|
@@ -65,7 +65,6 @@
|
|
#include "audit.h"
|
|
#include "audit.h"
|
|
|
|
|
|
extern void selnl_notify_policyload(u32 seqno);
|
|
extern void selnl_notify_policyload(u32 seqno);
|
|
-unsigned int policydb_loaded_version;
|
|
|
|
|
|
|
|
int selinux_policycap_netpeer;
|
|
int selinux_policycap_netpeer;
|
|
int selinux_policycap_openperm;
|
|
int selinux_policycap_openperm;
|
|
@@ -616,17 +615,6 @@ static int context_struct_compute_av(struct context *scontext,
|
|
struct ebitmap_node *snode, *tnode;
|
|
struct ebitmap_node *snode, *tnode;
|
|
unsigned int i, j;
|
|
unsigned int i, j;
|
|
|
|
|
|
- /*
|
|
|
|
- * Remap extended Netlink classes for old policy versions.
|
|
|
|
- * Do this here rather than socket_type_to_security_class()
|
|
|
|
- * in case a newer policy version is loaded, allowing sockets
|
|
|
|
- * to remain in the correct class.
|
|
|
|
- */
|
|
|
|
- if (policydb_loaded_version < POLICYDB_VERSION_NLCLASS)
|
|
|
|
- if (tclass >= unmap_class(SECCLASS_NETLINK_ROUTE_SOCKET) &&
|
|
|
|
- tclass <= unmap_class(SECCLASS_NETLINK_DNRT_SOCKET))
|
|
|
|
- tclass = unmap_class(SECCLASS_NETLINK_SOCKET);
|
|
|
|
-
|
|
|
|
/*
|
|
/*
|
|
* Initialize the access vectors to the default values.
|
|
* Initialize the access vectors to the default values.
|
|
*/
|
|
*/
|
|
@@ -761,17 +749,6 @@ int security_validate_transition(u32 oldsid, u32 newsid, u32 tasksid,
|
|
|
|
|
|
tclass = unmap_class(orig_tclass);
|
|
tclass = unmap_class(orig_tclass);
|
|
|
|
|
|
- /*
|
|
|
|
- * Remap extended Netlink classes for old policy versions.
|
|
|
|
- * Do this here rather than socket_type_to_security_class()
|
|
|
|
- * in case a newer policy version is loaded, allowing sockets
|
|
|
|
- * to remain in the correct class.
|
|
|
|
- */
|
|
|
|
- if (policydb_loaded_version < POLICYDB_VERSION_NLCLASS)
|
|
|
|
- if (tclass >= unmap_class(SECCLASS_NETLINK_ROUTE_SOCKET) &&
|
|
|
|
- tclass <= unmap_class(SECCLASS_NETLINK_DNRT_SOCKET))
|
|
|
|
- tclass = unmap_class(SECCLASS_NETLINK_SOCKET);
|
|
|
|
-
|
|
|
|
if (!tclass || tclass > policydb.p_classes.nprim) {
|
|
if (!tclass || tclass > policydb.p_classes.nprim) {
|
|
printk(KERN_ERR "SELinux: %s: unrecognized class %d\n",
|
|
printk(KERN_ERR "SELinux: %s: unrecognized class %d\n",
|
|
__func__, tclass);
|
|
__func__, tclass);
|
|
@@ -1766,7 +1743,6 @@ int security_load_policy(void *data, size_t len)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
security_load_policycaps();
|
|
security_load_policycaps();
|
|
- policydb_loaded_version = policydb.policyvers;
|
|
|
|
ss_initialized = 1;
|
|
ss_initialized = 1;
|
|
seqno = ++latest_granting;
|
|
seqno = ++latest_granting;
|
|
selinux_complete_init();
|
|
selinux_complete_init();
|
|
@@ -1829,7 +1805,6 @@ int security_load_policy(void *data, size_t len)
|
|
current_mapping = map;
|
|
current_mapping = map;
|
|
current_mapping_size = map_size;
|
|
current_mapping_size = map_size;
|
|
seqno = ++latest_granting;
|
|
seqno = ++latest_granting;
|
|
- policydb_loaded_version = policydb.policyvers;
|
|
|
|
write_unlock_irq(&policy_rwlock);
|
|
write_unlock_irq(&policy_rwlock);
|
|
|
|
|
|
/* Free the old policydb and SID table. */
|
|
/* Free the old policydb and SID table. */
|