[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [desktop] enabling gnome-session reboot and halt options on logout



Christophe,

> > A bit more blue-sky: have an ACL on /bin/halt and /bin/reboot that only
> > allows specific users to execute it.  Then the dialog would offer the
> > options iff the user had execute permission.

> I have zero experience with ACL. Is it available with all kernels? Or do
> we need a recent one or a patched one?

I don't think we need to care about that, since standard Unix system
calls tell us everything we need to know.

For /sbin/halt and /sbin/reboot, stat() the program. If it isn't suid
root, display the respective button only if the user logging out is
root. If it is suid root, ask via access() whether we have execute
permission and display the button if we do.

   Simon

-- 
GPG Fingerprint: 040E B5F7 84F1 4FBC CEAD  ADC6 18A0 CC8D 5706 A4B4

Attachment: pgpni2e4NkhgC.pgp
Description: PGP signature


Reply to: