From 90d15a9d6ad79c21d1c04e4d6d43d00d9b690219 Mon Sep 17 00:00:00 2001 From: David Shaw Date: Thu, 3 Jan 2002 20:03:14 +0000 Subject: [PATCH] Minor tweaks: remove --no-default-check-level, don't cache child tempfiles and simpler code in keyserver --- g10/ChangeLog | 14 ++++++++++++++ g10/exec.c | 10 ++++------ g10/g10.c | 3 --- g10/keyserver.c | 2 +- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/g10/ChangeLog b/g10/ChangeLog index ddfb61935..c7c14aeb4 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,17 @@ +2002-01-03 David Shaw + + * g10.c (main): Removed --no-default-check-level option, as it is + not consistent with other "default" options. Plus, it is the same + as saying --default-check-level 0. + + * exec.c (exec_read): Disallow caching tempfile from child + process, as this keeps the file handle open and can cause unlink + problems on some platforms. + + * keyserver.c (keyserver_search_prompt): Minor tweak - don't + bother to transform keyids into textual form if they're just going + to be transformed back to numbers. + 2002-01-03 Timo Schulz * g10.c: New command --encrypt-files. diff --git a/g10/exec.c b/g10/exec.c index 55a808546..9cf40b329 100644 --- a/g10/exec.c +++ b/g10/exec.c @@ -423,6 +423,9 @@ int exec_read(struct exec_info *info) ret=G10ERR_READ_FILE; goto fail; } + + /* Do not cache this iobuf on close */ + iobuf_ioctl(info->fromchild,3,1,NULL); } } @@ -447,13 +450,8 @@ int exec_finish(struct exec_info *info) } #endif - if(info->fromchild) { + if(info->fromchild) iobuf_close(info->fromchild); -#ifdef __riscos__ - /* invalidate close cache, as otherwise unlink() below won't work */ - iobuf_ioctl(NULL, 2, 0, info->tempfile_out); -#endif - } if(info->tochild) fclose(info->tochild); diff --git a/g10/g10.c b/g10/g10.c index 14e743ed1..37fbb1853 100644 --- a/g10/g10.c +++ b/g10/g10.c @@ -128,7 +128,6 @@ enum cmd_and_opt_values { aNull = 0, oAnswerYes, oAnswerNo, oDefCheckLevel, - oNoDefCheckLevel, oKeyring, oSecretKeyring, oShowKeyring, @@ -438,7 +437,6 @@ static ARGPARSE_OPTS opts[] = { { oCompressKeys, "compress-keys",0, "@"}, { oCompressSigs, "compress-sigs",0, "@"}, { oDefCheckLevel, "default-check-level", 1, "@"}, - { oNoDefCheckLevel, "no-default-check-level", 0, "@"}, { oAlwaysTrust, "always-trust", 0, "@"}, { oEmuChecksumBug, "emulate-checksum-bug", 0, "@"}, { oRunAsShmCP, "run-as-shm-coprocess", 4, "@" }, @@ -982,7 +980,6 @@ main( int argc, char **argv ) break; case oNoArmor: opt.no_armor=1; opt.armor=0; break; case oNoDefKeyring: default_keyring = 0; break; - case oNoDefCheckLevel: opt.def_check_level=0; break; case oDefCheckLevel: opt.def_check_level=pargs.r.ret_int; break; case oNoGreeting: nogreeting = 1; break; case oNoVerbose: g10_opt_verbose = 0; diff --git a/g10/keyserver.c b/g10/keyserver.c index 4e8d68834..5de695ec1 100644 --- a/g10/keyserver.c +++ b/g10/keyserver.c @@ -844,7 +844,7 @@ keyserver_search_prompt(IOBUF buffer,int count,const char *searchstr) while((num=strsep(&split," ,"))!=NULL) if(atoi(num)>=1 && atoi(num)<=i) - keyserver_import_keyid(keyids[atoi(num)-1]); + keyserver_work(GET,NULL,&keyids[atoi(num)-1],1); m_free(answer); break;