]> rtime.felk.cvut.cz Git - sojka/debian/lightdm.git/commitdiff
* debian/patches:
authorcorsac <corsac@0c9b3bff-18ee-0310-b944-d1aa2700132f>
Wed, 19 Oct 2016 18:51:56 +0000 (18:51 +0000)
committercorsac <corsac@0c9b3bff-18ee-0310-b944-d1aa2700132f>
Wed, 19 Oct 2016 18:51:56 +0000 (18:51 +0000)
  - 08_reset-SIGPIPE-before-exec added, ignore SIGPIPE during LightDM life
    but reset it before exec()ing children.                   closes: #823460

git-svn-id: svn://anonscm.debian.org/pkg-xfce/goodies/trunk/lightdm@9581 0c9b3bff-18ee-0310-b944-d1aa2700132f

debian/changelog
debian/patches/08_reset-SIGPIPE-before-exec.patch [new file with mode: 0644]
debian/patches/series

index 6a510db73ccd326019ccf800c10ff0cf764ca377..84df24971d95ab06ffd97065b929a5b4538e4931 100644 (file)
@@ -2,6 +2,9 @@ lightdm (1.18.2-3) UNRELEASED; urgency=medium
 
   * debian/control:
     - add Suggests on xserver-xephyr.                           closes: #831298
+  * debian/patches:
+    - 08_reset-SIGPIPE-before-exec added, ignore SIGPIPE during LightDM life
+      but reset it before exec()ing children.                   closes: #823460
 
  -- Yves-Alexis Perez <corsac@debian.org>  Fri, 15 Jul 2016 21:44:54 +0200
 
diff --git a/debian/patches/08_reset-SIGPIPE-before-exec.patch b/debian/patches/08_reset-SIGPIPE-before-exec.patch
new file mode 100644 (file)
index 0000000..d00ab79
--- /dev/null
@@ -0,0 +1,45 @@
+=== modified file 'src/lightdm.c'
+--- lightdm/src/lightdm.c      2016-07-14 02:25:24 +0000
++++ lightdm/src/lightdm.c      2016-10-19 12:24:49 +0000
+@@ -1225,6 +1225,12 @@
+     };
+     GError *error = NULL;
++    /* Disable the SIGPIPE handler - this is a stupid Unix hangover behaviour.
++     * We will handle piples / sockets being closed instead of having the whole daemon be killed...
++     * http://stackoverflow.com/questions/8369506/why-does-sigpipe-exist
++     */
++    signal (SIGPIPE, SIG_IGN);
++
+     /* When lightdm starts sessions it needs to run itself in a new mode */
+     if (argc >= 2 && strcmp (argv[1], "--session-child") == 0)
+         return session_child_run (argc, argv);
+
+=== modified file 'src/process.c'
+--- lightdm/src/process.c      2015-10-20 07:50:44 +0000
++++ lightdm/src/process.c      2016-10-19 12:24:49 +0000
+@@ -236,6 +236,9 @@
+         for (i = 0; i < env_length; i++)
+             setenv (env_keys[i], env_values[i], TRUE);
++        /* Reset SIGPIPE handler so the child has default behaviour (we disabled it at LightDM start) */
++        signal (SIGPIPE, SIG_DFL);
++
+         execvp (argv[0], argv);
+         _exit (EXIT_FAILURE);
+     }
+
+=== modified file 'src/session-child.c'
+--- lightdm/src/session-child.c        2016-03-15 03:07:59 +0000
++++ lightdm/src/session-child.c        2016-10-19 12:24:49 +0000
+@@ -704,6 +704,9 @@
+             }
+         }
++        /* Reset SIGPIPE handler so the child has default behaviour (we disabled it at LightDM start) */
++        signal (SIGPIPE, SIG_DFL);
++
+         /* Run the command */
+         execve (command_argv[0], command_argv, pam_getenvlist (pam_handle));
+         _exit (EXIT_FAILURE);
+
index 3b3f7e73d8b65cbb45c2a8d74119088580196527..766641b7d725ac598eb666406cf624a3199a5fa1 100644 (file)
@@ -3,3 +3,4 @@
 05_debianize-pam-files.patch
 06_change-user-dirs.patch
 07-Remove-unused-unititialized-file-descriptors-could-c.patch
+08_reset-SIGPIPE-before-exec.patch