File libgnomesu-unsetenv.patch of Package libgnomesu.1421

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
@@ -106,6 +106,7 @@ modify_environment (const struct passwd
 	const char *env_term;
 	const char *env_display, *env_shell;
 	const char *env_lang, *env_lcall, *env_lcmsgs, *env_xauthority;
+	const char *env_dbus;
 
 	/* Sanity-check the environment variables as best we can: those
 	 * which aren't path names shouldn't contain "/", and none of
@@ -175,6 +176,11 @@ modify_environment (const struct passwd
 	} else if (!path)
 		xputenv (concat ("PATH", "=",
 			(pw->pw_uid) ? DEFAULT_LOGIN_PATH : DEFAULT_ROOT_LOGIN_PATH));
+
+	/* Unset environment variables */
+	env_dbus = g_getenv ("DBUS_SESSION_BUS_ADDRESS");
+	if (env_dbus)
+		unsetenv ("DBUS_SESSION_BUS_ADDRESS");
 }
 
 /* Become the user and group(s) specified by PW.  */
openSUSE Build Service is sponsored by