mirror of
git://git.gnupg.org/gnupg.git
synced 2024-07-06 03:19:21 +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:
parent
f6ccde9f14
commit
ffc98f20ea
@ -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>
|
2002-05-05 Timo Schulz <ts@winpt.org>
|
||||||
|
|
||||||
* mainproc.c (proc_symkey_enc): Don't ask for a passphrase
|
* mainproc.c (proc_symkey_enc): Don't ask for a passphrase
|
||||||
|
25
g10/exec.c
25
g10/exec.c
@ -67,21 +67,13 @@ static int make_tempdir(struct exec_info *info)
|
|||||||
ext=info->binary?"bin":"txt";
|
ext=info->binary?"bin":"txt";
|
||||||
|
|
||||||
/* Make up the temp dir and files in case we need them */
|
/* Make up the temp dir and files in case we need them */
|
||||||
|
|
||||||
if(tmp==NULL)
|
if(tmp==NULL)
|
||||||
{
|
{
|
||||||
tmp=getenv("TMPDIR");
|
#if defined (__MINGW32__) || defined (__CYGWIN32__)
|
||||||
if(tmp==NULL)
|
|
||||||
{
|
|
||||||
tmp=getenv("TMP");
|
|
||||||
if(tmp==NULL)
|
|
||||||
{
|
|
||||||
#ifdef __riscos__
|
|
||||||
tmp="<Wimp$ScrapDir>.GnuPG";
|
|
||||||
mkdir(tmp,0700); /* Error checks occur later on */
|
|
||||||
#elif defined (__MINGW32__) || defined (__CYGWIN32__)
|
|
||||||
tmp=m_alloc(256);
|
tmp=m_alloc(256);
|
||||||
if(GetTempPath(256,tmp)==0)
|
if(GetTempPath(256,tmp)==0)
|
||||||
strcpy(tmp,"c:\\temp");
|
strcpy(tmp,"c:\\windows\temp");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int len=strlen(tmp);
|
int len=strlen(tmp);
|
||||||
@ -93,11 +85,22 @@ static int make_tempdir(struct exec_info *info)
|
|||||||
len--;
|
len--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else /* More unixish systems */
|
||||||
|
tmp=getenv("TMPDIR");
|
||||||
|
if(tmp==NULL)
|
||||||
|
{
|
||||||
|
tmp=getenv("TMP");
|
||||||
|
if(tmp==NULL)
|
||||||
|
{
|
||||||
|
#ifdef __riscos__
|
||||||
|
tmp="<Wimp$ScrapDir>.GnuPG";
|
||||||
|
mkdir(tmp,0700); /* Error checks occur later on */
|
||||||
#else
|
#else
|
||||||
tmp="/tmp";
|
tmp="/tmp";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
info->tempdir=m_alloc(strlen(tmp)+strlen(DIRSEP_S)+10+1);
|
info->tempdir=m_alloc(strlen(tmp)+strlen(DIRSEP_S)+10+1);
|
||||||
|
@ -517,13 +517,11 @@ import_one( const char *fname, KBNODE keyblock, int fast,
|
|||||||
KEYDB_HANDLE hd;
|
KEYDB_HANDLE hd;
|
||||||
int n_uids, n_sigs, n_subk;
|
int n_uids, n_sigs, n_subk;
|
||||||
|
|
||||||
|
|
||||||
/* Compare the original against the new key; just to be sure nothing
|
/* Compare the original against the new key; just to be sure nothing
|
||||||
* weird is going on */
|
* weird is going on */
|
||||||
if( cmp_public_keys( pk_orig, pk ) ) {
|
if( cmp_public_keys( pk_orig, pk ) ) {
|
||||||
log_error( _("key %08lX: doesn't match our copy\n"),
|
log_error( _("key %08lX: doesn't match our copy\n"),
|
||||||
(ulong)keyid[1]);
|
(ulong)keyid[1]);
|
||||||
rc = G10ERR_GENERAL;
|
|
||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user