|
@@ -599,9 +599,7 @@ static int audit_filter_rules(struct task_struct *tsk,
|
|
|
result = match_tree_refs(ctx, rule->tree);
|
|
|
break;
|
|
|
case AUDIT_LOGINUID:
|
|
|
- result = 0;
|
|
|
- if (ctx)
|
|
|
- result = audit_uid_comparator(tsk->loginuid, f->op, f->uid);
|
|
|
+ result = audit_uid_comparator(tsk->loginuid, f->op, f->uid);
|
|
|
break;
|
|
|
case AUDIT_LOGINUID_SET:
|
|
|
result = audit_comparator(audit_loginuid_set(tsk), f->op, f->val);
|
|
@@ -1023,7 +1021,7 @@ static int audit_log_single_execve_arg(struct audit_context *context,
|
|
|
* for strings that are too long, we should not have created
|
|
|
* any.
|
|
|
*/
|
|
|
- if (unlikely((len == -1) || len > MAX_ARG_STRLEN - 1)) {
|
|
|
+ if (unlikely((len == 0) || len > MAX_ARG_STRLEN - 1)) {
|
|
|
WARN_ON(1);
|
|
|
send_sig(SIGKILL, current, 0);
|
|
|
return -1;
|