Changeset 550


Ignore:
Timestamp:
Oct 31, 2019, 9:13:12 PM (5 years ago)
Author:
katerina
Message:

Fix for ticket #442 (support for OpenBSD signify).

Location:
trunk
Files:
22 added
4 deleted
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.in

    r549 r550  
    118118        sh_mem.h sh_entropy.h sh_xfer.h sh_modules.h sh_utmp.h \
    119119        sh_suidchk.h sh_srp.h sh_fifo.h sh_html.h sh_tools.h \
    120         sh_gpg.h sh_cat.h sh_calls.h sh_extern.h sh_database.h sh_trace.h \
     120        sh_sig.h sh_cat.h sh_calls.h sh_extern.h sh_database.h sh_trace.h \
    121121        sh_schedule.h bignum.h trustfile.h slib.h zAVLTree.h \
    122122        lzoconf.h minilzo.h rijndael-alg-fst.h rijndael-api-fst.h \
     
    144144        $(srcsrc)/sh_suidchk.c $(srcsrc)/sh_srp.c \
    145145        $(srcsrc)/sh_fifo.c $(srcsrc)/sh_tools.c \
    146         $(srcsrc)/sh_html.c $(srcsrc)/sh_gpg.c \
     146        $(srcsrc)/sh_html.c $(srcsrc)/sh_sig.c \
    147147        $(srcsrc)/sh_cat.c $(srcsrc)/sh_calls.c \
    148148        $(srcsrc)/sh_extern.c $(srcsrc)/sh_database.c \
     
    184184        sh_entropy.o sh_modules.o sh_utmp.o \
    185185        sh_xfer_client.o sh_xfer_server.o sh_xfer_syslog.o \
    186         sh_suidchk.o sh_srp.o sh_fifo.o sh_tools.o sh_html.o sh_gpg.o \
     186        sh_suidchk.o sh_srp.o sh_fifo.o sh_tools.o sh_html.o sh_sig.o \
    187187        sh_cat.o sh_calls.o sh_extern.o sh_database.o sh_err_log.o \
    188188        sh_err_console.o sh_err_syslog.o sh_schedule.o bignum.o \
     
    205205        testtimesrv.sh \
    206206        testext.sh testrc_1ext.in test_ext.c.in testrun_1d.sh \
    207         testrun_1.sh testrun_1a.sh testrun_1b.sh testrun_1c.sh testrc_1 \
     207        testrun_1.sh testrun_1a.sh testrun_1b.sh testrun_1c.sh \
     208        testrc_1 testrc_1i.dyn test1i_file.sig test1i_samhain.pub \
     209        testrun_1d.sh testrun_1e.sh testrun_1f.sh \
     210        testrun_1g.sh testrun_1h.sh testrun_1i.sh \
    208211        testrun_2.sh testrun_2a.sh testrun_2b.sh testrc_2.in \
    209         testrun_2c.sh testrun_2d.sh
     212        testrun_2c.sh testrun_2d.sh testrun_2e.sh testrun_2f.sh \
     213        testrun_2g.sh
    210214
    211215DIST_COMMON =  README COPYING LICENSE samhain.jpg \
     
    374378#
    375379
    376 DISTCLEANFILES = Makefile samhain.spec sh_gpg_checksum.h sh_gpg_fp.h \
     380DISTCLEANFILES = Makefile samhain.spec sh_sig_checksum.h sh_gpg_fp.h \
    377381        init/samhain.startLinux init/samhain.startGentoo init/samhain.startSystemd \
    378382        init/samhain.startLSB init/samhain.startFreeBSD \
    379383        init/samhain.startSolaris init/samhain.startHPUX \
    380384        init/samhain.startIRIX init/samhain.startMACOSX \
    381         deploy.sh sh_MK.h samhain-install.sh sh_gpg_chksum.h sh_gpg_fp.h \
     385        deploy.sh sh_MK.h samhain-install.sh \
    382386        rules.deb rules.deb-light src/CuTestMain.c \
     387        scripts/samhainadmin-sig.pl scripts/samhainadmin-gpg.pl \
    383388        scripts/samhainadmin.pl scripts/check_samhain.pl \
    384389        scripts/samhain.ebuild scripts/samhain.ebuild-light \
     
    15481553
    15491554SCRIPTFILES=redhat_i386.client.spec check_samhain.pl samhainadmin.pl \
     1555samhainadmin-gpg.pl samhainadmin-sig.pl \
    15501556yuleadmin.pl samhain.ebuild samhain.ebuild-light samhain.spec
    15511557
     
    16211627
    16221628
    1623 samhain.o: $(srcsrc)/samhain.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_getopt.h $(srcinc)/sh_readconf.h $(srcinc)/sh_hash.h $(srcinc)/sh_dbIO.h $(srcinc)/sh_restrict.h $(srcinc)/sh_nmail.h $(srcinc)/sh_tiger.h $(srcinc)/sh_gpg.h $(srcinc)/sh_mem.h $(srcinc)/sh_xfer.h $(srcinc)/sh_tools.h $(srcinc)/sh_hash.h $(srcinc)/sh_extern.h $(srcinc)/sh_modules.h $(srcinc)/sh_ignore.h $(srcinc)/sh_prelink.h $(srcinc)/sh_sem.h sh_MK.h $(srcinc)/sh_schedule.h
     1629
     1630samhain.o: $(srcsrc)/samhain.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_getopt.h $(srcinc)/sh_readconf.h $(srcinc)/sh_hash.h $(srcinc)/sh_dbIO.h $(srcinc)/sh_restrict.h $(srcinc)/sh_nmail.h $(srcinc)/sh_tiger.h $(srcinc)/sh_sig.h $(srcinc)/sh_mem.h $(srcinc)/sh_xfer.h $(srcinc)/sh_tools.h $(srcinc)/sh_hash.h $(srcinc)/sh_extern.h $(srcinc)/sh_modules.h $(srcinc)/sh_ignore.h $(srcinc)/sh_prelink.h $(srcinc)/sh_sem.h sh_MK.h $(srcinc)/sh_schedule.h
    16241631sh_unix.o: $(srcsrc)/sh_unix.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_unix.h $(srcinc)/sh_utils.h $(srcinc)/sh_mem.h $(srcinc)/sh_hash.h $(srcinc)/sh_tools.h $(srcinc)/sh_restrict.h $(srcinc)/sh_ipvx.h $(srcinc)/sh_tiger.h $(srcinc)/sh_prelink.h $(srcinc)/sh_pthread.h $(srcinc)/sh_sem.h $(srcinc)/sh_static.h $(srcinc)/sh_prelude.h $(srcinc)/zAVLTree.h $(srcinc)/sh_subuid.h $(srcinc)/sh_ignore.h
    16251632sh_utils.o: $(srcsrc)/sh_utils.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_tiger.h $(srcinc)/sh_entropy.h $(srcinc)/sh_pthread.h
     
    16271634sh_files.o: $(srcsrc)/sh_files.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_tiger.h $(srcinc)/sh_hash.h $(srcinc)/sh_ignore.h $(srcinc)/sh_inotify.h $(srcinc)/zAVLTree.h $(srcinc)/sh_dbIO.h $(srcinc)/CuTest.h
    16281635sh_getopt.o: $(srcsrc)/sh_getopt.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_getopt.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_utils.h $(srcinc)/sh_mail.h $(srcinc)/sh_xfer.h $(srcinc)/sh_hash.h $(srcinc)/sh_dbIO.h $(srcinc)/sh_dbCheck.h $(srcinc)/sh_dbCreate.h $(srcinc)/sh_sem.h $(srcinc)/sh_extern.h
    1629 sh_readconf.o: $(srcsrc)/sh_readconf.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_calls.h $(srcinc)/sh_error.h $(srcinc)/sh_extern.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_xfer.h $(srcinc)/sh_gpg.h $(srcinc)/sh_hash.h $(srcinc)/sh_dbIO.h $(srcinc)/sh_ignore.h $(srcinc)/sh_database.h $(srcinc)/sh_mail.h $(srcinc)/sh_modules.h $(srcinc)/sh_nmail.h $(srcinc)/sh_prelink.h $(srcinc)/sh_prelude.h $(srcinc)/sh_tiger.h $(srcinc)/sh_tools.h $(srcinc)/sh_utils.h $(srcinc)/sh_restrict.h $(srcinc)/sh_socket.h
     1636sh_readconf.o: $(srcsrc)/sh_readconf.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_calls.h $(srcinc)/sh_error.h $(srcinc)/sh_extern.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_xfer.h $(srcinc)/sh_sig.h $(srcinc)/sh_hash.h $(srcinc)/sh_dbIO.h $(srcinc)/sh_ignore.h $(srcinc)/sh_database.h $(srcinc)/sh_mail.h $(srcinc)/sh_modules.h $(srcinc)/sh_nmail.h $(srcinc)/sh_prelink.h $(srcinc)/sh_prelude.h $(srcinc)/sh_tiger.h $(srcinc)/sh_tools.h $(srcinc)/sh_utils.h $(srcinc)/sh_restrict.h $(srcinc)/sh_socket.h
    16301637sh_tiger0.o: $(srcsrc)/sh_tiger0.c Makefile config_xor.h $(srcinc)/sh_tiger.h $(srcinc)/sh_unix.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h $(srcinc)/sh_pthread.h $(srcinc)/sh_string.h $(srcinc)/sh_checksum.h
    16311638sh_tiger1.o: $(srcsrc)/sh_tiger1.c Makefile config_xor.h
     
    16331640sh_tiger1_64.o: $(srcsrc)/sh_tiger1_64.c Makefile config_xor.h
    16341641sh_tiger2_64.o: $(srcsrc)/sh_tiger2_64.c Makefile config_xor.h
    1635 sh_hash.o: $(srcsrc)/sh_hash.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_dbIO_int.h $(srcinc)/sh_dbIO.h $(srcinc)/sh_hash.h $(srcinc)/sh_error.h $(srcinc)/sh_tiger.h $(srcinc)/sh_gpg.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_ignore.h $(srcinc)/sh_pthread.h $(srcinc)/sh_xfer.h $(srcinc)/sh_hash.h $(srcinc)/sh_checksum.h
     1642sh_hash.o: $(srcsrc)/sh_hash.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_dbIO_int.h $(srcinc)/sh_dbIO.h $(srcinc)/sh_hash.h $(srcinc)/sh_error.h $(srcinc)/sh_tiger.h $(srcinc)/sh_sig.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_ignore.h $(srcinc)/sh_pthread.h $(srcinc)/sh_xfer.h $(srcinc)/sh_hash.h $(srcinc)/sh_checksum.h
    16361643sh_mail.o: $(srcsrc)/sh_mail.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_unix.h $(srcinc)/sh_tiger.h $(srcinc)/sh_mail.h $(srcinc)/sh_utils.h $(srcinc)/sh_fifo.h $(srcinc)/sh_tools.h $(srcinc)/sh_pthread.h $(srcinc)/sh_filter.h $(srcinc)/sh_mail_int.h $(srcinc)/sh_nmail.h $(srcinc)/sh_ipvx.h $(srcinc)/sh_static.h $(srcinc)/sh_tools.h
     1644sh_nmail.o: $(srcsrc)/sh_nmail.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_mem.h $(srcinc)/sh_mail.h $(srcinc)/sh_tiger.h $(srcinc)/sh_string.h $(srcinc)/sh_utils.h $(srcinc)/sh_fifo.h $(srcinc)/sh_filter.h $(srcinc)/sh_mail_int.h $(srcinc)/zAVLTree.h
    16371645sh_mem.o: $(srcsrc)/sh_mem.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h $(srcinc)/sh_mem.h $(srcinc)/sh_pthread.h
    16381646sh_entropy.o: $(srcsrc)/sh_entropy.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_tiger.h $(srcinc)/sh_calls.h $(srcinc)/sh_pthread.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h $(srcinc)/CuTest.h
    1639 sh_forward.o: $(srcsrc)/sh_forward.c Makefile config_xor.h $(srcinc)/sh_ipvx.h $(srcinc)/samhain.h $(srcinc)/sh_tiger.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_forward.h $(srcinc)/sh_srp.h $(srcinc)/sh_fifo.h $(srcinc)/sh_tools.h $(srcinc)/sh_entropy.h $(srcinc)/sh_html.h $(srcinc)/sh_nmail.h $(srcinc)/sh_socket.h $(srcinc)/sh_static.h $(srcinc)/rijndael-api-fst.h $(srcinc)/sh_readconf.h $(srcinc)/zAVLTree.h $(srcinc)/sh_extern.h
     1647sh_xfer_client.o: $(srcsrc)/sh_xfer_client.c Makefile config_xor.h $(srcinc)/sh_ipvx.h $(srcinc)/samhain.h $(srcinc)/sh_tiger.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_xfer.h $(srcinc)/sh_srp.h $(srcinc)/sh_fifo.h $(srcinc)/sh_tools.h $(srcinc)/sh_entropy.h $(srcinc)/sh_html.h $(srcinc)/sh_nmail.h $(srcinc)/sh_socket.h $(srcinc)/sh_static.h $(srcinc)/rijndael-api-fst.h
     1648sh_xfer_server.o: $(srcsrc)/sh_xfer_server.c Makefile config_xor.h $(srcinc)/sh_ipvx.h $(srcinc)/samhain.h $(srcinc)/sh_tiger.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_xfer.h $(srcinc)/sh_srp.h $(srcinc)/sh_fifo.h $(srcinc)/sh_tools.h $(srcinc)/sh_entropy.h $(srcinc)/sh_html.h $(srcinc)/sh_nmail.h $(srcinc)/sh_socket.h $(srcinc)/sh_static.h $(srcinc)/sh_guid.h $(srcinc)/rijndael-api-fst.h $(srcinc)/sh_readconf.h $(srcinc)/zAVLTree.h $(srcinc)/sh_extern.h
     1649sh_xfer_syslog.o: $(srcsrc)/sh_xfer_syslog.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_tools.h $(srcinc)/sh_utils.h $(srcinc)/sh_ipvx.h
    16401650sh_modules.o: $(srcsrc)/sh_modules.c Makefile config_xor.h $(srcinc)/sh_modules.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utmp.h $(srcinc)/sh_mounts.h $(srcinc)/sh_userfiles.h $(srcinc)/sh_suidchk.h $(srcinc)/sh_processcheck.h $(srcinc)/sh_portcheck.h $(srcinc)/sh_logmon.h $(srcinc)/sh_registry.h $(srcinc)/sh_fInotify.h
    16411651sh_utmp.o: $(srcsrc)/sh_utmp.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_modules.h $(srcinc)/sh_utmp.h $(srcinc)/sh_pthread.h $(srcinc)/sh_inotify.h
    1642 sh_kern.o: $(srcsrc)/sh_kern.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_modules.h $(srcinc)/sh_kern.h sh_ks_xor.h $(srcinc)/sh_unix.h $(srcinc)/sh_hash.h
     1652sh_login_track.o: $(srcsrc)/sh_login_track.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_string.h $(srcinc)/sh_tools.h $(srcinc)/sh_ipvx.h $(srcinc)/sh_error_min.h $(srcinc)/CuTest.h $(srcinc)/CuTest.h
    16431653sh_suidchk.o: $(srcsrc)/sh_suidchk.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_modules.h $(srcinc)/sh_suidchk.h $(srcinc)/sh_hash.h $(srcinc)/sh_dbIO.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_schedule.h $(srcinc)/sh_calls.h $(srcinc)/zAVLTree.h
    16441654sh_srp.o: $(srcsrc)/sh_srp.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_tiger.h $(srcinc)/sh_mem.h $(srcinc)/sh_utils.h $(srcinc)/sh_srp.h $(srcinc)/bignum.h $(srcinc)/CuTest.h
     
    16461656sh_tools.o: $(srcsrc)/sh_tools.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_error.h $(srcinc)/sh_tools.h $(srcinc)/sh_utils.h $(srcinc)/sh_tiger.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h $(srcinc)/sh_ipvx.h $(srcinc)/rijndael-api-fst.h $(srcinc)/rijndael-api-fst.h
    16471657sh_html.o: $(srcsrc)/sh_html.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_xfer.h $(srcinc)/sh_error.h $(srcinc)/sh_unix.h $(srcinc)/sh_utils.h $(srcinc)/sh_html.h $(srcinc)/zAVLTree.h
    1648 sh_gpg.o: $(srcsrc)/sh_gpg.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_tiger.h $(srcinc)/sh_static.h $(srcinc)/sh_gpg.h
     1658sh_sig.o: $(srcsrc)/sh_sig.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_tiger.h $(srcinc)/sh_static.h $(srcinc)/sh_sig.h
    16491659sh_cat.o: $(srcsrc)/sh_cat.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_cat.h
    16501660sh_calls.o: $(srcsrc)/sh_calls.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_ipvx.h $(srcinc)/sh_sub.h $(srcinc)/sh_utils.h
     
    16751685sh_userfiles.o: $(srcsrc)/sh_userfiles.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_modules.h $(srcinc)/sh_userfiles.h $(srcinc)/sh_utils.h $(srcinc)/sh_schedule.h $(srcinc)/sh_error.h $(srcinc)/sh_hash.h $(srcinc)/sh_files.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h
    16761686sh_prelude.o: $(srcsrc)/sh_prelude.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_cat.h $(srcinc)/sh_error_min.h $(srcinc)/sh_prelude.h $(srcinc)/sh_static.h
    1677 kern_head.o: $(srcsrc)/kern_head.c Makefile config.h $(srcinc)/kern_head.h $(srcinc)/kern_head.h
    16781687sh_prelink.o: $(srcsrc)/sh_prelink.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_tiger.h $(srcinc)/sh_extern.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h
    16791688sh_static.o: $(srcsrc)/sh_static.c Makefile config_xor.h $(srcinc)/sh_pthread.h
    1680 sh_async.o: $(srcsrc)/sh_async.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_calls.h $(srcinc)/sh_error.h
     1689sh_portcheck.o: $(srcsrc)/sh_portcheck.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_mem.h $(srcinc)/sh_calls.h $(srcinc)/sh_utils.h $(srcinc)/sh_modules.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h $(srcinc)/sh_ipvx.h $(srcinc)/CuTest.h
     1690sh_port2proc.o: $(srcsrc)/sh_port2proc.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_error_min.h $(srcinc)/sh_pthread.h $(srcinc)/sh_ipvx.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_ipvx.h
    16811691sh_processcheck.o: $(srcsrc)/sh_processcheck.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_modules.h $(srcinc)/sh_processcheck.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_extern.h $(srcinc)/sh_calls.h $(srcinc)/sh_pthread.h $(srcinc)/CuTest.h
    1682 sh_portcheck.o: $(srcsrc)/sh_portcheck.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_mem.h $(srcinc)/sh_calls.h $(srcinc)/sh_utils.h $(srcinc)/sh_modules.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h $(srcinc)/sh_ipvx.h $(srcinc)/CuTest.h
     1692sh_filter.o: $(srcsrc)/sh_filter.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_mem.h $(srcinc)/sh_filter.h
    16831693sh_pthread.o: $(srcsrc)/sh_pthread.c Makefile config_xor.h $(srcinc)/sh_pthread.h $(srcinc)/sh_calls.h $(srcinc)/sh_modules.h
    16841694sh_string.o: $(srcsrc)/sh_string.c Makefile config_xor.h $(srcinc)/sh_string.h $(srcinc)/sh_mem.h $(srcinc)/CuTest.h
    1685 dnmalloc.o: $(srcsrc)/dnmalloc.c Makefile config.h
    1686 t-test1.o: $(srcsrc)/t-test1.c Makefile config.h $(srcinc)/malloc.h
    1687 sh_port2proc.o: $(srcsrc)/sh_port2proc.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_error_min.h $(srcinc)/sh_pthread.h $(srcinc)/sh_ipvx.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_ipvx.h
    16881695sh_log_parse_syslog.o: $(srcsrc)/sh_log_parse_syslog.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_log_check.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h
    16891696sh_log_parse_pacct.o: $(srcsrc)/sh_log_parse_pacct.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_log_check.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h
     1697sh_log_parse_samba.o: $(srcsrc)/sh_log_parse_samba.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_log_check.h $(srcinc)/sh_string.h
     1698sh_log_parse_generic.o: $(srcsrc)/sh_log_parse_generic.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_log_check.h $(srcinc)/sh_string.h
    16901699sh_log_parse_apache.o: $(srcsrc)/sh_log_parse_apache.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_log_check.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h
    16911700sh_log_evalrule.o: $(srcsrc)/sh_log_evalrule.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h $(srcinc)/sh_log_check.h $(srcinc)/sh_log_evalrule.h $(srcinc)/sh_log_correlate.h $(srcinc)/sh_log_mark.h $(srcinc)/sh_log_repeat.h $(srcinc)/zAVLTree.h
    1692 sh_log_check.o: $(srcsrc)/sh_log_check.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_string.h $(srcinc)/sh_log_check.h $(srcinc)/sh_log_evalrule.h $(srcinc)/sh_log_correlate.h $(srcinc)/sh_log_mark.h $(srcinc)/sh_log_repeat.h $(srcinc)/sh_extern.h $(srcinc)/sh_modules.h
    1693 sh_log_parse_samba.o: $(srcsrc)/sh_log_parse_samba.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_log_check.h $(srcinc)/sh_string.h
    1694 sh_nmail.o: $(srcsrc)/sh_nmail.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_mem.h $(srcinc)/sh_mail.h $(srcinc)/sh_tiger.h $(srcinc)/sh_string.h $(srcinc)/sh_utils.h $(srcinc)/sh_fifo.h $(srcinc)/sh_filter.h $(srcinc)/sh_mail_int.h $(srcinc)/zAVLTree.h
    1695 sh_filter.o: $(srcsrc)/sh_filter.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_mem.h $(srcinc)/sh_filter.h
    1696 sh_inotify.o: $(srcsrc)/sh_inotify.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_calls.h $(srcinc)/sh_inotify.h $(srcinc)/sh_mem.h $(srcinc)/sh_utils.h $(srcinc)/slib.h $(srcinc)/zAVLTree.h $(srcinc)/sh_calls.h $(srcinc)/sh_inotify.h $(srcinc)/CuTest.h
    16971701sh_log_correlate.o: $(srcsrc)/sh_log_correlate.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h $(srcinc)/sh_log_check.h $(srcinc)/sh_log_evalrule.h
    16981702sh_log_mark.o: $(srcsrc)/sh_log_mark.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_mem.h $(srcinc)/sh_string.h $(srcinc)/sh_error_min.h $(srcinc)/sh_log_check.h $(srcinc)/sh_log_evalrule.h $(srcinc)/zAVLTree.h
     1703sh_log_check.o: $(srcsrc)/sh_log_check.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_string.h $(srcinc)/sh_log_check.h $(srcinc)/sh_log_evalrule.h $(srcinc)/sh_log_correlate.h $(srcinc)/sh_log_mark.h $(srcinc)/sh_log_repeat.h $(srcinc)/sh_extern.h $(srcinc)/sh_modules.h
     1704dnmalloc.o: $(srcsrc)/dnmalloc.c Makefile config.h
     1705sh_inotify.o: $(srcsrc)/sh_inotify.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_calls.h $(srcinc)/sh_inotify.h $(srcinc)/sh_mem.h $(srcinc)/sh_utils.h $(srcinc)/slib.h $(srcinc)/zAVLTree.h $(srcinc)/sh_calls.h $(srcinc)/sh_inotify.h $(srcinc)/CuTest.h
    16991706sh_log_repeat.o: $(srcsrc)/sh_log_repeat.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h $(srcinc)/sh_log_check.h $(srcinc)/sh_log_evalrule.h
    1700 sh_log_parse_generic.o: $(srcsrc)/sh_log_parse_generic.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_log_check.h $(srcinc)/sh_string.h
    1701 sh_login_track.o: $(srcsrc)/sh_login_track.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_string.h $(srcinc)/sh_tools.h $(srcinc)/sh_ipvx.h $(srcinc)/sh_error_min.h $(srcinc)/CuTest.h $(srcinc)/CuTest.h
    17021707sh_audit.o: $(srcsrc)/sh_audit.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_extern.h $(srcinc)/sh_utils.h
    17031708sh_registry.o: $(srcsrc)/sh_registry.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_modules.h $(srcinc)/sh_hash.h $(srcinc)/sh_tiger.h
     
    17091714sh_checksum.o: $(srcsrc)/sh_checksum.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_checksum.h $(srcinc)/sh_utils.h $(srcinc)/CuTest.h
    17101715sh_guid.o: $(srcsrc)/sh_guid.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/CuTest.h
    1711 sh_dbIO.o: $(srcsrc)/sh_dbIO.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_dbIO_int.h $(srcinc)/sh_hash.h $(srcinc)/sh_dbIO.h $(srcinc)/sh_gpg.h $(srcinc)/sh_tiger.h $(srcinc)/sh_xfer.h $(srcinc)/sh_pthread.h $(srcinc)/sh_socket.h $(srcinc)/sh_files.h $(srcinc)/zAVLTree.h
     1716sh_sem.o: $(srcsrc)/sh_sem.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_sem.h $(srcinc)/sh_error_min.h
     1717sh_dbIO.o: $(srcsrc)/sh_dbIO.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_dbIO_int.h $(srcinc)/sh_hash.h $(srcinc)/sh_dbIO.h $(srcinc)/sh_sig.h $(srcinc)/sh_tiger.h $(srcinc)/sh_xfer.h $(srcinc)/sh_pthread.h $(srcinc)/sh_socket.h $(srcinc)/sh_files.h $(srcinc)/zAVLTree.h
    17121718sh_dbCheck.o: $(srcsrc)/sh_dbCheck.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_unix.h $(srcinc)/sh_utils.h $(srcinc)/sh_hash.h $(srcinc)/sh_files.h $(srcinc)/sh_tiger.h $(srcinc)/sh_dbIO.h $(srcinc)/sh_dbIO_int.h $(srcinc)/sh_pthread.h
    17131719sh_dbCreate.o: $(srcsrc)/sh_dbCreate.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_hash.h $(srcinc)/sh_files.h $(srcinc)/sh_dbIO.h $(srcinc)/sh_dbIO_int.h $(srcinc)/sh_pthread.h $(srcinc)/sh_guid.h
    1714 sh_xfer_client.o: $(srcsrc)/sh_xfer_client.c Makefile config_xor.h $(srcinc)/sh_ipvx.h $(srcinc)/samhain.h $(srcinc)/sh_tiger.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_xfer.h $(srcinc)/sh_srp.h $(srcinc)/sh_fifo.h $(srcinc)/sh_tools.h $(srcinc)/sh_entropy.h $(srcinc)/sh_html.h $(srcinc)/sh_nmail.h $(srcinc)/sh_socket.h $(srcinc)/sh_static.h $(srcinc)/rijndael-api-fst.h
    1715 sh_xfer_server.o: $(srcsrc)/sh_xfer_server.c Makefile config_xor.h $(srcinc)/sh_ipvx.h $(srcinc)/samhain.h $(srcinc)/sh_tiger.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_xfer.h $(srcinc)/sh_srp.h $(srcinc)/sh_fifo.h $(srcinc)/sh_tools.h $(srcinc)/sh_entropy.h $(srcinc)/sh_html.h $(srcinc)/sh_nmail.h $(srcinc)/sh_socket.h $(srcinc)/sh_static.h $(srcinc)/sh_guid.h $(srcinc)/rijndael-api-fst.h $(srcinc)/sh_readconf.h $(srcinc)/zAVLTree.h $(srcinc)/sh_extern.h
    1716 sh_xfer_syslog.o: $(srcsrc)/sh_xfer_syslog.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_tools.h $(srcinc)/sh_utils.h $(srcinc)/sh_ipvx.h
    1717 sh_xload_client.o: $(srcsrc)/sh_xload_client.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_fifo.h $(srcinc)/sh_guid.h
    1718 sh_sem.o: $(srcsrc)/sh_sem.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_sem.h $(srcinc)/sh_error_min.h
    17191720sh_subuid.o: $(srcsrc)/sh_subuid.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_unix.h
     1721t-test1.o: $(srcsrc)/t-test1.c Makefile config.h $(srcinc)/malloc.h
  • trunk/acconfig.h

    r481 r550  
    231231/* The full path to GnuPG                     */
    232232#undef DEFAULT_GPG_PATH
    233 
    234 /* Define if using the gpg/pgp checksum.      */
    235 #undef HAVE_GPG_CHECKSUM
    236 
    237 /* The tiger checksum of the gpg/pgp binary.  */
    238 #undef GPG_HASH
    239233
    240234/* Define if you want to compile in the       */
  • trunk/aclocal.m4

    r544 r550  
    410410DESTDIR=
    411411SH_ENABLE_OPTS="selinux posix-acl asm ssp 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 ipv6 shellexpand suid"
    412 SH_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"
     412SH_WITH_OPTS="prelude libprelude-prefix database libwrap cflags libs console altconsole timeserver alttimeserver rnd egd-socket port logserver altlogserver signify pubkey-checksum 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/config.h.in

    r544 r550  
    232232#undef DEFAULT_GPG_PATH
    233233
    234 /* Define if using the gpg/pgp checksum.      */
    235 #undef HAVE_GPG_CHECKSUM
    236 
    237 /* The tiger checksum of the gpg/pgp binary.  */
    238 #undef GPG_HASH
    239 
    240234/* Define if you want to compile in the       */
    241235/* public key fingerprint.                    */
     
    440434#undef AC_APPLE_UNIVERSAL_BUILD
    441435
     436/* Define as path to signing binary */
     437#undef DEFAULT_SIG_PATH
     438
    442439/* Debug dnmalloc */
    443440#undef DNMALLOC_CHECKS
     
    798795#undef HAVE_SETUTENT
    799796
     797/* Define if signing binary checksum available. */
     798#undef HAVE_SIG_CHECKSUM
     799
     800/* Define if signing binary checksum available. */
     801#undef HAVE_SIG_KEY_HASH
     802
    800803/* Define if you have SI_USER */
    801804#undef HAVE_SI_USER
     
    10341037#undef SH_USE_PROCESSCHECK
    10351038
     1039/* Define as the signing binary TIGER192 checksum. */
     1040#undef SIG_HASH
     1041
     1042/* Define as the signify public key checksum. */
     1043#undef SIG_KEY_HASH
     1044
    10361045/* The size of `char *', as computed by sizeof. */
    10371046#undef SIZEOF_CHAR_P
     
    10901099/* Define if you want extended attributes support. */
    10911100#undef USE_XATTR
     1101
     1102/* Define if signature checking is supported. */
     1103#undef WITH_SIG
     1104
     1105/* Define if using OpenBSD signify for signature checking. */
     1106#undef WITH_SIGNIFY
    10921107
    10931108/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
  • trunk/configure.ac

    r548 r550  
    1212dnl start
    1313dnl
    14 AM_INIT_AUTOMAKE(samhain, 4.3.3)
     14AM_INIT_AUTOMAKE(samhain, 4.4.0)
    1515AC_DEFINE([SAMHAIN], 1, [Application is samhain])
    1616AC_CANONICAL_HOST
     
    22202220
    22212221dnl
    2222 dnl  GPG/PGP options
     2222dnl  Signify/GnuPG options
    22232223dnl
     2224
     2225AC_ARG_WITH(signify,
     2226        [  --with-signify=PATH          use OpenBSD signify to verify database/config [[no]]],
     2227        [
     2228        if test "x${withval}" != "xno"; then
     2229          if test "x${cross_compiling}" = xyes; then
     2230                mysignify="${withval}"
     2231          else
     2232                if test -f "${withval}"; then
     2233                  mysignify="${withval}"
     2234                  mychk0=`gpg --load-extension tiger --print-md TIGER192 ${withval} 2>/dev/null`
     2235                  if test "x$?" != "x0"; then
     2236                    mychktest=no
     2237                    for sam_pre in ./samhain ./yule /usr/local/sbin/samhain /usr/local/bin/samhain /usr/bin/samhain /usr/sbin/samhain /usr/local/sbin/yule /usr/local/bin/yule /usr/bin/yule /usr/sbin/yule; do
     2238                      if test x"${mychktest}" = xyes
     2239                      then
     2240                        :
     2241                      else
     2242                        if test -f ${sam_pre}
     2243                        then
     2244                          echo "use existing ${sam_pre} for signify checksum"
     2245                          mychk0=`${sam_pre} -H ${withval} 2>/dev/null`
     2246                          if test "x$?" != "x0"; then
     2247                            if test "x${nocl_code}" != "x"; then
     2248                               mychk0=`echo -H ${withval} | ${sam_pre} ${nocl_code} 2>/dev/null`
     2249                               if test "x$?" != "x0"; then
     2250                                  :
     2251                               else
     2252                                  mychk="${mychk0}"
     2253                                  mychktest=yes
     2254                               fi
     2255                            fi
     2256                          else
     2257                            mychk="${mychk0}"
     2258                            mychktest=yes
     2259                          fi
     2260                        fi
     2261                      fi
     2262                    done
     2263                    if test x${mychktest} = xno; then
     2264                      AC_MSG_WARN([--with-signify: cannot determine TIGER192 checksum of ${withval}])
     2265                      echo "-------------------------------------------------------------"
     2266                      echo " I cannot find an existing GnuPG or samhain binary to use."
     2267                      echo " You can:"
     2268                      echo "   (a) run make to compile a samhain binary, then repeat"
     2269                      echo "       ./configure and make"
     2270                      echo "   (b) ignore the failure. The checksum of the signify binary"
     2271                      echo "       will not get compiled in, thus allowing an attacker"
     2272                      echo "       to replace signify with a trojan and subverting the"
     2273                      echo "       signature verification of configure and database files."
     2274                      echo
     2275                      echo " PLEASE IGNORE THIS MESSAGE IF YOU ALSO USE --with-checksum"
     2276                      echo "-------------------------------------------------------------"
     2277                    fi
     2278                  else
     2279                    mychk="${mychk0}"
     2280                  fi
     2281                else
     2282                  AC_MSG_ERROR([--with-signify: cannot find signify PATH=${withval}])
     2283                fi
     2284          fi
     2285          AC_DEFINE([WITH_SIG], 1, [Define if signature checking is supported.])
     2286          AC_DEFINE([WITH_SIGNIFY], 1, [Define if using OpenBSD signify for signature checking.])
     2287          AC_DEFINE_UNQUOTED([DEFAULT_SIG_PATH], _("${mysignify}"), [Define as path to signing binary])
     2288          AC_SUBST(mysignify)
     2289        fi
     2290        ]
     2291)
     2292
     2293AC_ARG_WITH(pubkey-checksum,
     2294        [  --with-pubkey-checksum=CHKSUM        compile in TIGER192 checksum of signify public key [[no]]],
     2295        [
     2296        if test "x${withval}" != "xno"; then
     2297                if test "x${withval}" == "xyes"; then
     2298                        AC_MSG_ERROR([Option --with-pubkey-checksum=CHKSUM: checksum CHKSUM of signify public key not specified.])
     2299                else
     2300                        if test "x${withval}" = "x"; then
     2301                                AC_MSG_ERROR([Option --with-checksum=CHKSUM: checksum CHKSUM of the signify public key not specified.])
     2302                        fi
     2303                fi
     2304                AC_DEFINE([HAVE_SIG_KEY_HASH], 1, [Define if signing binary checksum available.])
     2305                AC_DEFINE_UNQUOTED([SIG_KEY_HASH], _("${withval}"), [Define as the signify public key checksum.] )
     2306        fi
     2307        ]
     2308)
     2309
    22242310
    22252311AC_ARG_WITH(gpg,
    22262312        [  --with-gpg=PATH              use GnuPG to verify database/config [[no]]],
    22272313        [
     2314        if test "x${mysignify}" != "x"; then
     2315           AC_MSG_ERROR([--with-gpg: already using --with-signify])
     2316        fi
    22282317        if test "x${withval}" != "xno"; then
    22292318          if test "x${cross_compiling}" = xyes; then
     
    22842373                fi
    22852374          fi
     2375          AC_DEFINE([WITH_SIG], 1, [Define if signature checking is supported.])
    22862376          AC_DEFINE(WITH_GPG)
    2287           AC_DEFINE_UNQUOTED(DEFAULT_GPG_PATH, _("${mygpg}") )
     2377          AC_DEFINE_UNQUOTED([DEFAULT_SIG_PATH], _("${mygpg}"), [Define as path to signing binary])
    22882378          AC_SUBST(mygpg)
    22892379        fi
     
    23122402)
    23132403
    2314 dnl AC_ARG_WITH(pgp,
    2315 dnl        [  --with-pgp=PATH           Use PGP to verify database/config (no).],
    2316 dnl         [myppg="$withval"
    2317 dnl     AC_DEFINE(WITH_PGP)
    2318 dnl     AC_DEFINE_UNQUOTED(DEFAULT_PGP_PATH, _("${myppg}") )
    2319 dnl     ])
    2320 
    23212404AC_ARG_WITH(checksum,
    2322         [  --with-checksum=CHKSUM       compile in gpg/pgp checksum [[yes]]],
     2405        [  --with-checksum=CHKSUM       compile in checksum of signing binary (e.g. gpg) [[yes]]],
    23232406        [
    23242407        if test "x${withval}" != "xno"; then
     
    23262409                        if test "x${mychk}" != "x"; then
    23272410                                if test "x${mychk}" != "x${withval}"; then
    2328                                         AC_MSG_WARN([--with-checksum: possible gpg CHKSUM problem])
     2411                                        AC_MSG_WARN([--with-checksum: possible signing binary CHKSUM problem])
    23292412                                        AC_MSG_WARN([--with-checksum: CHKSUM=${withval}])
    23302413                                        AC_MSG_WARN([--with-checksum: autodetected=${mychk}])
     
    23342417                else
    23352418                        if test "x${mychk}" = "x"; then
    2336                                 AC_MSG_ERROR([Option --with-checksum=CHKSUM: checksum CHKSUM of the gpg binary not specified.])
     2419                                AC_MSG_ERROR([Option --with-checksum=CHKSUM: checksum CHKSUM of the signing binary not specified.])
    23372420                        fi
    23382421                fi
    2339                 AC_DEFINE(HAVE_GPG_CHECKSUM)
    2340                 AC_DEFINE_UNQUOTED(GPG_HASH, _("${mychk}") )
    2341                 echo "${mychk}" | sed 's,.*:,,g' | sed 's, ,,g' | sed 's,\(.\),\1:,g' | awk '{ split($0, arr, ":"); m = length($1)/2; print "#ifndef CHKSUM_H"; print "#define CHKSUM_H"; print "char gpgchk[50];"; for (i=1; i <= m; i++) printf "gpgchk[%d] = %c%s%c;\n", i-1, 39, arr[i], 39; printf "gpgchk[48] = %c%c0%c;\n", 39, 92, 39; print "#endif"; }' > sh_gpg_chksum.h
     2422                AC_DEFINE([HAVE_SIG_CHECKSUM], 1, [Define if signing binary checksum available.])
     2423                AC_DEFINE_UNQUOTED([SIG_HASH], _("${mychk}"), [Define as the signing binary TIGER192 checksum.] )
     2424                echo "${mychk}" | sed 's,.*:,,g' | sed 's, ,,g' | sed 's,\(.\),\1:,g' | awk '{ split($0, arr, ":"); m = length($1)/2; print "#ifndef CHKSUM_H"; print "#define CHKSUM_H"; print "char sigchk[50];"; for (i=1; i <= m; i++) printf "sigchk[%d] = %c%s%c;\n", i-1, 39, arr[i], 39; printf "sigchk[48] = %c%c0%c;\n", 39, 92, 39; print "#endif"; }' > sh_sig_chksum.h
    23422425        fi
    23432426        ],
    23442427        [
    2345         if test "x${mygpg}" != "x"; then
     2428        if test "x${mygpg}" != "x" || test "x${mysignify}" != "x"
     2429        then
    23462430                if test "x${mychk}" != "x"; then
    2347                         AC_DEFINE(HAVE_GPG_CHECKSUM)
    2348                         AC_DEFINE_UNQUOTED(GPG_HASH, _("${mychk}") )
    2349                         echo "${mychk}" | sed 's,.*:,,g' | sed 's, ,,g' | sed 's,\(.\),\1:,g' | awk '{ split($0, arr, ":"); m = length($1)/2; print "#ifndef CHKSUM_H"; print "#define CHKSUM_H"; print "char gpgchk[50];"; for (i=1; i <= m; i++) printf "gpgchk[%d] = %c%s%c;\n", i-1, 39, arr[i], 39; printf "gpgchk[48] = %c%c0%c;\n", 39, 92, 39; print "#endif"; }' > sh_gpg_chksum.h
     2431                        AC_DEFINE([HAVE_SIG_CHECKSUM], 1, [Define if signing binary checksum available.])
     2432                        AC_DEFINE_UNQUOTED([SIG_HASH], _("${mychk}"), [Define as the signing binary TIGER192 checksum.] )
     2433                        echo "${mychk}" | sed 's,.*:,,g' | sed 's, ,,g' | sed 's,\(.\),\1:,g' | awk '{ split($0, arr, ":"); m = length($1)/2; print "#ifndef CHKSUM_H"; print "#define CHKSUM_H"; print "char sigchk[50];"; for (i=1; i <= m; i++) printf "sigchk[%d] = %c%s%c;\n", i-1, 39, arr[i], 39; printf "sigchk[48] = %c%c0%c;\n", 39, 92, 39; print "#endif"; }' > sh_sig_chksum.h
    23502434                fi
    23512435        fi
     
    27102794scripts/samhain.ebuild
    27112795scripts/samhain.ebuild-light
    2712 scripts/samhainadmin.pl
     2796scripts/samhainadmin-gpg.pl
     2797scripts/samhainadmin-sig.pl
    27132798scripts/yuleadmin.pl
    27142799scripts/check_samhain.pl
     
    27182803echo timestamp > stamp-h
    27192804chmod +x samhain-install.sh
    2720 chmod +x scripts/samhainadmin.pl
     2805chmod +x scripts/samhainadmin-gpg.pl
     2806chmod +x scripts/samhainadmin-sig.pl
    27212807chmod +x scripts/yuleadmin.pl
    27222808chmod +x scripts/check_samhain.pl
     
    27252811
    27262812chmod +x deploy.sh
     2813
     2814if test "x${mysignify}" != x
     2815then
     2816        cp -a scripts/samhainadmin-sig.pl scripts/samhainadmin.pl
     2817fi
     2818if test "x${mygpg}" != x
     2819then
     2820        cp -a scripts/samhainadmin-gpg.pl scripts/samhainadmin.pl
     2821fi
     2822
    27272823
    27282824if test "x${cross_compiling}" = xyes
  • trunk/depend.dep

    r546 r550  
    11
    22# DO NOT DELETE THIS LINE
    3 samhain.o: $(srcsrc)/samhain.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_getopt.h $(srcinc)/sh_readconf.h $(srcinc)/sh_hash.h $(srcinc)/sh_dbIO.h $(srcinc)/sh_restrict.h $(srcinc)/sh_nmail.h $(srcinc)/sh_tiger.h $(srcinc)/sh_gpg.h $(srcinc)/sh_mem.h $(srcinc)/sh_xfer.h $(srcinc)/sh_tools.h $(srcinc)/sh_hash.h $(srcinc)/sh_extern.h $(srcinc)/sh_modules.h $(srcinc)/sh_ignore.h $(srcinc)/sh_prelink.h $(srcinc)/sh_sem.h sh_MK.h $(srcinc)/sh_schedule.h
     3samhain.o: $(srcsrc)/samhain.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_getopt.h $(srcinc)/sh_readconf.h $(srcinc)/sh_hash.h $(srcinc)/sh_dbIO.h $(srcinc)/sh_restrict.h $(srcinc)/sh_nmail.h $(srcinc)/sh_tiger.h $(srcinc)/sh_sig.h $(srcinc)/sh_mem.h $(srcinc)/sh_xfer.h $(srcinc)/sh_tools.h $(srcinc)/sh_hash.h $(srcinc)/sh_extern.h $(srcinc)/sh_modules.h $(srcinc)/sh_ignore.h $(srcinc)/sh_prelink.h $(srcinc)/sh_sem.h sh_MK.h $(srcinc)/sh_schedule.h
    44sh_unix.o: $(srcsrc)/sh_unix.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_unix.h $(srcinc)/sh_utils.h $(srcinc)/sh_mem.h $(srcinc)/sh_hash.h $(srcinc)/sh_tools.h $(srcinc)/sh_restrict.h $(srcinc)/sh_ipvx.h $(srcinc)/sh_tiger.h $(srcinc)/sh_prelink.h $(srcinc)/sh_pthread.h $(srcinc)/sh_sem.h $(srcinc)/sh_static.h $(srcinc)/sh_prelude.h $(srcinc)/zAVLTree.h $(srcinc)/sh_subuid.h $(srcinc)/sh_ignore.h
    55sh_utils.o: $(srcsrc)/sh_utils.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_tiger.h $(srcinc)/sh_entropy.h $(srcinc)/sh_pthread.h
     
    77sh_files.o: $(srcsrc)/sh_files.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_tiger.h $(srcinc)/sh_hash.h $(srcinc)/sh_ignore.h $(srcinc)/sh_inotify.h $(srcinc)/zAVLTree.h $(srcinc)/sh_dbIO.h $(srcinc)/CuTest.h
    88sh_getopt.o: $(srcsrc)/sh_getopt.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_getopt.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_utils.h $(srcinc)/sh_mail.h $(srcinc)/sh_xfer.h $(srcinc)/sh_hash.h $(srcinc)/sh_dbIO.h $(srcinc)/sh_dbCheck.h $(srcinc)/sh_dbCreate.h $(srcinc)/sh_sem.h $(srcinc)/sh_extern.h
    9 sh_readconf.o: $(srcsrc)/sh_readconf.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_calls.h $(srcinc)/sh_error.h $(srcinc)/sh_extern.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_xfer.h $(srcinc)/sh_gpg.h $(srcinc)/sh_hash.h $(srcinc)/sh_dbIO.h $(srcinc)/sh_ignore.h $(srcinc)/sh_database.h $(srcinc)/sh_mail.h $(srcinc)/sh_modules.h $(srcinc)/sh_nmail.h $(srcinc)/sh_prelink.h $(srcinc)/sh_prelude.h $(srcinc)/sh_tiger.h $(srcinc)/sh_tools.h $(srcinc)/sh_utils.h $(srcinc)/sh_restrict.h $(srcinc)/sh_socket.h
     9sh_readconf.o: $(srcsrc)/sh_readconf.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_calls.h $(srcinc)/sh_error.h $(srcinc)/sh_extern.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_xfer.h $(srcinc)/sh_sig.h $(srcinc)/sh_hash.h $(srcinc)/sh_dbIO.h $(srcinc)/sh_ignore.h $(srcinc)/sh_database.h $(srcinc)/sh_mail.h $(srcinc)/sh_modules.h $(srcinc)/sh_nmail.h $(srcinc)/sh_prelink.h $(srcinc)/sh_prelude.h $(srcinc)/sh_tiger.h $(srcinc)/sh_tools.h $(srcinc)/sh_utils.h $(srcinc)/sh_restrict.h $(srcinc)/sh_socket.h
    1010sh_tiger0.o: $(srcsrc)/sh_tiger0.c Makefile config_xor.h $(srcinc)/sh_tiger.h $(srcinc)/sh_unix.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h $(srcinc)/sh_pthread.h $(srcinc)/sh_string.h $(srcinc)/sh_checksum.h
    1111sh_tiger1.o: $(srcsrc)/sh_tiger1.c Makefile config_xor.h
     
    1313sh_tiger1_64.o: $(srcsrc)/sh_tiger1_64.c Makefile config_xor.h
    1414sh_tiger2_64.o: $(srcsrc)/sh_tiger2_64.c Makefile config_xor.h
    15 sh_hash.o: $(srcsrc)/sh_hash.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_dbIO_int.h $(srcinc)/sh_dbIO.h $(srcinc)/sh_hash.h $(srcinc)/sh_error.h $(srcinc)/sh_tiger.h $(srcinc)/sh_gpg.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_ignore.h $(srcinc)/sh_pthread.h $(srcinc)/sh_xfer.h $(srcinc)/sh_hash.h $(srcinc)/sh_checksum.h
     15sh_hash.o: $(srcsrc)/sh_hash.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_dbIO_int.h $(srcinc)/sh_dbIO.h $(srcinc)/sh_hash.h $(srcinc)/sh_error.h $(srcinc)/sh_tiger.h $(srcinc)/sh_sig.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_ignore.h $(srcinc)/sh_pthread.h $(srcinc)/sh_xfer.h $(srcinc)/sh_hash.h $(srcinc)/sh_checksum.h
    1616sh_mail.o: $(srcsrc)/sh_mail.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_unix.h $(srcinc)/sh_tiger.h $(srcinc)/sh_mail.h $(srcinc)/sh_utils.h $(srcinc)/sh_fifo.h $(srcinc)/sh_tools.h $(srcinc)/sh_pthread.h $(srcinc)/sh_filter.h $(srcinc)/sh_mail_int.h $(srcinc)/sh_nmail.h $(srcinc)/sh_ipvx.h $(srcinc)/sh_static.h $(srcinc)/sh_tools.h
    1717sh_mem.o: $(srcsrc)/sh_mem.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h $(srcinc)/sh_mem.h $(srcinc)/sh_pthread.h
     
    9292sh_checksum.o: $(srcsrc)/sh_checksum.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_checksum.h $(srcinc)/sh_utils.h $(srcinc)/CuTest.h
    9393sh_guid.o: $(srcsrc)/sh_guid.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/CuTest.h
    94 sh_dbIO.o: $(srcsrc)/sh_dbIO.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_dbIO_int.h $(srcinc)/sh_hash.h $(srcinc)/sh_dbIO.h $(srcinc)/sh_gpg.h $(srcinc)/sh_tiger.h $(srcinc)/sh_xfer.h $(srcinc)/sh_pthread.h $(srcinc)/sh_socket.h $(srcinc)/sh_files.h $(srcinc)/zAVLTree.h
     94sh_dbIO.o: $(srcsrc)/sh_dbIO.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_dbIO_int.h $(srcinc)/sh_hash.h $(srcinc)/sh_dbIO.h $(srcinc)/sh_sig.h $(srcinc)/sh_tiger.h $(srcinc)/sh_xfer.h $(srcinc)/sh_pthread.h $(srcinc)/sh_socket.h $(srcinc)/sh_files.h $(srcinc)/zAVLTree.h
    9595sh_dbCheck.o: $(srcsrc)/sh_dbCheck.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_unix.h $(srcinc)/sh_utils.h $(srcinc)/sh_hash.h $(srcinc)/sh_files.h $(srcinc)/sh_tiger.h $(srcinc)/sh_dbIO.h $(srcinc)/sh_dbIO_int.h $(srcinc)/sh_pthread.h
    9696sh_dbCreate.o: $(srcsrc)/sh_dbCreate.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_hash.h $(srcinc)/sh_files.h $(srcinc)/sh_dbIO.h $(srcinc)/sh_dbIO_int.h $(srcinc)/sh_pthread.h $(srcinc)/sh_guid.h
     
    101101sh_sem.o: $(srcsrc)/sh_sem.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_sem.h $(srcinc)/sh_error_min.h
    102102sh_subuid.o: $(srcsrc)/sh_subuid.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_unix.h
     103sh_sig.o: $(srcsrc)/sh_sig.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_tiger.h $(srcinc)/sh_static.h $(srcinc)/sh_sig.h
  • trunk/depend.sum

    r546 r550  
    1 3024561571
     13600310821
  • trunk/docs/Changelog

    r549 r550  
     14.4.0:
     2        * support for OpenBSD signify as alternative to GnuPG
     3
    144.3.3:
    25        * fix broken 'make deb' makefile target
    36        * eliminate obsolete 'sstrip' utility
    4         * systemd support 
     7        * systemd support
    58        * fix broken rpm specfile (patch by Franky Van L.)
    69        * fix broken mysql init script
     
    5255        * fix build issue with musl libc (report & patch by A. Kuster)
    5356        * fix case sensitivity (tcp vs TCP, udp vs UDP) in portcheck
    54         directives (reported by Anton H.)
     57        directives (reported by A. Hofland)
    5558        * fix documentation typo ('make deploy-install' ->
    5659        'make install-deploy', reported by Ben)
     
    7275        as uint16, e.g. FreeBSD).
    7376        * add portcheck option 'PortCheckDevice = device' to monitor a
    74         device regardless of address assigned to it (patch by Anton H., plus
     77        device regardless of address assigned to it (patch by A. Hofland, plus
    7578        some additions)
    7679        * fix case sensitivity of severity/class options (issue raised by
    77         Anton H.).
     80        A. Hofland).
    7881        * clarify restrictions for ProcessCheckPSArg (user manual)
    7982
  • trunk/include/sh_calls.h

    r481 r550  
    7676long int retry_aud_dup2    (const char * file, int line, int fd, int fd2);
    7777long int retry_aud_execve  (const char * file, int line,
    78                             const  char *dateiname, char * argv[],
    79                             char *envp[]);
     78                            const  char *dateiname, char *const argv[],
     79                            char *const envp[]);
    8080long int retry_aud_dup     (const char * file, int line,
    8181                            int fd);
  • trunk/samhain-install.sh.in

    r548 r550  
    13391339
    13401340    GPGPATH=@mygpg@
     1341    SIGNIFY_PATH=@mysignify@
    13411342    TARGETKEYID=@mykeyid@
    13421343    KEYTAG=@mykeytag@
     
    14161417            cp ${RCFILE} samhainrc.pre
    14171418        fi
     1419    elif test x"${SIGNIFY_PATH}" != x
     1420    then
     1421        echo
     1422        echo "You need to sign the config file now"
     1423        echo
     1424        test -z "$verbose" || echo "  ${SIGNIFY_PATH} -Se -s ~/.signify/samhain.sec -m $RCFILE"
     1425        if test x"${NTEST}" = "x-DSH_WITH_SERVER"
     1426        then
     1427            myident_uid=`(cat /etc/passwd; ypcat passwd) 2>/dev/null |\
     1428                  grep "^${samhain}:" | awk -F: '{ print $3; }'`
     1429            if test x"${myident_uid}" != x
     1430            then
     1431                DOT_SIGNIFY=`eval echo ~${samhain}/.signify`
     1432                test -z "$verbose" || echo "  using home directory ${DOT_SIGNIFY}"
     1433                ${SIGNIFY_PATH} -Se -s ${DOT_GNUPG}/samhain.sec $RCFILE
     1434            else
     1435                ${SIGNIFY_PATH} -Se -s  ~/.signify/samhain.sec -m $RCFILE
     1436            fi
     1437        else
     1438            ${SIGNIFY_PATH} -Se -s  ~/.signify/samhain.sec -m $RCFILE
     1439        fi
     1440
     1441        if test -f ${RCFILE}.sig
     1442        then
     1443            test -z "$verbose" || echo "  mv -f ${RCFILE}.sig samhainrc.pre"
     1444            mv -f ${RCFILE}.sig samhainrc.pre
     1445        else
     1446            echo "**********************************************************"
     1447            echo
     1448            echo "${0}: ERROR: cannot find signed file ${RCFILE}.sig"
     1449            echo
     1450            echo "   --- You need to sign the configuration file ---"
     1451            echo
     1452            echo "**********************************************************"
     1453            cp ${RCFILE} samhainrc.pre
     1454        fi
    14181455    else
    14191456        test -z "$verbose" || echo "  cp $RCFILE samhainrc.pre"
  • trunk/scripts/yuleadmin.pl.in

    r121 r550  
    3838my $base = basename($0);
    3939
    40 #my $cfgfile  = "yulerc";
    41 #my $yule     = "./yule";
    42 #my $gpg      = "/usr/bin/gpg";
    43 
    4440my $cfgfile  = "@myconffile@";
    4541my $yule     = "@sbindir@/@install_name@";
    46 my $gpg      = "@mygpg@";
    4742
    4843$cfgfile  =~ s/^REQ_FROM_SERVER//;
    49 
    50 $gpg = "gpg" if ($gpg eq "");
    5144
    5245sub usage() {
  • trunk/src/depend-gen.c

    r383 r550  
    245245           *
    246246           **************************************************/
    247           if (0 == strcmp(p, "sh_gpg_chksum.h") ||
     247          if (0 == strcmp(p, "sh_sig_chksum.h") ||
    248248              0 == strcmp(p, "sh_gpg_fp.h"))
    249249            {
  • trunk/src/samhain.c

    r541 r550  
    7777
    7878#include "sh_tiger.h"
    79 #include "sh_gpg.h"
     79#include "sh_sig.h"
    8080#include "sh_mem.h"
    8181#include "sh_xfer.h"
     
    19071907#if defined(SH_WITH_SERVER) && !defined(SH_WITH_CLIENT)
    19081908
    1909 #if (defined(WITH_GPG) || defined(WITH_PGP))
     1909#if defined(WITH_GPG)
    19101910  /* log startup */
    1911   sh_gpg_log_startup ();
     1911  sh_sig_log_startup ();
    19121912#else
    19131913  sh_error_handle ((-1), FIL__, __LINE__, 0, MSG_START_1H,
     
    19301930  if (sh.flag.checkSum == SH_CHECK_CHECK)
    19311931    {
    1932 #if (defined(WITH_GPG) || defined(WITH_PGP))
     1932#if defined(WITH_GPG)
    19331933      /* log startup */
    1934       sh_gpg_log_startup ();
     1934      sh_sig_log_startup ();
    19351935#else
    19361936      sh_error_handle ((-1), FIL__, __LINE__, 0, MSG_START_2H,
     
    19421942  else
    19431943    {
    1944 #if (defined(WITH_GPG) || defined(WITH_PGP))
     1944#if defined(WITH_GPG)
    19451945      /* log startup */
    1946       sh_gpg_log_startup ();
     1946      sh_sig_log_startup ();
    19471947#else
    19481948      sh_error_handle ((-1), FIL__, __LINE__, 0, MSG_START_1H,
  • trunk/src/sh_calls.c

    r544 r550  
    533533
    534534long int retry_aud_execve  (const char * file, int line,
    535                             const  char *dateiname, char * argv[],
    536                             char * envp[])
     535                            const  char *dateiname, char *const argv[],
     536                            char *const envp[])
    537537{
    538538  uid_t a = geteuid();
  • trunk/src/sh_dbIO.c

    r543 r550  
    3131#include "sh_hash.h"
    3232#include "sh_dbIO.h"
    33 #include "sh_gpg.h"
     33#include "sh_sig.h"
    3434#include "sh_tiger.h"
    3535#include "sh_xfer.h"
     
    852852static SL_TICKET verify_data (SL_TICKET fd)
    853853{
    854 #if defined(WITH_GPG) || defined(WITH_PGP)
     854#if defined(WITH_SIG)
    855855  SL_TICKET fdTmp;
    856856
    857857  /* extract the data and copy to temporary file
    858858   */
    859   fdTmp = sh_gpg_extract_signed(fd);
     859  fdTmp = sh_sig_extract_signed(fd);
    860860
    861861  if (sig_termfast == 1)  /* SIGTERM */
     
    871871  /* Validate signature of open file.
    872872   */
    873   if (0 != sh_gpg_check_sign (fd, SIG_DATA))
     873  if (0 != sh_sig_check_signature (fd, SIG_DATA))
    874874    {
    875875      sl_close(fd);
     
    877877    }
    878878  sl_rewind (fd);
     879
     880  fdTmp = sh_sig_extract_signed_data(fd);
     881  sl_close(fd);
     882  fd = fdTmp; 
    879883#endif
    880884
  • trunk/src/sh_getopt.c

    r543 r550  
    481481#ifdef WITH_GPG
    482482  if (num > 0) fputc ('\n', stdout);
    483   printf (_(" GnuPG signatures (%s)"), DEFAULT_GPG_PATH); ++num;
    484 #ifdef HAVE_GPG_CHECKSUM
    485   if (num > 0) fputc ('\n', stdout);
    486   printf (_("   -- GnuPG checksum:  %s"), GPG_HASH); ++num;
     483  printf (_(" GnuPG signatures (%s)"), DEFAULT_SIG_PATH); ++num;
     484#ifdef HAVE_SIG_CHECKSUM
     485  if (num > 0) fputc ('\n', stdout);
     486  printf (_("   -- GnuPG checksum:  %s"), SIG_HASH); ++num;
    487487#endif
    488488#ifdef USE_FINGERPRINT
  • trunk/src/sh_hash.c

    r534 r550  
    5454#include "sh_error.h"
    5555#include "sh_tiger.h"
    56 #include "sh_gpg.h"
     56#include "sh_sig.h"
    5757#include "sh_unix.h"
    5858#include "sh_files.h"
  • trunk/src/sh_readconf.c

    r514 r550  
    3434#include "sh_files.h"
    3535#include "sh_xfer.h"
    36 #include "sh_gpg.h"
     36#include "sh_sig.h"
    3737#include "sh_hash.h"
    3838#include "sh_dbIO.h"
     
    352352  SL_TICKET    fdTmp = -1;
    353353#endif
    354 #if defined(WITH_GPG) || defined(WITH_PGP)
    355   SL_TICKET    fdGpg = -1;
     354#if defined(WITH_SIG)
     355  SL_TICKET    fdSIG = -1;
    356356#endif
    357357  char * tmp;
     
    369369  char   local_flag = 'R';
    370370
    371 #if defined(WITH_GPG) || defined(WITH_PGP)
     371#if defined(WITH_SIG)
    372372  int    signed_content = S_FALSE;
    373373  int    true_content   = S_FALSE;
     
    470470        sl_write_line(fdTmp, line_in, sl_strlen(line_in));
    471471      }
    472 #if defined(WITH_GPG) || defined(WITH_PGP)
    473     if (0 == sl_strncmp(line_in, _("-----END PGP SIGNATURE-----"), 25))
     472#if defined(WITH_SIG)
     473    if (S_TRUE == sh_sig_data_end(line_in))
    474474      break;
    475475#else
     
    485485#endif
    486486
    487 #if defined(WITH_GPG) || defined(WITH_PGP)
     487#if defined(WITH_SIG)
    488488
    489489  /* extract the data and copy to temporary file
    490490   */
    491   fdGpg = sh_gpg_extract_signed(fd);
     491  fdSIG = sh_sig_extract_signed(fd);
    492492
    493493  sl_close(fd);
    494   fd = fdGpg;
     494  fd = fdSIG;
    495495
    496496  /* Validate signature of open file.
    497497   */
    498   if (0 != sh_gpg_check_sign (fd, SIG_CONF))
     498  if (0 != sh_sig_check_signature (fd, SIG_CONF))
    499499    {
    500500      SH_FREE(line_in);
     
    520520    /* Sun May 27 18:40:05 CEST 2001
    521521     */
    522 #if defined(WITH_GPG) || defined(WITH_PGP)
     522#if defined(WITH_SIG)
    523523    if (signed_content == S_FALSE)
    524524      {
    525         if (0 == sl_strcmp(line, _("-----BEGIN PGP SIGNED MESSAGE-----")))
     525        if (S_TRUE == sh_sig_msg_start(line))
    526526          signed_content = S_TRUE;
    527527        else
    528528          continue;
    529529      }
    530     else if (true_content == S_FALSE)
    531       {
    532         if (line[0] == '\n')
    533           true_content = S_TRUE;
    534         else
    535           continue;
    536       }
    537     else if (signed_content == S_TRUE)
     530    else /* if (signed_content == S_TRUE) */
    538531      {
    539         if (0 == sl_strcmp(line, _("-----BEGIN PGP SIGNATURE-----")))
     532        if (S_TRUE == sh_sig_msg_end(line))
    540533          break;
    541         else if (0 == sl_strcmp(line, _("-----BEGIN PGP SIGNED MESSAGE-----")))
     534        else if (S_TRUE == sh_sig_msg_start(line))
    542535          {
    543536            sh_error_handle((-1), FIL__, __LINE__, 0, MSG_E_SUBGEN,
     
    551544            aud_exit (FIL__, __LINE__,EXIT_FAILURE);
    552545          }
     546      }
     547
     548    if (true_content == S_FALSE) /* continue if in header */
     549      {
     550        if (S_TRUE == sh_sig_msg_startdata(line))
     551          true_content = S_TRUE;
     552        else
     553          continue;
    553554      }
    554555#endif
  • trunk/src/sh_tools.c

    r541 r550  
    20752075#endif
    20762076
    2077 #if defined(SH_WITH_CLIENT) || defined(SH_WITH_SERVER) || defined(SH_STEALTH) || defined(WITH_GPG) || defined(WITH_PGP)
     2077#if defined(SH_WITH_CLIENT) || defined(SH_WITH_SERVER) || defined(SH_STEALTH) || defined(WITH_SIG)
    20782078
    20792079/* --------- secure temporary file ------------ */
  • trunk/src/sh_unix.c

    r541 r550  
    54075407{
    54085408  int                  add_off = 0, llen;
     5409  unsigned long        bread;
    54095410  static unsigned long off_data   = 0;
    54105411  static unsigned long max_data   = 0;
     
    54545455  /* --- Read one line. ---
    54555456   */
    5456   add_off   = hideout_hex_block(fd, (unsigned char *) str, len, &bytes_read);
    5457   off_data += add_off;
     5457  add_off   = hideout_hex_block(fd, (unsigned char *) str, len, &bread);
     5458  if (add_off > 0)
     5459    off_data += add_off;
     5460  bytes_read += bread;
     5461
     5462  if (bread == 0 || add_off <= 0) /* EOF */
     5463    str[0] = '\0';
    54585464
    54595465  llen = sl_strlen(str);
     
    54775483  ASSERT_RET((len > 1), _("len > 1"), (0));
    54785484
     5485  str[0] = '\0';
     5486  *bytes_read = 0;
    54795487  --len;
    54805488
     
    54945502              do {
    54955503                do {
     5504                  errno = 0;
    54965505                  num = sl_read (fd, &c, 1);
    54975506                } while (num == 0 && errno == EINTR);
    54985507                if (num > 0)
    54995508                  ++here;
    5500                 else if (num == 0)
    5501                   SL_RETURN((0), _("hideout_hex_block"));
    5502                 else
     5509                else if (num == 0) {
    55035510                  SL_RETURN((-1), _("hideout_hex_block"));
     5511                }
     5512                else {
     5513                  SL_RETURN((-1), _("hideout_hex_block"));
     5514                }
    55045515              } while (c == '\n' || c == '\t' || c == '\r' ||
    55055516                       c == ' ');
     
    55235534  if (i != 0)
    55245535    str[i] = '\0';
     5536  else if (str[0] == '\n')
     5537    str[i+1] = '\0'; /* keep newline and terminate */
    55255538  else
    5526     str[i+1] = '\0'; /* keep newline and terminate */
     5539    str[0] = '\0';
    55275540  retval += here;
    55285541  *bytes_read += (bread/8);
  • trunk/test/test.sh

    r481 r550  
    154154    echo "  ${S}test.sh 12${E}  -- CL create DeltaDB"
    155155    echo "  ${S}test.sh 13${E}  -- CL create/verify partial DB"
     156    echo "  ${S}test.sh 14${E}  -- Signify signed files"
    156157
    157158    echo "  ${S}test.sh 20${E}  -- Test c/s init/check      (testrc_2.in)"
     
    171172    echo "  (5) testext.sh     (6) testtimesrv.sh  (7) testrun_1b.sh  (8) testrun_1c.sh"
    172173    echo "  (9) testrun_1d.sh (10) testrun_1e.sh  (11) testrun_1f.sh (12) testrun_1g.sh"
    173     echo " (13) testrun_1h.sh"
     174    echo " (13) testrun_1h.sh (14) testrun_1i.sh"
    174175    echo " (20) testrun_2.sh  (21) testrun_2a.sh  (22) testrun_2b.sh (23) testrun_2c.sh"
    175176    echo " (24) testrun_2d.sh (25) testrun_2e.sh  (26) testrun_2f.sh (27) testrun_2g.sh"
     
    657658    exit $?
    658659fi
     660if test x$1 = x14; then
     661    . ${SCRIPTDIR}/testrun_1i.sh
     662    testrun1i
     663    print_summary
     664    exit $?
     665fi
    659666if test x$1 = x20; then
    660667    . ${SCRIPTDIR}/testrun_2.sh
     
    736743    . ${SCRIPTDIR}/testrun_1h.sh
    737744    let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
     745    . ${SCRIPTDIR}/testrun_1i.sh
     746    let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
    738747    . ${SCRIPTDIR}/testrun_2.sh
    739748    let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
     
    809818    MAXTEST=${TEST_MAX}; export MAXTEST
    810819    testrun1h
     820    #
     821    . ${SCRIPTDIR}/testrun_1i.sh
     822    MAXTEST=${TEST_MAX}; export MAXTEST
     823    testrun1i
    811824    #
    812825    . ${SCRIPTDIR}/testrun_2.sh
Note: See TracChangeset for help on using the changeset viewer.