r16845 - in /desktop/unstable/seahorse/debian: changelog patches/02_close_fds.patch patches/series

joss at users.alioth.debian.org joss at users.alioth.debian.org
Sat Aug 30 16:56:15 UTC 2008


Author: joss
Date: Sat Aug 30 16:56:15 2008
New Revision: 16845

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=16845
Log:
02_close_fds.patch: set close-on-exec flag on the agent socket's 
file descriptor to avoid leaking it to spawned processes.
Closes: #492282.

Added:
    desktop/unstable/seahorse/debian/patches/02_close_fds.patch
Modified:
    desktop/unstable/seahorse/debian/changelog
    desktop/unstable/seahorse/debian/patches/series

Modified: desktop/unstable/seahorse/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/seahorse/debian/changelog?rev=16845&op=diff
==============================================================================
--- desktop/unstable/seahorse/debian/changelog (original)
+++ desktop/unstable/seahorse/debian/changelog Sat Aug 30 16:56:15 2008
@@ -1,3 +1,11 @@
+seahorse (2.22.3-2) unstable; urgency=low
+
+  * 02_close_fds.patch: set close-on-exec flag on the agent socket's 
+    file descriptor to avoid leaking it to spawned processes.
+    Closes: #492282.
+
+ -- Josselin Mouette <joss at debian.org>  Sat, 30 Aug 2008 18:56:42 +0200
+
 seahorse (2.22.3-1) unstable; urgency=low
 
   * New upstream bugfix release.

Added: desktop/unstable/seahorse/debian/patches/02_close_fds.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/seahorse/debian/patches/02_close_fds.patch?rev=16845&op=file
==============================================================================
--- desktop/unstable/seahorse/debian/patches/02_close_fds.patch (added)
+++ desktop/unstable/seahorse/debian/patches/02_close_fds.patch Sat Aug 30 16:56:15 2008
@@ -1,0 +1,47 @@
+Index: seahorse-2.22.3/agent/seahorse-agent-io.c
+===================================================================
+--- seahorse-2.22.3.orig/agent/seahorse-agent-io.c	2008-07-27 06:42:44.538619363 +0200
++++ seahorse-2.22.3/agent/seahorse-agent-io.c	2008-07-27 06:56:22.687124410 +0200
+@@ -29,6 +29,7 @@
+ #include <stddef.h>
+ #include <stdlib.h>
+ #include <unistd.h>
++#include <fcntl.h>
+ #include <stdio.h>
+ #include <err.h>
+ #include <errno.h>
+@@ -110,6 +111,23 @@ struct _SeahorseAgentConn {
+ 
+ /* -------------------------------------------------------------------------- */
+ 
++static int
++set_cloexec_flag (int fd)
++{
++    int oldflags;
++   
++    oldflags = fcntl (fd, F_GETFD, 0);
++    /* If reading the flags failed, return error indication now.*/
++    if (oldflags < 0)
++    return oldflags;
++    /* Set just the flag we want to set. */
++    oldflags |= FD_CLOEXEC;
++
++    /* Store modified flag word in the descriptor. */
++    return fcntl (fd, F_SETFD, oldflags);
++}
++
++
+ /* Create the socket and fill in sockname with its path */
+ int
+ seahorse_agent_io_socket ()
+@@ -154,6 +172,10 @@ seahorse_agent_io_socket ()
+         return -1;
+     }
+ 
++    if (set_cloexec_flag (g_socket) < 0) {
++        g_critical ("can't set close-on-exec flag: %s", strerror (errno));
++    }
++
+     /* Bind it to the address */
+     if (bind (g_socket, (struct sockaddr *) &addr, len) == -1) {
+         g_critical ("couldn't bind to socket: %s: %s", addr.sun_path,

Modified: desktop/unstable/seahorse/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/seahorse/debian/patches/series?rev=16845&op=diff
==============================================================================
--- desktop/unstable/seahorse/debian/patches/series (original)
+++ desktop/unstable/seahorse/debian/patches/series Sat Aug 30 16:56:15 2008
@@ -1,4 +1,5 @@
 01_sharedlib.patch
+02_close_fds.patch
 04_ldap_deprecated.patch
 05_focus_windows.patch
 06_tray_hide_window.patch




More information about the pkg-gnome-commits mailing list