From 5f37d13405ccfe5faf5b6f834a0b926826d76edd Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Sun, 14 Aug 2011 13:16:26 +0000 Subject: [PATCH] * lib/prototypes.h, libmisc/getgr_nam_gid.c: getgr_nam_gid() returns an allocated structure. --- ChangeLog | 5 +++++ lib/prototypes.h | 2 +- libmisc/getgr_nam_gid.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0029c93b..362947a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-08-14 Nicolas François + + * lib/prototypes.h, libmisc/getgr_nam_gid.c: getgr_nam_gid() + returns an allocated structure. + 2011-08-14 Nicolas François * src/su.c: Add annotations to indicate that su_failure() does diff --git a/lib/prototypes.h b/lib/prototypes.h index 344d30fd..86029694 100644 --- a/lib/prototypes.h +++ b/lib/prototypes.h @@ -157,7 +157,7 @@ extern int find_new_uid (bool sys_user, extern int get_gid (const char *gidstr, gid_t *gid); /* getgr_nam_gid.c */ -extern /*@null@*/struct group *getgr_nam_gid (/*@null@*/const char *grname); +extern /*@only@*//*@null@*/struct group *getgr_nam_gid (/*@null@*/const char *grname); /* getlong.c */ extern int getlong (const char *numstr, /*@out@*/long int *result); diff --git a/libmisc/getgr_nam_gid.c b/libmisc/getgr_nam_gid.c index b2556c41..027280a5 100644 --- a/libmisc/getgr_nam_gid.c +++ b/libmisc/getgr_nam_gid.c @@ -44,7 +44,7 @@ * The string may be a valid GID or a valid groupname. * If the group does not exist on the system, NULL is returned. */ -extern /*@null@*/struct group *getgr_nam_gid (/*@null@*/const char *grname) +extern /*@only@*//*@null@*/struct group *getgr_nam_gid (/*@null@*/const char *grname) { long long int gid; char *endptr;