mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-10 13:04:23 +01:00
gpgkeys_ldap: Close files explicitly when exiting
gpgkeys_mailto: Use the outofband flag so gpg doesn't expect any actual data
This commit is contained in:
parent
aa2e2392da
commit
024cc59975
@ -1,3 +1,12 @@
|
||||
2001-12-28 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_mailto.in: Use the new OUTOFBAND indicator so gpg knows
|
||||
not to try and import anything. Also turn on perl -w for
|
||||
warnings.
|
||||
|
||||
* gpgkeys_ldap.c (main): If we're using temp files (rather than
|
||||
stdin/stdout), make sure the file is closed when we're done.
|
||||
|
||||
2001-12-20 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* Properly free the LDAP response when we're done with it.
|
||||
|
@ -930,6 +930,12 @@ int main(int argc,char *argv[])
|
||||
|
||||
fail:
|
||||
|
||||
if(input!=stdin)
|
||||
fclose(input);
|
||||
|
||||
if(output!=stdout)
|
||||
fclose(output);
|
||||
|
||||
if(ldap!=NULL)
|
||||
ldap_unbind_s(ldap);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!@PERL@
|
||||
#!@PERL@ -w
|
||||
|
||||
# gpgkeys_mailto - talk to a email keyserver
|
||||
# Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
@ -58,8 +58,7 @@ while(<STDIN>)
|
||||
{
|
||||
$verbose++;
|
||||
}
|
||||
|
||||
if($1=~/^no-verbose$/i)
|
||||
elsif($1=~/^no-verbose$/i)
|
||||
{
|
||||
$verbose--;
|
||||
}
|
||||
@ -75,10 +74,20 @@ while(<STDIN>)
|
||||
push(@keys,$_);
|
||||
}
|
||||
|
||||
# Send response
|
||||
|
||||
print "VERSION 0\n";
|
||||
print "OPTION OUTOFBAND\n\n";
|
||||
|
||||
# Email keyservers get and search the same way
|
||||
|
||||
if($command=~/get/i || $command=~/search/i)
|
||||
{
|
||||
if($command=~/search/i)
|
||||
{
|
||||
print "COUNT 0\n";
|
||||
}
|
||||
|
||||
foreach $key (@keys)
|
||||
{
|
||||
open(MAIL,"|$sendmail") || die "ERROR: Can't open $sendmail\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user