summaryrefslogtreecommitdiffstats
path: root/pw/grupd.c
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
commitca4b6dda1fbeb479c8d295f08d023feda7f94bf6 (patch)
treebe25a223f2b464269e77a3a6187a49a5bef584c4 /pw/grupd.c
parentde8b84558a19f34bd4b34c38662d0deb799d6a71 (diff)
downloadpw-darwin-ca4b6dda1fbeb479c8d295f08d023feda7f94bf6.tar.gz
pw-darwin-ca4b6dda1fbeb479c8d295f08d023feda7f94bf6.tar.zst
pw-darwin-ca4b6dda1fbeb479c8d295f08d023feda7f94bf6.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/grupd.c')
-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