1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

w32: Also change the directory on daemon startup.

* agent/gpg-agent.c (main): Always to the chdir.
* dirmngr/dirmngr.c (main): Ditto.
* scd/scdaemon.c (main): Ditto.
--

Note that only dirmngr did not call the chdir with --no-detach.  thus
we kept it this way.

Tested gpg-agent by checking the properties shown by procexp.

Gnupg-bug-id: 2670
Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2017-07-25 12:52:33 +02:00
parent 226f143ca0
commit 0ef50340ef
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
3 changed files with 14 additions and 11 deletions

View file

@ -908,6 +908,8 @@ main (int argc, char **argv )
sigaction (SIGPIPE, &sa, NULL);
}
#endif /*!HAVE_W32_SYSTEM*/
if (gnupg_chdir (gnupg_daemon_rootdir ()))
{
log_error ("chdir to '%s' failed: %s\n",
@ -915,8 +917,6 @@ main (int argc, char **argv )
exit (1);
}
#endif /*!HAVE_W32_SYSTEM*/
handle_connections (fd);
close (fd);