summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pw
diff options
context:
space:
mode:
authordd <dd@FreeBSD.org>2001-08-30 06:32:17 +0000
committerdd <dd@FreeBSD.org>2001-08-30 06:32:17 +0000
commitb9e2a3df4bc480b82f9905e677d60881a35dac36 (patch)
tree70534dd474502a14ab8409fa1f87a3b980cff62d /usr.sbin/pw
parentd08cdff0421c16249eac5ae0ffc738eaf24d84d5 (diff)
downloadFreeBSD-src-b9e2a3df4bc480b82f9905e677d60881a35dac36.zip
FreeBSD-src-b9e2a3df4bc480b82f9905e677d60881a35dac36.tar.gz
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 '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 a2a0282..edff76d 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
OpenPOWER on IntegriCloud