]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Allow Capsicum capabilities to delegate constrained
authorjonathan <jonathan@FreeBSD.org>
Sat, 13 Aug 2011 09:21:16 +0000 (09:21 +0000)
committerjonathan <jonathan@FreeBSD.org>
Sat, 13 Aug 2011 09:21:16 +0000 (09:21 +0000)
commitf63d2e920584a3d403a07e765a61eeac57210332
tree3334bf0dc037565dbb28b66bfe83c6d9e8823738
parent0ba1fe7d116a032383d49c9a252a5f09682c76f0
Allow Capsicum capabilities to delegate constrained
access to file system subtrees to sandboxed processes.

- Use of absolute paths and '..' are limited in capability mode.
- Use of absolute paths and '..' are limited when looking up relative
  to a capability.
- When a name lookup is performed, identify what operation is to be
  performed (such as CAP_MKDIR) as well as check for CAP_LOOKUP.

With these constraints, openat() and friends are now safe in capability
mode, and can then be used by code such as the capability-mode runtime
linker.

Approved by: re (bz), mentor (rwatson)
Sponsored by: Google Inc
sys/kern/kern_descrip.c
sys/kern/sys_capability.c
sys/kern/vfs_lookup.c
sys/kern/vfs_syscalls.c
sys/sys/capability.h
sys/sys/namei.h