I always "chmod +s /sbin/reboot /sbin/halt" after emerging baselayout. I guess I'm not the only one, and a USE flag for this would be a good idea ? Of course you'd want to set a specific user group that is allowed to do that. Reproducible: Always Steps to Reproduce: run /sbin/halt as ordinary user Actual Results: "halt: must be superuser." Expected Results: system halt
Now that you mention it, I have wanted that option for quite some time. It would seem right to have the binaries executable only by root and members of the wheel group. This could be implemented like the artswrappersuid flag for arts.
Created attachment 33205 [details, diff] Implement optional suid for halt in baselayout Try out this patch against baselayout-1.9.4-r2.
Why don't you allow users to execute these binaries by adding them to /etc/sudoers? I vote against adding a suid use flag for all and everything.
Thanks for the suggestion. I am not willing to add this USE flag since it serves no purpose. sudo provides a manageable way of providing this functionality with better security. emerge sudo and man sudoers