CentOS6 sudo漏洞修復 CVE-2021-3156


sudo又有漏洞啦,CVE-2021-3156。https://s.tencent.com/research/bsafe/1238.html

為了解決centos6無法直接yum update sudo的窘境,擼起袖子干吧

原料一、sudo源碼包一份

下載地址:https://www.sudo.ws/dist/sudo-1.9.5p2.tar.gz

原料二、sudo spec一份

打包前不知道用什么編譯參數合適,然后參考了一下os原版的內容

最終生成了自己的spec

Name:           sudo
Version:        1.9.5p2
Release:        1%{?dist}
Summary:        sudo-1.9.5p2 rpmbuild for centos6
License:        GPLv2
BuildRequires:  gcc,make
Source:         %{name}-%{version}.tar.gz

%description
sudo-1.9.5p2 rpmbuild for centos6 to fix CVE-2021-3156. 20210128

%prep
%setup -q

%install
./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --prefix=/usr --sbindir=/usr/sbin --libdir=/usr/lib64 --docdir=/usr/share/doc/sudo-1.8.6p3 --with-logging=syslog --with-logfac=authpriv --with-pam --with-pam-login --with-editor=/bin/vi --with-env-editor --with-ignore-dot --with-tty-tickets --with-ldap --with-ldap-conf-file=/etc/sudo-ldap.conf --with-selinux --with-passprompt=[sudo] password for %p:  --with-linux-audit --with-sssd
make
make install DESTDIR=%{buildroot}
tree %{buildroot} > /tmp/sudo.tree

%files
%defattr(-,root,root)
/

成品出爐,給自己一個贊


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM