setuid()/setreuid() in mcserv.c
Mon Feb 1 01:45:08 1999 Timur I. Bakeyev <mc@bat.ru> * mcserv.c: If setuid() is avaliable, use it, even, streuid() also present. (BTW, bsdi uses it's own auth system..)
Этот коммит содержится в:
родитель
351aa95e12
Коммит
4dce2ac60a
@ -1,3 +1,8 @@
|
|||||||
|
Mon Feb 1 01:45:08 1999 Timur I. Bakeyev <mc@bat.ru>
|
||||||
|
|
||||||
|
* mcserv.c: If setuid() is avaliable, use it, even, streuid() also
|
||||||
|
present. (BTW, bsdi uses it's own auth system..)
|
||||||
|
|
||||||
Sun Jan 31 20:51:17 1999 Alexander Savelyev <fano@vcom.kiev.ua>
|
Sun Jan 31 20:51:17 1999 Alexander Savelyev <fano@vcom.kiev.ua>
|
||||||
|
|
||||||
* mcserv.c (do_auth): mcserv never auth properly on bsdi.
|
* mcserv.c (do_auth): mcserv never auth properly on bsdi.
|
||||||
|
@ -912,12 +912,13 @@ do_auth (char *username, char *password)
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(BSD) || defined(__bsdi__)
|
#if defined (HAVE_SETUID)
|
||||||
if (setuid (this->pw_uid))
|
if (setuid (this->pw_uid))
|
||||||
#else
|
|
||||||
if (setreuid (this->pw_uid, this->pw_uid))
|
|
||||||
#endif
|
|
||||||
return 0;
|
return 0;
|
||||||
|
#elif defined (HAVE_SETREUID)
|
||||||
|
if (setreuid (this->pw_uid, this->pw_uid))
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* If the setuid call failed, then deny access */
|
/* If the setuid call failed, then deny access */
|
||||||
/* This should fix the problem on those machines with strange setups */
|
/* This should fix the problem on those machines with strange setups */
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user