[mdadm/f15/master] Fix SELinux directory perms and missing udev file

Doug Ledford dledford at fedoraproject.org
Thu Mar 31 16:53:03 UTC 2011


commit 4d4edba28d7e7bb824b9e3ccba8feb50c9e77fec
Author: Doug Ledford <dledford at redhat.com>
Date:   Thu Mar 31 12:52:54 2011 -0400

    Fix SELinux directory perms and missing udev file
    
    Signed-off-by: Doug Ledford <dledford at redhat.com>

 mdadm.spec     |    8 ++++++--
 mdmonitor.init |    3 ++-
 2 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/mdadm.spec b/mdadm.spec
index 28d8192..371015f 100644
--- a/mdadm.spec
+++ b/mdadm.spec
@@ -1,7 +1,7 @@
 Summary:     The mdadm program controls Linux md devices (software RAID arrays)
 Name:        mdadm
 Version:     3.1.5
-Release:     1%{?dist}
+Release:     2%{?dist}
 Source:      http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tar.bz2
 Source1:     mdmonitor.init
 Source2:     raid-check
@@ -40,7 +40,6 @@ make %{?_smp_mflags} CXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" SYSCONFDIR="%
 %install
 rm -rf %{buildroot}
 make DESTDIR=%{buildroot} MANDIR=%{_mandir} BINDIR=/sbin install
-rm -f %{buildroot}/lib/udev/rules.d/64*
 install -Dp -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/mdmonitor
 install -Dp -m 755 %{SOURCE2} %{buildroot}%{_sbindir}/raid-check
 install -Dp -m 644 %{SOURCE3} %{buildroot}/lib/udev/rules.d/65-md-incremental.rules
@@ -80,6 +79,11 @@ fi
 %ghost %attr(0700,root,root) %dir /var/run/mdadm
 
 %changelog
+* Thu Mar 31 2011 Doug Ledford <dledford at redhat.com> - 3.1.5-2
+- Fix mdmonitor init script setup of SELinux on PIDPATH
+- Re-add udev rules file that somehow went missing
+- Resolves: bz692559, bz692248
+
 * Fri Mar 25 2011 Doug Ledford <dledford at redhat.com> - 3.1.5-1
 - Update to latest upstream stable release
 - Update mdadm.rules file to honor noiswmd and nodmraid command line options
diff --git a/mdmonitor.init b/mdmonitor.init
index f0d57d9..03f3e95 100755
--- a/mdmonitor.init
+++ b/mdmonitor.init
@@ -56,8 +56,9 @@ start ()
     grep '^\(MAILADDR\|PROGRAM\) .' /etc/mdadm.conf >/dev/null 2>&1 || return 6
     # Create our directory if it isn't there yet
     if [ ! -d $PIDPATH ]; then
-        mkdir -m 0700 -Z system_u:object_r:mdadm_var_run_t $PIDPATH >&/dev/null
+        mkdir -m 0700 $PIDPATH >&/dev/null
 	RC=$?
+	[ -x /sbin/restorecon ] && /sbin/restorecon $PIDPATH
 	if [ $RC -ne 0 ]; then
 	    echo -n "Failed to create /var/run/mdadm"
             failure


More information about the scm-commits mailing list