Major Bug in Samba 2.0.4b with AIX 4.x

eller at tzd.telekom.de eller at tzd.telekom.de
Wed May 26 15:40:52 GMT 1999


Dear samba-Team,

There is a bug in Samba 2.0.3 and 2.0.4b with IBM AXI 4.x.
The Bug prevents connecting of other users than root to any
share.

I have a workaround/fix tested on AIX 4.1.5 ,4.3.2 with
gcc 2.8.1 here:

Change samba-2.0.4b/source/lib/util_sec.c 
funktion set_effective_uid like this:

155c155
< #elif defined(HAVE_SETREUID)
---
> #elif defined(HAVE_SETREUID) && !defined(AIX) 

#############################^^^^^^^^^^^^^^^^^
to
int set_effective_uid(uid_t uid)
{
#if defined(HAVE_TRAPDOOR_UID)
        return trapdoor_set_effective_uid(uid);
#elif defined(HAVE_SETRESUID)
    return setresuid(-1,uid,-1);
#elif defined(HAVE_SETREUID) && !defined(AIX)
        return setreuid(-1,uid);
#else
    if ((seteuid(uid) != 0) && (setuid(uid) != 0))
                return -1;
        return 0;
#endif
}

I noted no side effects on my system.
Best regards
Dirk Eller


WANmaster TZ, Postmaster TZ
...T.....................................................................
Dirk Eller Abt. EK11-5                eMail    :  eller at tzd.telekom.de
Deutsche Telekom AG                   Phone    :  +49 - 61 51 - 83 35 88
Technologiezentrum Darmstadt          FAX      :  +49 - 61 51 - 83 45 92
Adr.:  Am Kavalleriesand 3; D-64295 Darmstadt
...T.....................................................................
Everything written is MY opinion only, not the one of my company or
employer unless otherwise noted
...T.....................................................................


More information about the samba mailing list