Commit 66b12abc authored by Paul Moore's avatar Paul Moore

audit: fix some horrible switch statement style crimes

Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent 2b4c7afe
...@@ -1343,8 +1343,12 @@ static int audit_filter_user_rules(struct audit_krule *rule, int type, ...@@ -1343,8 +1343,12 @@ static int audit_filter_user_rules(struct audit_krule *rule, int type,
return result; return result;
} }
switch (rule->action) { switch (rule->action) {
case AUDIT_NEVER: *state = AUDIT_DISABLED; break; case AUDIT_NEVER:
case AUDIT_ALWAYS: *state = AUDIT_RECORD_CONTEXT; break; *state = AUDIT_DISABLED;
break;
case AUDIT_ALWAYS:
*state = AUDIT_RECORD_CONTEXT;
break;
} }
return 1; return 1;
} }
......
...@@ -695,8 +695,12 @@ static int audit_filter_rules(struct task_struct *tsk, ...@@ -695,8 +695,12 @@ static int audit_filter_rules(struct task_struct *tsk,
ctx->prio = rule->prio; ctx->prio = rule->prio;
} }
switch (rule->action) { switch (rule->action) {
case AUDIT_NEVER: *state = AUDIT_DISABLED; break; case AUDIT_NEVER:
case AUDIT_ALWAYS: *state = AUDIT_RECORD_CONTEXT; break; *state = AUDIT_DISABLED;
break;
case AUDIT_ALWAYS:
*state = AUDIT_RECORD_CONTEXT;
break;
} }
return 1; return 1;
} }
......
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