projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
18bca57
)
fix initgroups (uninitialized count passed to getgrouplist)
author
Rich Felker
<dalias@aerifal.cx>
Wed, 20 Apr 2011 23:15:27 +0000
(19:15 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Wed, 20 Apr 2011 23:15:27 +0000
(19:15 -0400)
src/linux/initgroups.c
patch
|
blob
|
history
diff --git
a/src/linux/initgroups.c
b/src/linux/initgroups.c
index ef9bc10a3a8bb732dfe14dd3415427331032aee8..545d1859734493b92752ec7a49c09e56f9b6f0f5 100644
(file)
--- a/
src/linux/initgroups.c
+++ b/
src/linux/initgroups.c
@@
-9,7
+9,7
@@
int setgroups(size_t, const gid_t *);
int initgroups(const char *user, gid_t gid)
{
gid_t groups[NGROUPS_MAX];
- int count;
+ int count
= NGROUPS_MAX
;
if (getgrouplist(user, gid, groups, &count) < 0) return -1;
return setgroups(count, groups);
}