Re: (resend) shutdown, reboot buttons lost from 2.10 logout dialog



> Date: Sat, 11 Mar 2006 12:19:42 +0100
> From: Sigmund Skjelnes <skjelnes robin no>
>
> Hmmm... It could be only  root should be able to shutdown or reboot the 
> machine. Any distribution is installed on machine to be anything from 
> one's personal pc to advanced servers used by many users. If any user 
> could shut down a server, it vould be a serious flaw, cause there may be 
> users logged in, which is using server apps which will fail if an sudden 
> shutdown occurs. It's just the same reason servers use to have ups, and 
> doubled power supplies. I'm thinking of "fail" as they won't start again 
> without repair, and maybe restoring backups. Now, most installations 
> will just restart all ok, but databases may be vulnerable to such cases.
>
> I ain't into Mandriva at all, but it's my hypotesis that the 
> shutdown/reboot buttons are removed on purpose.

Yes, on some machines, only root should be able to shutdown.
However, the Gnome developers cannot know which machines are   
and which machines should be shut down by (some) ordinary
users.  The distribution cannot know.  Only the system
administrators know what policy is appropriate for each 
machine.

Actually, a comparison of the code in gnome-session's         
logout.c between 2.8.1 and 2.10.0 shows the change was to
go _ONLY_ through GDM mechanisms in 2.10 rather than the
more general mechanisms in 2.8 that would work with any
*DM and even without any *DM.  I thought I included a  
partial diff in my first message.   

The button removal was on purpose for systems that do not
use GDM.  Systems that run GDM show the buttons as they had
before.  I'm considering filing a bug report in protest of
the apparent deliberate locking of functionality to those who
don't use the whole Gnome suite.  That's behavior I would
expect from Microsoft Corp., not from an open source project.
:-(  :-(

So, does nobody know a reasonable way to regain shutdown 
button functionality without GDM?

In the mean time, I went ahead and coded a patch to get
back shutdown button functionality under sysadmin control.
If a file /etc/shutdown.allow.d/$USER exists, then the
buttons are always shown.  The second half of the patch,
the actual action part, is more hamfisted and simply calls
system("/usr/bin/poweroff").  It's in 'works-for-me'
condition.  If anyone wants the patch (57 lines, mostly 
comments), I'd be happy to mail it out.

Thanks in advance for any suggestions.                    

Robert Riches
rm riches verizon net



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