diff options
author | dd <dd@FreeBSD.org> | 2001-08-30 06:32:17 +0000 |
---|---|---|
committer | dd <dd@FreeBSD.org> | 2001-08-30 06:32:17 +0000 |
commit | b9e2a3df4bc480b82f9905e677d60881a35dac36 (patch) | |
tree | 70534dd474502a14ab8409fa1f87a3b980cff62d | |
parent | d08cdff0421c16249eac5ae0ffc738eaf24d84d5 (diff) | |
download | FreeBSD-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.
-rw-r--r-- | usr.sbin/pw/grupd.c | 2 |
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 |