From bce4ea798a87ee7f8f9ea3a930c3e53a321a8622 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 16 Jul 2007 09:53:47 +0000 Subject: Properly close files opened by es_fopen. Allow setting of an empty passphrase. Assorted W32 changes. --- common/ChangeLog | 4 ++++ common/estream.c | 1 + common/exechelp.c | 5 +---- common/simple-pwquery.c | 3 --- 4 files changed, 6 insertions(+), 7 deletions(-) (limited to 'common') diff --git a/common/ChangeLog b/common/ChangeLog index 7dd887cdc..8c7828a05 100644 --- a/common/ChangeLog +++ b/common/ChangeLog @@ -1,3 +1,7 @@ +2007-07-16 Werner Koch + + * estream.c (es_func_file_create): Clear NO_CLOSE flag. + 2007-07-12 Werner Koch * sysutils.h (gnupg_fd_t): New. diff --git a/common/estream.c b/common/estream.c index f43690d0a..06c624401 100644 --- a/common/estream.c +++ b/common/estream.c @@ -861,6 +861,7 @@ es_func_file_create (void **cookie, int *filedes, #endif file_cookie->fd = fd; + file_cookie->no_close = 0; *cookie = file_cookie; *filedes = fd; diff --git a/common/exechelp.c b/common/exechelp.c index 44e6e837d..6883c2aa4 100644 --- a/common/exechelp.c +++ b/common/exechelp.c @@ -358,10 +358,7 @@ gnupg_spawn_process (const char *pgmname, const char *argv[], if (x == -1) log_error ("failed to translate osfhandle %p\n", (void*)rp[0] ); else - { - log_debug ("_open_osfhandle %p yields %d\n", (void*)fd, x ); - *statusfile = fdopen (x, "r"); - } + *statusfile = fdopen (x, "r"); } if (!*statusfile) { diff --git a/common/simple-pwquery.c b/common/simple-pwquery.c index 6381b9928..13617d2b9 100644 --- a/common/simple-pwquery.c +++ b/common/simple-pwquery.c @@ -327,9 +327,6 @@ agent_open (int *rfd) { #ifdef SPWQ_USE_LOGGING log_error ( _("malformed GPG_AGENT_INFO environment variable\n")); - log_debug ( "a='%s'\n", infostr); - log_debug ( "a='%s'\n", strchr ( infostr, PATHSEP_C)); - log_debug ( "a=%td\n", (p-infostr)); #endif return SPWQ_NO_AGENT; } -- cgit v1.2.3