lkml.org 
[lkml]   [1996]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: BEWARE! Linux seteuid is broken!
   From: "A.N.Kuznetsov" <kuznet@ms2.inr.ac.ru>
Date: Tue, 11 Jun 1996 13:28:31 +0400 (MSD)

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

setreuid changes saved uid, when euid != uid.
It breaks POSIX compliant programs.

Huh? seteuid() was never implemented; it's not in 1.2.x.

seteuid() is also not a POSIX function; it's not defined in POSIX. So
if you use it, you must be using it because you're interested in BSD
compliance.

Keep in mind that the whole notion of "effective" uid is non-POSIX. So
trying to mix effective uid and saved-uid is invariably going to cause
problems. I deliberately had setreuid() set the saved-uid because this
would seem to avoid certain security problems. See the comments in
kernel/sys.c for my justification for doing this.

- Ted


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