LLDPD: Delete redundant codes and enhance code security

driver inclusion
category: cleanup
bugzilla: https://gitee.com/openeuler/ub-lldpd/issues/IAM1Z1
CVE: NA

1.Delete redundant codes.
2.Add const to read-only data.

Signed-off-by: Ge Hu huge4@huawei.com
(cherry picked from commit bcb756cff8a93094e325ab76b548601cef435303)
This commit is contained in:
Ge Hu 2024-08-29 19:33:59 +08:00 committed by openeuler-sync-bot
parent 2b5dc074df
commit 46b92b7550
2 changed files with 7 additions and 2 deletions

Binary file not shown.

View File

@ -5,7 +5,7 @@
Summary: Implementation of UB (LLDP)
Name: ub-lldpd
Version: 1.0.0
Release: 2
Release: 3
License: ISC
Group: System/Management
URL: https://lldpd.github.io/
@ -74,6 +74,8 @@ make install DESTDIR=$RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/etc/sysconfig
install -m644 %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ub-lldpd
/usr/lib/rpm/brp-remove-la-files
%pre
# Create ub-lldpd user/group
if getent group %lldpd_group >/dev/null 2>&1 ; then : ; else \
@ -117,12 +119,15 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root)
%{_libdir}/libublldpctl.so
%{_libdir}/libublldpctl.a
%{_libdir}/libublldpctl.la
%{_libdir}/pkgconfig/ub-lldpctl.pc
%{_includedir}/lldpctl.h
%{_includedir}/lldp-const.h
%changelog
* Thu Aug 15 2024 Ge Hu <huge4@huawei.com> - 1.0.0-3
- update to openeuler-sp4.
- Security check and modification.
* Thu Jun 6 2024 Zhongyuan Zhou <zhouzhongyuan1@huawei.com> - 1.0.0-2
- Modify the dguid of network control packets.
- Add the UB-LLDP fuzz test case.