This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Corinna or Pierre please comment? [jason@tishler.net: Re: setuid


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]