diff --git a/.gitignore b/.gitignore index 352f8f8..754758f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ sudo-1.7.2p2-sudoers /sudo-1.7.4p4-sudoers /sudo-1.7.4p5.tar.gz /sudo-1.8.1p2.tar.gz +/sudo-1.8.3p1.tar.gz diff --git a/sources b/sources index a86ed7d..d108a9e 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -e8330f0e63b0ecb2e12b5c76922818cc sudo-1.8.1p2.tar.gz +7becc572fa97f94cf721a2ee8299c45b sudo-1.8.3p1.tar.gz 56f74aed3a7b32f2b01a34d65ac86f85 sudo-1.7.4p4-sudoers diff --git a/sudo-1.8.3-pipelist.patch b/sudo-1.8.3-pipelist.patch new file mode 100644 index 0000000..e976f0e --- /dev/null +++ b/sudo-1.8.3-pipelist.patch @@ -0,0 +1,28 @@ +diff -up sudo-1.8.3/src/ttysize.c.pipelist sudo-1.8.3/src/ttysize.c +--- sudo-1.8.3/src/ttysize.c.pipelist 2011-10-21 15:01:26.000000000 +0200 ++++ sudo-1.8.3/src/ttysize.c 2011-10-26 02:09:39.582790562 +0200 +@@ -20,6 +20,7 @@ + + #include + #include ++#include + #include + #ifdef STDC_HEADERS + # include +@@ -48,6 +49,16 @@ void + get_ttysize(int *rowp, int *colp) + { + char *p; ++ struct stat st; ++ ++ if (fstat(STDOUT_FILENO, &st) == 0) { ++ if (S_ISFIFO(st.st_mode)) { ++ *rowp = 0; ++ *colp = 0; ++ return; ++ } ++ } ++ + #ifdef TIOCGWINSZ + struct winsize wsize; + diff --git a/sudo.spec b/sudo.spec index 3653a74..75f1384 100644 --- a/sudo.spec +++ b/sudo.spec @@ -1,7 +1,7 @@ Summary: Allows restricted root access for specified users Name: sudo -Version: 1.8.1p2 -Release: 2%{?dist} +Version: 1.8.3p1 +Release: 1%{?dist} License: ISC Group: Applications/System URL: http://www.courtesan.com/sudo/ @@ -19,6 +19,7 @@ BuildRequires: automake autoconf libtool BuildRequires: audit-libs-devel libcap-devel BuildRequires: libselinux-devel BuildRequires: sendmail +BuildRequires: gettext # don't strip Patch1: sudo-1.6.7p5-strip.patch @@ -26,9 +27,8 @@ Patch1: sudo-1.6.7p5-strip.patch Patch2: sudo-1.7.2p1-envdebug.patch # add m4/ to paths in aclocal.m4 Patch3: sudo-1.7.4p3-m4path.patch -# getgrouplist() to determine group membership (#235915) -# - version with CVE-2009-0034 fixed -Patch4: sudo-1.8.1p2-getgrouplist.patch +# disable word wrapping if the ouput is piped +Patch4: sudo-1.8.3-pipelist.patch %description Sudo (superuser do) allows a system administrator to give certain @@ -56,7 +56,7 @@ plugins that use %{name}. %patch1 -p1 -b .strip %patch2 -p1 -b .envdebug %patch3 -p1 -b .m4path -%patch4 -p1 -b .getgrouplist +%patch4 -p1 -b .pipelist # Remove execute permission on this script so we don't pull in perl deps chmod -x plugins/sudoers/sudoers2ldif @@ -96,11 +96,18 @@ make %install rm -rf $RPM_BUILD_ROOT make install DESTDIR="$RPM_BUILD_ROOT" install_uid=`id -u` install_gid=`id -g` sudoers_uid=`id -u` sudoers_gid=`id -g` + chmod 755 $RPM_BUILD_ROOT%{_bindir}/* $RPM_BUILD_ROOT%{_sbindir}/* install -p -d -m 700 $RPM_BUILD_ROOT/var/db/sudo install -p -d -m 750 $RPM_BUILD_ROOT/etc/sudoers.d install -p -c -m 0440 %{SOURCE1} $RPM_BUILD_ROOT/etc/sudoers +%find_lang sudo +%find_lang sudoers + +cat sudo.lang sudoers.lang > sudo_all.lang +rm sudo.lang sudoers.lang + mkdir -p $RPM_BUILD_ROOT/etc/pam.d cat > $RPM_BUILD_ROOT/etc/pam.d/sudo << EOF #%PAM-1.0 @@ -124,7 +131,7 @@ EOF %clean rm -rf $RPM_BUILD_ROOT -%files +%files -f sudo_all.lang %defattr(-,root,root) %doc ChangeLog NEWS README* MANIFEST %doc doc/HISTORY doc/LICENSE doc/TROUBLESHOOTING doc/UPGRADE @@ -148,6 +155,7 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man8/sudoreplay.8* %{_mandir}/man8/visudo.8* + # Make sure permissions are ok even if we're updating %post /bin/chmod 0440 /etc/sudoers || : @@ -159,6 +167,10 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man8/sudo_plugin.8* %changelog +* Tue Nov 10 2011 Daniel Kopecek - 1.8.3p1-1 +- update to 1.8.3p1 +- disable output word wrapping if the output is piped + * Wed Sep 7 2011 Peter Robinson - 1.8.1p2-2 - Remove execute bit from sample script in docs so we don't pull in perl