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
05c2a6ff00
commit
b39783b6bc
@ -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