[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Running part of the code with superuser privileges
From:       Thiago Macieira <thiago.macieira () trolltech ! com>
Date:       2006-05-28 17:49:09
Message-ID: 200605281949.18137.thiago.macieira () trolltech ! com
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Michael Pyne wrote:
>On Sunday 28 May 2006 12:02, Iván Forcada Atienza wrote:
>> Is it possible?? Any other workaround to achieve this?? Examples,
>> docs??
>>
>> Thanks in advance!! :-)
>
>It's possible, but the application would need to be run as root (or as
> setuid root).

Setuid root isn't allowed in KDE applications. The KApplication 
constructor will abort the application.

If you need to have root privileges, you need to either run as root, or 
have a separate process to do your privileged work, which you can launch 
with kdesu.

>If it were me I'd just have a separate program that handles interfacing
> with the network stuff, and only with the network stuff.  Have it
> setuid root and call it as necessary.  And before I do any of this, I'd
> read the Secure Linux and UNIX Programming HOWTO by David Wheeler:
>http://www.dwheeler.com/secure-programs/Secure-Programs-HOWTO.html

Good advice.

-- 
Thiago José Macieira - thiago.macieira AT trolltech.com
Trolltech AS - Sandakerveien 116, NO-0402 Oslo, Norway

[Attachment #5 (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic