# vim:syntax=apparmor # ------------------------------------------------------------------ # # Copyright (C) 2019-2021 Mikhail Morfikov # # This program is free software; you can redistribute it and/or # modify it under the terms of version 2 of the GNU General Public # License published by the Free Software Foundation. # # ------------------------------------------------------------------ abi , include @{exec_path} = /{usr/,}bin/apt-listchanges profile apt-listchanges @{exec_path} { include include include include #capability sys_tty_config, @{exec_path} r, /{usr/,}bin/python3.[0-9]* r, /{usr/,}bin/ r, /{usr/,}bin/{,ba,da}sh rix, /{usr/,}bin/tar rix, # Do not strip env to avoid errors like the following: # ERROR: ld.so: object 'libfakeroot-sysv.so' from LD_PRELOAD cannot be preloaded (cannot open # shared object file): ignored. /{usr/,}bin/dpkg-deb rpx, # /{usr/,}bin/sensible-pager rCx -> pager, # Send results using email /{usr/,}sbin/exim4 rPx, /usr/share/apt-listchanges/{,**} r, /etc/apt/listchanges.conf r, /etc/apt/listchanges.conf.d/{,*} r, /etc/apt/apt.conf r, /etc/apt/apt.conf.d/{,*} r, /usr/share/dpkg/cputable r, /usr/share/dpkg/tupletable r, /var/lib/dpkg/status r, /var/lib/apt/listchanges{,-new}.db rw, /var/lib/apt/listchanges-old.db rwl -> /var/lib/apt/listchanges.db, /var/cache/apt/archives/ r, owner @{PROC}/@{pid}/fd/ r, /tmp/ r, owner /tmp/* rw, owner /tmp/apt-listchanges*/ rw, owner /tmp/apt-listchanges*/**/ rw, owner /tmp/apt-listchanges*/*/*/*/*/changelog.gz rw, owner /tmp/apt-listchanges*/*/*/*/*/changelog.Debian*.gz rw, owner /tmp/apt-listchanges*/*/*/*/*/NEWS.Debian.gz rw, owner /tmp/apt-listchanges*/*/*/*/*/*/changelog.gz rw, owner /tmp/apt-listchanges*/*/*/*/*/*/changelog/changelog_to_file rw, owner /tmp/apt-listchanges*/*/*/*/*/*/changelog/simple_changelog rw, # The following is needed when apt-listchanges uses debcconf GUI frontends. include include include include capability dac_read_search, /{usr/,}bin/lsb_release rPx -> child-lsb_release, /{usr/,}bin/hostname rix, owner @{PROC}/@{pid}/mounts r, @{HOME}/.Xauthority r, profile pager { include include #capability sys_tty_config, /{usr/,}bin/sensible-pager mr, /{usr/,}bin/ r, /{usr/,}bin/{,ba,da}sh rix, /{usr/,}bin/which rix, /{usr/,}bin/less rix, owner @{HOME}/.less* rw, # For shell pwd /root/ r, /tmp/ r, owner /tmp/apt-listchanges-tmp*.txt r, } include if exists }