Mercurial > dovecot > original-hg > dovecot-1.2
changeset 800:db1608b43054 HEAD
Don't bother trying to use setreuid(), setuid() check should be enough and
openbsd complains about it being deprecated.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 18 Dec 2002 04:23:13 +0200 |
parents | 41dde6822eea |
children | 86224ff16bf6 |
files | configure.in src/lib/restrict-access.c |
diffstat | 2 files changed, 1 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.in Wed Dec 18 03:52:14 2002 +0200 +++ b/configure.in Wed Dec 18 04:23:13 2002 +0200 @@ -165,7 +165,7 @@ fi dnl * after -lsocket and -lnsl tests, inet_aton() may be in them -AC_CHECK_FUNCS(fcntl flock inet_aton sigaction getpagesize madvise setreuid \ +AC_CHECK_FUNCS(fcntl flock inet_aton sigaction getpagesize madvise \ strcasecmp stricmp vsnprintf memmove vsyslog writev setrlimit \ setproctitle)
--- a/src/lib/restrict-access.c Wed Dec 18 03:52:14 2002 +0200 +++ b/src/lib/restrict-access.c Wed Dec 18 04:23:13 2002 +0200 @@ -91,11 +91,7 @@ i_fatal("setuid(%ld) failed: %m", (long) uid); /* just extra verification */ -#ifdef HAVE_SETREUID - if (setreuid((uid_t)-1, 0) == 0) -#else if (setuid(0) == 0) -#endif i_fatal("We couldn't drop root privileges"); } }