diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2004-07-11 19:33:03 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2004-07-11 19:33:03 +0000 |
commit | 95ad65935b6f0ae84f36265dcdc52d9ea7f290b0 (patch) | |
tree | 3d567d5b77a3ad6b96497319d5de7b671a5873d6 /app-admin | |
parent | "New package, submitted by Colin Macdonald <cbm@sfu.ca> #55473" (Manifest rec... (diff) | |
download | gentoo-2-95ad65935b6f0ae84f36265dcdc52d9ea7f290b0.tar.gz gentoo-2-95ad65935b6f0ae84f36265dcdc52d9ea7f290b0.tar.bz2 gentoo-2-95ad65935b6f0ae84f36265dcdc52d9ea7f290b0.zip |
Fix http://bugs.gnome.org/show_bug.cgi?id=147362; basically a 'hang' if the
user have passwd-less su privs.
Diffstat (limited to 'app-admin')
5 files changed, 149 insertions, 3 deletions
diff --git a/app-admin/gnome-system-tools/ChangeLog b/app-admin/gnome-system-tools/ChangeLog index a0ad20487ebc..9245a7d2b42e 100644 --- a/app-admin/gnome-system-tools/ChangeLog +++ b/app-admin/gnome-system-tools/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for app-admin/gnome-system-tools # Copyright 1999-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/gnome-system-tools/ChangeLog,v 1.6 2004/07/01 11:52:00 dholm Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/gnome-system-tools/ChangeLog,v 1.7 2004/07/11 19:33:03 azarah Exp $ + +*gnome-system-tools-0.34.0-r1 (11 Jul 2004) + + 11 Jul 2004; Martin Schlemmer <azarah@gentoo.org> + +files/gnome-system-tools-0.34.0-fix-nopasswd-auth.patch, + +gnome-system-tools-0.34.0-r1.ebuild: + Fix http://bugs.gnome.org/show_bug.cgi?id=147362; basically a 'hang' if the + user have passwd-less su privs. 01 Jul 2004; David Holm <dholm@gentoo.org> gnome-system-tools-0.34.0.ebuild: Added to ~ppc. diff --git a/app-admin/gnome-system-tools/Manifest b/app-admin/gnome-system-tools/Manifest index 3e4e94f48708..a7f1f698f584 100644 --- a/app-admin/gnome-system-tools/Manifest +++ b/app-admin/gnome-system-tools/Manifest @@ -1,6 +1,10 @@ +MD5 e3b58120e139be47a9ee2e095981fb58 gnome-system-tools-0.34.0-r1.ebuild 903 +MD5 59a12293f7f4d5348d68565a613efc82 gnome-system-tools-0.34.0.ebuild 758 MD5 a3e90f154a8db6311301d80f088e4d40 ChangeLog 864 +MD5 dbe3c3dc512f8fd0b8c39b3312902579 .gnome-system-tools-0.34.0-r1.ebuild.swp 12288 MD5 f0950f26ef1f0e0fdc65003a70f3738c gnome-system-tools-0.33.0.ebuild 735 MD5 0a88c243b3c32fba10c58cda47411101 metadata.xml 592 -MD5 59a12293f7f4d5348d68565a613efc82 gnome-system-tools-0.34.0.ebuild 758 -MD5 b19810539e97be86cb285492ef7ccc7e files/digest-gnome-system-tools-0.33.0 79 +MD5 059a3d1a89445a1ff4fdf30964148ca8 files/gnome-system-tools-0.34.0-fix-nopasswd-auth.patch 3545 MD5 deb1440d16f3601aecdc1811cc3f6667 files/digest-gnome-system-tools-0.34.0 79 +MD5 deb1440d16f3601aecdc1811cc3f6667 files/digest-gnome-system-tools-0.34.0-r1 79 +MD5 b19810539e97be86cb285492ef7ccc7e files/digest-gnome-system-tools-0.33.0 79 diff --git a/app-admin/gnome-system-tools/files/digest-gnome-system-tools-0.34.0-r1 b/app-admin/gnome-system-tools/files/digest-gnome-system-tools-0.34.0-r1 new file mode 100644 index 000000000000..51e083767478 --- /dev/null +++ b/app-admin/gnome-system-tools/files/digest-gnome-system-tools-0.34.0-r1 @@ -0,0 +1 @@ +MD5 0cd6ad61cb86cce72b86fce3e439fd17 gnome-system-tools-0.34.0.tar.bz2 1891817 diff --git a/app-admin/gnome-system-tools/files/gnome-system-tools-0.34.0-fix-nopasswd-auth.patch b/app-admin/gnome-system-tools/files/gnome-system-tools-0.34.0-fix-nopasswd-auth.patch new file mode 100644 index 000000000000..f02f26ec89ed --- /dev/null +++ b/app-admin/gnome-system-tools/files/gnome-system-tools-0.34.0-fix-nopasswd-auth.patch @@ -0,0 +1,97 @@ +--- gnome-system-tools-0.34.0/backends/general.pl.in 2004-07-05 17:08:11.752058480 +0200 ++++ gnome-system-tools-0.34.0.az/backends/general.pl.in 2004-07-05 17:08:32.256941264 +0200 +@@ -323,6 +323,22 @@ + { + my ($name, $version, $description, $directives, @args) = @_; + my (%tool, $arg); ++ my @iargs = @_; ++ my $i; ++ ++ # used to sync with gst_auth_write_password() - it checks for ++ # "Backend Init" and then writes a CR ++ while ($arg = shift (@iargs)) ++ { ++ if ($arg eq "--pw-prompt") { ++ print "Backend Init"; ++ do { ++ $i = <STDIN>; ++ } while ($1 != "\n"); ++ goto end_pw_prompt_loop; ++ } ++ } ++end_pw_prompt_loop: + + # print a CR for synchronysm with the frontend + print "\n"; +@@ -369,7 +385,7 @@ + $tool{"do_report"} = $gst_do_report = 1; + &gst_report_set_threshold (99); + } +- else ++ elsif ($arg ne "--pw-prompt") + { + print STDERR "Error: Unrecognized option '$arg'.\n\n"; + &gst_print_usage (\%tool, 1); +--- gnome-system-tools-0.34.0/src/common/gst-auth.c 2004-07-05 17:08:02.965394256 +0200 ++++ gnome-system-tools-0.34.0.az/src/common/gst-auth.c 2004-07-05 17:08:25.608951912 +0200 +@@ -158,25 +158,34 @@ + gst_auth_write_password (GstTool *tool, gchar *pwd) + { + gchar *answer = "yes\n"; +- gboolean cont = FALSE; ++ gboolean cont = FALSE, authed = FALSE; + gchar *str; + + /* read all the su or ssh output and flush the descriptors */ + while (!cont) { +- str = gst_tool_read_from_backend (tool, "assword:", "/no)?", NULL); ++ str = gst_tool_read_from_backend (tool, "assword:", "/no)?", "ackend Init", NULL); + + /* FIXME: hope that someday we can get rid of this ssh output string parsing */ + if (g_strrstr (g_ascii_strup (str, -1), "AUTHENTICITY") != NULL) { + /* it's the "add to known hosts list" ssh's message, just answer "yes" */ + gst_tool_write_to_backend (tool, answer); + } else if (g_strrstr (g_ascii_strup (str, -1), "PASSWORD") != NULL) { ++ authed = TRUE; ++ gst_tool_write_to_backend (tool, pwd); ++ ++ /* we pass --pw-prompt to the backend when we try to auth with su or ++ * ssh - it then prints "Backend Init" to allow us to sync with it ++ * in case the user can su/ssh without a password (pam module in the ++ * case of su, or DSA key in the case of ssh */ ++ } else if (g_strrstr (g_ascii_strup (str, -1), "BACKEND INIT") != NULL) { ++ /* we need to write '\n' to the backend, as it will wait for a CR ++ * before it continues (if --pw-prompt was passed to it) */ ++ gst_tool_write_to_backend (tool, "\n"); + cont = TRUE; + } + + g_free (str); + } +- +- gst_tool_write_to_backend (tool, pwd); + } + + static GladeXML * +@@ -336,7 +345,9 @@ + g_string_append (command, "`pkg-config --variable=backenddir system-tools-backends`"); + g_string_append (command, "/"); + g_string_append (command, tool->script_name); +- g_string_append (command, " --report"); ++ /* --pw-prompt is for gst_auth_write_password() to be able to sync ++ * with the backends */ ++ g_string_append (command, " --pw-prompt --report"); + + if (tool->current_platform) { + g_string_append (command, " --platform "); +@@ -364,7 +375,9 @@ + command = g_string_new (NULL); + gst_auth_save_locale (command); + command = g_string_append (command, tool->script_path); +- command = g_string_append (command, " --report"); ++ /* --pw-prompt is for gst_auth_write_password() to be able to sync ++ * with the backends */ ++ command = g_string_append (command, " --pw-prompt --report"); + + if (tool->current_platform) { + g_string_append (command, " --platform "); diff --git a/app-admin/gnome-system-tools/gnome-system-tools-0.34.0-r1.ebuild b/app-admin/gnome-system-tools/gnome-system-tools-0.34.0-r1.ebuild new file mode 100644 index 000000000000..545110cc9587 --- /dev/null +++ b/app-admin/gnome-system-tools/gnome-system-tools-0.34.0-r1.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/gnome-system-tools/gnome-system-tools-0.34.0-r1.ebuild,v 1.1 2004/07/11 19:33:03 azarah Exp $ + +inherit gnome2 eutils + +DESCRIPTION="Tools aimed to make easy the administration of UNIX systems" +HOMEPAGE="http://www.gnome.org/projects/gst/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64 ~ppc" +IUSE="" + +RDEPEND="net-misc/openssh + sys-apps/shadow + >=x11-libs/gtk+-2.4 + >=gnome-base/libgnomeui-1.109 + >=gnome-base/libglade-1.99.5 + >=gnome-base/gconf-2.2 + >=dev-libs/libxml2-2.4.12" +DEPEND="${RDEPEND} + dev-util/pkgconfig + >=dev-util/intltool-0.29" + +DOCS="AUTHORS BUGS ChangeLog HACKING NEWS README TODO" + +USE_DESTDIR="1" + +src_unpack() { + unpack ${A} + + cd ${S} + # http://bugs.gnome.org/show_bug.cgi?id=147362 + epatch ${FILESDIR}/${P}-fix-nopasswd-auth.patch +} |