diff options
author | peter enderborg <peter.enderborg@sony.com> | 2018-06-12 04:09:00 -0400 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2018-06-19 11:39:12 -0400 |
commit | ab48576c4298f7d8cd93e78f085841a05967e125 (patch) | |
tree | f07b7f66aabd35916732d007c40088109b55479d /security | |
parent | cf76e1e5198aad2721c8da84c2cc0933d32223cf (diff) |
selinux: Cleanup printk logging in conditional
Replace printk with pr_* to avoid checkpatch warnings.
Signed-off-by: Peter Enderborg <peter.enderborg@sony.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/selinux/ss/conditional.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/security/selinux/ss/conditional.c b/security/selinux/ss/conditional.c index c91543a617ac..f49e522e932d 100644 --- a/security/selinux/ss/conditional.c +++ b/security/selinux/ss/conditional.c | |||
@@ -96,7 +96,7 @@ int evaluate_cond_node(struct policydb *p, struct cond_node *node) | |||
96 | if (new_state != node->cur_state) { | 96 | if (new_state != node->cur_state) { |
97 | node->cur_state = new_state; | 97 | node->cur_state = new_state; |
98 | if (new_state == -1) | 98 | if (new_state == -1) |
99 | printk(KERN_ERR "SELinux: expression result was undefined - disabling all rules.\n"); | 99 | pr_err("SELinux: expression result was undefined - disabling all rules.\n"); |
100 | /* turn the rules on or off */ | 100 | /* turn the rules on or off */ |
101 | for (cur = node->true_list; cur; cur = cur->next) { | 101 | for (cur = node->true_list; cur; cur = cur->next) { |
102 | if (new_state <= 0) | 102 | if (new_state <= 0) |
@@ -287,7 +287,7 @@ static int cond_insertf(struct avtab *a, struct avtab_key *k, struct avtab_datum | |||
287 | */ | 287 | */ |
288 | if (k->specified & AVTAB_TYPE) { | 288 | if (k->specified & AVTAB_TYPE) { |
289 | if (avtab_search(&p->te_avtab, k)) { | 289 | if (avtab_search(&p->te_avtab, k)) { |
290 | printk(KERN_ERR "SELinux: type rule already exists outside of a conditional.\n"); | 290 | pr_err("SELinux: type rule already exists outside of a conditional.\n"); |
291 | goto err; | 291 | goto err; |
292 | } | 292 | } |
293 | /* | 293 | /* |
@@ -302,7 +302,7 @@ static int cond_insertf(struct avtab *a, struct avtab_key *k, struct avtab_datum | |||
302 | node_ptr = avtab_search_node(&p->te_cond_avtab, k); | 302 | node_ptr = avtab_search_node(&p->te_cond_avtab, k); |
303 | if (node_ptr) { | 303 | if (node_ptr) { |
304 | if (avtab_search_node_next(node_ptr, k->specified)) { | 304 | if (avtab_search_node_next(node_ptr, k->specified)) { |
305 | printk(KERN_ERR "SELinux: too many conflicting type rules.\n"); | 305 | pr_err("SELinux: too many conflicting type rules.\n"); |
306 | goto err; | 306 | goto err; |
307 | } | 307 | } |
308 | found = 0; | 308 | found = 0; |
@@ -313,13 +313,13 @@ static int cond_insertf(struct avtab *a, struct avtab_key *k, struct avtab_datum | |||
313 | } | 313 | } |
314 | } | 314 | } |
315 | if (!found) { | 315 | if (!found) { |
316 | printk(KERN_ERR "SELinux: conflicting type rules.\n"); | 316 | pr_err("SELinux: conflicting type rules.\n"); |
317 | goto err; | 317 | goto err; |
318 | } | 318 | } |
319 | } | 319 | } |
320 | } else { | 320 | } else { |
321 | if (avtab_search(&p->te_cond_avtab, k)) { | 321 | if (avtab_search(&p->te_cond_avtab, k)) { |
322 | printk(KERN_ERR "SELinux: conflicting type rules when adding type rule for true.\n"); | 322 | pr_err("SELinux: conflicting type rules when adding type rule for true.\n"); |
323 | goto err; | 323 | goto err; |
324 | } | 324 | } |
325 | } | 325 | } |
@@ -327,7 +327,7 @@ static int cond_insertf(struct avtab *a, struct avtab_key *k, struct avtab_datum | |||
327 | 327 | ||
328 | node_ptr = avtab_insert_nonunique(&p->te_cond_avtab, k, d); | 328 | node_ptr = avtab_insert_nonunique(&p->te_cond_avtab, k, d); |
329 | if (!node_ptr) { | 329 | if (!node_ptr) { |
330 | printk(KERN_ERR "SELinux: could not insert rule.\n"); | 330 | pr_err("SELinux: could not insert rule.\n"); |
331 | rc = -ENOMEM; | 331 | rc = -ENOMEM; |
332 | goto err; | 332 | goto err; |
333 | } | 333 | } |
@@ -387,12 +387,12 @@ static int cond_read_av_list(struct policydb *p, void *fp, struct cond_av_list * | |||
387 | static int expr_isvalid(struct policydb *p, struct cond_expr *expr) | 387 | static int expr_isvalid(struct policydb *p, struct cond_expr *expr) |
388 | { | 388 | { |
389 | if (expr->expr_type <= 0 || expr->expr_type > COND_LAST) { | 389 | if (expr->expr_type <= 0 || expr->expr_type > COND_LAST) { |
390 | printk(KERN_ERR "SELinux: conditional expressions uses unknown operator.\n"); | 390 | pr_err("SELinux: conditional expressions uses unknown operator.\n"); |
391 | return 0; | 391 | return 0; |
392 | } | 392 | } |
393 | 393 | ||
394 | if (expr->bool > p->p_bools.nprim) { | 394 | if (expr->bool > p->p_bools.nprim) { |
395 | printk(KERN_ERR "SELinux: conditional expressions uses unknown bool.\n"); | 395 | pr_err("SELinux: conditional expressions uses unknown bool.\n"); |
396 | return 0; | 396 | return 0; |
397 | } | 397 | } |
398 | return 1; | 398 | return 1; |