security: replace remaining __FUNCTION__ occurrences

__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: James Morris <jmorris@namei.org>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Morris <jmorris@namei.org>
This commit is contained in:
Harvey Harrison 2008-03-06 10:03:59 +11:00 committed by James Morris
parent b0c636b999
commit dd6f953adb
8 changed files with 26 additions and 26 deletions

View File

@ -267,7 +267,7 @@ static int get_file_caps(struct linux_binprm *bprm)
rc = cap_from_disk(&vcaps, bprm, rc); rc = cap_from_disk(&vcaps, bprm, rc);
if (rc) if (rc)
printk(KERN_NOTICE "%s: cap_from_disk returned %d for %s\n", printk(KERN_NOTICE "%s: cap_from_disk returned %d for %s\n",
__FUNCTION__, rc, bprm->filename); __func__, rc, bprm->filename);
out: out:
dput(dentry); dput(dentry);
@ -302,7 +302,7 @@ int cap_bprm_set_security (struct linux_binprm *bprm)
ret = get_file_caps(bprm); ret = get_file_caps(bprm);
if (ret) if (ret)
printk(KERN_NOTICE "%s: get_file_caps returned %d for %s\n", printk(KERN_NOTICE "%s: get_file_caps returned %d for %s\n",
__FUNCTION__, ret, bprm->filename); __func__, ret, bprm->filename);
/* To support inheritance of root-permissions and suid-root /* To support inheritance of root-permissions and suid-root
* executables under compatibility mode, we raise all three * executables under compatibility mode, we raise all three

View File

@ -22,16 +22,16 @@ void no_printk(const char *fmt, ...)
#ifdef __KDEBUG #ifdef __KDEBUG
#define kenter(FMT, ...) \ #define kenter(FMT, ...) \
printk(KERN_DEBUG "==> %s("FMT")\n", __FUNCTION__, ##__VA_ARGS__) printk(KERN_DEBUG "==> %s("FMT")\n", __func__, ##__VA_ARGS__)
#define kleave(FMT, ...) \ #define kleave(FMT, ...) \
printk(KERN_DEBUG "<== %s()"FMT"\n", __FUNCTION__, ##__VA_ARGS__) printk(KERN_DEBUG "<== %s()"FMT"\n", __func__, ##__VA_ARGS__)
#define kdebug(FMT, ...) \ #define kdebug(FMT, ...) \
printk(KERN_DEBUG "xxx" FMT"yyy\n", ##__VA_ARGS__) printk(KERN_DEBUG "xxx" FMT"yyy\n", ##__VA_ARGS__)
#else #else
#define kenter(FMT, ...) \ #define kenter(FMT, ...) \
no_printk(KERN_DEBUG "==> %s("FMT")\n", __FUNCTION__, ##__VA_ARGS__) no_printk(KERN_DEBUG "==> %s("FMT")\n", __func__, ##__VA_ARGS__)
#define kleave(FMT, ...) \ #define kleave(FMT, ...) \
no_printk(KERN_DEBUG "<== %s()"FMT"\n", __FUNCTION__, ##__VA_ARGS__) no_printk(KERN_DEBUG "<== %s()"FMT"\n", __func__, ##__VA_ARGS__)
#define kdebug(FMT, ...) \ #define kdebug(FMT, ...) \
no_printk(KERN_DEBUG FMT"\n", ##__VA_ARGS__) no_printk(KERN_DEBUG FMT"\n", ##__VA_ARGS__)
#endif #endif

View File

@ -49,7 +49,7 @@ module_param(debug, bool, 0600);
do { \ do { \
if (debug) \ if (debug) \
printk(KERN_DEBUG "%s: %s: " fmt , \ printk(KERN_DEBUG "%s: %s: " fmt , \
MY_NAME , __FUNCTION__ , \ MY_NAME , __func__ , \
## arg); \ ## arg); \
} while (0) } while (0)

View File

@ -57,7 +57,7 @@ int __init security_init(void)
if (verify(&dummy_security_ops)) { if (verify(&dummy_security_ops)) {
printk(KERN_ERR "%s could not verify " printk(KERN_ERR "%s could not verify "
"dummy_security_ops structure.\n", __FUNCTION__); "dummy_security_ops structure.\n", __func__);
return -EIO; return -EIO;
} }
@ -82,7 +82,7 @@ int register_security(struct security_operations *ops)
{ {
if (verify(ops)) { if (verify(ops)) {
printk(KERN_DEBUG "%s could not verify " printk(KERN_DEBUG "%s could not verify "
"security_operations structure.\n", __FUNCTION__); "security_operations structure.\n", __func__);
return -EINVAL; return -EINVAL;
} }
@ -110,13 +110,13 @@ int mod_reg_security(const char *name, struct security_operations *ops)
{ {
if (verify(ops)) { if (verify(ops)) {
printk(KERN_INFO "%s could not verify " printk(KERN_INFO "%s could not verify "
"security operations.\n", __FUNCTION__); "security operations.\n", __func__);
return -EINVAL; return -EINVAL;
} }
if (ops == security_ops) { if (ops == security_ops) {
printk(KERN_INFO "%s security operations " printk(KERN_INFO "%s security operations "
"already registered.\n", __FUNCTION__); "already registered.\n", __func__);
return -EINVAL; return -EINVAL;
} }

View File

@ -668,7 +668,7 @@ static int selinux_set_mnt_opts(struct super_block *sb,
rc = security_fs_use(sb->s_type->name, &sbsec->behavior, &sbsec->sid); rc = security_fs_use(sb->s_type->name, &sbsec->behavior, &sbsec->sid);
if (rc) { if (rc) {
printk(KERN_WARNING "%s: security_fs_use(%s) returned %d\n", printk(KERN_WARNING "%s: security_fs_use(%s) returned %d\n",
__FUNCTION__, sb->s_type->name, rc); __func__, sb->s_type->name, rc);
goto out; goto out;
} }
@ -1134,7 +1134,7 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent
} }
if (!dentry) { if (!dentry) {
printk(KERN_WARNING "%s: no dentry for dev=%s " printk(KERN_WARNING "%s: no dentry for dev=%s "
"ino=%ld\n", __FUNCTION__, inode->i_sb->s_id, "ino=%ld\n", __func__, inode->i_sb->s_id,
inode->i_ino); inode->i_ino);
goto out_unlock; goto out_unlock;
} }
@ -1172,7 +1172,7 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent
if (rc < 0) { if (rc < 0) {
if (rc != -ENODATA) { if (rc != -ENODATA) {
printk(KERN_WARNING "%s: getxattr returned " printk(KERN_WARNING "%s: getxattr returned "
"%d for dev=%s ino=%ld\n", __FUNCTION__, "%d for dev=%s ino=%ld\n", __func__,
-rc, inode->i_sb->s_id, inode->i_ino); -rc, inode->i_sb->s_id, inode->i_ino);
kfree(context); kfree(context);
goto out_unlock; goto out_unlock;
@ -1187,7 +1187,7 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent
if (rc) { if (rc) {
printk(KERN_WARNING "%s: context_to_sid(%s) " printk(KERN_WARNING "%s: context_to_sid(%s) "
"returned %d for dev=%s ino=%ld\n", "returned %d for dev=%s ino=%ld\n",
__FUNCTION__, context, -rc, __func__, context, -rc,
inode->i_sb->s_id, inode->i_ino); inode->i_sb->s_id, inode->i_ino);
kfree(context); kfree(context);
/* Leave with the unlabeled SID */ /* Leave with the unlabeled SID */
@ -2437,7 +2437,7 @@ static int selinux_inode_init_security(struct inode *inode, struct inode *dir,
printk(KERN_WARNING "%s: " printk(KERN_WARNING "%s: "
"security_transition_sid failed, rc=%d (dev=%s " "security_transition_sid failed, rc=%d (dev=%s "
"ino=%ld)\n", "ino=%ld)\n",
__FUNCTION__, __func__,
-rc, inode->i_sb->s_id, inode->i_ino); -rc, inode->i_sb->s_id, inode->i_ino);
return rc; return rc;
} }
@ -2671,7 +2671,7 @@ static void selinux_inode_post_setxattr(struct dentry *dentry, char *name,
rc = security_context_to_sid(value, size, &newsid); rc = security_context_to_sid(value, size, &newsid);
if (rc) { if (rc) {
printk(KERN_WARNING "%s: unable to obtain SID for context " printk(KERN_WARNING "%s: unable to obtain SID for context "
"%s, rc=%d\n", __FUNCTION__, (char*)value, -rc); "%s, rc=%d\n", __func__, (char*)value, -rc);
return; return;
} }
@ -5017,14 +5017,14 @@ static int selinux_register_security (const char *name, struct security_operatio
{ {
if (secondary_ops != original_ops) { if (secondary_ops != original_ops) {
printk(KERN_ERR "%s: There is already a secondary security " printk(KERN_ERR "%s: There is already a secondary security "
"module registered.\n", __FUNCTION__); "module registered.\n", __func__);
return -EINVAL; return -EINVAL;
} }
secondary_ops = ops; secondary_ops = ops;
printk(KERN_INFO "%s: Registering secondary module %s\n", printk(KERN_INFO "%s: Registering secondary module %s\n",
__FUNCTION__, __func__,
name); name);
return 0; return 0;

View File

@ -89,7 +89,7 @@ static void selnl_notify(int msgtype, void *data)
nlmsg_failure: nlmsg_failure:
kfree_skb(skb); kfree_skb(skb);
oom: oom:
printk(KERN_ERR "SELinux: OOM in %s\n", __FUNCTION__); printk(KERN_ERR "SELinux: OOM in %s\n", __func__);
goto out; goto out;
} }

View File

@ -392,7 +392,7 @@ static ssize_t sel_write_context(struct file * file, char *buf, size_t size)
if (len > SIMPLE_TRANSACTION_LIMIT) { if (len > SIMPLE_TRANSACTION_LIMIT) {
printk(KERN_ERR "%s: context size (%u) exceeds payload " printk(KERN_ERR "%s: context size (%u) exceeds payload "
"max\n", __FUNCTION__, len); "max\n", __func__, len);
length = -ERANGE; length = -ERANGE;
goto out; goto out;
} }
@ -645,7 +645,7 @@ static ssize_t sel_write_create(struct file * file, char *buf, size_t size)
if (len > SIMPLE_TRANSACTION_LIMIT) { if (len > SIMPLE_TRANSACTION_LIMIT) {
printk(KERN_ERR "%s: context size (%u) exceeds payload " printk(KERN_ERR "%s: context size (%u) exceeds payload "
"max\n", __FUNCTION__, len); "max\n", __func__, len);
length = -ERANGE; length = -ERANGE;
goto out3; goto out3;
} }
@ -822,7 +822,7 @@ static ssize_t sel_write_member(struct file * file, char *buf, size_t size)
if (len > SIMPLE_TRANSACTION_LIMIT) { if (len > SIMPLE_TRANSACTION_LIMIT) {
printk(KERN_ERR "%s: context size (%u) exceeds payload " printk(KERN_ERR "%s: context size (%u) exceeds payload "
"max\n", __FUNCTION__, len); "max\n", __func__, len);
length = -ERANGE; length = -ERANGE;
goto out3; goto out3;
} }
@ -1761,7 +1761,7 @@ static int sel_fill_super(struct super_block * sb, void * data, int silent)
out: out:
return ret; return ret;
err: err:
printk(KERN_ERR "%s: failed while creating inodes\n", __FUNCTION__); printk(KERN_ERR "%s: failed while creating inodes\n", __func__);
goto out; goto out;
} }

View File

@ -413,7 +413,7 @@ static int context_struct_compute_av(struct context *scontext,
return 0; return 0;
inval_class: inval_class:
printk(KERN_ERR "%s: unrecognized class %d\n", __FUNCTION__, tclass); printk(KERN_ERR "%s: unrecognized class %d\n", __func__, tclass);
return -EINVAL; return -EINVAL;
} }
@ -2206,7 +2206,7 @@ int security_get_permissions(char *class, char ***perms, int *nperms)
match = hashtab_search(policydb.p_classes.table, class); match = hashtab_search(policydb.p_classes.table, class);
if (!match) { if (!match) {
printk(KERN_ERR "%s: unrecognized class %s\n", printk(KERN_ERR "%s: unrecognized class %s\n",
__FUNCTION__, class); __func__, class);
rc = -EINVAL; rc = -EINVAL;
goto out; goto out;
} }