Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f0c5fad authored by Eric Paris's avatar Eric Paris
Browse files

audit: remove needless switch in AUDIT_SET



If userspace specified that it was setting values via the mask we do not
need a second check to see if they also set the version field high
enough to understand those values.  (clearly if they set the mask they
knew those values).

Signed-off-by: default avatarEric Paris <eparis@redhat.com>
parent 70249a9c
Loading
Loading
Loading
Loading
+9 −16
Original line number Diff line number Diff line
@@ -834,10 +834,6 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
			if (err < 0)
				return err;
		}
		switch (s.version) {
		/* add future vers # cases immediately below and allow
		 * to fall through */
		case 2:
		if (s.mask & AUDIT_STATUS_BACKLOG_WAIT_TIME) {
			if (sizeof(s) > (size_t)nlh->nlmsg_len)
				return -EINVAL;
@@ -848,9 +844,6 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
			if (err < 0)
				return err;
		}
		default:
			break;
		}
		break;
	}
	case AUDIT_GET_FEATURE: