Re: effective user

From: Tamas Szalay <[email protected]>
Date: Wed, 26 Nov 1997 15:18:57 +0100 (MET)

On Tue, 25 Nov 1997, Benjamin Michael VanWagner wrote:

> so is there a place i can set the effective user in the source code

On one of my AIX 3.2.5 boxes I faced with the same problem. As I figured
out, seteuid() isn't work correctly, but setuid() does. If you have the
same problem with your Red Hat, in $(SRCDIR)/src/tools.c file look for the
following code part:

#if HAVE_SETRESUID
    if (setresuid(pwd->pw_uid, pwd->pw_uid, 0) < 0)
        debug(50, 1, "leave_suid: setresuid: %s\n", xstrerror());
#elif HAVE_SETEUID
    if (seteuid(pwd->pw_uid) < 0)
        debug(50, 1, "leave_suid: seteuid: %s\n", xstrerror());
#else
    if (setuid(pwd->pw_uid) < 0)
        debug(50, 1, "leave_suid: setuid: %s\n", xstrerror());
#endif

I don't know which of the above functions are implemented in Red Hat to
change uid and gid. Maybe, you can try another instead of the preferred
one.

I hope it helps,

Tamas
Received on Wed Nov 26 1997 - 06:28:28 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:37:44 MST