1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-07-01 02:42:44 +02:00

* import.c (import_one): When merging with a key we already have, don't

let a key conflict (same keyid but different key) stop the import: just
skip the bad key and continue.

* exec.c (make_tempdir): Under Win32, don't try environment variables for
temp directories - GetTempDir tries environment variables internally, and
it's better not to second-guess it in case MS adds some sort of temp dir
handling to Windows at some point.
This commit is contained in:
David Shaw 2002-05-05 19:44:22 +00:00
parent f6ccde9f14
commit ffc98f20ea
3 changed files with 30 additions and 17 deletions

View File

@ -1,3 +1,15 @@
2002-05-05 David Shaw <dshaw@jabberwocky.com>
* import.c (import_one): When merging with a key we already have,
don't let a key conflict (same keyid but different key) stop the
import: just skip the bad key and continue.
* exec.c (make_tempdir): Under Win32, don't try environment
variables for temp directories - GetTempDir tries environment
variables internally, and it's better not to second-guess it in
case MS adds some sort of temp dir handling to Windows at some
point.
2002-05-05 Timo Schulz <ts@winpt.org>
* mainproc.c (proc_symkey_enc): Don't ask for a passphrase

View File

@ -67,8 +67,25 @@ static int make_tempdir(struct exec_info *info)
ext=info->binary?"bin":"txt";
/* Make up the temp dir and files in case we need them */
if(tmp==NULL)
{
#if defined (__MINGW32__) || defined (__CYGWIN32__)
tmp=m_alloc(256);
if(GetTempPath(256,tmp)==0)
strcpy(tmp,"c:\\windows\temp");
else
{
int len=strlen(tmp);
/* GetTempPath may return with \ on the end */
while(len>0 && tmp[len-1]=='\\')
{
tmp[len-1]='\0';
len--;
}
}
#else /* More unixish systems */
tmp=getenv("TMPDIR");
if(tmp==NULL)
{
@ -78,26 +95,12 @@ static int make_tempdir(struct exec_info *info)
#ifdef __riscos__
tmp="<Wimp$ScrapDir>.GnuPG";
mkdir(tmp,0700); /* Error checks occur later on */
#elif defined (__MINGW32__) || defined (__CYGWIN32__)
tmp=m_alloc(256);
if(GetTempPath(256,tmp)==0)
strcpy(tmp,"c:\\temp");
else
{
int len=strlen(tmp);
/* GetTempPath may return with \ on the end */
while(len>0 && tmp[len-1]=='\\')
{
tmp[len-1]='\0';
len--;
}
}
#else
tmp="/tmp";
#endif
}
}
#endif
}
info->tempdir=m_alloc(strlen(tmp)+strlen(DIRSEP_S)+10+1);

View File

@ -517,13 +517,11 @@ import_one( const char *fname, KBNODE keyblock, int fast,
KEYDB_HANDLE hd;
int n_uids, n_sigs, n_subk;
/* Compare the original against the new key; just to be sure nothing
* weird is going on */
if( cmp_public_keys( pk_orig, pk ) ) {
log_error( _("key %08lX: doesn't match our copy\n"),
(ulong)keyid[1]);
rc = G10ERR_GENERAL;
goto leave;
}