* syscalls.cc (setegid32): Verify the correctness of the gid
of the group returned by getgrgid32.
This commit is contained in:
parent
1eb934b7c5
commit
656c31920b
|
@ -1,3 +1,8 @@
|
||||||
|
2002-06-03 Pierre Humblet <pierre.humblet@ieee.org>
|
||||||
|
|
||||||
|
* syscalls.cc (setegid32): Verify the correctness of the gid
|
||||||
|
of the group returned by getgrgid32.
|
||||||
|
|
||||||
2002-06-03 Pierre Humblet <pierre.humblet@ieee.org>
|
2002-06-03 Pierre Humblet <pierre.humblet@ieee.org>
|
||||||
|
|
||||||
* security.cc (lsa2wchar): Suppressed.
|
* security.cc (lsa2wchar): Suppressed.
|
||||||
|
|
|
@ -2175,7 +2175,8 @@ setegid32 (__gid32_t gid)
|
||||||
cygsid gsid;
|
cygsid gsid;
|
||||||
HANDLE ptok;
|
HANDLE ptok;
|
||||||
|
|
||||||
if (!(gsid.getfromgr (getgrgid32 (gid))))
|
struct __group32 * gr = getgrgid32 (gid);
|
||||||
|
if (!gr || gr->gr_gid != gid || !gsid.getfromgr (gr))
|
||||||
{
|
{
|
||||||
set_errno (EINVAL);
|
set_errno (EINVAL);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in New Issue