From kde-devel Sun May 28 17:49:09 2006 From: Thiago Macieira Date: Sun, 28 May 2006 17:49:09 +0000 To: kde-devel Subject: Re: Running part of the code with superuser privileges Message-Id: <200605281949.18137.thiago.macieira () trolltech ! com> X-MARC-Message: https://marc.info/?l=kde-devel&m=114883860820400 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============2086442645==" --===============2086442645== Content-Type: multipart/signed; boundary="nextPart1833620.fkicUzgvp2"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1833620.fkicUzgvp2 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Michael Pyne wrote: >On Sunday 28 May 2006 12:02, Iv=E1n 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=20 constructor will abort the application. If you need to have root privileges, you need to either run as root, or=20 have a separate process to do your privileged work, which you can launch=20 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. =2D-=20 Thiago Jos=E9 Macieira - thiago.macieira AT trolltech.com Trolltech AS - Sandakerveien 116, NO-0402 Oslo, Norway --nextPart1833620.fkicUzgvp2 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQBEeeKeM/XwBW70U1gRAo0sAKC6MXXrlaUl1uFCT4VPTutaAx3CQACffHTv dsB6O1vZvKZJJjo6d4FwJ9o= =tJ87 -----END PGP SIGNATURE----- --nextPart1833620.fkicUzgvp2-- --===============2086442645== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << --===============2086442645==--