selinux: allow dontauditx and auditallowx rules to take effect without allowx
authorbauen1 <j2468h@googlemail.com>
Fri, 9 Oct 2020 12:47:11 +0000 (14:47 +0200)
committerPaul Moore <paul@paul-moore.com>
Wed, 28 Oct 2020 02:21:11 +0000 (22:21 -0400)
This allows for dontauditing very specific ioctls e.g. TCGETS without
dontauditing every ioctl or granting additional permissions.

Now either an allowx, dontauditx or auditallowx rules enables checking
for extended permissions.

Signed-off-by: Jonathan Hettwer <j2468h@gmail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/ss/services.c

index 9704c8a..597b797 100644 (file)
@@ -596,9 +596,7 @@ void services_compute_xperms_drivers(
                                        node->datum.u.xperms->driver);
        }
 
-       /* If no ioctl commands are allowed, ignore auditallow and auditdeny */
-       if (node->key.specified & AVTAB_XPERMS_ALLOWED)
-               xperms->len = 1;
+       xperms->len = 1;
 }
 
 /*