mbox series

[0/2] shiftfs reworked as a uid/gid shifting bind mount

Message ID 1575335637.24227.26.camel@HansenPartnership.com (mailing list archive)
Headers show
Series shiftfs reworked as a uid/gid shifting bind mount | expand

Message

James Bottomley Dec. 3, 2019, 1:13 a.m. UTC
I've split these patches into two for easy review.  I think there's no
real point adding MS_SHIFT and letting the old mount API configure
this, so the second patch depends on the configfd proposal previously
sent since currently the new mount API is deficient in handling bind
mount properties.  However, for those of you who want to get it working
with the old API, simply adding MS_SHIFT and wiring it up to MNT_SHIFT
should work for now ... you can ignore all the part about the allow-
shift marking for test purposes ... I suspect the allow mechanism will
likely change, say to something xattr based, anyway.

James

---

James Bottomley (2):
  fs: introduce uid/gid shifting bind mount
  fs: expose shifting bind mount to userspace

 fs/attr.c             |  87 ++++++++++++++++++++++++++++----------
 fs/bind.c             |  35 ++++++++++++++++
 fs/exec.c             |   7 +++-
 fs/inode.c            |   9 ++--
 fs/internal.h         |   2 +
 fs/mount.h            |   2 +
 fs/namei.c            | 114 +++++++++++++++++++++++++++++++++++++++++---------
 fs/namespace.c        |   1 +
 fs/open.c             |  25 ++++++++++-
 fs/posix_acl.c        |   4 +-
 fs/proc_namespace.c   |   4 ++
 fs/stat.c             |  31 ++++++++++++--
 include/linux/cred.h  |  10 +++++
 include/linux/mount.h |   4 +-
 include/linux/sched.h |   5 +++
 kernel/capability.c   |  14 ++++++-
 kernel/cred.c         |  20 +++++++++
 kernel/groups.c       |   7 ++++
 18 files changed, 325 insertions(+), 56 deletions(-)