[PATCH] deprecate AUDIT_POSSBILE

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2006-05-23 01:36:13 -04:00
parent d8945bb51a
commit 014149cce1
2 changed files with 5 additions and 4 deletions

View File

@ -128,8 +128,11 @@ static inline struct audit_entry *audit_to_entry_common(struct audit_rule *rule)
#endif #endif
; ;
} }
if (rule->action != AUDIT_NEVER && rule->action != AUDIT_POSSIBLE && if (unlikely(rule->action == AUDIT_POSSIBLE)) {
rule->action != AUDIT_ALWAYS) printk(KERN_ERR "AUDIT_POSSIBLE is deprecated\n");
goto exit_err;
}
if (rule->action != AUDIT_NEVER && rule->action != AUDIT_ALWAYS)
goto exit_err; goto exit_err;
if (rule->field_count > AUDIT_MAX_FIELDS) if (rule->field_count > AUDIT_MAX_FIELDS)
goto exit_err; goto exit_err;
@ -734,7 +737,6 @@ static int audit_filter_user_rules(struct netlink_skb_parms *cb,
} }
switch (rule->action) { switch (rule->action) {
case AUDIT_NEVER: *state = AUDIT_DISABLED; break; case AUDIT_NEVER: *state = AUDIT_DISABLED; break;
case AUDIT_POSSIBLE: *state = AUDIT_BUILD_CONTEXT; break;
case AUDIT_ALWAYS: *state = AUDIT_RECORD_CONTEXT; break; case AUDIT_ALWAYS: *state = AUDIT_RECORD_CONTEXT; break;
} }
return 1; return 1;

View File

@ -307,7 +307,6 @@ static int audit_filter_rules(struct task_struct *tsk,
} }
switch (rule->action) { switch (rule->action) {
case AUDIT_NEVER: *state = AUDIT_DISABLED; break; case AUDIT_NEVER: *state = AUDIT_DISABLED; break;
case AUDIT_POSSIBLE: *state = AUDIT_BUILD_CONTEXT; break;
case AUDIT_ALWAYS: *state = AUDIT_RECORD_CONTEXT; break; case AUDIT_ALWAYS: *state = AUDIT_RECORD_CONTEXT; break;
} }
return 1; return 1;