[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:       Iván Forcada Atienza <ivan () swscanner ! org>
Date:       2006-05-29 8:10:13
Message-ID: 20060529081013.GB12270 () masao ! forcada ! info
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


[lun, 29 may 2006 08:46:33 +0200] - Ingo Krabbe:
> Am Montag, 29. Mai 2006 01:17 schrieb Iván Forcada Atienza:
> > [dom, 28 may 2006 13:07:18 -0400] - Michael Pyne:
> > > On Sunday 28 May 2006 12:02, Iván Forcada Atienza wrote:
> > > > Is it possible?? Any other workaround to achieve this?? Examples,
> > > > docs??
> > >
> > > It's possible, but the application would need to be run as root (or as
> > > setuid root).
> > >
> > > Basically what you need to do is that after the fork call, you can drop
> > > privileges in the child process immediately to act as a normal user,
> > > while the parent process will keep the privileges of root.
> >
> > I feared that this was the only possibility :-(. The goal was to avoid
> > de use of kdesu at start, and only ask the user for the root's password
> > when it's needed.
> 
> Hmm, I don't think that this is the full truth and basically I think of 
> starting a program as root (through kdesu or whatever) is a secrurity hole 
> too.  But the path through fork and exec is a good way.  I did that exactly 
> for a (slip line setup, ifconfig, route) combination.  I prefer to do these 
> jobs in a small subprogram which aren't KApplications but just a small 
> helper, which again is installed as setuid root.  This small program can then 
> be called through the bigger process which can be executed by any user.
> 
> Finally I don't believe that you need kdesu if you won't start you parent 
> process as root, which is insecure anyway, but you need a small subprogram 
> that you call through fork/exec that is setuid root, which again is no 
> KApplication of course.

Well, setuid root is comfortable but: why is the use of kdesu insecure??
I personally don't like setuid root (no special reason). I prefer the
use of sudo instead because it allows a more fine-grained permissions
control. 

Anyway... I was planning to use kdesu to call to the privileged parts in
the middle of the unprivileged code. It's also comfortable as kdesud
stores the password and the user doesn't need to re-type it all the
times so my worry now is to know if the use of kdesu in that way is a
real insecurity :-S

Thanks to all again for your comments :-)

-- 
__________________________________________________________________
Iván Forcada Atienza:
  correo: ivan@forcada.info
  jabber: ivanfor@jabber.guadawireless.org
------------------------------------------------------------------
Nodo guada21 en GuadaWireless usando Debian GNU/Linux:
  http://el21.guadawireless.net
------------------------------------------------------------------
"Software is like sex: it's better when it's free" (Linus Torvalds)

[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