Re: [Exim] odd UID lookup problem...

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Peter Galbavy
Datum:  
To: Peter Galbavy
CC: Philip Hazel, Nigel Metheringham, exim-users
Betreff: Re: [Exim] odd UID lookup problem...
On Fri, Sep 10, 1999 at 10:54:18AM +0100, Peter Galbavy wrote:
> Further testing shows that the system (getpwuid) is retruning EACCES
> when the program is setuid, but is OK when not. Mail sent to
> tech@??? to try to get some advice. More on this OS specific
> issue later...


This sounds like a setuid() issue with OpenBSD, but for reference, I
have got to this point:

Adding this:

if (getpwuid(real_uid) == NULL)
{
DEBUG(9) debug_printf("getpwuid failed: %s\n", strerror(errno));
}

before the "if (exim_uid_set)" line (src/exim.c:1940 odd) make
everything work, but removing it and putting it after the if block,
then fails again.

Examining the libc routines, and the interaction with YP leads me to
believe that within the getpwent.c file __initdb() is called first
time though, and caches the entry, but if this is not done while root,
the uid/euid combination seems to confuse the YP server, which only
serves the secure passwd map to priveledged users (low ports I guess).

So, this is not a directly exim problem, but it might be worth getting
into the mailing list archives in case a *BSD user sees something
similar.

I will now go and play with libc...

Regards,
--
Peter Galbavy
Knowledge Matters Ltd
http://www.knowledge.com/