Changeset 1254

Show
Ignore:
Timestamp:
09/28/08 20:17:20 (2 months ago)
Author:
mbr
Message:

Added GPG_PATH variable to access.conf import routine to allow different paths for gpg to be specified on a per-SOURCE basis

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • fwknop/trunk/fwknopd

    r1252 r1254  
    231231    'GPG_NO_REQUIRE_PREFIX' => 0, 
    232232    'GPG_PREFIX' => '', 
     233    'GPG_PATH'   => '', 
    233234    'ULOG_PCAP'  => '', 
    234235    'FILE_PCAP'  => '', 
     
    23352336        if $gpg_no_options or $access_hr->{'GPG_NO_OPTIONS'}; 
    23362337 
    2337     $gnupg->call($cmds{'gpg'}) if defined $cmds{'gpg'}; 
     2338    if ($access_hr->{'GPG_PATH'}) { 
     2339        $gnupg->call($access_hr->{'GPG_PATH'}); 
     2340    } elsif (defined $cmds{'gpg'}) { 
     2341        $gnupg->call($cmds{'gpg'}); 
     2342    } 
    23382343 
    23392344    my $input  = IO::Handle->new() or die $!; 
     
    35263531                } elsif ($line =~ /^\s*GPG_PREFIX:\s*(\S+);/) { 
    35273532                    $access_hsh{'GPG_PREFIX'} = $1; 
     3533                } elsif ($line =~ /^\s*GPG_PATH:\s*(\S+);/) { 
     3534                    $access_hsh{'GPG_PATH'} = $1; 
     3535                    unless (-e $access_hsh{'GPG_PATH'} 
     3536                            and -x $access_hsh{'GPG_PATH'}) { 
     3537                        die "[*] $access_hsh{'GPG_PATH'} does not exist ", 
     3538                            "or could not execute."; 
     3539                    } 
    35283540                } elsif ($line =~ /^\s*FILE_PCAP\s*;/) { 
    35293541                    ### used in file pcap mode 
     
    39043916            $access_hr->{'GPG_PREFIX'} = $gpg_default_prefix 
    39053917                unless defined $access_hr->{'GPG_PREFIX'}; 
     3918            $access_hr->{'GPG_PATH'} = '' 
     3919                unless defined $access_hr->{'GPG_PATH'}; 
    39063920        } 
    39073921        if (defined ($access_hr->{'REQUIRE_AUTH_METHOD'})) {