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.
This commit is contained in:
Dima Dorfman 2001-08-30 06:32:17 +00:00
parent 8dc27f5be5
commit 912e378232

View File

@ -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