This is the mail archive of the cygwin 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]

1.5.25: setuid(uid) takes 5 sec on Windows XP SP2 for a domain user


I'm installing courier-imap 4.4.1 + courier-authlib 0.61.0 on Cygwin
1.5.25. Everything goes fine, except that I noticed that LOGIN command in
IMAP server takes 5 sec when logging in as a domain user AND when domain
server *IS NOT* available, whereas it is instantaneous when logging as a
local user.

$ telnet localhost 143
  001 login a_local_user password
  001 OK LOGIN Ok.               <-- immediate reply

$ telnet localhost 143
  001 login a_domain_user password
  001 OK LOGIN Ok.               <-- Reply after 5 sec

I dug into courier-imap/authlib code, and I've located the guilty
instruction. It's a call to setuid(uid) in function libmail_changeuidgid()
of file numlib/changeuidgid.c (package courier-authlib).

changeuidgid.c-41-void libmail_changeuidgid(uid_t uid, gid_t gid)
changeuidgid.c-43-      libmail_changegroup(gid);
changeuidgid.c:44:      if ( setuid(uid))                  <== GUILTY ONE!
changeuidgid.c-45-      {

The problem only occurs when the NT Domain Server *IS NOT* available /
Laptop not connected to the domain network. So this might be due to a
stupid check a-la-windows, like hanging because printer not available,
etc. But I have actually no clue.

An easy fix would be of course to only use local users, but this is not a
very confortable solution. So any help on how to avoid this 5 sec time-out
would be very much appreciated.

Best regards,

Unsubscribe info:
Problem reports:

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