aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/ss/mls.h
diff options
context:
space:
mode:
authorJames Morris <jmorris@redhat.com>2005-07-28 04:07:37 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-28 11:39:02 -0400
commitf5c1d5b2aaf9a98f15a6dcdfbba1f494d0aaae52 (patch)
treee896d0b6b9f561c9d124fa81efd261518ccbddf4 /security/selinux/ss/mls.h
parente1699f508ab5098de4b258268fa8913db38d9d35 (diff)
[PATCH] SELinux: default labeling of MLS field
Implement kernel labeling of the MLS (multilevel security) field of security contexts for files which have no existing MLS field. This is to enable upgrades of a system from non-MLS to MLS without performing a full filesystem relabel including all of the mountpoints, which would be quite painful for users. With this patch, with MLS enabled, if a file has no MLS field, the kernel internally adds an MLS field to the in-core inode (but not to the on-disk file). This MLS field added is the default for the superblock, allowing per-mountpoint control over the values via fixed policy or mount options. This patch has been tested by enabling MLS without relabeling its filesystem, and seems to be working correctly. Signed-off-by: James Morris <jmorris@redhat.com> Signed-off-by: Stephen Smalley <sds@epoch.ncsc.mil> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'security/selinux/ss/mls.h')
-rw-r--r--security/selinux/ss/mls.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/security/selinux/ss/mls.h b/security/selinux/ss/mls.h
index 0d37beaa85e2..03de697c8058 100644
--- a/security/selinux/ss/mls.h
+++ b/security/selinux/ss/mls.h
@@ -23,7 +23,9 @@ int mls_context_isvalid(struct policydb *p, struct context *c);
23 23
24int mls_context_to_sid(char oldc, 24int mls_context_to_sid(char oldc,
25 char **scontext, 25 char **scontext,
26 struct context *context); 26 struct context *context,
27 struct sidtab *s,
28 u32 def_sid);
27 29
28int mls_convert_context(struct policydb *oldp, 30int mls_convert_context(struct policydb *oldp,
29 struct policydb *newp, 31 struct policydb *newp,