Corinna or Pierre please comment? [jason@tishler.net: Re: setuid
Corinna Vinschen
cygwin-patches@cygwin.com
Fri Jul 19 01:23:00 GMT 2002
On Thu, Jul 18, 2002 at 09:12:50PM -0400, Pierre A. Humblet wrote:
> Corinna,
>
> Here is the patch.
Thanks but I don't see why you removed the call to get_user_primary_group().
You now rely fully on /etc/passwd and /etc/group containing the correct
information. Before, prgpsid has been set to a value if it was NULL, now
it's only used for checking. This would result in
pgrp.PrimaryGroup = NULL;
in the calling create_token() function. Which probably results in
a failing NtCreateToken() function.
Another question. Shouldn't this in create_token
psa = __sec_user (sa_buf, usersid, TRUE);
if (psa->lpSecurityDescriptor &&
!SetSecurityDescriptorGroup (
(PSECURITY_DESCRIPTOR) psa->lpSecurityDescriptor,
special_pgrp ? pgrpsid : well_known_null_sid, FALSE))
^^^^^^^^^^^^
better be change to
psa = __sec_user (sa_buf, usersid, TRUE);
if (psa->lpSecurityDescriptor &&
!SetSecurityDescriptorGroup (
(PSECURITY_DESCRIPTOR) psa->lpSecurityDescriptor,
pgrpsid ? pgrpsid : well_known_null_sid, FALSE))
^^^^^^^
?
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Developer mailto:cygwin@cygwin.com
Red Hat, Inc.
More information about the Cygwin-patches
mailing list