From f83001ef756a62b15ab3df6c3836dddc4078d274 Mon Sep 17 00:00:00 2001 From: Vitezslav Crhonek Date: Tue, 6 Sep 2011 13:19:35 +0200 Subject: [PATCH] Use full path to 'su' in passmass example, it's safer, Fix expect man page minor formatting issue --- expect-5.45-man-page.patch | 13 +++++++++++++ expect-5.45-passmass-su-full-path.patch | 12 ++++++++++++ expect.spec | 12 ++++++++++-- 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 expect-5.45-man-page.patch create mode 100644 expect-5.45-passmass-su-full-path.patch diff --git a/expect-5.45-man-page.patch b/expect-5.45-man-page.patch new file mode 100644 index 0000000..1a55251 --- /dev/null +++ b/expect-5.45-man-page.patch @@ -0,0 +1,13 @@ +diff -up expect5.45/expect.man.orig expect5.45/expect.man +--- expect5.45/expect.man.orig 2011-09-06 13:15:57.081827720 +0200 ++++ expect5.45/expect.man 2011-09-06 13:16:19.463826364 +0200 +@@ -173,7 +173,8 @@ way, use the + .B \-b + flag. + (When using Expectk, this option is specified as +-.BR \-buffer .) Note that stdio-buffering may still take place however this shouldn't cause problems when reading from a fifo or stdin. ++.BR \-buffer .) ++Note that stdio-buffering may still take place however this shouldn't cause problems when reading from a fifo or stdin. + .PP + If the string "\-" is supplied as a filename, standard input is read instead. + (Use "./\-" to read from a file actually named "\-".) diff --git a/expect-5.45-passmass-su-full-path.patch b/expect-5.45-passmass-su-full-path.patch new file mode 100644 index 0000000..6febf94 --- /dev/null +++ b/expect-5.45-passmass-su-full-path.patch @@ -0,0 +1,12 @@ +diff -up expect5.45/example/passmass.orig expect5.45/example/passmass +--- expect5.45/example/passmass.orig 2011-09-06 13:04:41.439875491 +0200 ++++ expect5.45/example/passmass 2011-09-06 13:04:54.663874571 +0200 +@@ -178,7 +178,7 @@ for {set i 0} {$i<$argc} {incr i} { + } + + if ($su) { +- send "su -\r" ++ send "/bin/su -\r" + expect -nocase "password:" + send "$password(old)\r" + expect "# " diff --git a/expect.spec b/expect.spec index c651518..e958301 100644 --- a/expect.spec +++ b/expect.spec @@ -5,7 +5,7 @@ Summary: A program-script interaction and testing utility Name: expect Version: %{majorver} -Release: 3%{?dist} +Release: 4%{?dist} License: Public Domain Group: Development/Languages # URL: probably more useful is http://sourceforge.net/projects/expect/ @@ -17,6 +17,8 @@ Buildrequires: tcl-devel tk-devel autoconf automake libXft-devel chrpath Patch0: expect-5.43.0-log_file.patch # Patch1: fixes install location, change pkgIndex Patch1: expect-5.43.0-pkgpath.patch +# Patch2: fixes minor man page formatting issue +Patch2: expect-5.45-man-page.patch # examples patches # Patch100: changes random function Patch100: expect-5.32.2-random.patch @@ -25,6 +27,8 @@ Patch101: expect-5.45-mkpasswd-dash.patch # Patch102: fixes bz703702 - let user know that telnet is needed for # running some examples Patch102: expect-5.45-check-telnet.patch +# Patch103: use full path to 'su', it's safer +Patch103: expect-5.45-passmass-su-full-path.patch %description Expect is a tcl application for automating and testing @@ -68,10 +72,12 @@ of expectk. %setup -q -n expect%{version} %patch0 -p1 -b .log_file %patch1 -p1 -b .pkgpath +%patch2 -p1 -b .man-page # examples fixes %patch100 -p1 -b .random %patch101 -p1 -b .mkpasswd-dash %patch102 -p1 -b .check-telnet +%patch103 -p1 -b .passmass-su-full-path # -pkgpath.patch touch configure.in aclocal autoconf @@ -155,9 +161,11 @@ rm -rf "$RPM_BUILD_ROOT" %{_mandir}/man1/tknewsbiff.1* %changelog -* Wed Jul 27 2011 Vitezslav Crhonek - 5.45-4 +* Tue Sep 06 2011 Vitezslav Crhonek - 5.45-4 - Let user know when expample script needs telnet and it is missing Resolves: #703702 +- Use full path to 'su' in passmass example, it's safer +- Fix expect man page minor formatting issue * Wed Mar 16 2011 Vitezslav Crhonek - 5.45-3 - Fix mkpasswd fails randomly