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

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).


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    [W:0.129 / U:1.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site