diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2013-01-30 18:50:54 -0800 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2013-02-13 06:00:52 -0800 |
commit | 9fd973e085f7759f710603422b2e11ad5f2e000d (patch) | |
tree | ab037487925db629c9e3c5b45475f0e97954fd1d /fs/coda/upcall.c | |
parent | a0a5386ac6400493cc2eb8b58583e56af0708730 (diff) |
coda: Restrict coda messages to the initial pid namespace
Remove the slight chance that pids in coda messages will be
interpreted in the wrong pid namespace.
- Explicitly send all pids in coda messages in the initial pid
namespace.
- Only allow mounts from processes in the initial pid namespace.
- Only allow processes in the initial pid namespace to open the coda
character device to communicate with coda.
Cc: Jan Harkes <jaharkes@cs.cmu.edu>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'fs/coda/upcall.c')
-rw-r--r-- | fs/coda/upcall.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/coda/upcall.c b/fs/coda/upcall.c index 0c68fd31fbf2..5c6d2cd6ee86 100644 --- a/fs/coda/upcall.c +++ b/fs/coda/upcall.c @@ -50,8 +50,8 @@ static void *alloc_upcall(int opcode, int size) return ERR_PTR(-ENOMEM); inp->ih.opcode = opcode; - inp->ih.pid = current->pid; - inp->ih.pgid = task_pgrp_nr(current); + inp->ih.pid = task_pid_nr_ns(current, &init_pid_ns); + inp->ih.pgid = task_pgrp_nr_ns(current, &init_pid_ns); inp->ih.uid = current_fsuid(); return (void*)inp; |