diff options
author | Dima Dorfman <dd@FreeBSD.org> | 2001-08-30 06:32:17 +0000 |
---|---|---|
committer | Dima Dorfman <dd@FreeBSD.org> | 2001-08-30 06:32:17 +0000 |
commit | 9a02d1e0da0818375a208378d76d157c9c69b3a3 (patch) | |
tree | ca903f995e916a01b82356d89a006ea551f39c29 /pw | |
parent | 7c534f87ff6f1e00331c83ef766eb1c3c78883c3 (diff) | |
download | pw-darwin-9a02d1e0da0818375a208378d76d157c9c69b3a3.tar.gz pw-darwin-9a02d1e0da0818375a208378d76d157c9c69b3a3.tar.zst pw-darwin-9a02d1e0da0818375a208378d76d157c9c69b3a3.zip |
Unbreak group operations by reverting previous delta which removed the
assignment of `l' in `gr_update' to the return value of snprintf. It
claimed to have fixed the case where snprintf returned -1--in fact, it
broke the entire routine. Not setting `l' here causes fileupdate() to
invariably fail with EINVAL because it does its own check to assert
that the parameter isn't -1.
Diffstat (limited to 'pw')
-rw-r--r-- | pw/grupd.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -134,7 +134,7 @@ gr_update(struct group * grp, char const * group, int mode) char *grbuf = NULL; ENDGRENT(); - snprintf(pfx, sizeof pfx, "%s:", group); + l = snprintf(pfx, sizeof pfx, "%s:", group); /* * Update the group file |