* lib/prototypes.h, libmisc/getgr_nam_gid.c: getgr_nam_gid()

returns an allocated structure.
This commit is contained in:
nekral-guest 2011-08-14 13:16:26 +00:00
parent 745bcb5406
commit 5f37d13405
3 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2011-08-14 Nicolas François <nicolas.francois@centraliens.net>
* lib/prototypes.h, libmisc/getgr_nam_gid.c: getgr_nam_gid()
returns an allocated structure.
2011-08-14 Nicolas François <nicolas.francois@centraliens.net>
* src/su.c: Add annotations to indicate that su_failure() does

View File

@ -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);

View File

@ -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;