aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/ss
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2008-02-28 12:58:40 -0500
committerJames Morris <jmorris@namei.org>2008-04-18 06:26:06 -0400
commitb0c636b99997c8594da6a46e166ce4fcf6956fda (patch)
tree16308f0324846cd8c19180b6a45793268dd16f50 /security/selinux/ss
parentd4ee4231a3a8731576ef0e0a7e1225e4fde1e659 (diff)
SELinux: create new open permission
Adds a new open permission inside SELinux when 'opening' a file. The idea is that opening a file and reading/writing to that file are not the same thing. Its different if a program had its stdout redirected to /tmp/output than if the program tried to directly open /tmp/output. This should allow policy writers to more liberally give read/write permissions across the policy while still blocking many design and programing flaws SELinux is so good at catching today. Signed-off-by: Eric Paris <eparis@redhat.com> Acked-by: Stephen Smalley <sds@tycho.nsa.gov> Reviewed-by: Paul Moore <paul.moore@hp.com> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/selinux/ss')
-rw-r--r--security/selinux/ss/services.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index 26de2be0c8e2..4a14348de876 100644
--- a/security/selinux/ss/services.c
+++ b/security/selinux/ss/services.c
@@ -61,6 +61,7 @@ extern void selnl_notify_policyload(u32 seqno);
61unsigned int policydb_loaded_version; 61unsigned int policydb_loaded_version;
62 62
63int selinux_policycap_netpeer; 63int selinux_policycap_netpeer;
64int selinux_policycap_openperm;
64 65
65/* 66/*
66 * This is declared in avc.c 67 * This is declared in avc.c
@@ -1308,6 +1309,8 @@ static void security_load_policycaps(void)
1308{ 1309{
1309 selinux_policycap_netpeer = ebitmap_get_bit(&policydb.policycaps, 1310 selinux_policycap_netpeer = ebitmap_get_bit(&policydb.policycaps,
1310 POLICYDB_CAPABILITY_NETPEER); 1311 POLICYDB_CAPABILITY_NETPEER);
1312 selinux_policycap_openperm = ebitmap_get_bit(&policydb.policycaps,
1313 POLICYDB_CAPABILITY_OPENPERM);
1311} 1314}
1312 1315
1313extern void selinux_complete_init(void); 1316extern void selinux_complete_init(void);