ntsec patch for setup
Max Bowsher
maxb@ukf.net
Sun Jan 19 22:25:00 GMT 2003
Pierre A. Humblet wrote:
> 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.
Formats? What formats? :-) Setup has already has some badly punctuated /
badly spelt log strings. Anyway, I'd suggest something like this:
if (isusers)
{
nsid = usid;
log(LOG_TIMESTAMP) << "Changing gid to Users" << endLog;
}
else if (isadmins)
nsid = asid;
log(LOG_TIMESTAMP) << "Changing gid to Administrators" << endLog;
}
>> 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.
*I must pay more attention!*
Max.
More information about the Cygwin-apps
mailing list