Changeset 191 for trunk/scripts


Ignore:
Timestamp:
Nov 7, 2008, 10:01:47 PM (16 years ago)
Author:
katerina
Message:

Patch for GnuPG key ID by Jim Dutton

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/samhainadmin.pl.in

    r53 r191  
    5050my $daemon   = "@sbindir@/@install_name@";
    5151my $gpg      = "@mygpg@";
     52
     53my $TARGETKEYID = "@mykeyid@";
     54my $KEYTAG      = "@mykeytag@";
    5255
    5356$cfgfile  =~ s/^REQ_FROM_SERVER//;
     
    502505    if (defined($passphrase)) {
    503506        local $SIG{PIPE} = 'IGNORE';
    504         my $command = "$gpg --homedir $ENV{'HOME'}/.gnupg --passphrase-fd 0 -a --clearsign -o $fileout --not-dash-escaped $file1";
     507        my $command = "$gpg --homedir $ENV{'HOME'}/.gnupg --passphrase-fd 0 -a ${KEYTAG} ${TARGETKEYID} --clearsign -o $fileout --not-dash-escaped $file1";
    505508        open (FH, "|$command")  or die "can't fork: $!";
    506509        print FH "$passphrase"  or die "can't write: $!";
    507510        close FH                or die "can't close: status=$?";
    508511    } else {
    509         my $command = "$gpg --homedir $ENV{'HOME'}/.gnupg                   -a --clearsign -o $fileout --not-dash-escaped $file1";
     512        my $command = "$gpg --homedir $ENV{'HOME'}/.gnupg                   -a ${KEYTAG} ${TARGETKEYID} --clearsign -o $fileout --not-dash-escaped $file1";
    510513        system("$command") == 0
    511514            or die "system $command failed: $?";
Note: See TracChangeset for help on using the changeset viewer.