aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/ss/policydb.c
diff options
context:
space:
mode:
authorEric Paris <eparis@parisplace.org>2007-02-22 18:11:31 -0500
committerJames Morris <jmorris@namei.org>2007-02-26 14:43:07 -0500
commitfadcdb451632d32d7c0d4c71df9ac2d3b7ae2348 (patch)
tree51e411452a4aa05bb5150d4d670324badf1a4bd0 /security/selinux/ss/policydb.c
parent9654640d0af8f2de40ff3807d3695109d3463f54 (diff)
Reassign printk levels in selinux kernel code
Below is a patch which demotes many printk lines to KERN_DEBUG from KERN_INFO. It should help stop the spamming of logs with messages in which users are not interested nor is there any action that users should take. It also promotes some KERN_INFO to KERN_ERR such as when there are improper attempts to register/unregister security modules. A similar patch was discussed a while back on list: http://marc.theaimsgroup.com/?t=116656343500003&r=1&w=2 This patch addresses almost all of the issues raised. I believe the only advice not taken was in the demoting of messages related to undefined permissions and classes. Signed-off-by: Eric Paris <eparis@redhat.com> Acked-by: Stephen Smalley <sds@tycho.nsa.gov> security/selinux/hooks.c | 20 ++++++++++---------- security/selinux/ss/avtab.c | 2 +- security/selinux/ss/policydb.c | 6 +++--- security/selinux/ss/sidtab.c | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/selinux/ss/policydb.c')
-rw-r--r--security/selinux/ss/policydb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c
index cd79c6338aa0..0ac1021734c0 100644
--- a/security/selinux/ss/policydb.c
+++ b/security/selinux/ss/policydb.c
@@ -374,7 +374,7 @@ static void symtab_hash_eval(struct symtab *s)
374 struct hashtab_info info; 374 struct hashtab_info info;
375 375
376 hashtab_stat(h, &info); 376 hashtab_stat(h, &info);
377 printk(KERN_INFO "%s: %d entries and %d/%d buckets used, " 377 printk(KERN_DEBUG "%s: %d entries and %d/%d buckets used, "
378 "longest chain length %d\n", symtab_name[i], h->nel, 378 "longest chain length %d\n", symtab_name[i], h->nel,
379 info.slots_used, h->size, info.max_chain_len); 379 info.slots_used, h->size, info.max_chain_len);
380 } 380 }
@@ -391,14 +391,14 @@ static int policydb_index_others(struct policydb *p)
391{ 391{
392 int i, rc = 0; 392 int i, rc = 0;
393 393
394 printk(KERN_INFO "security: %d users, %d roles, %d types, %d bools", 394 printk(KERN_DEBUG "security: %d users, %d roles, %d types, %d bools",
395 p->p_users.nprim, p->p_roles.nprim, p->p_types.nprim, p->p_bools.nprim); 395 p->p_users.nprim, p->p_roles.nprim, p->p_types.nprim, p->p_bools.nprim);
396 if (selinux_mls_enabled) 396 if (selinux_mls_enabled)
397 printk(", %d sens, %d cats", p->p_levels.nprim, 397 printk(", %d sens, %d cats", p->p_levels.nprim,
398 p->p_cats.nprim); 398 p->p_cats.nprim);
399 printk("\n"); 399 printk("\n");
400 400
401 printk(KERN_INFO "security: %d classes, %d rules\n", 401 printk(KERN_DEBUG "security: %d classes, %d rules\n",
402 p->p_classes.nprim, p->te_avtab.nel); 402 p->p_classes.nprim, p->te_avtab.nel);
403 403
404#ifdef DEBUG_HASHES 404#ifdef DEBUG_HASHES