-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
nobodysu
committed
Nov 22, 2021
1 parent
49b2696
commit 541b804
Showing
4 changed files
with
124 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# vim:syntax=apparmor | ||
|
||
#include <tunables/global> | ||
|
||
# adjust in local | ||
@{ETC_DIRS} = /etc /var/local/etc | ||
#include if exists <local/tunables/3rd/usr.lib.systemd.systemd-timesyncd> | ||
|
||
#profile systemd_timesyncd /{,usr/}lib/systemd/systemd-timesyncd { # Debian | ||
profile systemd_timesyncd /{,usr/}lib/systemd/systemd-timesyncd flags=(attach_disconnected) { # Ubuntu | ||
#include <abstractions/base> | ||
#include <abstractions/3rd/nameservice-strict> | ||
|
||
capability sys_time, | ||
|
||
@{ETC_DIRS}/adjtime r, | ||
/etc/systemd/timesyncd.conf r, | ||
|
||
owner @{PROC}/@{pid}/stat r, | ||
@{PROC}/@{pid}/sched r, | ||
@{PROC}/cmdline r, | ||
@{PROC}/sys/kernel/random/boot_id r, | ||
@{PROC}/sys/kernel/osrelease r, | ||
|
||
owner /var/lib/systemd/timesync/clock rw, | ||
owner /{,var/}run/systemd/timesync/synchronized rw, | ||
|
||
# Ubuntu | ||
network inet dgram, | ||
network inet6 dgram, | ||
network inet stream, | ||
network inet6 stream, | ||
|
||
/{,var/}run/systemd/journal/socket rw, | ||
/{,var/}run/systemd/notify rw, | ||
/{,var/}run/dbus/system_bus_socket rw, | ||
|
||
dbus send | ||
bus=system | ||
path=/org/freedesktop/DBus | ||
interface=org.freedesktop.DBus | ||
member={Hello,RequestName} | ||
peer=(name=org.freedesktop.DBus), | ||
|
||
dbus bind | ||
bus=system | ||
name=org.freedesktop.timesync1, | ||
|
||
#include if exists <local/usr.lib.systemd.systemd-timesyncd> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# vim:syntax=apparmor | ||
|
||
#include <tunables/global> | ||
|
||
# adjust in local | ||
@{GLDL_DIRS} = @{HOME}/Downloads/gallery-dl @{HOME}/gallery-dl /tmp/gallery-dl | ||
#include if exists <local/tunables/3rd/usr.local.bin.gallery-dl> | ||
|
||
profile gallery_dl /usr/{,local/}bin/gallery-dl { | ||
/usr/{,local/}bin/gallery-dl rix, | ||
#include <abstractions/base> | ||
#include <abstractions/openssl> | ||
#include <abstractions/ssl_certs> | ||
#include <abstractions/python> | ||
#include <abstractions/3rd/nameservice-strict> | ||
|
||
owner @{GLDL_DIRS}/{,**} rwk, | ||
|
||
/etc/gallery-dl.conf r, | ||
|
||
owner @{HOME}/.config/gallery-dl/config.json r, | ||
owner @{HOME}/.gallery-dl.conf r, | ||
owner @{HOME}/.cache/gallery-dl/{,**} rwk, | ||
|
||
owner @{HOME}/.netrc r, | ||
|
||
/usr/local/lib{,32,64}/python{2.[4-7],3.[0-9],3.[0-9][0-9]}/{site,dist}-packages/gallery_dl/{,**} r, | ||
/usr/lib/python3/dist-packages/idna/__pycache__/{,**} rw, | ||
|
||
deny /usr/local/bin/ r, # ?? | ||
|
||
# Ubuntu | ||
network inet dgram, | ||
network inet6 dgram, | ||
network inet stream, | ||
network inet6 stream, | ||
network netlink raw, | ||
|
||
#include if exists <local/usr.local.bin.gallery-dl> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters