diff options
author | Eric Paris <eparis@redhat.com> | 2008-04-17 11:52:44 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2008-04-21 05:09:26 -0400 |
commit | 744ba35e455b0d5cf4f85208a8ca0edcc9976b95 (patch) | |
tree | 1b242324aeba16d07e1a3811df041969c10422a6 /security/selinux/ss/conditional.c | |
parent | 11670889380b144adfa5a91dc184c8f6300c4b28 (diff) |
SELinux: clean up printks
Make sure all printk start with KERN_*
Make sure all printk end with \n
Make sure all printk have the word 'selinux' in them
Change "function name" to "%s", __func__ (found 2 wrong)
Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/selinux/ss/conditional.c')
-rw-r--r-- | security/selinux/ss/conditional.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/security/selinux/ss/conditional.c b/security/selinux/ss/conditional.c index 5691af498c40..3a464c75d047 100644 --- a/security/selinux/ss/conditional.c +++ b/security/selinux/ss/conditional.c | |||
@@ -273,7 +273,7 @@ static int cond_insertf(struct avtab *a, struct avtab_key *k, struct avtab_datum | |||
273 | */ | 273 | */ |
274 | if (k->specified & AVTAB_TYPE) { | 274 | if (k->specified & AVTAB_TYPE) { |
275 | if (avtab_search(&p->te_avtab, k)) { | 275 | if (avtab_search(&p->te_avtab, k)) { |
276 | printk("SELinux: type rule already exists outside of a conditional."); | 276 | printk(KERN_ERR "SELinux: type rule already exists outside of a conditional.\n"); |
277 | goto err; | 277 | goto err; |
278 | } | 278 | } |
279 | /* | 279 | /* |
@@ -288,7 +288,7 @@ static int cond_insertf(struct avtab *a, struct avtab_key *k, struct avtab_datum | |||
288 | node_ptr = avtab_search_node(&p->te_cond_avtab, k); | 288 | node_ptr = avtab_search_node(&p->te_cond_avtab, k); |
289 | if (node_ptr) { | 289 | if (node_ptr) { |
290 | if (avtab_search_node_next(node_ptr, k->specified)) { | 290 | if (avtab_search_node_next(node_ptr, k->specified)) { |
291 | printk("SELinux: too many conflicting type rules."); | 291 | printk(KERN_ERR "SELinux: too many conflicting type rules.\n"); |
292 | goto err; | 292 | goto err; |
293 | } | 293 | } |
294 | found = 0; | 294 | found = 0; |
@@ -299,13 +299,13 @@ static int cond_insertf(struct avtab *a, struct avtab_key *k, struct avtab_datum | |||
299 | } | 299 | } |
300 | } | 300 | } |
301 | if (!found) { | 301 | if (!found) { |
302 | printk("SELinux: conflicting type rules.\n"); | 302 | printk(KERN_ERR "SELinux: conflicting type rules.\n"); |
303 | goto err; | 303 | goto err; |
304 | } | 304 | } |
305 | } | 305 | } |
306 | } else { | 306 | } else { |
307 | if (avtab_search(&p->te_cond_avtab, k)) { | 307 | if (avtab_search(&p->te_cond_avtab, k)) { |
308 | printk("SELinux: conflicting type rules when adding type rule for true.\n"); | 308 | printk(KERN_ERR "SELinux: conflicting type rules when adding type rule for true.\n"); |
309 | goto err; | 309 | goto err; |
310 | } | 310 | } |
311 | } | 311 | } |
@@ -313,7 +313,7 @@ static int cond_insertf(struct avtab *a, struct avtab_key *k, struct avtab_datum | |||
313 | 313 | ||
314 | node_ptr = avtab_insert_nonunique(&p->te_cond_avtab, k, d); | 314 | node_ptr = avtab_insert_nonunique(&p->te_cond_avtab, k, d); |
315 | if (!node_ptr) { | 315 | if (!node_ptr) { |
316 | printk("SELinux: could not insert rule."); | 316 | printk(KERN_ERR "SELinux: could not insert rule.\n"); |
317 | goto err; | 317 | goto err; |
318 | } | 318 | } |
319 | 319 | ||
@@ -372,12 +372,12 @@ static int cond_read_av_list(struct policydb *p, void *fp, struct cond_av_list * | |||
372 | static int expr_isvalid(struct policydb *p, struct cond_expr *expr) | 372 | static int expr_isvalid(struct policydb *p, struct cond_expr *expr) |
373 | { | 373 | { |
374 | if (expr->expr_type <= 0 || expr->expr_type > COND_LAST) { | 374 | if (expr->expr_type <= 0 || expr->expr_type > COND_LAST) { |
375 | printk("SELinux: conditional expressions uses unknown operator.\n"); | 375 | printk(KERN_ERR "SELinux: conditional expressions uses unknown operator.\n"); |
376 | return 0; | 376 | return 0; |
377 | } | 377 | } |
378 | 378 | ||
379 | if (expr->bool > p->p_bools.nprim) { | 379 | if (expr->bool > p->p_bools.nprim) { |
380 | printk("SELinux: conditional expressions uses unknown bool.\n"); | 380 | printk(KERN_ERR "SELinux: conditional expressions uses unknown bool.\n"); |
381 | return 0; | 381 | return 0; |
382 | } | 382 | } |
383 | return 1; | 383 | return 1; |