aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/ss/services.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/selinux/ss/services.c')
-rw-r--r--security/selinux/ss/services.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index 3f2bad28ee7b..26de2be0c8e2 100644
--- a/security/selinux/ss/services.c
+++ b/security/selinux/ss/services.c
@@ -1096,7 +1096,7 @@ static int validate_classes(struct policydb *p)
1096 continue; 1096 continue;
1097 if (i > p->p_classes.nprim) { 1097 if (i > p->p_classes.nprim) {
1098 printk(KERN_INFO 1098 printk(KERN_INFO
1099 "security: class %s not defined in policy\n", 1099 "SELinux: class %s not defined in policy\n",
1100 def_class); 1100 def_class);
1101 if (p->reject_unknown) 1101 if (p->reject_unknown)
1102 return -EINVAL; 1102 return -EINVAL;
@@ -1107,7 +1107,7 @@ static int validate_classes(struct policydb *p)
1107 pol_class = p->p_class_val_to_name[i-1]; 1107 pol_class = p->p_class_val_to_name[i-1];
1108 if (strcmp(pol_class, def_class)) { 1108 if (strcmp(pol_class, def_class)) {
1109 printk(KERN_ERR 1109 printk(KERN_ERR
1110 "security: class %d is incorrect, found %s but should be %s\n", 1110 "SELinux: class %d is incorrect, found %s but should be %s\n",
1111 i, pol_class, def_class); 1111 i, pol_class, def_class);
1112 return -EINVAL; 1112 return -EINVAL;
1113 } 1113 }
@@ -1125,7 +1125,7 @@ static int validate_classes(struct policydb *p)
1125 nprim = 1 << (perms->nprim - 1); 1125 nprim = 1 << (perms->nprim - 1);
1126 if (perm_val > nprim) { 1126 if (perm_val > nprim) {
1127 printk(KERN_INFO 1127 printk(KERN_INFO
1128 "security: permission %s in class %s not defined in policy\n", 1128 "SELinux: permission %s in class %s not defined in policy\n",
1129 def_perm, pol_class); 1129 def_perm, pol_class);
1130 if (p->reject_unknown) 1130 if (p->reject_unknown)
1131 return -EINVAL; 1131 return -EINVAL;
@@ -1136,14 +1136,14 @@ static int validate_classes(struct policydb *p)
1136 perdatum = hashtab_search(perms->table, def_perm); 1136 perdatum = hashtab_search(perms->table, def_perm);
1137 if (perdatum == NULL) { 1137 if (perdatum == NULL) {
1138 printk(KERN_ERR 1138 printk(KERN_ERR
1139 "security: permission %s in class %s not found in policy, bad policy\n", 1139 "SELinux: permission %s in class %s not found in policy, bad policy\n",
1140 def_perm, pol_class); 1140 def_perm, pol_class);
1141 return -EINVAL; 1141 return -EINVAL;
1142 } 1142 }
1143 pol_val = 1 << (perdatum->value - 1); 1143 pol_val = 1 << (perdatum->value - 1);
1144 if (pol_val != perm_val) { 1144 if (pol_val != perm_val) {
1145 printk(KERN_ERR 1145 printk(KERN_ERR
1146 "security: permission %s in class %s has incorrect value\n", 1146 "SELinux: permission %s in class %s has incorrect value\n",
1147 def_perm, pol_class); 1147 def_perm, pol_class);
1148 return -EINVAL; 1148 return -EINVAL;
1149 } 1149 }
@@ -1157,7 +1157,7 @@ static int validate_classes(struct policydb *p)
1157 BUG_ON(!cladatum); 1157 BUG_ON(!cladatum);
1158 if (!cladatum->comdatum) { 1158 if (!cladatum->comdatum) {
1159 printk(KERN_ERR 1159 printk(KERN_ERR
1160 "security: class %s should have an inherits clause but does not\n", 1160 "SELinux: class %s should have an inherits clause but does not\n",
1161 pol_class); 1161 pol_class);
1162 return -EINVAL; 1162 return -EINVAL;
1163 } 1163 }
@@ -1172,7 +1172,7 @@ static int validate_classes(struct policydb *p)
1172 def_perm = kdefs->av_inherit[i].common_pts[j]; 1172 def_perm = kdefs->av_inherit[i].common_pts[j];
1173 if (j >= perms->nprim) { 1173 if (j >= perms->nprim) {
1174 printk(KERN_INFO 1174 printk(KERN_INFO
1175 "security: permission %s in class %s not defined in policy\n", 1175 "SELinux: permission %s in class %s not defined in policy\n",
1176 def_perm, pol_class); 1176 def_perm, pol_class);
1177 if (p->reject_unknown) 1177 if (p->reject_unknown)
1178 return -EINVAL; 1178 return -EINVAL;
@@ -1183,13 +1183,13 @@ static int validate_classes(struct policydb *p)
1183 perdatum = hashtab_search(perms->table, def_perm); 1183 perdatum = hashtab_search(perms->table, def_perm);
1184 if (perdatum == NULL) { 1184 if (perdatum == NULL) {
1185 printk(KERN_ERR 1185 printk(KERN_ERR
1186 "security: permission %s in class %s not found in policy, bad policy\n", 1186 "SELinux: permission %s in class %s not found in policy, bad policy\n",
1187 def_perm, pol_class); 1187 def_perm, pol_class);
1188 return -EINVAL; 1188 return -EINVAL;
1189 } 1189 }
1190 if (perdatum->value != j + 1) { 1190 if (perdatum->value != j + 1) {
1191 printk(KERN_ERR 1191 printk(KERN_ERR
1192 "security: permission %s in class %s has incorrect value\n", 1192 "SELinux: permission %s in class %s has incorrect value\n",
1193 def_perm, pol_class); 1193 def_perm, pol_class);
1194 return -EINVAL; 1194 return -EINVAL;
1195 } 1195 }
@@ -1219,7 +1219,7 @@ static inline int convert_context_handle_invalid_context(struct context *context
1219 u32 len; 1219 u32 len;
1220 1220
1221 context_struct_to_string(context, &s, &len); 1221 context_struct_to_string(context, &s, &len);
1222 printk(KERN_ERR "security: context %s is invalid\n", s); 1222 printk(KERN_ERR "SELinux: context %s is invalid\n", s);
1223 kfree(s); 1223 kfree(s);
1224 } 1224 }
1225 return rc; 1225 return rc;
@@ -1299,7 +1299,7 @@ out:
1299bad: 1299bad:
1300 context_struct_to_string(&oldc, &s, &len); 1300 context_struct_to_string(&oldc, &s, &len);
1301 context_destroy(&oldc); 1301 context_destroy(&oldc);
1302 printk(KERN_ERR "security: invalidating context %s\n", s); 1302 printk(KERN_ERR "SELinux: invalidating context %s\n", s);
1303 kfree(s); 1303 kfree(s);
1304 goto out; 1304 goto out;
1305} 1305}
@@ -1350,7 +1350,7 @@ int security_load_policy(void *data, size_t len)
1350 /* Verify that the kernel defined classes are correct. */ 1350 /* Verify that the kernel defined classes are correct. */
1351 if (validate_classes(&policydb)) { 1351 if (validate_classes(&policydb)) {
1352 printk(KERN_ERR 1352 printk(KERN_ERR
1353 "security: the definition of a class is incorrect\n"); 1353 "SELinux: the definition of a class is incorrect\n");
1354 LOAD_UNLOCK; 1354 LOAD_UNLOCK;
1355 sidtab_destroy(&sidtab); 1355 sidtab_destroy(&sidtab);
1356 policydb_destroy(&policydb); 1356 policydb_destroy(&policydb);
@@ -1384,14 +1384,14 @@ int security_load_policy(void *data, size_t len)
1384 /* Verify that the kernel defined classes are correct. */ 1384 /* Verify that the kernel defined classes are correct. */
1385 if (validate_classes(&newpolicydb)) { 1385 if (validate_classes(&newpolicydb)) {
1386 printk(KERN_ERR 1386 printk(KERN_ERR
1387 "security: the definition of a class is incorrect\n"); 1387 "SELinux: the definition of a class is incorrect\n");
1388 rc = -EINVAL; 1388 rc = -EINVAL;
1389 goto err; 1389 goto err;
1390 } 1390 }
1391 1391
1392 rc = security_preserve_bools(&newpolicydb); 1392 rc = security_preserve_bools(&newpolicydb);
1393 if (rc) { 1393 if (rc) {
1394 printk(KERN_ERR "security: unable to preserve booleans\n"); 1394 printk(KERN_ERR "SELinux: unable to preserve booleans\n");
1395 goto err; 1395 goto err;
1396 } 1396 }
1397 1397