lkml.org 
[lkml]   [1996]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: BEWARE! Linux seteuid is broken!
Stephen R. van den Berg (srb@cuci.NL) wrote:

: I'd say, drop the whole saved [ug]id changes whenever setre[ug]id() are
: called and the world will be a better place.

I thought about it.
The only objection: if not-root set-uid program wants to drop privileges
without exec f.e. before jumping into huge/obscure library,
or if it does not believe itself 8)8) there will be no way to reset suid.
Now it may be done with setreuid(getuid(), getuid()).

Really, setresuid() looks as the most reasonable idea.
(and getresuid()! It was pretty silly not to have getsuid()
function. Yes, and getfsuid(), if we do not want to kill setfsuid())

Alexey Kuznetsov.


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.039 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site