1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-23 10:29:58 +01:00

Minor tweaks: remove --no-default-check-level, don't cache child tempfiles

and simpler code in keyserver
This commit is contained in:
David Shaw 2002-01-03 20:03:14 +00:00
parent c02977a2de
commit 90d15a9d6a
4 changed files with 19 additions and 10 deletions

View File

@ -1,3 +1,17 @@
2002-01-03 David Shaw <dshaw@jabberwocky.com>
* 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 <ts@winpt.org>
* g10.c: New command --encrypt-files.

View File

@ -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);

View File

@ -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;

View File

@ -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;