summaryrefslogtreecommitdiffstats
path: root/pw
diff options
context:
space:
mode:
authorDima Dorfman <dd@FreeBSD.org>2001-08-30 06:32:17 +0000
committerDima Dorfman <dd@FreeBSD.org>2001-08-30 06:32:17 +0000
commit9a02d1e0da0818375a208378d76d157c9c69b3a3 (patch)
treeca903f995e916a01b82356d89a006ea551f39c29 /pw
parent7c534f87ff6f1e00331c83ef766eb1c3c78883c3 (diff)
downloadpw-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pw/grupd.c b/pw/grupd.c
index a2a0282..edff76d 100644
--- a/pw/grupd.c
+++ b/pw/grupd.c
@@ -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