Shutdown / Reboot Overrides
Benedikt Meurer
benedikt.meurer at unix-ag.uni-siegen.de
Thu Jul 21 21:56:52 CEST 2005
Kevin Day wrote:
> In general, I believe the shutdown and reboot buttons are built into the xfce
> programs. (not the system ones, but the right-shutdown or the panel-shutdown).
> This system is nicely integrated with sudo, however, I have little or no reason
> to use sudo as I setup the sticky bit on /sbin/shutdown and /sbin/halt
> (/sbin/reboot is an symlink to /sbin/halt).
> I then created a user group called 'admin'. I chmoded /sbin/{shutdown,halt} to
> 4750.
>
> Any console user in general would get the 'admin' privaledges.
> My problem: I need a way to optionally specify whether or not 'sudo' is to be
> used for the shutdown commands.
>
> BTW, If you can point to me where in the source that contains the 'sudo
> shutdown' or whatever method used as well as the if (..) then .. ; that
> designates to mark unusable the shutdown/reboot options, then I can make a
> patch myself.
The shutdown mechanism is modular. You can use various methods (choosen
at compile time). The default is to use the xfsm_shutdown_helper_sudo.c.
For your case, you could simply modify the xfsm_shutdown_helper_redhat.c
and edit the test in the xfsm_shutdown_helper_spawn() method. You need
to select your method at configure using --with-shutdown-style=<whatever>.
HTH,
Benedikt
More information about the Xfce
mailing list