diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/audit.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/audit.c b/kernel/audit.c index 52ee8eee0e07..d5a1220c8620 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
@@ -346,7 +346,7 @@ static int audit_set_backlog_wait_time(u32 timeout) | |||
346 | static int audit_set_enabled(u32 state) | 346 | static int audit_set_enabled(u32 state) |
347 | { | 347 | { |
348 | int rc; | 348 | int rc; |
349 | if (state < AUDIT_OFF || state > AUDIT_LOCKED) | 349 | if (state > AUDIT_LOCKED) |
350 | return -EINVAL; | 350 | return -EINVAL; |
351 | 351 | ||
352 | rc = audit_do_config_change("audit_enabled", &audit_enabled, state); | 352 | rc = audit_do_config_change("audit_enabled", &audit_enabled, state); |
@@ -888,8 +888,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) | |||
888 | if (s.mask & AUDIT_STATUS_BACKLOG_WAIT_TIME) { | 888 | if (s.mask & AUDIT_STATUS_BACKLOG_WAIT_TIME) { |
889 | if (sizeof(s) > (size_t)nlh->nlmsg_len) | 889 | if (sizeof(s) > (size_t)nlh->nlmsg_len) |
890 | return -EINVAL; | 890 | return -EINVAL; |
891 | if (s.backlog_wait_time < 0 || | 891 | if (s.backlog_wait_time > 10*AUDIT_BACKLOG_WAIT_TIME) |
892 | s.backlog_wait_time > 10*AUDIT_BACKLOG_WAIT_TIME) | ||
893 | return -EINVAL; | 892 | return -EINVAL; |
894 | err = audit_set_backlog_wait_time(s.backlog_wait_time); | 893 | err = audit_set_backlog_wait_time(s.backlog_wait_time); |
895 | if (err < 0) | 894 | if (err < 0) |