fix(profile): workaround in apparmor issue for attached path.
See https://gitlab.com/apparmor/apparmor/-/issues/450 Fix #815
This commit is contained in:
parent
52e9ae9fd6
commit
4e70cb4c91
8 changed files with 7 additions and 6 deletions
|
|
@ -135,6 +135,8 @@
|
||||||
owner @{PROC}/@{pid}/task/ r,
|
owner @{PROC}/@{pid}/task/ r,
|
||||||
owner @{PROC}/@{pid}/task/@{tid}/comm rw,
|
owner @{PROC}/@{pid}/task/@{tid}/comm rw,
|
||||||
|
|
||||||
|
owner @{att}/dev/shm/@{uuid} r,
|
||||||
|
|
||||||
/dev/hidraw@{int} rw,
|
/dev/hidraw@{int} rw,
|
||||||
/dev/input/ r,
|
/dev/input/ r,
|
||||||
/dev/input/event@{int} rw,
|
/dev/input/event@{int} rw,
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,6 @@ profile flatpak-app flags=(attach_disconnected,mediate_deleted) {
|
||||||
/var/lib/flatpak/app/{,**} r,
|
/var/lib/flatpak/app/{,**} r,
|
||||||
/var/lib/flatpak/exports/** rw,
|
/var/lib/flatpak/exports/** rw,
|
||||||
|
|
||||||
@{run}/.userns r,
|
|
||||||
@{run}/parent/** r,
|
@{run}/parent/** r,
|
||||||
@{run}/parent/app/.ref rk,
|
@{run}/parent/app/.ref rk,
|
||||||
@{run}/parent/usr/.ref rk,
|
@{run}/parent/usr/.ref rk,
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ profile flatpak-portal @{exec_path} flags=(attach_disconnected) {
|
||||||
|
|
||||||
/var/lib/flatpak/exports/share/mime/mime.cache r,
|
/var/lib/flatpak/exports/share/mime/mime.cache r,
|
||||||
|
|
||||||
owner @{att}/ r,
|
owner /att/**/ r,
|
||||||
owner @{att}/.flatpak-info r,
|
owner @{att}/.flatpak-info r,
|
||||||
|
|
||||||
owner @{HOME}/.var/app/*/**/.ref rw,
|
owner @{HOME}/.var/app/*/**/.ref rw,
|
||||||
|
|
|
||||||
|
|
@ -65,8 +65,8 @@ profile xdg-desktop-portal @{exec_path} flags=(attach_disconnected) {
|
||||||
@{open_path} rPx -> child-open,
|
@{open_path} rPx -> child-open,
|
||||||
|
|
||||||
/ r,
|
/ r,
|
||||||
@{att}/ r,
|
|
||||||
@{att}/.flatpak-info r,
|
@{att}/.flatpak-info r,
|
||||||
|
owner /att/**/ r,
|
||||||
|
|
||||||
/usr/share/dconf/profile/gdm r,
|
/usr/share/dconf/profile/gdm r,
|
||||||
/usr/share/xdg-desktop-portal/** r,
|
/usr/share/xdg-desktop-portal/** r,
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ profile xdg-desktop-portal-gtk @{exec_path} flags=(attach_disconnected) {
|
||||||
/usr/share/gdm/greeter-dconf-defaults r,
|
/usr/share/gdm/greeter-dconf-defaults r,
|
||||||
|
|
||||||
/ r,
|
/ r,
|
||||||
owner @{att}/ r,
|
owner /att/**/ r,
|
||||||
|
|
||||||
owner /var/lib/xkb/server-@{int}.xkm rw,
|
owner /var/lib/xkb/server-@{int}.xkm rw,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ profile xdg-document-portal @{exec_path} flags=(attach_disconnected) {
|
||||||
@{bin}/snap rPx,
|
@{bin}/snap rPx,
|
||||||
|
|
||||||
/ r,
|
/ r,
|
||||||
owner @{att}/ r,
|
owner /att/**/ r,
|
||||||
owner @{att}/.flatpak-info r,
|
owner @{att}/.flatpak-info r,
|
||||||
|
|
||||||
owner @{HOME}/ r,
|
owner @{HOME}/ r,
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,6 @@
|
||||||
# Disabled on abi3 and Ubuntu 25.04+
|
# Disabled on abi3 and Ubuntu 25.04+
|
||||||
# See https://apparmor.pujol.io/development/internal/#re-attached-path
|
# See https://apparmor.pujol.io/development/internal/#re-attached-path
|
||||||
@{att}=/
|
@{att}=/
|
||||||
|
|
||||||
alias / -> //,
|
alias / -> //,
|
||||||
|
|
||||||
# vim:syntax=apparmor
|
# vim:syntax=apparmor
|
||||||
|
|
|
||||||
|
|
@ -33,5 +33,6 @@ func (p ReAttach) Apply() ([]string, error) {
|
||||||
return res, err
|
return res, err
|
||||||
}
|
}
|
||||||
out = strings.ReplaceAll(out, "@{att}=/", "# @{att}=/")
|
out = strings.ReplaceAll(out, "@{att}=/", "# @{att}=/")
|
||||||
|
out = strings.ReplaceAll(out, "alias / -> //,", "#alias / -> //,")
|
||||||
return res, path.WriteFile([]byte(out))
|
return res, path.WriteFile([]byte(out))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue