diff --git a/src/bin/copy.c b/src/bin/copy.c index 680d0a70..6e54b079 100644 --- a/src/bin/copy.c +++ b/src/bin/copy.c @@ -114,8 +114,7 @@ static gid_t in_group(const char *user, const char *fn, gid_t *gid) if (stat(dir, &st)) return 0; - getgrouplist(user, pw->pw_gid, NULL, &num); - + num = NGROUPS_MAX; groups = malloc(num * sizeof(gid_t)); if (!groups) { perror("in_group() malloc");