aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/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
commit912e37823248cdc7f1e3aaff18327b771aa0d1bf (patch)
tree70534dd474502a14ab8409fa1f87a3b980cff62d /usr.sbin/pw
parent8dc27f5be59a4282d7e009adad9a351e3dcb8fbd (diff)
downloadsrc-912e37823248cdc7f1e3aaff18327b771aa0d1bf.tar.gz
src-912e37823248cdc7f1e3aaff18327b771aa0d1bf.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.
Notes
Notes: svn path=/head/; revision=82551
Diffstat (limited to 'usr.sbin/pw')
-rw-r--r--usr.sbin/pw/grupd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/pw/grupd.c b/usr.sbin/pw/grupd.c
index a2a028282c27..edff76d1285c 100644
--- a/usr.sbin/pw/grupd.c
+++ b/usr.sbin/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