uw-imap-imapd: suggestions for cyg_server issue

Shaddy Baddah helium@shaddybaddah.name
Thu Feb 11 22:40:00 GMT 2010


I have discovered that there is an issue with imapd when installed on
Vista/W7. When started through inetd, any imap connection is
preauthenticated onto the cyg_server account running the inetd Windows

I have traced the issue to the root uid emulation employed by the
Cygwin specific code, used to correct the Unix model of only uid 0
being privileged. It only performs the emulation if the SYSTEM user is
the process owner.

Cygwin uses cyg_server as a necessary alternative for all releases
Windows 2003 server onwards.

There are two solutions here. The first I consider a workaround. The
/usr/share/doc/Cygwin/uw-imap-2007.README could document that a user
could remap the uids of SYSTEM and cyg_server in /etc/passwd so that
cyg_server took SYSTEMS RID 18 as its uid.

The second is the patch (that can be applied to the cygport
./uw-imap-2007-2.cygport prepare 'ed source) I have attached. The
patch checks the gids for the process (using POSIX getgroups()) and
searches for the Administrators group RID 544. The attached patch
describes this non-direct approach to identifying cyg_server, and
avoiding preauth.

Your thoughts on this would be greatly appreciated.


PS: I segued onto this from my screen debugging because I remembered
this issue, and thought it might be related to any potential problem
with the Cygwin privilege model. Time permitting, I will be getting
back onto that problem (as it does block me from using screen

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cyg_server_for_imapd_patch.diff
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20100211/87e381f4/attachment.ksh>

More information about the Cygwin-apps mailing list