diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-07-02 09:08:54 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-07-02 09:08:54 +0000 |
commit | 9d59fdf77480f56db168824cdad47161e940cb90 (patch) | |
tree | 5c10ef689609b4c5edaa3085a49dab31686ca15b /lib/libc/sys/execve.2 | |
parent | 75008b27c81b6ebc5b4e13343101410eb495f158 (diff) |
document fd 0-2 scheme for setuid/setgid
Diffstat (limited to 'lib/libc/sys/execve.2')
-rw-r--r-- | lib/libc/sys/execve.2 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libc/sys/execve.2 b/lib/libc/sys/execve.2 index de7a0dc8ee2..023d232d499 100644 --- a/lib/libc/sys/execve.2 +++ b/lib/libc/sys/execve.2 @@ -115,6 +115,13 @@ and .Xr fcntl 2 ) . Descriptors that remain open are unaffected by .Fn execve . +In the case of a new setuid or setgid executable being executed, if +file descriptors 0, 1, or 2 (representing stdin, stdout, and stderr) +are currently unallocated, these descriptors will be opened to point to +some system file like +.Pa /dev/null . +The intent is to ensure these descriptors are not unallocated, since +many libraries make assumptions about the use of these 3 file descriptors. .Pp Signals set to be ignored in the calling process are set to be ignored in the |