rpms/ypbind/F-13 nis.sh,1.4,1.5 ypbind.spec,1.68,1.69
Karel Klíč
kklic at fedoraproject.org
Wed May 19 14:51:00 UTC 2010
Author: kklic
Update of /cvs/pkgs/rpms/ypbind/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv24605
Modified Files:
nis.sh ypbind.spec
Log Message:
Fixed #593278
Index: nis.sh
===================================================================
RCS file: /cvs/pkgs/rpms/ypbind/F-13/nis.sh,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- nis.sh 18 Mar 2009 12:19:32 -0000 1.4
+++ nis.sh 19 May 2010 14:50:59 -0000 1.5
@@ -38,7 +38,11 @@ save_config_file() {
fi
if [ -e ${origfile} ]; then
- mv ${origfile} ${savefile}
+ # cp+rm instead of mv: preserve SELinux context
+ # rhbz#509240
+ # Do not rely on restorecon.
+ cp -c ${origfile} ${savefile}
+ rm ${origfile}
else
echo > ${savefile}
fi
@@ -53,6 +57,7 @@ nis_config() {
save_config_file ${CONF}
let contents=0
echo '# generated by /sbin/dhclient-script' > ${CONF}
+ fixContext ${CONF}
if [ -n "${new_nis_servers}" ]; then
for i in ${new_nis_servers} ; do
@@ -73,6 +78,7 @@ nis_config() {
elif [ -n "${new_nis_servers}" ]; then
save_config_file ${CONF}
echo '# generated by /sbin/dhclient-script' > ${CONF}
+ fixContext ${CONF}
let contents=0
for i in ${new_nis_servers} ; do
@@ -94,8 +100,11 @@ nis_restore() {
if [ ! "${PEERNIS}" = "no" ]; then
if [ -f ${SAVEDIR}/${CONF}.predhclient.${interface} ]; then
rm -f ${CONF}
- mv -f ${SAVEDIR}/${CONF}.predhclient.${interface} ${CONF}
- fixContext /etc/yp.conf
+ # cp+rm instead of mv: preserve SELinux context
+ # rhbz#509240
+ cp -c ${SAVEDIR}/${CONF}.predhclient.${interface} ${CONF}
+ rm ${SAVEDIR}/${CONF}.predhclient.${interface}
+ fixContext ${CONF}
if [ -x /etc/rc.d/init.d/ypbind ] && [ -r /var/run/ypbind.pid ]; then
service ypbind restart >/dev/null 2>&1
fi
Index: ypbind.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ypbind/F-13/ypbind.spec,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -p -r1.68 -r1.69
--- ypbind.spec 21 Jan 2010 21:22:12 -0000 1.68
+++ ypbind.spec 19 May 2010 14:50:59 -0000 1.69
@@ -1,7 +1,7 @@
Summary: The NIS daemon which binds NIS clients to an NIS domain
Name: ypbind
Version: 1.31
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2
Group: System Environment/Daemons
Source0: ftp://ftp.us.kernel.org/pub/linux/utils/net/NIS/ypbind-mt-%{version}.tar.bz2
@@ -85,6 +85,10 @@ fi
%doc README NEWS
%changelog
+* Wed May 19 2010 Karel Klic <kklic at redhat.com> - 3:1.31-3
+- Update SELinux context of /etc/yp.conf in nis.sh (rhbz#593278)
+- Use cp+rm instead of mv in nis.sh (#509240)
+
* Thu Jan 21 2010 Karel Klic <kklic at redhat.com> - 3:1.31-2
- Rewrote initscript to become closer to Packaging:SysVInitScript
Fedora guildeline. Also fixes rhbz#523913
More information about the scm-commits
mailing list