From d5a6ce8ca124d1eea343314b23110e006eb313d5 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sun, 16 Dec 2012 22:05:49 +1000 Subject: Remove checks for geteuid The geteuid function is defined in POSIX and we will not support any operating systems without it. Signed-off-by: Allan McRae --- src/pacman/pacman.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src') diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 2c49fe97..f293a5d1 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -758,9 +758,7 @@ int main(int argc, char *argv[]) size_t i; struct sigaction new_action, old_action; const int signals[] = { SIGHUP, SIGINT, SIGTERM, SIGSEGV }; -#if defined(HAVE_GETEUID) uid_t myuid = geteuid(); -#endif /* Set signal handlers */ /* Set up the structure to specify the new action. */ @@ -880,13 +878,11 @@ int main(int argc, char *argv[]) config->logmask &= ~ALPM_LOG_WARNING; } -#if defined(HAVE_GETEUID) /* check if we have sufficient permission for the requested operation */ if(myuid > 0 && needs_root()) { pm_printf(ALPM_LOG_ERROR, _("you cannot perform this operation unless you are root.\n")); cleanup(EXIT_FAILURE); } -#endif if(config->verbose > 0) { alpm_list_t *j; -- cgit v1.2.3-70-g09d2