[Qemu-devel] [PATCH] linux-user, fix getgroups/getgroups32 when both args are zero.

2008-02-22 Thread Takashi Yoshii
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

Re: [Qemu-devel] [PATCH] linux-user, fix getgroups/getgroups32 when both args are zero.

2008-02-22 Thread Kirill A. Shutemov
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:

Re: [Qemu-devel] [PATCH] linux-user, fix getgroups/getgroups32 when both args are zero.

2008-02-23 Thread Takashi Yoshii
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

Re: [Qemu-devel] [PATCH] linux-user, fix getgroups/getgroups32 when both args are zero.

2008-02-26 Thread Kirill A. Shutemov
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