]> git.baikalelectronics.ru Git - kernel.git/commit
fuse: Add support for pid namespaces
authorSeth Forshee <seth.forshee@canonical.com>
Wed, 2 Jul 2014 21:29:19 +0000 (16:29 -0500)
committerMiklos Szeredi <mszeredi@redhat.com>
Tue, 18 Apr 2017 14:58:38 +0000 (16:58 +0200)
commit653e9d14ec27620c5ed7bd9f95dde72c232536fb
treecd3865a34605be80a272a920713b11df7efcb35b
parentb26a0df2330058c576aa52990d715d6a34adafd3
fuse: Add support for pid namespaces

When the userspace process servicing fuse requests is running in
a pid namespace then pids passed via the fuse fd are not being
translated into that process' namespace. Translation is necessary
for the pid to be useful to that process.

Since no use case currently exists for changing namespaces all
translations can be done relative to the pid namespace in use
when fuse_conn_init() is called. For fuse this translates to
mount time, and for cuse this is when /dev/cuse is opened. IO for
this connection from another namespace will return errors.

Requests from processes whose pid cannot be translated into the
target namespace will have a value of 0 for in.h.pid.

File locking changes based on previous work done by Eric
Biederman.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/dev.c
fs/fuse/file.c
fs/fuse/fuse_i.h
fs/fuse/inode.c