Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#29897 - [pacman-contrib] paccache quits if run as root

Attached to Project: Pacman
Opened by Yaohan Chen (hagabaka) - Tuesday, 15 May 2012, 07:35 GMT
Last edited by Allan McRae (Allan) - Saturday, 04 August 2012, 09:29 GMT
Task Type General Gripe
Category Scripts & Tools
Status Closed
Assigned To Dave Reisner (falconindy)
Architecture All
Severity Low
Priority Normal
Reported Version 4.0.3
Due in Version 4.1.0
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
When paccache is run as root, it prints out an error and quits. As a result, it cannot be run as a cronjob.
It's nice that it can prompt for privilege escalation if needed, but is there any reason to not work when it's started as root?

Additional info:
* pacman-contrib version 4.0.3-1
* The code responsible for the behavior is in lines 250-253 of /usr/bin/paccache:
if (( ! UID )); then
error "Do not run this script as root. You will be prompted for privilege escalation."
exit 42
fi

Steps to reproduce:
sudo paccache -r
This task depends upon

Closed by  Allan McRae (Allan)
Saturday, 04 August 2012, 09:29 GMT
Reason for closing:  Fixed
Additional comments about closing:  git commit a64a8d6cea82

Loading...