diff options
Diffstat (limited to 'security/selinux/ss/policydb.c')
-rw-r--r-- | security/selinux/ss/policydb.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c index 6bdb0ff6a927..891c2d07e8b6 100644 --- a/security/selinux/ss/policydb.c +++ b/security/selinux/ss/policydb.c | |||
@@ -390,7 +390,7 @@ static void symtab_hash_eval(struct symtab *s) | |||
390 | struct hashtab_info info; | 390 | struct hashtab_info info; |
391 | 391 | ||
392 | hashtab_stat(h, &info); | 392 | hashtab_stat(h, &info); |
393 | printk(KERN_DEBUG "%s: %d entries and %d/%d buckets used, " | 393 | printk(KERN_DEBUG "SELinux: %s: %d entries and %d/%d buckets used, " |
394 | "longest chain length %d\n", symtab_name[i], h->nel, | 394 | "longest chain length %d\n", symtab_name[i], h->nel, |
395 | info.slots_used, h->size, info.max_chain_len); | 395 | info.slots_used, h->size, info.max_chain_len); |
396 | } | 396 | } |
@@ -1215,7 +1215,7 @@ static int role_read(struct policydb *p, struct hashtab *h, void *fp) | |||
1215 | 1215 | ||
1216 | if (strcmp(key, OBJECT_R) == 0) { | 1216 | if (strcmp(key, OBJECT_R) == 0) { |
1217 | if (role->value != OBJECT_R_VAL) { | 1217 | if (role->value != OBJECT_R_VAL) { |
1218 | printk(KERN_ERR "Role %s has wrong value %d\n", | 1218 | printk(KERN_ERR "SELinux: Role %s has wrong value %d\n", |
1219 | OBJECT_R, role->value); | 1219 | OBJECT_R, role->value); |
1220 | rc = -EINVAL; | 1220 | rc = -EINVAL; |
1221 | goto bad; | 1221 | goto bad; |
@@ -1551,22 +1551,23 @@ int policydb_read(struct policydb *p, void *fp) | |||
1551 | 1551 | ||
1552 | if ((le32_to_cpu(buf[1]) & POLICYDB_CONFIG_MLS)) { | 1552 | if ((le32_to_cpu(buf[1]) & POLICYDB_CONFIG_MLS)) { |
1553 | if (ss_initialized && !selinux_mls_enabled) { | 1553 | if (ss_initialized && !selinux_mls_enabled) { |
1554 | printk(KERN_ERR "Cannot switch between non-MLS and MLS " | 1554 | printk(KERN_ERR "SELinux: Cannot switch between non-MLS" |
1555 | "policies\n"); | 1555 | " and MLS policies\n"); |
1556 | goto bad; | 1556 | goto bad; |
1557 | } | 1557 | } |
1558 | selinux_mls_enabled = 1; | 1558 | selinux_mls_enabled = 1; |
1559 | config |= POLICYDB_CONFIG_MLS; | 1559 | config |= POLICYDB_CONFIG_MLS; |
1560 | 1560 | ||
1561 | if (p->policyvers < POLICYDB_VERSION_MLS) { | 1561 | if (p->policyvers < POLICYDB_VERSION_MLS) { |
1562 | printk(KERN_ERR "security policydb version %d (MLS) " | 1562 | printk(KERN_ERR "SELinux: security policydb version %d " |
1563 | "not backwards compatible\n", p->policyvers); | 1563 | "(MLS) not backwards compatible\n", |
1564 | p->policyvers); | ||
1564 | goto bad; | 1565 | goto bad; |
1565 | } | 1566 | } |
1566 | } else { | 1567 | } else { |
1567 | if (ss_initialized && selinux_mls_enabled) { | 1568 | if (ss_initialized && selinux_mls_enabled) { |
1568 | printk(KERN_ERR "Cannot switch between MLS and non-MLS " | 1569 | printk(KERN_ERR "SELinux: Cannot switch between MLS and" |
1569 | "policies\n"); | 1570 | " non-MLS policies\n"); |
1570 | goto bad; | 1571 | goto bad; |
1571 | } | 1572 | } |
1572 | } | 1573 | } |