set_his_uid()? [was Re: Changing uid of another process?]

Pavel Machek (pavel@bug.ucw.cz)
Fri, 10 Jul 1998 23:02:58 +0200


Hi!

> >I've got a large server which in the middle of its processing should
> >change
> >uid if the client has provided a valid username/password. Since the
> >server
> >is quite large and the clients username/password combination is sent a
> >long
> >time into the session (sometimes not at all), I don't want to run the
> >server
> >as root for obvious reasons. This server can sometimes be used quite a
> >lot
> >and therefor it needs a fast way of switching uid/gids.
> ----
> Hideous unnecessary contortions deleted
>
> man 2 setfsuid (linux systems)
> man seteuid (BSD systems)
>
> This mailing list is about kernel developement, not application
> developement. comp.unix.programmer would be a better forum

No. He asked us to add set_his_euid( pid_t pid, uid_t uid )
syscall. I do not see why this syscall is bad idea. Look at IRIX where
every stupid app has suid, because it has to be able to do root
operation if root enters his password. Currently, they have 10+ suid
programs with 10+ holes. If there was set_his_euid() syscall, they
would be pretty safe.

I'm not sure set_his_euid() syscall is bad idea. (Should be trivial to
implement.) What do others think?

Pavel

PS: There is no problem with PID wrapping: application requesting
server to suid here just must not die ;-). If she dies, she could
easily do anything else (like chmod 666 /etc/passwd) after she is
suid-ed.

-- 
I'm really pavel@atrey.karlin.mff.cuni.cz. 	   Pavel
Look at http://atrey.karlin.mff.cuni.cz/~pavel/ ;-).

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html