Hello community, here is the log from the commit of package libgnomesu for openSUSE:Factory checked in at Fri Jul 31 20:03:45 CEST 2009. -------- --- GNOME/libgnomesu/libgnomesu.changes 2009-05-20 18:28:22.000000000 +0200 +++ /mounts/work_src_done/STABLE/libgnomesu/libgnomesu.changes 2009-07-15 17:54:53.000000000 +0200 @@ -1,0 +2,7 @@ +Wed Jul 15 17:54:25 CEST 2009 - vuntz@novell.com + +- Add libgnomesu-bnc440970-safe-path.patch to fix bnc#440970: + instead of resetting PATH to a default value that we can't get + right, just remove the unsafe values. + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- libgnomesu-bnc440970-safe-path.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libgnomesu.spec ++++++ --- /var/tmp/diff_new_pack.boidap/_old 2009-07-31 20:03:12.000000000 +0200 +++ /var/tmp/diff_new_pack.boidap/_new 2009-07-31 20:03:12.000000000 +0200 @@ -21,14 +21,14 @@ Name: libgnomesu BuildRequires: fdupes gconf2-devel gtk2-devel intltool pam-devel Url: http://members.chello.nl/~h.lai/libgnomesu/ -License: GPL v2 or later; LGPL v2.1 or later +License: GPL v2 or later ; LGPL v2.1 or later Group: System/GUI/GNOME PreReq: permissions # obsolete in >9.3 Provides: xsu Obsoletes: xsu Version: 1.0.0 -Release: 311 +Release: 312 Summary: GNOME su Library Source: %{name}-%{version}.tar.bz2 Source1: gnomesu-pam.pamd @@ -58,6 +58,8 @@ Patch10: libgnomesu-ia64-crash.patch # PATCH-FIX-UPSTREAM libgnomesu-drop-libgnomeui.patch vuntz@novell.com -- Drop libgnomeui dependency Patch11: libgnomesu-drop-libgnomeui.patch +# PATCH-FIX-UPSTREAM libgnomesu-bnc440970-safe-path.patch vuntz@novell.com -- When making $PATH safer, try to keep what's relevant from $PATH +Patch12: libgnomesu-bnc440970-safe-path.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: %{name}-lang = %{version} pam libgnomesu0 @@ -118,6 +120,7 @@ %patch9 -p1 %patch10 -p0 %patch11 -p1 +%patch12 -p1 cp -a %{S:1} pam-backend/gnomesu-pam cp %{S:2} po/pl.po ++++++ libgnomesu-bnc440970-safe-path.patch ++++++ Index: libgnomesu-1.0.0/su-backend/common.c =================================================================== --- libgnomesu-1.0.0.orig/su-backend/common.c +++ libgnomesu-1.0.0/su-backend/common.c @@ -169,10 +169,35 @@ modify_environment (const struct passwd || (strlen (path) > 2 && strcmp (path + strlen (path) - 2, ":.") == 0) || strcmp (path, ".") == 0)) { - /* Reset PATH to a reasonably safe list of directories */ - path = (pw->pw_uid) ? DEFAULT_LOGIN_PATH : DEFAULT_ROOT_LOGIN_PATH; - setenv ("PATH", path, 1); - } else if (!path) + char **paths; + char **new_paths; + int path_len; + int i, j; + + paths = g_strsplit (path, ":", -1); + path_len = g_strv_length (paths); + new_paths = g_new0 (char *, path_len); + + j = 0; + for (i = 0; i < path_len; i++) { + if (paths[i] && !strchr(paths[i], '.')) { + new_paths[j++] = g_strdup (paths[i]); + } + } + + g_strfreev (paths); + if (j != 0) { + char *new_path; + new_path = g_strjoinv (":", new_paths); + setenv ("PATH", new_path, 1); + g_free (new_path); + } else { + /* make sure we set PATH to something below */ + path = NULL; + } + } + + if (!path) xputenv (concat ("PATH", "=", (pw->pw_uid) ? DEFAULT_LOGIN_PATH : DEFAULT_ROOT_LOGIN_PATH)); } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org