diff options
author | wollman <wollman@FreeBSD.org> | 2002-08-07 18:03:30 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 2002-08-07 18:03:30 +0000 |
commit | 227736bae6503488a6a05abd330da40c7c754a02 (patch) | |
tree | e5d4e443ff179e56e6debf3f8545401d7a675af8 /lib/libc | |
parent | 40626b3576f6380b744a554745468bd598a6f67a (diff) | |
download | FreeBSD-src-227736bae6503488a6a05abd330da40c7c754a02.zip FreeBSD-src-227736bae6503488a6a05abd330da40c7c754a02.tar.gz |
Document file descriptor reopening and current standardization status.
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/sys/execve.2 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/libc/sys/execve.2 b/lib/libc/sys/execve.2 index ff842da..4cfabef 100644 --- a/lib/libc/sys/execve.2 +++ b/lib/libc/sys/execve.2 @@ -120,6 +120,14 @@ and .Xr fcntl 2 ) . Descriptors that remain open are unaffected by .Fn execve . +If any of the standard descriptors (0, 1, and/or 2) are closed at the +time +.Fn execve +is called, and the process will gain privilege as a result of set-id +semantics, those descriptors will be re-opened automatically. +No programs, whether privileged or not, should assume that these descriptors +will remain closed across a call to +.Fn execve . .Pp Signals set to be ignored in the calling process are set to be ignored in the @@ -278,6 +286,17 @@ of a super-user as well. .Xr elf 5 , .Xr environ 7 , .Xr mount 8 +.Sh STANDARDS +The +.Fn execve +function conforms to +.St -p1003.1-2001 , +with the exception of reopening descriptors 0, 1, and/or 2 in certain +circumstances. +A future update of the Standard is expected to require this behavior, +and it may become the default for non-privileged processes as well. +.\" NB: update this caveat when TC1 is blessed. +The support for executing interpreted programs is an extension. .Sh HISTORY The .Fn execve |