summaryrefslogtreecommitdiffstats
path: root/README
diff options
context:
space:
mode:
authorCory Olmo <colmo@TrustedCS.com>2006-09-29 01:58:44 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-29 09:18:03 -0700
commit3528a95322b5c1ce882ab723f175a1845430cd89 (patch)
tree3aa8b456e08ed3e57fe23152c934b8ed1b234022 /README
parent79f5acf5d784492afe80723496624093079aed9c (diff)
downloadop-kernel-dev-3528a95322b5c1ce882ab723f175a1845430cd89.zip
op-kernel-dev-3528a95322b5c1ce882ab723f175a1845430cd89.tar.gz
[PATCH] SELinux: support mls categories for context mounts
Allows commas to be embedded into context mount options (i.e. "-o context=some_selinux_context_t"), to better support multiple categories, which are separated by commas and confuse mount. For example, with the current code: mount -t iso9660 /dev/cdrom /media/cdrom -o \ ro,context=system_u:object_r:iso9660_t:s0:c1,c3,c4,exec The context option that will be interpreted by SELinux is context=system_u:object_r:iso9660_t:s0:c1 instead of context=system_u:object_r:iso9660_t:s0:c1,c3,c4 The options that will be passed on to the file system will be ro,c3,c4,exec. The proposed solution is to allow/require the SELinux context option specified to mount to use quotes when the context contains a comma. This patch modifies the option parsing in parse_opts(), contained in mount.c, to take options after finding a comma only if it hasn't seen a quote or if the quotes are matched. It also introduces a new function that will strip the quotes from the context option prior to translation. The quotes are replaced after the translation is completed to insure that in the event the raw context contains commas the kernel will be able to interpret the correct context. Signed-off-by: Cory Olmo <colmo@TrustedCS.com> Signed-off-by: James Morris <jmorris@namei.org> Acked-by: Stephen Smalley <sds@tycho.nsa.gov> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud