packages: libgnomesu/libgnomesu-remove-prior-cookie.patch (NEW) - merged fr...

hawk hawk at pld-linux.org
Thu Nov 25 10:41:46 CET 2010


Author: hawk                         Date: Thu Nov 25 09:41:46 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- merged from OpenSUSE: remove old, potentially broken xauth cookies

---- Files affected:
packages/libgnomesu:
   libgnomesu-remove-prior-cookie.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/libgnomesu/libgnomesu-remove-prior-cookie.patch
diff -u /dev/null packages/libgnomesu/libgnomesu-remove-prior-cookie.patch:1.1
--- /dev/null	Thu Nov 25 10:41:46 2010
+++ packages/libgnomesu/libgnomesu-remove-prior-cookie.patch	Thu Nov 25 10:41:41 2010
@@ -0,0 +1,23 @@
+diff --git a/su-backend/common.c b/su-backend/common.c
+index 004119c..31124ca 100644
+--- a/su-backend/common.c
++++ b/su-backend/common.c
+@@ -188,6 +188,8 @@ void
+ change_identity (const struct passwd *pw)
+ {
+ 	FILE *p;
++	const gchar *hostname;
++	gchar *command;
+ 
+ #ifdef HAVE_INITGROUPS
+ 	errno = 0;
+@@ -199,6 +201,9 @@ change_identity (const struct passwd *pw)
+ 	if (setuid (pw->pw_uid))
+ 		perror ("cannot set user id");
+ 
++        command = g_strdup_printf ("xauth -q remove %s/unix:0", g_get_host_name ());
++        g_spawn_command_line_sync (command, NULL, NULL, NULL, NULL);
++
+ 	/* Create a new .Xauthorization file */
+ 	if (!xauth_data) return;
+ 	p = popen ("xauth -q nmerge - 2>/dev/null", "w");
================================================================


More information about the pld-cvs-commit mailing list