distribute .index file in mib directory to preven SELinux AVCs in

applications using net-snmp libraries Resolves: #562001
This commit is contained in:
Jan Šafránek 2010-02-05 09:19:33 +00:00
parent 687a9591f1
commit 3cacefaf9b
1 changed files with 14 additions and 2 deletions

View File

@ -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/fixproc*
# 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@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@redhat.com> 5.4.2.1-13
- fix hrSWRunPath not being returned by snmpd (#512345)