diff options
| author | Tor Egge <tegge@FreeBSD.org> | 2003-02-15 22:43:05 +0000 |
|---|---|---|
| committer | Tor Egge <tegge@FreeBSD.org> | 2003-02-15 22:43:05 +0000 |
| commit | 218a01e0624b8b439277a5e0f5b52a529840121e (patch) | |
| tree | b8fc43179ec725ae6a10c79cff344462bcda2b98 /sys/kern/kern_fork.c | |
| parent | 6f8ebcc2323135ca3f26a0458f86c9c0942c6086 (diff) | |
Notes
Diffstat (limited to 'sys/kern/kern_fork.c')
| -rw-r--r-- | sys/kern/kern_fork.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index f84afa89ef4b..166f1c6b72b6 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -166,6 +166,13 @@ rfork(td, uap) /* Don't allow kernel only flags. */ if ((uap->flags & RFKERNELONLY) != 0) return (EINVAL); + /* + * Don't allow sharing of file descriptor table unless + * RFTHREAD flag is supplied + */ + if ((uap->flags & (RFPROC | RFTHREAD | RFFDG | RFCFDG)) == + RFPROC) + return(EINVAL); mtx_lock(&Giant); error = fork1(td, uap->flags, 0, &p2); if (error == 0) { |
