]> granicus.if.org Git - shadow/commitdiff
* src/login.c: Check that no username is specified with -r.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sat, 20 Sep 2008 20:00:51 +0000 (20:00 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sat, 20 Sep 2008 20:00:51 +0000 (20:00 +0000)
* src/login.c: Make sure a username is specified with -f.

ChangeLog
src/login.c

index 68be08003e7f35a5be0b85c18169ce4adc1a9e2c..97a5e4ff3b5db62908962e3d7111a9820649f862 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
index 60964d3dc1d23e13b0319d450cbd21680b75d8b0..5d31df0c1b8d4846df682ac22d7db174564cca26 100644 (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 ();
+       }
+
 }