From 9a02d1e0da0818375a208378d76d157c9c69b3a3 Mon Sep 17 00:00:00 2001 From: Dima Dorfman Date: Thu, 30 Aug 2001 06:32:17 +0000 Subject: 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. --- pw/grupd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pw') diff --git a/pw/grupd.c b/pw/grupd.c index a2a0282..edff76d 100644 --- a/pw/grupd.c +++ b/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 -- cgit v1.2.3-56-ge451