Bug 143597

Summary: kdesktop_lock doesn't honour kiosk switch user restriction
Product: kdesktop Reporter: Thibauld Favre <tfavre>
Component: generalAssignee: David Faure <faure>
Status: CLOSED FIXED    
Severity: normal CC: finex
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Patch to have lockdlg.cc honour kiosk switch_user restriction

Description Thibauld Favre 2007-03-29 19:13:31 UTC
Version:           3.5.5 (using KDE KDE 3.5.6)
Installed from:    Ubuntu Packages
OS:                Linux

Hi,

I'm desperately trying to make the "Switch user" button disappear from the password dialog that displays when someone move the mouse on a locked session. I finally looked into the code and I think I found where the problem lies in lockdlg.cc

Here's a patch that I think will make kdesktop_lock honour kiosk switch_user restriction. I wasn't able to test it but the patch is so tiny, I just hope I made no mistake :)

Thibauld
Comment 1 Thibauld Favre 2007-03-29 19:14:35 UTC
Created attachment 20123 [details]
Patch to have lockdlg.cc honour kiosk switch_user restriction
Comment 2 David Faure 2007-03-30 16:15:51 UTC
SVN commit 648097 by dfaure:

Patch by Thibauld Favre <tfavre rift-technologies com> to honour kiosk switch user restriction - thanks!
BUG: 143597


 M  +1 -1      lockdlg.cc  


--- branches/KDE/3.5/kdebase/kdesktop/lock/lockdlg.cc #648096:648097
@@ -128,7 +128,7 @@
     connect(ok, SIGNAL(clicked()), SLOT(slotOK()));
     connect(mNewSessButton, SIGNAL(clicked()), SLOT(slotSwitchUser()));
 
-    if (!DM().isSwitchable())
+    if (!DM().isSwitchable() || !kapp->authorize("switch_user"))
         mNewSessButton->hide();
 
     installEventFilter(this);
Comment 3 FiNeX 2009-01-02 20:33:46 UTC
Bug closed. Kdesktop is no more mantained.