* uinfo.cc (internal_getlogin): Only update user.groups.pgsid
if the call to set the primary group succeeds.
This commit is contained in:
parent
0e7a60fef9
commit
7b2ce66370
|
@ -1,3 +1,8 @@
|
||||||
|
2003-02-27 Pierre Humblet <pierre.humblet@ieee.org>
|
||||||
|
|
||||||
|
* uinfo.cc (internal_getlogin): Only update user.groups.pgsid
|
||||||
|
if the call to set the primary group succeeds.
|
||||||
|
|
||||||
2003-02-27 Christopher Faylor <cgf@redhat.com>
|
2003-02-27 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* cygthread::detach: Improve error message.
|
* cygthread::detach: Improve error message.
|
||||||
|
|
|
@ -83,10 +83,11 @@ internal_getlogin (cygheap_user &user)
|
||||||
if (gsid.getfromgr (internal_getgrgid (pw->pw_gid)))
|
if (gsid.getfromgr (internal_getgrgid (pw->pw_gid)))
|
||||||
{
|
{
|
||||||
/* Set primary group to the group in /etc/passwd. */
|
/* Set primary group to the group in /etc/passwd. */
|
||||||
user.groups.pgsid = gsid;
|
|
||||||
if (!SetTokenInformation (ptok, TokenPrimaryGroup,
|
if (!SetTokenInformation (ptok, TokenPrimaryGroup,
|
||||||
&gsid, sizeof gsid))
|
&gsid, sizeof gsid))
|
||||||
debug_printf ("SetTokenInformation(TokenPrimaryGroup): %E");
|
debug_printf ("SetTokenInformation(TokenPrimaryGroup): %E");
|
||||||
|
else
|
||||||
|
user.groups.pgsid = gsid;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
debug_printf ("gsid not found in augmented /etc/group");
|
debug_printf ("gsid not found in augmented /etc/group");
|
||||||
|
|
Loading…
Reference in New Issue