[Pkg-gnupg-commit] [gnupg2] 152/185: Revert "w32: Change directory on daemon startup."
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Mon Aug 7 11:55:31 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch experimental
in repository gnupg2.
commit f2d2648a4deb205c26ac869c857c000a95d3ff0c
Author: Werner Koch <wk at gnupg.org>
Date: Tue Jul 25 12:19:08 2017 +0200
Revert "w32: Change directory on daemon startup."
--
This reverts commit 78ebc62604d77600b9865950610717d28c6027a2.
Gnupg-bug-id: 2670
---
agent/gpg-agent.c | 6 ------
dirmngr/dirmngr.c | 13 +++----------
scd/scdaemon.c | 13 +++----------
3 files changed, 6 insertions(+), 26 deletions(-)
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index 90e8a26..efaebfd 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -39,7 +39,6 @@
# endif
# include <aclapi.h>
# include <sddl.h>
-# include <direct.h>
#else /*!HAVE_W32_SYSTEM*/
# include <sys/socket.h>
# include <sys/un.h>
@@ -1559,11 +1558,6 @@ main (int argc, char **argv )
(void)csh_style;
(void)nodetach;
initialize_modules ();
- if (_chdir("\\"))
- {
- log_error ("chdir to / failed: %s\n", strerror (errno));
- exit (1);
- }
#else /*!HAVE_W32_SYSTEM*/
diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c
index b19b418..6eabca9 100644
--- a/dirmngr/dirmngr.c
+++ b/dirmngr/dirmngr.c
@@ -30,11 +30,9 @@
#include <assert.h>
#include <time.h>
#include <fcntl.h>
-#ifdef HAVE_W32_SYSTEM
-# include <direct.h>
-#else
-# include <sys/socket.h>
-# include <sys/un.h>
+#ifndef HAVE_W32_SYSTEM
+#include <sys/socket.h>
+#include <sys/un.h>
#endif
#include <sys/stat.h>
#include <unistd.h>
@@ -1270,11 +1268,6 @@ main (int argc, char **argv)
#ifdef HAVE_W32_SYSTEM
(void)csh_style;
(void)nodetach;
- if (_chdir("\\"))
- {
- log_error ("chdir to / failed: %s\n", strerror (errno));
- exit (1);
- }
pid = getpid ();
es_printf ("set %s=%s;%lu;1\n",
diff --git a/scd/scdaemon.c b/scd/scdaemon.c
index bbb0433..26e89dd 100644
--- a/scd/scdaemon.c
+++ b/scd/scdaemon.c
@@ -29,11 +29,9 @@
#include <assert.h>
#include <time.h>
#include <fcntl.h>
-#ifdef HAVE_W32_SYSTEM
-# include <direct.h>
-#else
-# include <sys/socket.h>
-# include <sys/un.h>
+#ifndef HAVE_W32_SYSTEM
+#include <sys/socket.h>
+#include <sys/un.h>
#endif /*HAVE_W32_SYSTEM*/
#include <unistd.h>
#include <signal.h>
@@ -813,11 +811,6 @@ main (int argc, char **argv )
#ifdef HAVE_W32_SYSTEM
(void)csh_style;
(void)nodetach;
- if (_chdir("\\"))
- {
- log_error ("chdir to / failed: %s\n", strerror (errno));
- exit (1);
- }
#else
pid = fork ();
if (pid == (pid_t)-1)
--
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