summaryrefslogtreecommitdiff
path: root/simplebl.c
diff options
context:
space:
mode:
Diffstat (limited to 'simplebl.c')
-rw-r--r--simplebl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/simplebl.c b/simplebl.c
index 2890bd2..de80227 100644
--- a/simplebl.c
+++ b/simplebl.c
@@ -105,6 +105,8 @@ check_group(void)
glist_size = getgroups(0, NULL);
if (errno)
die("getgroups: %s\n", strerror(errno));
+ if (!glist_size)
+ die("getgroups: User has no supplementary groups\n");
glist = calloc(glist_size, sizeof(*glist));
if (!glist)
die("check_group: Out of memory\n");