audit: fix coding style issues
Fix various coding style issues across the audit subsystem flagged
by checkpatch.pl script to adhere to kernel coding standards.
Specific changes include:
- kernel/auditfilter.c: Move the open brace '{' to the previous line
for the audit_ops array declaration.
- lib/audit.c: Add a required space before the open parenthesis '('.
- include/uapi/linux/audit.h: Enclose the complex macro value for
AUDIT_UID_UNSET in parentheses.
Signed-off-by: Ricardo Robaina <rrobaina@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
parent
a6053fefcd
commit
f3e334fb7f
3 changed files with 3 additions and 4 deletions
|
|
@ -508,7 +508,7 @@ struct audit_tty_status {
|
||||||
__u32 log_passwd; /* 1 = enabled, 0 = disabled */
|
__u32 log_passwd; /* 1 = enabled, 0 = disabled */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define AUDIT_UID_UNSET (unsigned int)-1
|
#define AUDIT_UID_UNSET ((unsigned int)-1)
|
||||||
#define AUDIT_SID_UNSET ((unsigned int)-1)
|
#define AUDIT_SID_UNSET ((unsigned int)-1)
|
||||||
|
|
||||||
/* audit_rule_data supports filter rules with both integer and string
|
/* audit_rule_data supports filter rules with both integer and string
|
||||||
|
|
|
||||||
|
|
@ -303,8 +303,7 @@ exit_err:
|
||||||
return ERR_PTR(err);
|
return ERR_PTR(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 audit_ops[] =
|
static u32 audit_ops[] = {
|
||||||
{
|
|
||||||
[Audit_equal] = AUDIT_EQUAL,
|
[Audit_equal] = AUDIT_EQUAL,
|
||||||
[Audit_not_equal] = AUDIT_NOT_EQUAL,
|
[Audit_not_equal] = AUDIT_NOT_EQUAL,
|
||||||
[Audit_bitmask] = AUDIT_BIT_MASK,
|
[Audit_bitmask] = AUDIT_BIT_MASK,
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ int audit_classify_syscall(int abi, unsigned syscall)
|
||||||
if (audit_is_compat(abi))
|
if (audit_is_compat(abi))
|
||||||
return audit_classify_compat_syscall(abi, syscall);
|
return audit_classify_compat_syscall(abi, syscall);
|
||||||
|
|
||||||
switch(syscall) {
|
switch (syscall) {
|
||||||
#ifdef __NR_open
|
#ifdef __NR_open
|
||||||
case __NR_open:
|
case __NR_open:
|
||||||
return AUDITSC_OPEN;
|
return AUDITSC_OPEN;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue