plan9fox/sys/man/2
cinap_lenrek 0b33b3b8ad kernel: implement per file descriptor OCEXEC flag, reject ORCLOSE when opening /fd, /srv and /shr
The OCEXEC flag used to be maintained per channel,
making it shared between all the file desciptors.

This has a unexpected side effects with regard to
channel passing drivers such as devdup (/fd),
devsrv (/srv) and devshr (/shr).

For example, opening a /srv file with OCEXEC
makes it impossible to be remounted by exportfs
as it internally does a exec() to mount and
re-export it. There is no way to reset the flag.

This change makes the OCEXEC flag per file descriptor,
so a open with the OCEXEC flag only affects the fd
group of the calling process, and not the channel
itself.

On rfork(RFFDG), the per file descriptor flags get
copied.

On dup(), the per file descriptor flags are reset.

The second modification is that /fd, /srv and /shr
should reject the ORCLOSE flag, as the files that
are returned have already been opend.
2020-12-13 16:04:09 +01:00
..
0intro /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
9p 9p(2): fix typo 2020-06-25 23:23:23 +02:00
9pcmdbuf /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
9pfid /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
9pfile /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
9pqueue /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
abort /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
abs /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
access /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
addpt /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
aes /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
allocimage /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
aml /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
arg /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
arith3 /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
assert /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
atof /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
auth fix bad function declarations in manpages 2019-04-09 18:34:17 +00:00
authsrv /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
avl avl(2): add avlmin/avlmax in synopsis 2018-06-08 16:37:39 +00:00
bin /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
bind /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
bio libbio: add aux pointer to bio 2020-11-01 11:42:54 -08:00
blowfish /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
brk /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
cachechars /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
chacha /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
chdir chdir(2): add reference to getwd(2) in SEE ALSO section 2020-08-25 20:51:24 +09:30
cleanname /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
color /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
complete /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
control /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
cputime fix bad function declarations in manpages 2019-04-09 18:34:17 +00:00
ctime ctime(2): add tmdate(2) to "see also" 2020-11-18 20:11:55 +01:00
ctype /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
debugger /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
des /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
dial we prefer nil over 0, make the example show it. 2020-03-28 20:32:53 -07:00
dirread /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
disk /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
draw draw(2): fix manpage typo (thanks rgl) 2019-11-11 13:35:47 -08:00
dsa /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
dup kernel: implement per file descriptor OCEXEC flag, reject ORCLOSE when opening /fd, /srv and /shr 2020-12-13 16:04:09 +01:00
ec /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
elgamal /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
encode libc: constant time implementation for encode(2) routines, fix base32 2017-12-31 09:06:42 +01:00
encrypt /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
errstr /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
event fix bad function declarations in manpages 2019-04-09 18:34:17 +00:00
exec /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
exits /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
exp /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
fauth /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
fcall fix bad function declarations in manpages 2019-04-09 18:34:17 +00:00
fd2path /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
fgetc /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
flate flate(2): fix typos (thanks rgl) 2019-12-18 09:01:38 +10:30
floor /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
fmtinstall /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
fopen /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
fork /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
fprintf /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
frame fix bad function declarations in manpages 2019-04-09 18:34:17 +00:00
frexp /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
fscanf /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
fversion /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
getcallerpc /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
getenv /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
getfcr /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
getfields /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
getpid /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
getuser getuser(2): add source or sysname() 2018-06-03 23:46:47 +02:00
getwd getwd(2): add reference to chdir(2) in SEE ALSO section 2020-08-25 20:51:38 +09:30
graphics graphics(2): fix typo 2020-06-28 23:45:18 +02:00
html /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
httpd /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
hypot /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
idn misc small manpage fixes 2018-10-28 00:05:05 +02:00
intmap /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
ioproc fix bad function declarations in manpages 2019-04-09 18:34:17 +00:00
iounit /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
ip fix bad function declarations in manpages 2019-04-09 18:34:17 +00:00
isalpharune /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
json /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
keyboard keyboard(2) spelling (thanks Amavect) 2018-09-22 09:41:16 +02:00
lock lock(2): fix typo 2018-03-23 11:34:39 +10:30
mach mach(2): fix byteswapping function signatures 2019-03-06 19:10:58 -08:00
malloc /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
matrix /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
memdraw memdraw(2): remove references to iprint() 2019-05-11 15:28:18 +00:00
memlayer fix bad function declarations in manpages 2019-04-09 18:34:17 +00:00
memory /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
mktemp /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
mouse /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
mp mp(2): correct documentation of error handling (thanks LordCreepity) 2020-10-24 17:24:59 -07:00
muldiv /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
nan /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
ndb libndb: make ndbipinfo() walk ipnet for all matching entries, concatenate and dedup result 2018-09-16 12:39:47 +02:00
notify notify(2): fix typo 2020-04-07 12:14:12 +09:30
nusb nusb(2): remove startdevs() reference, document getdev() (thanks BurnZeZ) 2019-05-14 09:06:09 +02:00
object /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
open /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
perror /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
pipe /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
plumb fix bad function declarations in manpages 2019-04-09 18:34:17 +00:00
pool fix bad function declarations in manpages 2019-04-09 18:34:17 +00:00
postnote /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
prime /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
print fix bad function declarations in manpages 2019-04-09 18:34:17 +00:00
privalloc /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
procsetname provide procsetname(2) manpage 2018-09-26 15:24:29 +02:00
proto /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
pushssl /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
pushtls /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
qball /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
qsort /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
quaternion /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
quote /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
rand /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
rc4 /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
read /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
readcolmap /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
readv /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
regexp /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
remove /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
rendezvous /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
rsa rsa(2): document asn1encodeRSApriv() and asn1encodeRSApub() functions 2019-08-30 07:35:54 +02:00
rune rune(2): complete source references 2019-09-04 02:41:22 +02:00
runestrcat /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
salsa /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
sat fix manpage cross references 2018-05-11 16:15:08 +02:00
scribble /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
scsi /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
sechash libsec: remove hash pickle functions, document ripemd160, cleanup sechash(2) manpage 2020-03-01 15:07:44 +01:00
seek /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
segattach /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
segbrk /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
segflush /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
semacquire /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
setjmp /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
sin /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
sinh /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
sleep /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
stat /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
strcat fix bad function declarations in manpages 2019-04-09 18:34:17 +00:00
string /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
stringsize /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
subfont /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
symbol fix bad function declarations in manpages 2019-04-09 18:34:17 +00:00
thread thread(2): fix description of when/why procexec(l) functions return 2019-12-19 17:12:15 +10:30
time /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
tmdate tmdate(2): remove lies 2020-11-30 07:41:49 -08:00
tmpfile /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
ttf fix bad function declarations in manpages 2019-04-09 18:34:17 +00:00
venti /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
venti-cache /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
venti-client /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
venti-conn sys/src/libventi: implement vtreconn and vtredial functions 2019-09-06 11:54:44 -07:00
venti-fcall /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
venti-file /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
venti-log /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
venti-mem /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
venti-packet /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
venti-server /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
venti-zero /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
wait /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
window fix bad function declarations in manpages 2019-04-09 18:34:17 +00:00