close Warning: Can't synchronize with repository "(default)" (The repository directory has changed, you should resynchronize the repository with: trac-admin $ENV repository resync '(default)'). Look in the Trac log for more information.

Changeset 191


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

Patch for GnuPG key ID by Jim Dutton

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/aclocal.m4

    r183 r191  
    410410DESTDIR=
    411411SH_ENABLE_OPTS="db-reload xml-log message-queue login-watch process-check port-check mounts-check logfile-monitor userfiles debug ptrace static network udp nocl stealth micro-stealth install-name identity khide suidcheck base largefile mail external-scripts encrypt srp dnmalloc"
    412 SH_WITH_OPTS="prelude libprelude-prefix database libwrap cflags libs console altconsole timeserver alttimeserver rnd egd-socket port logserver altlogserver kcheck gpg checksum fp recipient sender trusted tmp-dir config-file log-file pid-file state-dir data-file html-file"
     412SH_WITH_OPTS="prelude libprelude-prefix database libwrap cflags libs console altconsole timeserver alttimeserver rnd egd-socket port logserver altlogserver kcheck gpg keyid checksum fp recipient sender trusted tmp-dir config-file log-file pid-file state-dir data-file html-file"
    413413
    414414# Installation directory options.
  • trunk/configure.ac

    r188 r191  
    1 
    21dnl We want to override the standard _AC_INIT_PARSE_ARGS
    32dnl
    … …  
    21472146                  fi
    21482147                else
    2149                   AC_MSG_WARN([--with-gpg: cannot find GnuPG PATH=${withval}])
     2148                  AC_MSG_ERROR([--with-gpg: cannot find GnuPG PATH=${withval}])
    21502149                fi
    21512150          fi
    … …  
    21542153          AC_SUBST(mygpg)
    21552154        fi
     2155        ]
     2156)
     2157
     2158AC_ARG_WITH(keyid,
     2159        [  --with-keyid=KEYID           specify KeyID (0x...) for GPG/PGP functions [[none]]],
     2160        [
     2161        if test "x${withval}" != "x"; then
     2162                echo "${withval}" | awk '{if((length($0)==10)||(length($0)==18)){exit 2}else{exit 0}}' &&
     2163                AC_MSG_ERROR([--with-keyid:${withval} must be "0x" + 8|16 hex digits])
     2164                echo "${withval}" | grep ['[^0][^x][^0123456789ABCDEFabcdef]'] >/dev/null 2>&1 &&
     2165                AC_MSG_ERROR([--with-keyid:${withval} must be "0x" + 8|16 hex digits])
     2166                mykeyid="$withval"
     2167                mykeytag="--default-key"
     2168        else
     2169                mykeyid=""
     2170                mykeytag=""
     2171        fi
     2172        AC_SUBST(mykeyid)
     2173        AC_SUBST(mykeytag)
    21562174        ]
    21572175)
    … …  
    26022620        echo "            Log file: ${mylogfile}"
    26032621        echo "            Base key: ${mykeybase}"
     2622        if test x"$mykeyid" != x
     2623        then
     2624            echo "  target GPG/PGP key: ${mykeyid}"
     2625        fi
    26042626        echo
    26052627        if test x"$mytclient" = x"-DSH_WITH_SERVER"
  • trunk/docs/Changelog

    r190 r191  
    112.5.1:
    22        * constness patch by Joe MacDonald
     3        * GnuPG key ID patch by Jim Dutton
    34       
    452.5.0 (01-11-2008):
  • trunk/docs/TODO

    r171 r191  
    1 gcc -g -DDNMALLOC_DEBUG=1 -DUSE_MALLOC_LOCK=1 -Wall -O2 -o dnmalloc-1.0.beta5-rw.o -c   src/dnmalloc-1.0.beta5-rw.c
    21
    3 gcc -g -Wall -O2 -o t-test.o -c src/t-test1.c
    4 gcc -g -DUSE_MALLOC_LOCK=1 -Wall -O2 -o dnmalloc-1.0.beta5-rw.o -c   src/dnmalloc-1.0.beta5-rw.c
    5 gcc -g -lpthread -o t-test t-test.o dnmalloc-1.0.beta5-rw.o
    6 ./t-test
     2Patch for 'setmailport'
    73
  • trunk/samhain-install.sh.in

    r170 r191  
    13121312
    13131313    GPGPATH=@mygpg@
     1314    TARGETKEYID=@mykeyid@
     1315    KEYTAG=@mykeytag@
    13141316
    13151317    NTEST=@mytclient@
    … …  
    13561358        echo "You need to sign the config file now"
    13571359        echo
    1358         test -z "$verbose" || echo "  ${GPGPATH} -a --clearsign $RCFILE"
     1360        test -z "$verbose" || echo "  ${GPGPATH} -a ${KEYTAG} ${TARGETKEYID} --clearsign $RCFILE"
    13591361        if test x"${NTEST}" = "x-DSH_WITH_SERVER"
    13601362        then
    … …  
    13651367                DOT_GNUPG=`eval echo ~${samhain}/.gnupg`
    13661368                test -z "$verbose" || echo "  using --homedir ${DOT_GNUPG}"
    1367                 ${GPGPATH} --homedir ${DOT_GNUPG} -a --clearsign $RCFILE
     1369                ${GPGPATH} --homedir ${DOT_GNUPG} -a ${KEYTAG} ${TARGETKEYID} --clearsign $RCFILE
    13681370            else
    1369                 ${GPGPATH} -a --clearsign $RCFILE
    1370             fi
    1371         else
    1372             ${GPGPATH} -a --clearsign $RCFILE
     1371                ${GPGPATH} -a ${KEYTAG} ${TARGETKEYID} --clearsign $RCFILE
     1372            fi
     1373        else
     1374            ${GPGPATH} -a ${KEYTAG} ${TARGETKEYID} --clearsign $RCFILE
    13731375        fi
    13741376
  • 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.