From 9bb3678d0885d6766adbff4ea7c7bd38c6283817 Mon Sep 17 00:00:00 2001 From: hyunuktak Date: Thu, 22 Sep 2016 16:31:01 +0900 Subject: [PATCH] Change attribute for daemon and set uid/gid into service Change-Id: I4c8f01a655f839e3bcc75a7da00337561414ac29 Signed-off-by: hyunuktak --- packaging/net-config.spec | 4 ++-- resources/usr/lib/systemd/system/net-config.service | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packaging/net-config.spec b/packaging/net-config.spec index f384165..01e01e9 100755 --- a/packaging/net-config.spec +++ b/packaging/net-config.spec @@ -147,8 +147,8 @@ ln -sf %{_unitdir}/net-config.service %{_sysconfdir}/systemd/default-extra-depen %files %manifest net-config.manifest -%attr(500,root,root) %{_sbindir}/* -%attr(644,root,root) %{_sysconfdir}/resolv.conf +%attr(755,root,root) %{_sbindir}/* +%attr(644,network_fw,network_fw) %{_sysconfdir}/resolv.conf %attr(644,root,root) %{_datadir}/dbus-1/system-services/* #DBus DAC %attr(644,root,root) %{_sysconfdir}/dbus-1/system.d/* diff --git a/resources/usr/lib/systemd/system/net-config.service b/resources/usr/lib/systemd/system/net-config.service index 26685b4..4eccf02 100755 --- a/resources/usr/lib/systemd/system/net-config.service +++ b/resources/usr/lib/systemd/system/net-config.service @@ -8,8 +8,8 @@ Type=forking SmackProcessLabel=System ExecStart=/usr/sbin/net-config Restart=always -CapabilityBoundingSet=~CAP_MAC_ADMIN -CapabilityBoundingSet=~CAP_MAC_OVERRIDE +User=network_fw +Group=network_fw [Install] WantedBy=multi-user.target -- 2.7.4