Skip to content

Commit

Permalink
chore: remove unneeded abi definition in abstraction.
Browse files Browse the repository at this point in the history
  • Loading branch information
roddhjav committed Feb 11, 2024
1 parent 7269ac6 commit 804bde0
Show file tree
Hide file tree
Showing 25 changed files with 9 additions and 64 deletions.
2 changes: 0 additions & 2 deletions apparmor.d/abstractions/app-launcher-root
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# Copyright (C) 2022-2024 Alexandre Pujol <[email protected]>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/3.0>,

@{bin}/* rPUx,
/usr/local/{s,}bin/* rPUx,

Expand Down
2 changes: 0 additions & 2 deletions apparmor.d/abstractions/app-launcher-user
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# Copyright (C) 2022-2024 Alexandre Pujol <[email protected]>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/3.0>,

@{bin}/* rPUx,
/opt/*/** rPUx,
/usr/share/*/* rPUx,
Expand Down
2 changes: 0 additions & 2 deletions apparmor.d/abstractions/apt-common
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# Copyright (C) 2021-2024 Alexandre Pujol <[email protected]>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/3.0>,

/usr/share/dpkg/cputable r,
/usr/share/dpkg/tupletable r,

Expand Down
2 changes: 0 additions & 2 deletions apparmor.d/abstractions/chromium
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# @{config_dirs} = @{user_config_dirs}/chromium
# @{cache_dirs} = @{user_cache_dirs}/chromium

abi <abi/3.0>,

include <abstractions/audio>
include <abstractions/dconf-write>
include <abstractions/desktop>
Expand Down
24 changes: 9 additions & 15 deletions apparmor.d/abstractions/chromium-common
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
# This abstraction is for chromium based application. Chromium based browsers
# need to use abstractions/chromium instead.

abi <abi/3.0>,

# The following rules are needed only when the kernel.unprivileged_userns_clone option is set
# to "1".
# Only needed when kernel.unprivileged_userns_clone is set to "1"
capability sys_admin,
capability sys_chroot,
capability setuid,
Expand All @@ -18,6 +15,14 @@
owner @{PROC}/@{pid}/gid_map w,
owner @{PROC}/@{pid}/uid_map w,

owner @{HOME}/.pki/ rw,
owner @{HOME}/.pki/nssdb/ rw,
owner @{HOME}/.pki/nssdb/pkcs11.txt rw,
owner @{HOME}/.pki/nssdb/{cert9,key4}.db rwk,
owner @{HOME}/.pki/nssdb/{cert9,key4}.db-journal rw,

owner @{user_share_dirs}/.org.chromium.Chromium.* rw,

/tmp/ r,
/var/tmp/ r,
owner /tmp/.org.chromium.Chromium.* rw,
Expand All @@ -30,15 +35,4 @@
/dev/shm/ r,
owner /dev/shm/.org.chromium.Chromium.* rw,

owner @{user_share_dirs}/.org.chromium.Chromium.* rw,

# Should this be read-only? (##FIXME##)
# To remove the following error:
# Error initializing NSS with a persistent database
owner @{HOME}/.pki/ rw,
owner @{HOME}/.pki/nssdb/ rw,
owner @{HOME}/.pki/nssdb/pkcs11.txt rw,
owner @{HOME}/.pki/nssdb/{cert9,key4}.db rwk,
owner @{HOME}/.pki/nssdb/{cert9,key4}.db-journal rw,

include if exists <abstractions/chromium-common.d>
2 changes: 0 additions & 2 deletions apparmor.d/abstractions/desktop
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# Copyright (C) 2023-2024 Alexandre Pujol <[email protected]>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/3.0>,

include <abstractions/fonts>
include <abstractions/freedesktop.org>
include <abstractions/gtk>
Expand Down
2 changes: 0 additions & 2 deletions apparmor.d/abstractions/devices-usb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# Copyright (C) 2021-2024 Alexandre Pujol <[email protected]>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/3.0>,

/dev/ r,
/dev/bus/usb/ r,
/dev/bus/usb/@{int}/ r,
Expand Down
2 changes: 0 additions & 2 deletions apparmor.d/abstractions/disks-read
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# Copyright (C) 2022-2024 Alexandre Pujol <[email protected]>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/3.0>,

# The /sys/ entries probably should be tightened

/dev/ r,
Expand Down
2 changes: 0 additions & 2 deletions apparmor.d/abstractions/disks-write
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# Copyright (C) 2022-2024 Alexandre Pujol <[email protected]>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/3.0>,

# The /sys/ entries probably should be tightened

/dev/ r,
Expand Down
2 changes: 0 additions & 2 deletions apparmor.d/abstractions/flatpak-snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
# Copyright (C) 2021-2024 Alexandre Pujol <[email protected]>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/3.0>,

# Flatpak
/var/lib/flatpak/exports/share/{,**} r,
/var/lib/flatpak/app/**/export/share/applications/{,*.desktop} r,
Expand Down
2 changes: 0 additions & 2 deletions apparmor.d/abstractions/fontconfig-cache-read
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# Copyright (C) 2021-2024 Alexandre Pujol <[email protected]>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/3.0>,

# The fontconfig cache can be generated via the following command:
# $ fc-cache -f -v
# There's no need to give apps the ability to create cache for their own. Apps can generate the
Expand Down
2 changes: 0 additions & 2 deletions apparmor.d/abstractions/fontconfig-cache-write
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# Copyright (C) 2022-2024 Alexandre Pujol <[email protected]>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/3.0>,

owner @{user_cache_dirs}/fontconfig/ rw,
owner @{user_cache_dirs}/fontconfig/CACHEDIR.TAG{,.NEW,.LCK,.TMP-*} rw,
owner @{user_cache_dirs}/fontconfig/[a-f0-9]*.cache-?{,.NEW,.LCK,.TMP-*} rwk,
Expand Down
2 changes: 0 additions & 2 deletions apparmor.d/abstractions/fzf
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# Copyright (C) 2021-2024 Alexandre Pujol <[email protected]>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/3.0>,

owner @{HOME}/.fzf/{,**} r,

owner @{HOME}/.fzf.* r,
Expand Down
2 changes: 0 additions & 2 deletions apparmor.d/abstractions/gnome-strict
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# Copyright (C) 2021-2024 Alexandre Pujol <[email protected]>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/3.0>,

include <abstractions/fonts>
include <abstractions/freedesktop.org>
include <abstractions/gtk>
Expand Down
2 changes: 0 additions & 2 deletions apparmor.d/abstractions/graphics
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# Copyright (C) 2023-2024 Alexandre Pujol <[email protected]>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/3.0>,

include <abstractions/dri>
include <abstractions/mesa>
include <abstractions/nvidia-strict>
Expand Down
2 changes: 0 additions & 2 deletions apparmor.d/abstractions/graphics-full
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# Copyright (C) 2023-2024 Alexandre Pujol <[email protected]>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/3.0>,

include <abstractions/graphics>

@{bin}/nvidia-modprobe Px -> nvidia_modprobe,
Expand Down
2 changes: 0 additions & 2 deletions apparmor.d/abstractions/kde-strict
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# Copyright (C) 2023-2024 Alexandre Pujol <[email protected]>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/3.0>,

include <abstractions/fonts>
include <abstractions/freedesktop.org>
include <abstractions/qt5>
Expand Down
2 changes: 0 additions & 2 deletions apparmor.d/abstractions/kde4
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# Copyright (C) 2021-2024 Alexandre Pujol <[email protected]>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/3.0>,

/usr/share/kde4/** r,

@{lib}/kde4/*.so mr,
Expand Down
2 changes: 0 additions & 2 deletions apparmor.d/abstractions/nameservice-strict
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# Copyright (C) 2021-2024 Alexandre Pujol <[email protected]>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/3.0>,

@{etc_ro}/default/nss r,
@{etc_ro}/gai.conf r,
@{etc_ro}/group r,
Expand Down
3 changes: 0 additions & 3 deletions apparmor.d/abstractions/nvidia-strict
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
# Copyright (C) 2021-2024 Alexandre Pujol <[email protected]>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/3.0>,


/usr/share/nvidia/nvidia-application-profiles-* r,

/etc/nvidia/nvidia-application-profiles-* r,
Expand Down
2 changes: 0 additions & 2 deletions apparmor.d/abstractions/qt5-shader-cache
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# Copyright (C) 2021-2024 Alexandre Pujol <[email protected]>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/3.0>,

owner @{user_cache_dirs}/ w,
owner @{user_cache_dirs}/qtshadercache/ rw,
owner @{user_cache_dirs}/qtshadercache/#@{int} rw,
Expand Down
2 changes: 0 additions & 2 deletions apparmor.d/abstractions/thumbnails-cache-read
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# Copyright (C) 2023-2024 Alexandre Pujol <[email protected]>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/3.0>,

owner @{HOME}/thumbnails/ r,
owner @{HOME}/thumbnails/{large,normal}/ r,
owner @{HOME}/thumbnails/{large,normal}/@{hex}.png r,
Expand Down
2 changes: 0 additions & 2 deletions apparmor.d/abstractions/thumbnails-cache-write
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# Copyright (C) 2021-2024 Alexandre Pujol <[email protected]>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/3.0>,

owner @{HOME}/thumbnails/ rw,
owner @{HOME}/thumbnails/{large,normal}/ rw,
owner @{HOME}/thumbnails/{large,normal}/#@{int} rw,
Expand Down
2 changes: 0 additions & 2 deletions apparmor.d/abstractions/user-download-strict
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# Copyright (C) 2021-2024 Alexandre Pujol <[email protected]>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/3.0>,

owner @{HOME}/@{XDG_DESKTOP_DIR}/ w,
owner @{HOME}/@{XDG_DOWNLOAD_DIR}/ w,

Expand Down
2 changes: 0 additions & 2 deletions apparmor.d/abstractions/zsh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
# This abstraction is only required when an interactive shell is started.
# Classic shell scripts do not need it.

abi <abi/3.0>,

@{lib}/@{multiarch}/zsh/@{int}/zsh/*.so mr,

/usr/share/zsh/{,**} r,
Expand Down

0 comments on commit 804bde0

Please sign in to comment.