[Pkg-gnupg-commit] [gnupg2] 59/102: Do not try to remove the enclosing directory of sockets.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Fri Jun 17 00:14:54 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch experimental
in repository gnupg2.

commit 0faf8951544f43790c412777a926c969540174bd
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Jun 8 09:04:29 2016 +0200

    Do not try to remove the enclosing directory of sockets.
    
    * agent/gpg-agent.c (remove_socket): Do not remove the enclosing
    directory.
    * scd/scdaemon.c (cleanup): Ditto.
    
    --
    
    The socket directory is now below /run or at ~/.gnupg.  Thus we should
    not try to remove the directory of the socket.  The auto-removal was
    introduced at a time we used a temporary directory for the sockets.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>
---
 agent/gpg-agent.c | 9 +--------
 scd/scdaemon.c    | 7 -------
 2 files changed, 1 insertion(+), 15 deletions(-)

diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index e5b352c..3e23a19 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -1,6 +1,6 @@
 /* gpg-agent.c  -  The GnuPG Agent
  * Copyright (C) 2000-2007, 2009-2010 Free Software Foundation, Inc.
- * Copyright (C) 2000-2014 Werner Koch
+ * Copyright (C) 2000-2016 Werner Koch
  *
  * This file is part of GnuPG.
  *
@@ -561,13 +561,6 @@ remove_socket (char *name, char *redir_name)
         name = redir_name;
 
       gnupg_remove (name);
-      p = strrchr (name, '/');
-      if (p)
-	{
-	  *p = 0;
-	  rmdir (name);
-	  *p = '/';
-	}
       *name = 0;
     }
 }
diff --git a/scd/scdaemon.c b/scd/scdaemon.c
index 215e63f..c468a84 100644
--- a/scd/scdaemon.c
+++ b/scd/scdaemon.c
@@ -376,13 +376,6 @@ cleanup (void)
       name = redir_socket_name? redir_socket_name : socket_name;
 
       gnupg_remove (name);
-      p = strrchr (name, '/');
-      if (p)
-        {
-          *p = 0;
-          rmdir (name);
-          *p = '/';
-        }
       *socket_name = 0;
     }
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list