This is the mail archive of the cygwin-apps@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: ntsec patch for setup


At 06:25 PM 1/19/2003 -0000, Max Bowsher wrote:
>Pierre A. Humblet wrote:
>It would probably be nice to add some logging to the success case, so its
>easier to see that it has actually taken effect.

OK. Good idea. I don't mind doing it but you know better
what formats to use etc.. to fit with the rest. Let me
know how you want to proceed.

>I don't understand this code:
>+  isadmins = isadmins || EqualSid(groups->Groups[pg].Sid, asid);
>+  isusers = isusers || EqualSid(groups->Groups[pg].Sid, usid);
>
>If I'm reading it right, isadmins and isusers were initialized as false
>several lines above, and not touched since - so why not a direct assignment?

That's in the pg loop. So the effect is to set isadmins or isusers
to true if the admins or users sids are found anywhere in the token 
groups. A direct assignment would in effect only consider the last
sid in the groups array.

Pierre


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