diff options
author | Eric Paris <eparis@redhat.com> | 2008-03-05 10:31:54 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2008-03-05 16:40:53 -0500 |
commit | e0007529893c1c064be90bd21422ca0da4a0198e (patch) | |
tree | c2334ba940e682183a18d18972cf95bd3a3da46a /security/selinux/include/security.h | |
parent | 29e8c3c304b62f31b799565c9ee85d42bd163f80 (diff) |
LSM/SELinux: Interfaces to allow FS to control mount options
Introduce new LSM interfaces to allow an FS to deal with their own mount
options. This includes a new string parsing function exported from the
LSM that an FS can use to get a security data blob and a new security
data blob. This is particularly useful for an FS which uses binary
mount data, like NFS, which does not pass strings into the vfs to be
handled by the loaded LSM. Also fix a BUG() in both SELinux and SMACK
when dealing with binary mount data. If the binary mount data is less
than one page the copy_page() in security_sb_copy_data() can cause an
illegal page fault and boom. Remove all NFSisms from the SELinux code
since they were broken by past NFS changes.
Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/selinux/include/security.h')
-rw-r--r-- | security/selinux/include/security.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/security/selinux/include/security.h b/security/selinux/include/security.h index 837ce420d2f6..f7d2f03781f2 100644 --- a/security/selinux/include/security.h +++ b/security/selinux/include/security.h | |||
@@ -35,6 +35,11 @@ | |||
35 | #define POLICYDB_VERSION_MAX POLICYDB_VERSION_POLCAP | 35 | #define POLICYDB_VERSION_MAX POLICYDB_VERSION_POLCAP |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | #define CONTEXT_MNT 0x01 | ||
39 | #define FSCONTEXT_MNT 0x02 | ||
40 | #define ROOTCONTEXT_MNT 0x04 | ||
41 | #define DEFCONTEXT_MNT 0x08 | ||
42 | |||
38 | struct netlbl_lsm_secattr; | 43 | struct netlbl_lsm_secattr; |
39 | 44 | ||
40 | extern int selinux_enabled; | 45 | extern int selinux_enabled; |