delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/11/12/19:43:23

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <55128.213.193.229.10.1226536923.squirrel@intmail.priorweb.be>
Date: Thu, 13 Nov 2008 01:42:03 +0100 (CET)
Subject: 1.5.25: setuid(uid) takes 5 sec on Windows XP SP2 for a domain user
From: "M. Peeters" <peeters-ml1 AT noekeon DOT org>
To: cygwin AT cygwin DOT com
Reply-To: peeters-ml1 AT noekeon DOT org
User-Agent: SquirrelMail/1.4.10a
MIME-Version: 1.0
X-Spam-Scanned: -3.3
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Hello,

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-42-{
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,
Michaël




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019