[Pkg-shadow-commits] r2777 - in upstream/trunk: . lib libmisc src
Nicolas FRANÇOIS
nekral-guest at alioth.debian.org
Thu Apr 23 17:43:27 UTC 2009
Author: nekral-guest
Date: 2009-04-23 17:43:27 +0000 (Thu, 23 Apr 2009)
New Revision: 2777
Modified:
upstream/trunk/ChangeLog
upstream/trunk/lib/groupmem.c
upstream/trunk/lib/prototypes.h
upstream/trunk/lib/pwauth.h
upstream/trunk/lib/pwmem.c
upstream/trunk/lib/shadowmem.c
upstream/trunk/libmisc/find_new_gid.c
upstream/trunk/libmisc/find_new_uid.c
upstream/trunk/libmisc/isexpired.c
upstream/trunk/src/groupadd.c
Log:
* libmisc/find_new_gid.c, libmisc/find_new_uid.c,
libmisc/isexpired.c, src/groupadd.c, lib/pwauth.h, lib/groupmem.c,
lib/shadowmem.c, lib/pwmem.c, lib/prototypes.h: Added splint
annotations.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2009-04-23 17:34:46 UTC (rev 2776)
+++ upstream/trunk/ChangeLog 2009-04-23 17:43:27 UTC (rev 2777)
@@ -1,5 +1,12 @@
2009-04-22 Nicolas François <nicolas.francois at centraliens.net>
+ * libmisc/find_new_gid.c, libmisc/find_new_uid.c,
+ libmisc/isexpired.c, src/groupadd.c, lib/pwauth.h, lib/groupmem.c,
+ lib/shadowmem.c, lib/pwmem.c, lib/prototypes.h: Added splint
+ annotations.
+
+2009-04-22 Nicolas François <nicolas.francois at centraliens.net>
+
* libmisc/loginprompt.c: Use exit(EXIT_FAILURE) instead of
exit(1).
* libmisc/loginprompt.c: Avoid implicit conversion of pointers to
Modified: upstream/trunk/lib/groupmem.c
===================================================================
--- upstream/trunk/lib/groupmem.c 2009-04-23 17:34:46 UTC (rev 2776)
+++ upstream/trunk/lib/groupmem.c 2009-04-23 17:43:27 UTC (rev 2777)
@@ -3,7 +3,7 @@
* Copyright (c) 1996 - 2000, Marek Michałkiewicz
* Copyright (c) 2001 , Michał Moskal
* Copyright (c) 2005 , Tomasz Kłoczko
- * Copyright (c) 2007 , Nicolas François
+ * Copyright (c) 2007 - 2009, Nicolas François
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,7 @@
#include "defines.h"
#include "groupio.h"
-struct group *__gr_dup (const struct group *grent)
+/*@null@*/ /*@only@*/struct group *__gr_dup (const struct group *grent)
{
struct group *gr;
int i;
@@ -75,7 +75,7 @@
return gr;
}
-void gr_free (struct group *grent)
+void gr_free (/*@out@*/ /*@only@*/struct group *grent)
{
free (grent->gr_name);
memzero (grent->gr_passwd, strlen (grent->gr_passwd));
Modified: upstream/trunk/lib/prototypes.h
===================================================================
--- upstream/trunk/lib/prototypes.h 2009-04-23 17:34:46 UTC (rev 2776)
+++ upstream/trunk/lib/prototypes.h 2009-04-23 17:43:27 UTC (rev 2777)
@@ -66,8 +66,9 @@
/* age.c */
extern void agecheck (/*@null@*/const struct spwd *);
-extern int expire (const struct passwd *, const struct spwd *);
-extern int isexpired (const struct passwd *, const struct spwd *);
+extern int expire (const struct passwd *, /*@null@*/const struct spwd *);
+/* isexpired.c */
+extern int isexpired (const struct passwd *, /*@null@*/const struct spwd *);
/* basename() renamed to Basename() to avoid libc name space confusion */
/* basename.c */
@@ -129,7 +130,7 @@
extern void pw_entry (const char *, struct passwd *);
/* env.c */
-extern void addenv (const char *, const char *);
+extern void addenv (const char *, /*@null@*/const char *);
extern void initenv (void);
extern void set_env (int, char *const *);
extern void sanitize_env (void);
@@ -139,10 +140,14 @@
extern int valid_field (const char *, const char *);
/* find_new_gid.c */
-extern int find_new_gid (bool sys_group, gid_t *gid, gid_t const *preferred_gid);
+extern int find_new_gid (bool sys_group,
+ gid_t *gid,
+ /*@null@*/gid_t const *preferred_gid);
/* find_new_uid.c */
-extern int find_new_uid (bool sys_user, uid_t *uid, uid_t const *preferred_uid);
+extern int find_new_uid (bool sys_user,
+ uid_t *uid,
+ /*@null@*/uid_t const *preferred_uid);
/* get_gid.c */
extern int get_gid (const char *gidstr, gid_t *gid);
Modified: upstream/trunk/lib/pwauth.h
===================================================================
--- upstream/trunk/lib/pwauth.h 2009-04-23 17:34:46 UTC (rev 2776)
+++ upstream/trunk/lib/pwauth.h 2009-04-23 17:43:27 UTC (rev 2777)
@@ -2,6 +2,7 @@
* Copyright (c) 1992 - 1993, Julianne Frances Haugh
* Copyright (c) 1996 - 1997, Marek Michałkiewicz
* Copyright (c) 2003 - 2005, Tomasz Kłoczko
+ * Copyright (c) 2009 , Nicolas François
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -34,7 +35,10 @@
*/
#ifndef USE_PAM
-int pw_auth (const char *cipher, const char *user, int flag, const char *input);
+int pw_auth (const char *cipher,
+ const char *user,
+ int flag,
+ /*@null@*/const char *input);
#endif /* !USE_PAM */
/*
Modified: upstream/trunk/lib/pwmem.c
===================================================================
--- upstream/trunk/lib/pwmem.c 2009-04-23 17:34:46 UTC (rev 2776)
+++ upstream/trunk/lib/pwmem.c 2009-04-23 17:43:27 UTC (rev 2777)
@@ -3,7 +3,7 @@
* Copyright (c) 1996 - 2000, Marek Michałkiewicz
* Copyright (c) 2001 , Michał Moskal
* Copyright (c) 2003 - 2005, Tomasz Kłoczko
- * Copyright (c) 2007 , Nicolas François
+ * Copyright (c) 2007 - 2009, Nicolas François
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -40,7 +40,7 @@
#include "prototypes.h"
#include "pwio.h"
-struct passwd *__pw_dup (const struct passwd *pwent)
+/*@null@*/ /*@only@*/struct passwd *__pw_dup (const struct passwd *pwent)
{
struct passwd *pw;
@@ -73,7 +73,7 @@
return pw;
}
-void pw_free (struct passwd *pwent)
+void pw_free (/*@out@*/ /*@only@*/struct passwd *pwent)
{
free (pwent->pw_name);
memzero (pwent->pw_passwd, strlen (pwent->pw_passwd));
Modified: upstream/trunk/lib/shadowmem.c
===================================================================
--- upstream/trunk/lib/shadowmem.c 2009-04-23 17:34:46 UTC (rev 2776)
+++ upstream/trunk/lib/shadowmem.c 2009-04-23 17:43:27 UTC (rev 2777)
@@ -3,7 +3,7 @@
* Copyright (c) 1996 - 2000, Marek Michałkiewicz
* Copyright (c) 2001 , Michał Moskal
* Copyright (c) 2005 , Tomasz Kłoczko
- * Copyright (c) 2007 - 2008, Nicolas François
+ * Copyright (c) 2007 - 2009, Nicolas François
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,7 @@
#include <stdio.h>
#include "shadowio.h"
-struct spwd *__spw_dup (const struct spwd *spent)
+/*@null@*/ /*@only@*/struct spwd *__spw_dup (const struct spwd *spent)
{
struct spwd *sp;
@@ -62,7 +62,7 @@
return sp;
}
-void spw_free (struct spwd *spent)
+void spw_free (/*@out@*/ /*@only@*/struct spwd *spent)
{
free (spent->sp_namp);
memzero (spent->sp_pwdp, strlen (spent->sp_pwdp));
Modified: upstream/trunk/libmisc/find_new_gid.c
===================================================================
--- upstream/trunk/libmisc/find_new_gid.c 2009-04-23 17:34:46 UTC (rev 2776)
+++ upstream/trunk/libmisc/find_new_gid.c 2009-04-23 17:43:27 UTC (rev 2777)
@@ -1,6 +1,6 @@
/*
* Copyright (c) 1991 - 1994, Julianne Frances Haugh
- * Copyright (c) 2008 , Nicolas François
+ * Copyright (c) 2008 - 2009, Nicolas François
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -47,7 +47,9 @@
*
* Return 0 on success, -1 if no unused GIDs are available.
*/
-int find_new_gid (bool sys_group, gid_t *gid, gid_t const *preferred_gid)
+int find_new_gid (bool sys_group,
+ gid_t *gid,
+ /*@null@*/gid_t const *preferred_gid)
{
const struct group *grp;
gid_t gid_min, gid_max, group_id;
Modified: upstream/trunk/libmisc/find_new_uid.c
===================================================================
--- upstream/trunk/libmisc/find_new_uid.c 2009-04-23 17:34:46 UTC (rev 2776)
+++ upstream/trunk/libmisc/find_new_uid.c 2009-04-23 17:43:27 UTC (rev 2777)
@@ -1,6 +1,6 @@
/*
* Copyright (c) 1991 - 1994, Julianne Frances Haugh
- * Copyright (c) 2008 , Nicolas François
+ * Copyright (c) 2008 - 2009, Nicolas François
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -47,7 +47,9 @@
*
* Return 0 on success, -1 if no unused UIDs are available.
*/
-int find_new_uid (bool sys_user, uid_t *uid, uid_t const *preferred_uid)
+int find_new_uid (bool sys_user,
+ uid_t *uid,
+ /*@null@*/uid_t const *preferred_uid)
{
const struct passwd *pwd;
uid_t uid_min, uid_max, user_id;
Modified: upstream/trunk/libmisc/isexpired.c
===================================================================
--- upstream/trunk/libmisc/isexpired.c 2009-04-23 17:34:46 UTC (rev 2776)
+++ upstream/trunk/libmisc/isexpired.c 2009-04-23 17:43:27 UTC (rev 2777)
@@ -2,7 +2,7 @@
* Copyright (c) 1989 - 1994, Julianne Frances Haugh
* Copyright (c) 1996 - 1997, Marek Michałkiewicz
* Copyright (c) 2001 - 2005, Tomasz Kłoczko
- * Copyright (c) 2008 , Nicolas François
+ * Copyright (c) 2008 - 2009, Nicolas François
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -59,7 +59,7 @@
* now disabled. (password cannot be changed)
* 3: The account has expired
*/
-int isexpired (const struct passwd *pw, const struct spwd *sp)
+int isexpired (const struct passwd *pw, /*@null@*/const struct spwd *sp)
{
long now;
Modified: upstream/trunk/src/groupadd.c
===================================================================
--- upstream/trunk/src/groupadd.c 2009-04-23 17:34:46 UTC (rev 2776)
+++ upstream/trunk/src/groupadd.c 2009-04-23 17:43:27 UTC (rev 2777)
@@ -72,10 +72,10 @@
*/
char *Prog;
-static char *group_name;
+static /*@null@*/char *group_name;
static gid_t group_id;
-static char *group_passwd;
-static char *empty_list = NULL;
+static /*@null@*/char *group_passwd;
+static /*@null@*/char *empty_list = NULL;
static bool oflg = false; /* permit non-unique group ID to be specified with -g */
static bool gflg = false; /* ID value for the new group */
@@ -605,6 +605,6 @@
nscd_flush_cache ("group");
exit (E_SUCCESS);
- /* NOT REACHED */
+ /*@notreached@*/
}
More information about the Pkg-shadow-commits
mailing list