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

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Wed Apr 22 20:53:15 UTC 2009


Author: nekral-guest
Date: 2009-04-22 20:53:15 +0000 (Wed, 22 Apr 2009)
New Revision: 2752

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/src/login.c
Log:
	* src/login.c: Added splint annotations.


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2009-04-22 20:51:13 UTC (rev 2751)
+++ upstream/trunk/ChangeLog	2009-04-22 20:53:15 UTC (rev 2752)
@@ -2,6 +2,7 @@
 
 	* src/login.c: Added assert()s for NULL (or ! NULL) username, and
 	pwd. This helps splint.
+	* src/login.c: Added splint annotations.
 
 2009-04-22  Nicolas François  <nicolas.francois at centraliens.net>
 

Modified: upstream/trunk/src/login.c
===================================================================
--- upstream/trunk/src/login.c	2009-04-22 20:51:13 UTC (rev 2751)
+++ upstream/trunk/src/login.c	2009-04-22 20:53:15 UTC (rev 2752)
@@ -83,7 +83,7 @@
 char *Prog;
 
 static const char *hostname = "";
-static char *username = NULL;
+static /*@null@*/ /*@only@*/char *username = NULL;
 static int reason = PW_LOGIN;
 
 #ifndef USE_PAM
@@ -122,8 +122,8 @@
 /* local function prototypes */
 static void usage (void);
 static void setup_tty (void);
-static void process_flags (int, char *const *);
-static const char *get_failent_user (const char *user);
+static void process_flags (int argc, char *const *argv);
+static const char *get_failent_user (/*@returned@*/const char *user);
 static void update_utmp (const char *username,
                          const char *tty,
                          const char *hostname,
@@ -454,7 +454,7 @@
  * It is quite common to mistyped the password for username, and passwords
  * should not be logged.
  */
-static const char *get_failent_user (const char *user)
+static const char *get_failent_user (/*@returned@*/const char *user)
 {
 	const char *failent_user = "UNKNOWN";
 	bool log_unkfail_enab = getdef_bool("LOG_UNKFAIL_ENAB");
@@ -537,7 +537,7 @@
 	struct passwd *pwd = NULL;
 	char **envp = environ;
 	const char *failent_user;
-	struct utmp *utent;
+	/*@null@*/struct utmp *utent;
 
 #ifdef USE_PAM
 	int retcode;




More information about the Pkg-shadow-commits mailing list