diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-04-10 09:41:23 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-04-10 09:41:23 +0000 |
commit | a38cc9a81b647016b67cba99019e797a2d474538 (patch) | |
tree | 1228beaeaeeff811f7c49b0bace6c9d104b95063 /lib/libc | |
parent | b7fe1a8d19f2c0ca72548ac099ab078be2653576 (diff) |
fix up a few pieces of doc.
NOTE: FreeBSD has now integrated issetugid() into their system and have
changed the semantics! Their's will return 1 if a process has called
setuid() or setgid() ---- ours was specifically designed to be decoupled
from that behaviour.
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/sys/issetugid.2 | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/lib/libc/sys/issetugid.2 b/lib/libc/sys/issetugid.2 index 5d15f4e2035..975878f07cc 100644 --- a/lib/libc/sys/issetugid.2 +++ b/lib/libc/sys/issetugid.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: issetugid.2,v 1.8 1997/04/10 01:13:27 millert Exp $ +.\" $OpenBSD: issetugid.2,v 1.9 1997/04/10 09:41:22 deraadt Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -50,25 +50,37 @@ the result of the last system call. Otherwise it returns 0. .Pp -This system call exists so that library routines (inside libc, libtermlib, +This system call exists so that library routines (inside libtermlib, libc, or other libraries) can gaurantee safe behavior when used inside setuid or setgid programs. Some library routines may not be passed sufficient information to know if the current program was started setuid or setgid because higher level calling code may have made changes to the uid or the euid. +.Pp In particular, it is wise to use this call to determine if a pathname returned from a .Fn getenv call may safely be used to .Fn open the specified file. +Quite often this is not wise because the status of the effective uid +is not known. .Pp +The .Fn issetugid -is unaffected by calls to +system call's result is unaffected by calls to .Fn setuid , +.Fn setgid , +or other such calls. +In case of a .Fn fork , -and other such calls. It is only controlled by -.Fn execve . +the child process inherits the same status. +The status of +.Fn issetugid +is only affected by +.Fn execve , +meaning that if a child process executes a new binary a new +status will be determined based on the executable file modes. .Sh ERRORS The .Fn issetugid |