mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 06:16:03 +00:00
Remove setting of capabilities from the syntax
The ability to set capabilities from a profile has been removed from the kernel for several releases. Remove it from the parser as well. Signed-off-by: John Johansen <john.johansen@canonical.com> Acked-by: Kees Cook <kees@ubuntu.com>
This commit is contained in:
@@ -609,15 +609,14 @@ int sd_serialize_profile(sd_serialize *p, struct codomain *profile,
|
||||
|
||||
#define low_caps(X) ((u32) ((X) & 0xffffffff))
|
||||
#define high_caps(X) ((u32) (((X) >> 32) & 0xffffffff))
|
||||
allowed_caps = (profile->capabilities | profile->set_caps) &
|
||||
~profile->deny_caps;
|
||||
allowed_caps = (profile->capabilities) & ~profile->deny_caps;
|
||||
if (!sd_write32(p, low_caps(allowed_caps)))
|
||||
return 0;
|
||||
if (!sd_write32(p, low_caps(allowed_caps & profile->audit_caps)))
|
||||
return 0;
|
||||
if (!sd_write32(p, low_caps(profile->deny_caps & profile->quiet_caps)))
|
||||
return 0;
|
||||
if (!sd_write32(p, low_caps(profile->set_caps & ~profile->deny_caps)))
|
||||
if (!sd_write32(p, 0))
|
||||
return 0;
|
||||
|
||||
if (!sd_write_struct(p, "caps64"))
|
||||
@@ -628,7 +627,7 @@ int sd_serialize_profile(sd_serialize *p, struct codomain *profile,
|
||||
return 0;
|
||||
if (!sd_write32(p, high_caps(profile->deny_caps & profile->quiet_caps)))
|
||||
return 0;
|
||||
if (!sd_write32(p, high_caps(profile->set_caps & ~profile->deny_caps)))
|
||||
if (!sd_write32(p, 0))
|
||||
return 0;
|
||||
if (!sd_write_structend(p))
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user