Restore proper SELinux context for runtime created /var/run/nut directory

This commit is contained in:
Laurent Bigonville 2012-10-09 23:38:43 +02:00
parent 5b99c93354
commit c79bcd71af
5 changed files with 8 additions and 3 deletions

3
debian/changelog vendored
View File

@ -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 <bigon@debian.org> Mon, 13 Aug 2012 10:45:03 +0200
-- Laurent Bigonville <bigon@debian.org> Tue, 09 Oct 2012 23:38:10 +0200
nut (2.6.5-1) experimental; urgency=low

View File

@ -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

View File

@ -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
;;

View File

@ -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

View File

@ -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