nut: Do not run as privileged container
The only privilege NUT needs is access to the USB device nodes. Using a device CGroup rule to allow this is significantly better than disabling all restrictions. Especially since I discovered that `--privileged` implies `--security-opt label=disable`, effectively disabling SELinux confinement of the container.master
parent
74508faf27
commit
be1042cda7
|
@ -16,8 +16,8 @@ Volume=/etc/ups:/etc/ups:ro
|
||||||
Volume=/dev:/dev:rw
|
Volume=/dev:/dev:rw
|
||||||
ReadOnly=true
|
ReadOnly=true
|
||||||
VolatileTmp=true
|
VolatileTmp=true
|
||||||
PodmanArgs=--privileged
|
|
||||||
Network=host
|
Network=host
|
||||||
|
PodmanArgs=--device-cgroup-rule 'c 189:* rw'
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecReload=podman exec systemd-%N upsd -c reload
|
ExecReload=podman exec systemd-%N upsd -c reload
|
||||||
|
|
Loading…
Reference in New Issue