uw-imap-imapd: suggestions for cyg_server issue
Shaddy Baddah
helium@shaddybaddah.name
Sat Feb 13 11:37:00 GMT 2010
Hi,
On 12/02/2010 11:49 AM, Corinna Vinschen wrote:
> On Feb 11 23:11, Shaddy Baddah wrote:
>> Hi Pierre,
>>
>> On 11/02/2010 10:39 PM, Pierre A. Humblet wrote:
>>> The problem you will run into is that 544 can be changed (e.g. to 0).
>>> It's better to do it learn it dynamically.
>>> The following is from the cron package source code.
>> <snip>
>>
>> Thanks for that. Yes, I have a similar patch I made in my experimental
>> branch. I make one, IMO, slightly stronger assumption (than having a
>> fixed RID) that enables the check to be all POSIX.
>>
>> I assume that the correct SID is always in the password field for both
>> passwd and group. I then search for these files for the SIDs of SYSTEM
>> user and Administrators group. The checks from there are the same.
>
> Alternatively:
>
> getgroups();
> for all gids
> gr = getgrgid();
> if (!strcasecmp (gr->gr_passwd, "S-1-32-544"))
> return is_admin;
> return non_admin;
Doh! Why didn't I think of that. That would of course be easier. Does
the underlying implementation of getgrgid() scan through
/etc/group. If not, then this would also have been quicker.
In anycase, I await a response from the uw-imap maintainer for Cygwin,
Dr. Volker Zell before I do anything more. The patch I made is at
least enough to get me going with imapd.
Best regards,
Shaddy
More information about the Cygwin-apps
mailing list