[Pkg-shadow-commits] r2318 - in upstream/trunk: . src

nekral-guest at alioth.debian.org nekral-guest at alioth.debian.org
Sun Aug 31 17:28:31 UTC 2008


Author: nekral-guest
Date: 2008-08-31 17:28:30 +0000 (Sun, 31 Aug 2008)
New Revision: 2318

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/src/logoutd.c
Log:
	* src/logoutd.c: Fail if
	unexpected parameters are provided.

Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2008-08-31 17:28:21 UTC (rev 2317)
+++ upstream/trunk/ChangeLog	2008-08-31 17:28:30 UTC (rev 2318)
@@ -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.
 

Modified: upstream/trunk/src/logoutd.c
===================================================================
--- upstream/trunk/src/logoutd.c	2008-08-31 17:28:21 UTC (rev 2317)
+++ upstream/trunk/src/logoutd.c	2008-08-31 17:28:30 UTC (rev 2318)
@@ -53,11 +53,13 @@
 #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 @@
 	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);




More information about the Pkg-shadow-commits mailing list