Commit 4dc756be authored by Frank Denis's avatar Frank Denis

Error out if systemd sockets are used with the user_name option

parent 1019428c
......@@ -11,6 +11,10 @@ import (
func (proxy *Proxy) SystemDListeners() error {
files := activation.Files(true)
if len(files) > 0 && (len(proxy.userName) > 0 || proxy.child) {
dlog.Fatal("Systemd activated sockets are incompatible with privilege dropping. Remove activated sockets and fill `listen_addresses` in the dnscrypt-proxy configuration file instead.")
}
for i, file := range files {
if listener, err := net.FileListener(file); err == nil {
dlog.Noticef("Wiring systemd TCP socket #%d, %s, %s", i, file.Name(), listener.Addr())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment