Please read the Arch Linux guidelines before reporting a bug, they're very good:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines
Do NOT report bugs when a package is just outdated. Use the "Mark out of date" link on the package page, or the mailing list.
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines
Do NOT report bugs when a package is just outdated. Use the "Mark out of date" link on the package page, or the mailing list.
FS#13 - [initscripts] rc.shutdown runs as non root user in login prompt
Attached to Project:
Arch Hurd
Opened by Diego Martin Nieto Cid (diego) - 2010-07-18 06:44:36
Last edited by Matthias Lanzinger (melpo) - 2010-08-15 15:28:19
Opened by Diego Martin Nieto Cid (diego) - 2010-07-18 06:44:36
Last edited by Matthias Lanzinger (melpo) - 2010-08-15 15:28:19
|
DetailsThe login prompt is a funny thing in Hurd, you can actually run commands, cat files, etc :P
Executing reboot will run rc.shutdown and print the corresponding messages as if root were there current user. But finally when /sbin/internal_reboot is run it fails because of insufficient privileges. At the login some kind of *unnamed* guest user is active so whoami fails and the script continues. Using id reveals that the uid is 2^32 (or (unsigned int) -1). The following patch drops the usage of whoami. diff --git a/rc.shutdown b/rc.shutdown index 0a77615..bac471d 100644 --- a/rc.shutdown +++ b/rc.shutdown @@ -6,7 +6,7 @@ . /etc/rc.conf . /etc/rc.d/functions -if [ `whoami` != "root" ]; then +if [ `id -u` -ne 0 ]; then echo "Only superuser can do this" exit 1 fi (the diff avobe has an extra leading space on each line) |
This task depends upon
Closed by Matthias Lanzinger (melpo)
2010-08-15 15:28:19
Reason for closing: Fixed
Additional comments about closing: Fixed in initscripts-2010.08
2010-08-15 15:28:19
Reason for closing: Fixed
Additional comments about closing: Fixed in initscripts-2010.08
The updated initscripts are in the git repo and a new package will be available soon.