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:
parent
8dc27f5be5
commit
912e378232
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user