* src/login.c: Check that no username is specified with -r.

* src/login.c: Make sure a username is specified with -f.
This commit is contained in:
nekral-guest 2008-09-20 20:00:51 +00:00
parent c813e692a2
commit 29d4533047
2 changed files with 11 additions and 0 deletions

View File

@ -4,6 +4,8 @@
* src/login.c: Copy the name of the user authenticated by PAM to
username. This simplify later logging (avoid USE_PAM
conditional).
* src/login.c: Check that no username is specified with -r.
* src/login.c: Make sure a username is specified with -f.
2008-09-20 Nicolas François <nicolas.francois@centraliens.net>

View File

@ -339,6 +339,15 @@ static void process_flags (int argc, char *const *argv)
++optind;
}
#ifdef RLOGIN
if (rflg && (NULL != username)) {
usage ();
}
#endif /* RLOGIN */
if (fflg && (NULL == username)) {
usage ();
}
}