This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: Corinna or Pierre please comment? [jason@tishler.net: Re: setuid
- From: Corinna Vinschen <cygwin-patches at cygwin dot com>
- To: cygpatch <cygwin-patches at cygwin dot com>
- Date: Fri, 19 Jul 2002 10:23:28 +0200
- Subject: Re: Corinna or Pierre please comment? [jason@tishler.net: Re: setuid
- References: <3.0.5.32.20020718211250.0080a5e0@mail.attbi.com>
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.