Bug in set_effective_uid on AIX 4.1.5 /4.3.2 Samba 2.0.3

Kai Andersen andersen at dpd.de
Thu Mar 11 12:38:58 GMT 1999


Dirk Eller wrote:

> Dear samba-Team,
>
> The bug reported in PR#12819 for AXI 4.1.5 persits
> also in samba 2.0.3.
> The Bug prevents the connecting of other users as 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.3/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
> }

Thanks a lot, this fixed my problems. I hope this patch will be considered
in the next update.

Greeting,
Kai Andersen.




More information about the samba mailing list