summaryrefslogtreecommitdiffhomepage
path: root/libpwdgrp
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2015-01-03 21:16:18 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2015-01-03 21:16:18 +0100
commit12fc86956057ac3e679dd276ba3897260b95157e (patch)
treec391706e6afa4f3c9c53f85d00d99b3d542d5bc4 /libpwdgrp
parent402451aa19521908125c9aeeb52e91fd4032948b (diff)
libpwdgrp: getgrXXX: empty string is not a member name, do not store it
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libpwdgrp')
-rw-r--r--libpwdgrp/pwd_grp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libpwdgrp/pwd_grp.c b/libpwdgrp/pwd_grp.c
index 2392e7d22..65fd5261d 100644
--- a/libpwdgrp/pwd_grp.c
+++ b/libpwdgrp/pwd_grp.c
@@ -297,7 +297,10 @@ static void *convert_to_struct(struct passdb *db,
((struct group *)result)->gr_mem = members;
while (--i >= 0) {
- *members++ = buffer;
+ if (buffer[0]) {
+ *members++ = buffer;
+ // bb_error_msg("member[]='%s'", buffer);
+ }
buffer += strlen(buffer) + 1;
}
*members = NULL;