!64 remove rpath

From: @cherry530 
Reviewed-by: @wu-leilei 
Signed-off-by: @wu-leilei
This commit is contained in:
openeuler-ci-bot 2023-11-08 03:09:47 +00:00 committed by Gitee
commit b41e2db3fc
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -4,7 +4,7 @@
Name: freeradius
Version: 3.0.15
Release: 25
Release: 26
Summary: Remote Authentication Dial-In User Service
License: GPLv2+ and LGPLv2+
@ -29,7 +29,7 @@ patch6009: CVE-2022-41861.patch
BuildRequires: autoconf gdbm-devel openssl openssl-devel pam-devel zlib-devel net-snmp-devel
BuildRequires: net-snmp-utils readline-devel libpcap-devel systemd-units libtalloc-devel
BuildRequires: pcre-devel unixODBC-devel json-c-devel libcurl-devel
BuildRequires: pcre-devel unixODBC-devel json-c-devel libcurl-devel chrpath
Requires: openssl >= %{openssl_version}
Requires: %{name}-help = %{version}-%{release}
@ -178,12 +178,23 @@ for f in COPYRIGHT CREDITS INSTALL.rst README.rst VERSION; do
cp $f $RPM_BUILD_ROOT/%{docdir}
done
cd $RPM_BUILD_ROOT/usr
file `find -type f`| grep -w ELF | awk -F":" '{print $1}' | for i in `xargs`
do
chrpath -d $i
done
cd -
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
echo "%{_bindir}/%{name}" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf
echo "%{_libdir}/%{name}" >> $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf
%pre
getent group radiusd >/dev/null || /usr/sbin/groupadd -r -g 95 radiusd > /dev/null 2>&1
getent passwd radiusd >/dev/null || /usr/sbin/useradd -r -g radiusd -u 95 -c "radiusd user" \
-d %{_localstatedir}/lib/radiusd -s /sbin/nologin radiusd > /dev/null 2>&1
%post
/sbin/ldconfig
%systemd_post radiusd.service
if [ $1 -eq 1 ]; then
if [ ! -e /etc/raddb/certs/server.pem ]; then
@ -196,6 +207,7 @@ exit 0
%systemd_preun radiusd.service
%postun
/sbin/ldconfig
%systemd_postun_with_restart radiusd.service
if [ $1 -eq 0 ]; then
getent passwd radiusd >/dev/null && /usr/sbin/userdel radiusd > /dev/null 2>&1
@ -346,6 +358,8 @@ exit 0
%{_libdir}/freeradius/rlm_rest.so
%attr(640,root,radiusd) %config(noreplace) /etc/raddb/mods-available/rest
%config(noreplace) /etc/ld.so.conf.d/*
%files help
%doc %{docdir}/
# utils man pages
@ -441,6 +455,9 @@ exit 0
%attr(640,root,radiusd) %config(noreplace) /etc/raddb/mods-available/ldap
%changelog
* Wed Nov 08 2023 xu_ping <707078654@qq.com> - 3.0.15-26
- remove rpath for some elf file.
* Wed Dec 21 2022 jiangpeng <jiangpeng01@ncti-gba.cn> - 3.0.15-25
- Fix CVE-2022-41860 and CVE-2022-41861