Fix host agent socket activation
CI / php-store (push) Waiting to run
CI / python-components (push) Waiting to run

This commit is contained in:
2026-08-24 23:13:10 +02:00
parent acadcdfeee
commit eb6be0e5fa
5 changed files with 12 additions and 5 deletions
@@ -11,8 +11,6 @@ Group=root
ExecStart=/usr/local/bin/netbox-store-agent --config /etc/netbox-store-agent/agent.toml daemon
StateDirectory=netbox-store-agent
StateDirectoryMode=0711
RuntimeDirectory=netbox-store-agent
RuntimeDirectoryMode=0755
UMask=0077
NoNewPrivileges=true
PrivateTmp=true
+2 -2
View File
@@ -10,11 +10,11 @@ class SystemdUnitTests(unittest.TestCase):
self.assertIn("SocketMode=0660", socket_unit)
self.assertIn("SocketGroup=netbox", socket_unit)
def test_state_traversal_does_not_relax_service_umask(self):
def test_service_does_not_own_socket_runtime_directory(self):
service_unit = Path("systemd/netbox-store-agent.service").read_text(encoding="utf-8")
self.assertIn("StateDirectoryMode=0711", service_unit)
self.assertIn("RuntimeDirectoryMode=0755", service_unit)
self.assertNotIn("RuntimeDirectory=netbox-store-agent", service_unit)
self.assertIn("UMask=0077", service_unit)