mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-23 00:08:50 -05:00
pacman/pacman.c : put back root check even if -r is specified.
Root is needed for most install / remove operation, because it's needed for chrooting, for running scriptlets. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
This commit is contained in:
parent
abce73de4c
commit
5d30c5c0b7
@ -782,9 +782,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
#if defined(HAVE_GETEUID)
|
||||
/* check if we have sufficient permission for the requested operation */
|
||||
if(myuid > 0 && !strcmp(alpm_option_get_root(), "/") && needs_transaction()) {
|
||||
/* special case: ignore root user check if -r is specified, fall back on
|
||||
* normal FS checking */
|
||||
if(myuid > 0 && needs_transaction()) {
|
||||
pm_printf(PM_LOG_ERROR, _("you cannot perform this operation unless you are root.\n"));
|
||||
cleanup(EXIT_FAILURE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user