2018-02-10 18:42:43 +01:00
|
|
|
[Unit]
|
|
|
|
Description=Wireless service
|
2021-01-22 15:41:23 +01:00
|
|
|
After=network-pre.target
|
2018-07-13 18:42:39 +02:00
|
|
|
Before=network.target
|
|
|
|
Wants=network.target
|
2018-02-10 18:42:43 +01:00
|
|
|
|
|
|
|
[Service]
|
2018-08-06 22:34:11 +02:00
|
|
|
Type=dbus
|
|
|
|
BusName=net.connman.iwd
|
2018-02-10 18:42:43 +01:00
|
|
|
ExecStart=@libexecdir@/iwd
|
2019-09-08 20:36:57 +02:00
|
|
|
NotifyAccess=main
|
2018-02-10 18:42:43 +01:00
|
|
|
LimitNPROC=1
|
2018-10-30 11:32:26 +01:00
|
|
|
Restart=on-failure
|
2021-06-29 18:07:00 +02:00
|
|
|
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE
|
iwd.service: Harden systemd service file
This commit hardens the iwd.service.in template file for systemd
services. The following is a short explanation for each added directive:
+PrivateTmp=true
If true, sets up a new file system namespace for the executed processes
and mounts private /tmp and /var/tmp directories inside it that is not
shared by processes outside of the namespace.
+NoNewPrivileges=true
If true, ensures that the service process and all its children can never
gain new privileges through execve() (e.g. via setuid or setgid bits, or
filesystem capabilities).
+PrivateDevices=true
If true, sets up a new /dev mount for the executed processes and only
adds API pseudo devices such as /dev/null, /dev/zero or /dev/random (as
well as the pseudo TTY subsystem) to it, but no physical devices such as
/dev/sda, system memory /dev/mem, system ports /dev/port and others.
+ProtectHome=yes
If true, the directories /home, /root and /run/user are made
inaccessible and empty for processes invoked by this unit.
+ProtectSystem=strict
If set to "strict" the entire file system hierarchy is mounted
read-only, except for the API file system subtrees /dev, /proc and /sys
(protect these directories using PrivateDevices=,
ProtectKernelTunables=, ProtectControlGroups=).
+ReadWritePaths=/var/lib/iwd/
Sets up a new file system namespace for executed processes. These
options may be used to limit access a process might have to the file
system hierarchy. Each setting takes a space-separated list of paths
relative to the host's root directory (i.e. the system running the
service manager). Note that if paths contain symlinks, they are resolved
relative to the root directory set with RootDirectory=/RootImage=.
Paths listed in ReadWritePaths= are accessible from within
the namespace with the same access modes as from outside of
it.
+ProtectControlGroups=yes
If true, the Linux Control Groups (cgroups(7)) hierarchies accessible
through /sys/fs/cgroup will be made read-only to all processes of the
unit.
+ProtectKernelModules=yes
If true, explicit module loading will be denied. This allows module
load and unload operations to be turned off on modular kernels.
For further explanation to all directives see `man systemd.directives`
2019-02-26 00:30:09 +01:00
|
|
|
PrivateTmp=true
|
|
|
|
NoNewPrivileges=true
|
2019-07-31 14:59:16 +02:00
|
|
|
DevicePolicy=closed
|
|
|
|
DeviceAllow=/dev/rfkill rw
|
iwd.service: Harden systemd service file
This commit hardens the iwd.service.in template file for systemd
services. The following is a short explanation for each added directive:
+PrivateTmp=true
If true, sets up a new file system namespace for the executed processes
and mounts private /tmp and /var/tmp directories inside it that is not
shared by processes outside of the namespace.
+NoNewPrivileges=true
If true, ensures that the service process and all its children can never
gain new privileges through execve() (e.g. via setuid or setgid bits, or
filesystem capabilities).
+PrivateDevices=true
If true, sets up a new /dev mount for the executed processes and only
adds API pseudo devices such as /dev/null, /dev/zero or /dev/random (as
well as the pseudo TTY subsystem) to it, but no physical devices such as
/dev/sda, system memory /dev/mem, system ports /dev/port and others.
+ProtectHome=yes
If true, the directories /home, /root and /run/user are made
inaccessible and empty for processes invoked by this unit.
+ProtectSystem=strict
If set to "strict" the entire file system hierarchy is mounted
read-only, except for the API file system subtrees /dev, /proc and /sys
(protect these directories using PrivateDevices=,
ProtectKernelTunables=, ProtectControlGroups=).
+ReadWritePaths=/var/lib/iwd/
Sets up a new file system namespace for executed processes. These
options may be used to limit access a process might have to the file
system hierarchy. Each setting takes a space-separated list of paths
relative to the host's root directory (i.e. the system running the
service manager). Note that if paths contain symlinks, they are resolved
relative to the root directory set with RootDirectory=/RootImage=.
Paths listed in ReadWritePaths= are accessible from within
the namespace with the same access modes as from outside of
it.
+ProtectControlGroups=yes
If true, the Linux Control Groups (cgroups(7)) hierarchies accessible
through /sys/fs/cgroup will be made read-only to all processes of the
unit.
+ProtectKernelModules=yes
If true, explicit module loading will be denied. This allows module
load and unload operations to be turned off on modular kernels.
For further explanation to all directives see `man systemd.directives`
2019-02-26 00:30:09 +01:00
|
|
|
ProtectHome=yes
|
|
|
|
ProtectSystem=strict
|
|
|
|
ProtectControlGroups=yes
|
|
|
|
ProtectKernelModules=yes
|
2019-09-08 10:25:39 +02:00
|
|
|
ConfigurationDirectory=iwd
|
2019-09-08 19:56:21 +02:00
|
|
|
StateDirectory=iwd
|
2019-09-09 06:55:22 +02:00
|
|
|
StateDirectoryMode=0700
|
2018-02-10 18:42:43 +01:00
|
|
|
|
|
|
|
[Install]
|
2018-05-22 18:28:02 +02:00
|
|
|
WantedBy=multi-user.target
|