diff options
author | Allan McRae <allan@archlinux.org> | 2012-12-16 13:05:49 +0100 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2013-01-03 03:03:10 +0100 |
commit | d5a6ce8ca124d1eea343314b23110e006eb313d5 (patch) | |
tree | 31b8d41a7c5b7d725b371c5fa3a3d7e2a5bbfda1 | |
parent | 5aaf5bcf830cb808de2484c0f3860a22a21a79b4 (diff) | |
download | pacman-d5a6ce8ca124d1eea343314b23110e006eb313d5.tar.gz pacman-d5a6ce8ca124d1eea343314b23110e006eb313d5.tar.xz |
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 <allan@archlinux.org>
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/pacman/pacman.c | 4 |
2 files changed, 1 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 122f3876..8ec0eab8 100644 --- a/configure.ac +++ b/configure.ac @@ -279,7 +279,7 @@ AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK AC_FUNC_MALLOC AC_FUNC_MKTIME AC_FUNC_STRCOLL -AC_CHECK_FUNCS([dup2 getcwd geteuid getmntinfo gettimeofday memmove memset \ +AC_CHECK_FUNCS([dup2 getcwd getmntinfo gettimeofday memmove memset \ mkdir realpath regcomp rmdir setenv setlocale strcasecmp \ strchr strcspn strdup strerror strndup strrchr strsep strstr \ strtol swprintf tcflush wcwidth uname]) 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; |