]> granicus.if.org Git - shadow/commitdiff
* src/logoutd.c: Fail if
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 31 Aug 2008 17:28:30 +0000 (17:28 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 31 Aug 2008 17:28:30 +0000 (17:28 +0000)
unexpected parameters are provided.

ChangeLog
src/logoutd.c

index 637b04e9103f511893e45ac25982d38b2f2d0e31..8ffceab16d3a2b649aa60fef587b1c76bbf967bd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,8 +2,8 @@
 
        * src/grpconv.c, src/groups.c: Name the parameters in the
        prototypes of the static functions.
-       * src/grpconv.c, src/grpunconv.c: Fail if unexpected parameters
-       are provided.
+       * src/grpconv.c, src/grpunconv.c, src/logoutd.c: Fail if
+       unexpected parameters are provided.
        * src/grpconv.c, src/grpunconv.c: Indicate that argc is not used
        in the no SHADOWGRP version.
 
index 6f964280eaafb42c5ad26ba3497dfbe73a538a7f..078109f44cb9c231b297b0a1bfda313bc450b4b0 100644 (file)
@@ -53,11 +53,13 @@ static char *Prog;
 #define HUP_MESG_FILE "/etc/logoutd.mesg"
 #endif
 
+/* local function prototypes */
 #if HAVE_UTMPX_H
-static int check_login (const struct utmpx *);
+static int check_login (const struct utmpx *ut);
 #else
-static int check_login (const struct utmp *);
+static int check_login (const struct utmp *ut);
 #endif
+static void send_mesg_to_tty (int tty_fd);
 
 /*
  * check_login - check if user (struct utmpx/utmp) allowed to stay logged in
@@ -154,6 +156,10 @@ int main (int argc, char **argv)
        char tty_name[sizeof (ut->ut_line) + 6];        /* /dev/ + NUL */
        int tty_fd;
 
+       if (1 != argc) {
+               (void) fputs (_("Usage: logoutd\n"), stderr);
+       }
+
        (void) setlocale (LC_ALL, "");
        (void) bindtextdomain (PACKAGE, LOCALEDIR);
        (void) textdomain (PACKAGE);