Bug 104249 - Doesn't ask for shutdown password when using XDMCP, doesn't shutdown, just disconnects
Summary: Doesn't ask for shutdown password when using XDMCP, doesn't shutdown, just di...
Alias: None
Product: kdm
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: kdm bugs tracker
Depends on:
Reported: 2005-04-20 00:44 UTC by Christian Spitzlay
Modified: 2008-05-19 17:30 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Christian Spitzlay 2005-04-20 00:44:04 UTC
Version:            (using KDE KDE 3.4.0)
Installed from:    Unlisted Binary Package
OS:                Linux

I'm connecting from my main box (A) to another one (B) and start a KDE session there using XDMCP. I have set the kdm on (B) to require the root password before allowing shutdown from a remote machine.  

When I log out of KDE on (B) I am presented with the proper shutdown and restart options in addition to the "end session" option.  So far so good. 

But when I select shutdown or restart I'm disconnected immediately.  No shutdown or restart takes place.  

As soon as I reconnect to (B) I see the password dialog.  After providing it with the root password (B) shuts down as desired.   

But being disconnected *before* being asked for the password looks like a bug to me... or does the bug lie in the fact that I'm shown the shutdown options in KDE's logout dialog at all (in the remote case)?
Comment 1 Oswald Buddenhagen 2005-05-01 10:42:12 UTC
heh, indeed, very interesting effect ... the "remote login" mode runs the new X server with the -once option. consequently the display will not "return" to the client to ask for the root password. it might turn out to be pretty hard to fix it.
whether we want this type of remote shutdown at all is discussed in another bug.
Comment 2 Christian Spitzlay 2005-05-01 11:16:35 UTC
Would it be possible to hide the shutdown and restart options from the KDE session logout dialog in the case of remote login with required password?  This would remove the surprising behaviour.  

In order to shutdown box (B) one could still reconnect and choose shutdown from the kdm login screen.  

OTOH a user might ask: "What does the fact that I require a password have to do with the question of whether the shutdown option is displayed or not?"
Comment 3 Oswald Buddenhagen 2006-01-15 16:25:16 UTC
> Would it be possible [...]
nope. the remote kdm cannot know how the connecting X server was started - and for X servers started manually without -once things work as expected.

the solution lies in not disconnecting from the server totally, so it does not exit. this means moving the initial connection from the display subdaemon to the master daemon. this might happen as a side effect of making kdm work with ill-behaved pam modules.
Comment 4 Oswald Buddenhagen 2007-11-10 19:59:30 UTC
SVN commit 735053 by ossi:

when the user session requested a shutdown that needs confirmation or a
password, don't put the dialog at the start of the next kdm session (and
thus reset/disconnect the x server in between), but do it in the current
kdm session after the user session exits.

BUG: 104249

 M  +46 -28    backend/dm.c  
 M  +1 -0      backend/dm.h  
 M  +1 -0      backend/greet.h  
 M  +12 -13    backend/session.c  
 M  +4 -2      kfrontend/kgapp.cpp  

WebSVN link: http://websvn.kde.org/?view=rev&revision=735053