Skip to content

Commit

Permalink
feat(profile): add udev child & low-memory profiles.
Browse files Browse the repository at this point in the history
  • Loading branch information
roddhjav committed Nov 27, 2023
1 parent cdfa769 commit fade974
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
20 changes: 20 additions & 0 deletions apparmor.d/profiles-g-l/low-memory-monitor
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2023 Alexandre Pujol <[email protected]>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/3.0>,

include <tunables/global>

@{exec_path} = @{lib}/low-memory-monitor
profile low-memory-monitor @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>

capability ipc_lock,

@{exec_path} mr,

owner @{PROC}/pressure/memory rw,

include if exists <local/low-memory-monitor>
}
21 changes: 21 additions & 0 deletions apparmor.d/profiles-s-z/udev-dmi-memory-id
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2023 Alexandre Pujol <[email protected]>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/3.0>,

include <tunables/global>

@{exec_path} = @{lib}/udev/dmi_memory_id
profile udev-dmi-memory-id @{exec_path} {
include <abstractions/base>

@{exec_path} mr,

/etc/udev/udev.conf r,

@{sys}/firmware/dmi/tables/DMI r,
@{sys}/firmware/dmi/tables/smbios_entry_point r,

include if exists <local/udev-dmi-memory-id>
}
5 changes: 5 additions & 0 deletions dists/flags/main.flags
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ gnome-disk-image-mounter complain
gnome-disks complain
gnome-extension-gsconnect complain
gnome-extension-manager complain
gnome-initial-setup complain
gnome-music complain
gnome-photos-thumbnailer complain
gnome-remote-desktop-daemon complain
Expand Down Expand Up @@ -173,6 +174,7 @@ hostnamectl complain
ibus-engine-table complain
ibus-memconf complain
im-launch complain
init-exim4 complain
install-info complain
irqbalance attach_disconnected,complain
iwctl complain
Expand Down Expand Up @@ -215,6 +217,7 @@ locale-gen complain
localectl complain
login attach_disconnected,complain
loginctl complain
low-memory-monitor attach_disconnected,complain
lvm attach_disconnected,complain
lvmconfig complain
lvmdump complain
Expand Down Expand Up @@ -242,6 +245,7 @@ org.gnome.NautilusPreviewer complain
os-prober attach_disconnected,complain
package-data-downloader complain
packagekitd attach_disconnected,complain
pam_kwallet_init complain
pass-import complain
passim complain
passimd attach_disconnected,complain
Expand Down Expand Up @@ -361,6 +365,7 @@ thunderbird complain
thunderbird-glxtest complain
thunderbird-vaapitest complain
transmission-gtk complain
udev-dmi-memory-id complain
udisksctl complain
udisksd attach_disconnected,complain
umount complain
Expand Down

0 comments on commit fade974

Please sign in to comment.