diff --git a/debian/changelog b/debian/changelog index e97fa58..1651395 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,9 @@ nut (2.6.5-2) UNRELEASED; urgency=low * debian/control: Move the nut-monitor Suggests from nut-server to nut-client + * Restore proper SELinux context for runtime created /var/run/nut directory - -- Laurent Bigonville Mon, 13 Aug 2012 10:45:03 +0200 + -- Laurent Bigonville Tue, 09 Oct 2012 23:38:10 +0200 nut (2.6.5-1) experimental; urgency=low diff --git a/debian/nut-client.init b/debian/nut-client.init index 8524dd2..15a9f75 100755 --- a/debian/nut-client.init +++ b/debian/nut-client.init @@ -54,7 +54,8 @@ fi check_var_directory() { [ ! -d ${pid_dir} ] && mkdir -p ${pid_dir} \ && chown root:nut ${pid_dir} \ - && chmod 770 ${pid_dir} + && chmod 770 ${pid_dir} \ + && [ -x /sbin/restorecon ] && /sbin/restorecon ${pid_dir} } # check if the right components are running diff --git a/debian/nut-client.postinst b/debian/nut-client.postinst index 8546a95..5f61e55 100644 --- a/debian/nut-client.postinst +++ b/debian/nut-client.postinst @@ -36,6 +36,7 @@ case "$1" in if [ -d /var/run/nut ] ; then chown root:nut /var/run/nut chmod 770 /var/run/nut + [ -x /sbin/restorecon ] && /sbin/restorecon /var/run/nut fi ;; diff --git a/debian/nut-server.init b/debian/nut-server.init index a606b72..c539bd5 100644 --- a/debian/nut-server.init +++ b/debian/nut-server.init @@ -52,7 +52,8 @@ fi check_var_directory() { [ ! -d ${pid_dir} ] && mkdir -p ${pid_dir} \ && chown root:nut ${pid_dir} \ - && chmod 770 ${pid_dir} + && chmod 770 ${pid_dir} \ + && [ -x /sbin/restorecon ] && /sbin/restorecon ${pid_dir} } # check if the right components are running diff --git a/debian/nut-server.postinst b/debian/nut-server.postinst index d0ec14b..8523527 100644 --- a/debian/nut-server.postinst +++ b/debian/nut-server.postinst @@ -36,6 +36,7 @@ case "$1" in if [ -d /var/run/nut ] ; then chown root:nut /var/run/nut chmod 770 /var/run/nut + [ -x /sbin/restorecon ] && /sbin/restorecon /var/run/nut fi # make sure that /var/lib/nut has the correct permissions and ownerships