systemd-resolved.service 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # SPDX-License-Identifier: LGPL-2.1+
  2. #
  3. # This file is part of systemd.
  4. #
  5. # systemd is free software; you can redistribute it and/or modify it
  6. # under the terms of the GNU Lesser General Public License as published by
  7. # the Free Software Foundation; either version 2.1 of the License, or
  8. # (at your option) any later version.
  9. [Unit]
  10. Description=Network Name Resolution
  11. Documentation=man:systemd-resolved.service(8)
  12. Documentation=https://www.freedesktop.org/wiki/Software/systemd/resolved
  13. Documentation=https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
  14. Documentation=https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
  15. DefaultDependencies=no
  16. After=systemd-sysusers.service systemd-networkd.service
  17. Before=network.target nss-lookup.target shutdown.target
  18. Conflicts=shutdown.target
  19. Wants=nss-lookup.target
  20. [Service]
  21. AmbientCapabilities=CAP_SETPCAP CAP_NET_RAW CAP_NET_BIND_SERVICE
  22. CapabilityBoundingSet=CAP_SETPCAP CAP_NET_RAW CAP_NET_BIND_SERVICE
  23. ExecStart=!!/lib/systemd/systemd-resolved
  24. LockPersonality=yes
  25. MemoryDenyWriteExecute=yes
  26. NoNewPrivileges=yes
  27. PrivateDevices=yes
  28. PrivateTmp=yes
  29. ProtectControlGroups=yes
  30. ProtectHome=yes
  31. ProtectKernelModules=yes
  32. ProtectKernelTunables=yes
  33. ProtectKernelLogs=yes
  34. ProtectSystem=strict
  35. Restart=always
  36. RestartSec=0
  37. RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6
  38. RestrictNamespaces=yes
  39. RestrictRealtime=yes
  40. RestrictSUIDSGID=yes
  41. RuntimeDirectory=systemd/resolve
  42. RuntimeDirectoryPreserve=yes
  43. SystemCallArchitectures=native
  44. SystemCallErrorNumber=EPERM
  45. SystemCallFilter=@system-service
  46. Type=notify
  47. User=systemd-resolve
  48. WatchdogSec=3min
  49. [Install]
  50. WantedBy=multi-user.target
  51. Alias=dbus-org.freedesktop.resolve1.service