rpms/net-snmp/F-11 net-snmp.spec,1.182,1.183

Jan Šafránek jsafrane at fedoraproject.org
Fri Feb 5 09:19:33 UTC 2010


Author: jsafrane

Update of /cvs/pkgs/rpms/net-snmp/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv31600

Modified Files:
	net-snmp.spec 
Log Message:
distribute .index file in mib directory to preven SELinux AVCs in applications using net-snmp libraries
Resolves: #562001


Index: net-snmp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/net-snmp/F-11/net-snmp.spec,v
retrieving revision 1.182
retrieving revision 1.183
diff -u -p -r1.182 -r1.183
--- net-snmp.spec	19 Nov 2009 14:28:18 -0000	1.182
+++ net-snmp.spec	5 Feb 2010 09:19:33 -0000	1.183
@@ -8,7 +8,7 @@
 Summary: A collection of SNMP protocol tools and libraries
 Name: net-snmp
 Version: %{major_ver}
-Release: 13%{?dist}
+Release: 14%{?dist}
 Epoch: 1
 
 License: BSD and MIT
@@ -325,6 +325,10 @@ rm $RPM_BUILD_ROOT/%{_mandir}/man1/fixpr
 # trim down massive ChangeLog
 dd bs=1024 count=250 if=ChangeLog of=ChangeLog.trimmed
 
+# generate empty .index in mibs directory. This ensures the .index has correct
+# SELinux context. The file get's rewritten when net-snmp libaries are first
+# used, but still we need the context...
+touch $RPM_BUILD_ROOT/%{_datadir}/snmp/mibs/.index
 
 %post
 /sbin/chkconfig --add snmpd 
@@ -346,7 +350,11 @@ if [ "$1" -ge "1" ]; then
     service snmptrapd condrestart >/dev/null 2>&1 || :
 fi
 
-%post libs -p /sbin/ldconfig
+%post libs
+/sbin/ldconfig
+# Let net-snmp libraries regenerate /usr/share/snmp/mibs/.index,
+# just in case user has some additional mibs there.
+touch %{_datadir}/snmp/mibs/
 
 %postun libs -p /sbin/ldconfig
 
@@ -425,6 +433,10 @@ rm -rf ${RPM_BUILD_ROOT}
 %{_datadir}/snmp/mibs
 
 %changelog
+* Fri Feb  5 2010 Jan Safranek <jsafrane at redhat.com>  5.4.2.1-14
+- distribute .index file in mib directory to preven SELinux AVCs
+  in applications using net-snmp libraries (#562001)
+
 * Thu Nov 19 2009 Jan Safranek <jsafrane at redhat.com> 5.4.2.1-13
 - fix hrSWRunPath not being returned by snmpd (#512345)
 



More information about the scm-commits mailing list