git » nmap.git » commit 4572cf2

fix FS#31158

author Gaetan Bisson
2012-08-17 08:45:29 UTC
committer Gaetan Bisson
2012-08-17 08:45:29 UTC
parent d970574b668164562e2c757226451d16bccc3c3c

fix FS#31158

PKGBUILD +7 -3
kdesu.patch +14 -0

diff --git a/PKGBUILD b/PKGBUILD
index 77f38f9..7cd2b16 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
 
 pkgname=nmap
 pkgver=6.01
-pkgrel=1
+pkgrel=2
 pkgdesc='Utility for network discovery and security auditing'
 url='http://nmap.org/'
 arch=('i686' 'x86_64')
@@ -12,8 +12,10 @@ license=('GPL')
 makedepends=('pygtk')
 optdepends=('pygtk: zenmap')
 depends=('pcre' 'openssl' 'libpcap' 'lua')
-source=("http://nmap.org/dist/${pkgname}-${pkgver}.tar.bz2")
-sha1sums=('e397e453893930d14e9bb33a847d15b94b7ee83a')
+source=("http://nmap.org/dist/${pkgname}-${pkgver}.tar.bz2"
+        'kdesu.patch')
+sha1sums=('e397e453893930d14e9bb33a847d15b94b7ee83a'
+          '159bc1243564d3a9dee820291bf07168870cbaf6')
 
 build() {
 	cd "${srcdir}/${pkgname}-${pkgver}"
@@ -22,6 +24,8 @@ build() {
 	echo 'TryExec=/usr/bin/pygtk-demo' >> zenmap/install_scripts/unix/zenmap.desktop 
 	echo 'TryExec=/usr/bin/pygtk-demo' >> zenmap/install_scripts/unix/zenmap-root.desktop 
 
+	patch -p1 -i ../kdesu.patch # FS#31158
+
 	./configure \
 		--prefix=/usr \
 		--libexecdir=/usr/lib \
diff --git a/kdesu.patch b/kdesu.patch
new file mode 100644
index 0000000..daed631
--- /dev/null
+++ b/kdesu.patch
@@ -0,0 +1,14 @@
+diff -Naur old/zenmap/install_scripts/unix/su-to-zenmap.sh new/zenmap/install_scripts/unix/su-to-zenmap.sh
+--- old/zenmap/install_scripts/unix/su-to-zenmap.sh	2012-08-17 18:34:05.863827354 +1000
++++ new/zenmap/install_scripts/unix/su-to-zenmap.sh	2012-08-17 18:35:53.872952226 +1000
+@@ -40,8 +40,8 @@
+     fi
+     case $SU_TO_ROOT_X in
+       gksu) gksu -u "$PRIV" "$COMMAND";;
+-      kdesu) kdesu -u "$PRIV" "$COMMAND";;
+-      kde4su) /usr/lib/kde4/libexec/kdesu -u "$PRIV" "$COMMAND";;
++      kdesu) kdesu -u "$PRIV" -c "$COMMAND";;
++      kde4su) /usr/lib/kde4/libexec/kdesu -u "$PRIV" -c "$COMMAND";;
+       ktsuss) ktsuss -u "$PRIV" "$COMMAND";;
+   # As a last resort, open a new xterm use sudo/su
+       sdterm) xterm -e "sudo -u $PRIV $COMMAND";;