My previous change to getgroups() broke the getgroups(0) special case,
which e.g. "awk" didn't like. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24691 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
71136ca48a
commit
9fe0705bee
@ -156,6 +156,10 @@ common_getgroups(int groupCount, gid_t* groupList, bool kernel)
|
|||||||
actualCount = 1;
|
actualCount = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if groupCount 0 is supplied, we only return the number of groups
|
||||||
|
if (groupCount == 0)
|
||||||
|
return actualCount;
|
||||||
|
|
||||||
// check for sufficient space
|
// check for sufficient space
|
||||||
if (groupCount < actualCount)
|
if (groupCount < actualCount)
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user