2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 22:35:35 +00:00

parser: add support for attach_disconnected.ipc flag

The attach_disconnected.ipc flag allows the use of disconnected paths
on posix mqueues. This flag is a subset of attach_disconnected, and it
does not allow disconnected paths for all files.

Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
This commit is contained in:
Georgia Garcia
2025-02-25 19:18:58 -03:00
parent 2afdf1b214
commit d9b3603f48
8 changed files with 68 additions and 15 deletions

View File

@@ -474,6 +474,11 @@ void sd_serialize_profile(std::ostringstream &buf, Profile *profile,
"disconnected");
}
if (profile->flags.disconnected_ipc && features_supports_flag_disconnected_ipc) {
sd_write_string(buf, profile->flags.disconnected_ipc,
"disconnected_ipc");
}
if (profile->flags.signal && features_supports_flag_signal) {
sd_write_name(buf, "kill");
sd_write_uint32(buf, profile->flags.signal);
@@ -500,6 +505,8 @@ void sd_serialize_profile(std::ostringstream &buf, Profile *profile,
flags |= 0x4;
if (profile->flags.path & PATH_CHROOT_NSATTACH)
flags |= 0x10;
if (profile->flags.path & PATH_IPC_ATTACH)
flags |= 0x20;
sd_write_name(buf, "path_flags");
sd_write_uint32(buf, flags);