aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2008-04-17 11:52:44 -0400
committerJames Morris <jmorris@namei.org>2008-04-21 05:09:26 -0400
commit744ba35e455b0d5cf4f85208a8ca0edcc9976b95 (patch)
tree1b242324aeba16d07e1a3811df041969c10422a6 /security/selinux/hooks.c
parent11670889380b144adfa5a91dc184c8f6300c4b28 (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/hooks.c')
-rw-r--r--security/selinux/hooks.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index f9927f02bc3d..c507f67e2ba7 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -575,8 +575,8 @@ static int selinux_set_mnt_opts(struct super_block *sb,
575 goto out; 575 goto out;
576 } 576 }
577 rc = -EINVAL; 577 rc = -EINVAL;
578 printk(KERN_WARNING "Unable to set superblock options before " 578 printk(KERN_WARNING "SELinux: Unable to set superblock options "
579 "the security server is initialized\n"); 579 "before the security server is initialized\n");
580 goto out; 580 goto out;
581 } 581 }
582 582
@@ -1135,7 +1135,7 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent
1135 dentry = d_find_alias(inode); 1135 dentry = d_find_alias(inode);
1136 } 1136 }
1137 if (!dentry) { 1137 if (!dentry) {
1138 printk(KERN_WARNING "%s: no dentry for dev=%s " 1138 printk(KERN_WARNING "SELinux: %s: no dentry for dev=%s "
1139 "ino=%ld\n", __func__, inode->i_sb->s_id, 1139 "ino=%ld\n", __func__, inode->i_sb->s_id,
1140 inode->i_ino); 1140 inode->i_ino);
1141 goto out_unlock; 1141 goto out_unlock;
@@ -1173,7 +1173,7 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent
1173 dput(dentry); 1173 dput(dentry);
1174 if (rc < 0) { 1174 if (rc < 0) {
1175 if (rc != -ENODATA) { 1175 if (rc != -ENODATA) {
1176 printk(KERN_WARNING "%s: getxattr returned " 1176 printk(KERN_WARNING "SELinux: %s: getxattr returned "
1177 "%d for dev=%s ino=%ld\n", __func__, 1177 "%d for dev=%s ino=%ld\n", __func__,
1178 -rc, inode->i_sb->s_id, inode->i_ino); 1178 -rc, inode->i_sb->s_id, inode->i_ino);
1179 kfree(context); 1179 kfree(context);
@@ -1187,7 +1187,7 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent
1187 sbsec->def_sid, 1187 sbsec->def_sid,
1188 GFP_NOFS); 1188 GFP_NOFS);
1189 if (rc) { 1189 if (rc) {
1190 printk(KERN_WARNING "%s: context_to_sid(%s) " 1190 printk(KERN_WARNING "SELinux: %s: context_to_sid(%s) "
1191 "returned %d for dev=%s ino=%ld\n", 1191 "returned %d for dev=%s ino=%ld\n",
1192 __func__, context, -rc, 1192 __func__, context, -rc,
1193 inode->i_sb->s_id, inode->i_ino); 1193 inode->i_sb->s_id, inode->i_ino);
@@ -1510,7 +1510,8 @@ static int may_link(struct inode *dir,
1510 av = DIR__RMDIR; 1510 av = DIR__RMDIR;
1511 break; 1511 break;
1512 default: 1512 default:
1513 printk(KERN_WARNING "may_link: unrecognized kind %d\n", kind); 1513 printk(KERN_WARNING "SELinux: %s: unrecognized kind %d\n",
1514 __func__, kind);
1514 return 0; 1515 return 0;
1515 } 1516 }
1516 1517
@@ -1640,8 +1641,8 @@ static inline u32 open_file_mask_to_av(int mode, int mask)
1640 else if (S_ISDIR(mode)) 1641 else if (S_ISDIR(mode))
1641 av |= DIR__OPEN; 1642 av |= DIR__OPEN;
1642 else 1643 else
1643 printk(KERN_ERR "SELinux: WARNING: inside open_file_to_av " 1644 printk(KERN_ERR "SELinux: WARNING: inside %s with "
1644 "with unknown mode:%x\n", mode); 1645 "unknown mode:%x\n", __func__, mode);
1645 } 1646 }
1646 return av; 1647 return av;
1647} 1648}