getgroups() and getgroups32() returns NGROUPS_MAX when both its two args are
zero. But because we pass a ptr to allocated space as 2nd arg, this function
are interfered. The patch attached fixed it.
/yoshii
---
linux-user/syscall.c: fix getgroups{,32} when both args are zero.
diff --git a/linu
On [Sat, 23.02.2008 12:00], Takashi Yoshii wrote:
> getgroups() and getgroups32() returns NGROUPS_MAX when both its two args are
> zero. But because we pass a ptr to allocated space as 2nd arg, this function
> are interfered. The patch attached fixed it.
> /yoshii
> ---
> linux-user/syscall.c:
Hi,
> My version of patch to fix same problem:
Oh, yes. You are right.
I have read manpage again, and I found it says,
if size is zero, list is not modified, but ...
So, mine is wrong. We should check only "size".
/yoshii
On [Sat, 23.02.2008 09:25], Kirill A. Shutemov wrote:
> On [Sat, 23.02.2008 12:00], Takashi Yoshii wrote:
> > getgroups() and getgroups32() returns NGROUPS_MAX when both its two args are
> > zero. But because we pass a ptr to allocated space as 2nd arg, this function
> > are interfered. The patch a