r46512 - in /desktop/unstable/gnome-keyring/debian: changelog patches/fork_before_using_dbus.patch patches/series

mitya57 at users.alioth.debian.org mitya57 at users.alioth.debian.org
Mon Oct 12 10:48:50 UTC 2015


Author: mitya57
Date: Mon Oct 12 10:48:50 2015
New Revision: 46512

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=46512
Log:
* Use https:// for Vcs-Browser.
* Add another proposed upstream patch from Cosimo Cecchi to make
  sure fork is done before attempting to use D-Bus connections
  (fork_before_using_dbus.patch; closes: #800617).

Added:
    desktop/unstable/gnome-keyring/debian/patches/fork_before_using_dbus.patch
Modified:
    desktop/unstable/gnome-keyring/debian/changelog
    desktop/unstable/gnome-keyring/debian/patches/series

Modified: desktop/unstable/gnome-keyring/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-keyring/debian/changelog?rev=46512&op=diff
==============================================================================
--- desktop/unstable/gnome-keyring/debian/changelog	[utf-8] (original)
+++ desktop/unstable/gnome-keyring/debian/changelog	[utf-8] Mon Oct 12 10:48:50 2015
@@ -1,3 +1,15 @@
+gnome-keyring (3.18.0-3) unstable; urgency=medium
+
+  [ Michael Biebl ]
+  * Use https:// for Vcs-Browser.
+
+  [ Dmitry Shachnev ]
+  * Add another proposed upstream patch from Cosimo Cecchi to make
+    sure fork is done before attempting to use D-Bus connections
+    (fork_before_using_dbus.patch; closes: #800617).
+
+ -- Dmitry Shachnev <mitya57 at debian.org>  Mon, 12 Oct 2015 13:45:21 +0300
+
 gnome-keyring (3.18.0-2) unstable; urgency=medium
 
   * Add proposed upstream patch from Jan Alexander Steffens to fix

Added: desktop/unstable/gnome-keyring/debian/patches/fork_before_using_dbus.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-keyring/debian/patches/fork_before_using_dbus.patch?rev=46512&op=file
==============================================================================
--- desktop/unstable/gnome-keyring/debian/patches/fork_before_using_dbus.patch	(added)
+++ desktop/unstable/gnome-keyring/debian/patches/fork_before_using_dbus.patch	[utf-8] Mon Oct 12 10:48:50 2015
@@ -0,0 +1,128 @@
+Description: be careful to avoid spinning a main loop before fork()
+Author: Cosimo Cecchi <cosimo.cecchi at gmail.com>
+Forwarded: https://bugzilla.gnome.org/show_bug.cgi?id=756059#c5
+Last-Update: 2015-10-12
+
+--- a/daemon/gkd-main.c
++++ b/daemon/gkd-main.c
+@@ -609,10 +609,8 @@
+ {
+ 	int status;
+ 	pid_t pid;
+-	int fd, i;
+ 
+ 	if (run_foreground) {
+-		print_environment ();
+ 		return;
+ 	}
+ 
+@@ -632,9 +630,6 @@
+ 			if (WEXITSTATUS (status) != 0)
+ 				exit (WEXITSTATUS (status));
+ 
+-		} else {
+-			/* Not double forking */
+-			print_environment ();
+ 		}
+ 
+ 		/* The initial process exits successfully */
+@@ -664,22 +659,11 @@
+ 			if (pid == -1)
+ 				exit (1);
+ 
+-			/* We've done two forks. */
+-			print_environment ();
+-
+ 			/* The intermediate child exits */
+ 			exit (0);
+ 		}
+ 
+ 	}
+-
+-	/* Here we are in the resulting daemon or background process. */
+-
+-	for (i = 0; i < 3; ++i) {
+-		fd = open ("/dev/null", O_RDONLY);
+-		sane_dup2 (fd, i);
+-		close (fd);
+-	}
+ }
+ 
+ static gboolean
+@@ -810,6 +794,8 @@
+ int
+ main (int argc, char *argv[])
+ {
++	int fd, i;
++
+ 	/*
+ 	 * The gnome-keyring startup is not as simple as I wish it could be.
+ 	 *
+@@ -876,6 +862,19 @@
+ 		exit (0);
+ 	}
+ 
++	if (perform_unlock) {
++		login_password = read_login_password (STDIN);
++		atexit (clear_login_password);
++	}
++
++	signal (SIGPIPE, SIG_IGN);
++
++	/* The whole forking and daemonizing dance starts here. */
++	fork_and_print_environment();
++
++	/* Prepare logging a second time, since we may be in a different process */
++	prepare_logging();
++
+ 	/* The --start option */
+ 	if (run_for_start) {
+ 		if (discover_other_daemon (initialize_daemon_at, TRUE)) {
+@@ -898,6 +897,16 @@
+ 			g_message ("Could not find daemon to replace, staring normally");
+ 	}
+ 
++	/* Here we are in the resulting daemon or background process. */
++	print_environment ();
++
++	if (!run_foreground)
++		for (i = 0; i < 3; ++i) {
++			fd = open ("/dev/null", O_RDONLY);
++			sane_dup2 (fd, i);
++			close (fd);
++		}
++
+ 	/* Initialize the main directory */
+ 	gkd_util_init_master_directory (control_directory);
+ 
+@@ -908,11 +917,6 @@
+ 	if (!gkd_control_listen ())
+ 		return FALSE;
+ 
+-	if (perform_unlock) {
+-		login_password = read_login_password (STDIN);
+-		atexit (clear_login_password);
+-	}
+-
+ 	/* The --login option. Delayed initialization */
+ 	if (run_for_login) {
+ 		timeout_id = g_timeout_add_seconds (LOGIN_TIMEOUT, (GSourceFunc) on_login_timeout, NULL);
+@@ -924,18 +928,10 @@
+ 			cleanup_and_exit (1);
+ 	}
+ 
+-	signal (SIGPIPE, SIG_IGN);
+-
+-	/* The whole forking and daemonizing dance starts here. */
+-	fork_and_print_environment();
+-
+ 	g_unix_signal_add (SIGTERM, on_signal_term, loop);
+ 	g_unix_signal_add (SIGHUP, on_signal_term, loop);
+ 	g_unix_signal_add (SIGUSR1, on_signal_usr1, loop);
+ 
+-	/* Prepare logging a second time, since we may be in a different process */
+-	prepare_logging();
+-
+ 	/* Remainder initialization after forking, if initialization not delayed */
+ 	if (!run_for_login) {
+ 		gkr_daemon_initialize_steps (run_components);

Modified: desktop/unstable/gnome-keyring/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-keyring/debian/patches/series?rev=46512&op=diff
==============================================================================
--- desktop/unstable/gnome-keyring/debian/patches/series	[utf-8] (original)
+++ desktop/unstable/gnome-keyring/debian/patches/series	[utf-8] Mon Oct 12 10:48:50 2015
@@ -1,3 +1,4 @@
 03_kfreebsd.patch
 fix_tests_for_new_glib.patch
 init_secret_service.patch
+fork_before_using_dbus.patch




More information about the pkg-gnome-commits mailing list