aboutsummaryrefslogtreecommitdiffstats
path: root/agent/protect-tool.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2004-12-20 16:17:25 +0000
committerWerner Koch <[email protected]>2004-12-20 16:17:25 +0000
commit581f5ddb1724f469dc7f934f5093179dfb1e05a9 (patch)
treed239f17e59f705f1b85c5cb5c2b9e1595e512e5f /agent/protect-tool.c
parent(do_pth_event_free): The events are hold in a ring (diff)
downloadgnupg-581f5ddb1724f469dc7f934f5093179dfb1e05a9.tar.gz
gnupg-581f5ddb1724f469dc7f934f5093179dfb1e05a9.zip
* configure.ac: Add PATHSEP_C and PATHSEP_S. For W32 let all
directories default to c:/gnupg. Require libassuan 0.6.9. * gpg-agent.c (main) [W32]: Now that Mutexes work we can remove the pth_init kludge. (main): Add new options --[no-]use-standard-socket. (check_for_running_agent): Check whether it is running on the standard socket. * sysutils.h [W32]: Define sleep. * util.h: Add prototype for mkdtemp. * call-agent.c (start_agent): Before starting a pipe server start to connect to a server on the standard socket. Use PATHSEP * call-dirmngr.c (start_dirmngr): Use PATHSEP. * import.c: Include unistd.h for dup and close.
Diffstat (limited to 'agent/protect-tool.c')
-rw-r--r--agent/protect-tool.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/agent/protect-tool.c b/agent/protect-tool.c
index ef8a50916..43dd67eea 100644
--- a/agent/protect-tool.c
+++ b/agent/protect-tool.c
@@ -44,6 +44,8 @@
#include "minip12.h"
#include "simple-pwquery.h"
#include "i18n.h"
+#include "sysutils.h"
+
enum cmd_and_opt_values
{ aNull = 0,
@@ -1065,12 +1067,12 @@ main (int argc, char **argv )
gcry_control (GCRYCTL_INIT_SECMEM, 16384, 0);
-#ifdef HAVE_W32_SYSTEM
- opt_homedir = read_w32_registry_string ( NULL,
- "Software\\GNU\\GnuPG", "HomeDir" );
-#else /*!HAVE_W32_SYSTEM*/
opt_homedir = getenv ("GNUPGHOME");
-#endif /*!HAVE_W32_SYSTEM*/
+#ifdef HAVE_W32_SYSTEM
+ if (!opt_homedir || !*opt_homedir)
+ opt_homedir = read_w32_registry_string (NULL,
+ "Software\\GNU\\GnuPG", "HomeDir");
+#endif /*HAVE_W32_SYSTEM*/
if (!opt_homedir || !*opt_homedir)
opt_homedir = GNUPG_DEFAULT_HOMEDIR;
@@ -1162,7 +1164,9 @@ get_passphrase (int promptno)
char *pw;
int err;
const char *desc;
+#ifdef HAVE_LANGINFO_CODESET
char *orig_codeset = NULL;
+#endif
int error_msgno;