lkml.org 
[lkml]   [1996]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectBEWARE! Linux seteuid is broken!
Date
Hello!

POSIX seteuid DOES NOT CHANGE saved uid.

As I see, seteuid syscall was deleted from kernel
because someone decided that it is equivalent to setreuid(-1, euid).


kernel/sys.c

if (ruid != (uid_t) -1 ||
(euid != (uid_t) -1 && euid != old_ruid)) <- ?????
current->suid = current->euid;
setreuid changes saved uid, when euid != uid.
It breaks POSIX compliant programs.

Well, we might delete second condition, but I'am
afraid it will break BSD compliance.

Alexey Kuznetsov.


\
 
 \ /
  Last update: 2005-03-22 13:37    [from the cache]
©2003-2011 Jasper Spaans