From 491710623e59ac6bf1d5d6e17d2a9c74a1becfe2 Mon Sep 17 00:00:00 2001 From: vcrhonek Date: Mar 18 2009 12:19:32 +0000 Subject: Fix nis.sh SELinux issue --- diff --git a/nis.sh b/nis.sh index 3c18da5..5a9f0bf 100755 --- a/nis.sh +++ b/nis.sh @@ -23,6 +23,12 @@ CONF=/etc/yp.conf +fixContext() { + if [ -x /sbin/restorecon ]; then + /sbin/restorecon ${1} >/dev/null 2>&1 + fi +} + save_config_file() { origfile="${1}" savefile="${SAVEDIR}/${origfile##*/}.predhclient.${interface}" @@ -37,7 +43,7 @@ save_config_file() { echo > ${savefile} fi - restorecon ${savefile} >/dev/null 2>&1 + fixContext ${savefile} } nis_config() { @@ -89,6 +95,7 @@ nis_restore() { if [ -f ${SAVEDIR}/${CONF}.predhclient.${interface} ]; then rm -f ${CONF} mv -f ${SAVEDIR}/${CONF}.predhclient.${interface} ${CONF} + fixContext /etc/yp.conf if [ -x /etc/rc.d/init.d/ypbind ] && [ -r /var/run/ypbind.pid ]; then service ypbind restart >/dev/null 2>&1 fi diff --git a/ypbind.spec b/ypbind.spec index ca15d86..9ab874c 100644 --- a/ypbind.spec +++ b/ypbind.spec @@ -1,7 +1,7 @@ Summary: The NIS daemon which binds NIS clients to an NIS domain Name: ypbind Version: 1.20.4 -Release: 16%{?dist} +Release: 17%{?dist} License: GPLv2 Group: System Environment/Daemons Source0: ftp://ftp.us.kernel.org/pub/linux/utils/net/NIS/ypbind-mt-%{version}.tar.bz2 @@ -97,6 +97,10 @@ fi %doc README NEWS %changelog +* Wed Mar 18 2009 Vitezslav Crhonek - 3:1.20.4-17 +- Fix nis.sh SELinux issue + Resolves: #488865 + * Thu Feb 26 2009 Vitezslav Crhonek - 3:1.20.4-16 - Fix ypbind script in dos format - bash syntax errors Resolves: #486722