diff options
author | Roland McGrath <roland@gnu.org> | 2005-07-18 04:41:16 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2005-07-18 04:41:16 +0000 |
commit | 7a85da437bd49afd827c41474677c3904cf7ce3e (patch) | |
tree | 8ab56107960fcc0f3a2cf39f2eef07aadc180e1a /grp | |
parent | efe36102b1d423e82e94217e069460134cde5687 (diff) |
Updated to fedora-glibc-2_3-20050718T0425
Diffstat (limited to 'grp')
-rw-r--r-- | grp/putgrent.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/grp/putgrent.c b/grp/putgrent.c index cb9b6b1f79..8280b0cb2f 100644 --- a/grp/putgrent.c +++ b/grp/putgrent.c @@ -44,8 +44,13 @@ putgrent (gr, stream) flockfile (stream); - retval = fprintf (stream, "%s:%s:%u:", - gr->gr_name, _S (gr->gr_passwd), gr->gr_gid); + if (gr->gr_name[0] == '+' || gr->gr_name[0] == '-') + retval = fprintf (stream, "%s:%s::", + gr->gr_name, _S (gr->gr_passwd)); + else + retval = fprintf (stream, "%s:%s:%lu:", + gr->gr_name, _S (gr->gr_passwd), + (unsigned long int) gr->gr_gid); if (__builtin_expect (retval, 0) < 0) { funlockfile (stream); |