-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapparmor.txt
75 lines (59 loc) · 1.89 KB
/
apparmor.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#include <tunables/global>
profile gpsd2mqtt flags=(attach_disconnected,mediate_deleted) {
#include <abstractions/base>
# Capabilities
file,
signal (send) set=(kill,term,int,hup,cont),
# S6-Overlay
/init ix,
/bin/** ix,
/usr/bin/** ix,
/run/{s6,s6-rc*,service}/** ix,
/package/** ix,
/command/** ix,
/etc/services.d/** rwix,
/etc/cont-init.d/** rwix,
/etc/cont-finish.d/** rwix,
/run/{,**} rwk,
/dev/tty rw,
# Bashio
/usr/lib/bashio/** ix,
/tmp/** rwk,
# Access to options.json and other files within your addon
/data/** rw,
profile /usr/sbin/gpsd flags=(attach_disconnected,mediate_deleted) {
#include <abstractions/base>
# Receive signals from S6-Overlay
signal (receive) peer=*gpsd2mqtt,
# Access to options.json and other files within your addon
/data/** rw,
# Access to mapped volumes specified in config.json
/share/** rw,
# Allow gpsd access
/usr/sbin/gpsd rix,
# Access required for service functionality
/bin/bash rix,
/bin/echo ix,
/etc/passwd r,
# ------------------------------------------------------------------------------
# common serial paths to GPS devices
/dev/tty{,S,USB,AMA,ACM,XTRX}[0-9]* rw,
# default paths feeding GPS data into chrony
/{,var/}run/chrony.tty{,S,USB,AMA,XTRX}[0-9]*.sock rw,
/tmp/chrony.tty{,S,USB,AMA,XTRX}[0-9]*.sock rw,
# ------------------------------------------------------------------------------
# Allow outbound MQTT communication
network tcp,
network inet stream,
network inet dgram,
network inet6 stream,
network inet6 dgram,
# Allow system calls needed for gpsd
capability setgid,
capability setuid,
# Add any additional MQTT-related rules if needed
# For example, if you're using the paho-mqtt library
/usr/bin/python3 cx -> paho.mqtt,
/usr/lib/python3.11/site-packages/paho/mqtt/** r,
}
}