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

Commit 86aea56f authored by Christos Gkekas's avatar Christos Gkekas Committed by John Johansen
Browse files

apparmor: Fix logical error in verify_header()



verify_header() is currently checking whether interface version is less
than 5 *and* greater than 7, which always evaluates to false. Instead it
should check whether it is less than 5 *or* greater than 7.

Signed-off-by: default avatarChristos Gkekas <chris.gekas@gmail.com>
Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
parent 19fe43a5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -832,7 +832,7 @@ static int verify_header(struct aa_ext *e, int required, const char **ns)
	 * if not specified use previous version
	 * Mask off everything that is not kernel abi version
	 */
	if (VERSION_LT(e->version, v5) && VERSION_GT(e->version, v7)) {
	if (VERSION_LT(e->version, v5) || VERSION_GT(e->version, v7)) {
		audit_iface(NULL, NULL, NULL, "unsupported interface version",
			    e, error);
		return error;