Commit 5985de67 authored by Ameen Ali's avatar Ameen Ali Committed by Paul Moore

audit: code clean up

Fixed a coding style issue (unnecessary parentheses , unnecessary braces)
Signed-off-by: default avatarAmeen-Ali <Ameenali023@gmail.com>
[PM: tweaked subject line]
Signed-off-by: default avatarPaul Moore <pmoore@redhat.com>
parent efef73a1
...@@ -673,7 +673,7 @@ static int audit_netlink_ok(struct sk_buff *skb, u16 msg_type) ...@@ -673,7 +673,7 @@ static int audit_netlink_ok(struct sk_buff *skb, u16 msg_type)
case AUDIT_MAKE_EQUIV: case AUDIT_MAKE_EQUIV:
/* Only support auditd and auditctl in initial pid namespace /* Only support auditd and auditctl in initial pid namespace
* for now. */ * for now. */
if ((task_active_pid_ns(current) != &init_pid_ns)) if (task_active_pid_ns(current) != &init_pid_ns)
return -EPERM; return -EPERM;
if (!netlink_capable(skb, CAP_AUDIT_CONTROL)) if (!netlink_capable(skb, CAP_AUDIT_CONTROL))
...@@ -1770,7 +1770,7 @@ void audit_log_name(struct audit_context *context, struct audit_names *n, ...@@ -1770,7 +1770,7 @@ void audit_log_name(struct audit_context *context, struct audit_names *n,
} else } else
audit_log_format(ab, " name=(null)"); audit_log_format(ab, " name=(null)");
if (n->ino != (unsigned long)-1) { if (n->ino != (unsigned long)-1)
audit_log_format(ab, " inode=%lu" audit_log_format(ab, " inode=%lu"
" dev=%02x:%02x mode=%#ho" " dev=%02x:%02x mode=%#ho"
" ouid=%u ogid=%u rdev=%02x:%02x", " ouid=%u ogid=%u rdev=%02x:%02x",
...@@ -1782,7 +1782,6 @@ void audit_log_name(struct audit_context *context, struct audit_names *n, ...@@ -1782,7 +1782,6 @@ void audit_log_name(struct audit_context *context, struct audit_names *n,
from_kgid(&init_user_ns, n->gid), from_kgid(&init_user_ns, n->gid),
MAJOR(n->rdev), MAJOR(n->rdev),
MINOR(n->rdev)); MINOR(n->rdev));
}
if (n->osid != 0) { if (n->osid != 0) {
char *ctx = NULL; char *ctx = NULL;
u32 len; u32 len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment