Administrator mode in systemsettings

Lubos Lunak l.lunak at suse.cz
Thu Apr 10 17:03:39 BST 2008


 Hello,

 systemsettings, as far as I can say, has no support at all for actions 
requiring root rights, and the only way to handle those seems to be running 
it as root directly.

 How about the attached patch? It makes the date/time to work normally as 
user, and when doing changes, it runs a small helper using kdesu that 
actually does those changes. Well, not that small, but it only links kdecore. 
I more or less copied the code from save() to the helper and the new values 
are passed using arguments, and since there's nothing fancy done with them, 
it looks quite safe to my security-not-much-trained eye. The arguments only 
look a bit ugly in the kdesu dialog.

 The patch reduces the amount of code that's run as root, doesn't make root 
modules possibly look different, avoids the XEmbed fun and makes it work. 
Comments, flames, improvements?

-- 
Lubos Lunak
KDE developer
--------------------------------------------------------------
SUSE LINUX, s.r.o.   e-mail: l.lunak at suse.cz , l.lunak at kde.org
Lihovarska 1060/12   tel: +420 284 028 972
190 00 Prague 9      fax: +420 284 028 951
Czech Republic       http://www.suse.cz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dateandtime.patch
Type: text/x-diff
Size: 21119 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080410/00dcdd9c/attachment.patch>


More information about the kde-core-devel mailing list