Index: trunk/Makefile.in
===================================================================
--- trunk/Makefile.in	(revision 65)
+++ trunk/Makefile.in	(revision 68)
@@ -87,5 +87,6 @@
 LIBS_KVM = @sh_libkvm@
 CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
+CUTEST =
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(CUTEST)
 LINK = $(CC) $(DBGDEF) -O $(LDFLAGS) -o $@
 
@@ -114,5 +115,6 @@
 	lzoconf.h minilzo.h rijndael-alg-fst.h rijndael-api-fst.h \
 	rijndael-boxes-fst.h sh_socket.h sh_ignore.h sh_prelude.h \
-	sh_mounts.h sh_userfiles.h sh_static.h sh_prelink.h 
+	sh_mounts.h sh_userfiles.h sh_static.h sh_prelink.h \
+	sh_processcheck.h sh_portcheck.h
 
 
@@ -146,5 +148,6 @@
 	$(srcsrc)/sh_userfiles.c $(srcsrc)/sh_prelude.c \
 	$(srcsrc)/sh_prelink.c $(srcsrc)/sh_static.c \
-	$(srcsrc)/sh_prelude_old.c 
+	$(srcsrc)/sh_portcheck.c \
+	$(srcsrc)/sh_processcheck.c $(srcsrc)/sh_prelude_old.c 
 
 OBJECTS = sh_files.o sh_tiger0.o sh_tiger2.o sh_tiger2_64.o \
@@ -159,5 +162,5 @@
 	zAVLTree.o sh_socket.o sh_ignore.o sh_prelude.o \
 	sh_mounts.o sh_userfiles.o sh_prelink.o sh_static.o \
-	sh_prelude_old.o 
+	sh_processcheck.o sh_portcheck.o sh_prelude_old.o  
 
 KERN = kern_head.h kern_head.c
@@ -165,5 +168,5 @@
 TESTSUITE = test.sh testcompile.sh testhash.sh testtiger.txt \
 	testtimesrv.sh \
-	testext.sh testrc_1ext.in test_ext.c.in \
+	testext.sh testrc_1ext.in test_ext.c.in testrun_1d.sh \
 	testrun_1.sh testrun_1a.sh testrun_1b.sh testrun_1c.sh testrc_1 \
 	testrun_2.sh testrun_2a.sh testrun_2b.sh testrc_2.in \
@@ -808,6 +811,6 @@
 	echo $(top_srcdir)/docs/HOWTO-client+server.html >> debian/docs; \
 	echo $(top_srcdir)/docs/HOWTO-samhain+GnuPG.html >> debian/docs; \
-	echo $(top_srcdir)/docs/MANUAL-2_2.html.tar      >> debian/docs; \
-	echo $(top_srcdir)/docs/MANUAL-2_2.pdf           >> debian/docs; \
+	echo $(top_srcdir)/docs/MANUAL-2_3.html.tar      >> debian/docs; \
+	echo $(top_srcdir)/docs/MANUAL-2_3.pdf           >> debian/docs; \
 	echo $(top_srcdir)/docs/README.gcc_bug           >> debian/docs; \
 	echo $(top_srcdir)/docs/README.LZO               >> debian/docs; \
@@ -819,5 +822,5 @@
 
 deb-run:
-	@maintainer=`gpg --list-secret-keys | grep 'sec ' | cut -d" " -f 5- | sed 's/^ *//' | sed q1`;\
+	@maintainer=`gpg --list-secret-keys | grep 'uid ' | cut -d" " -f 5- | sed 's/^ *//' | sed q1`;\
 	if test "x$$maintainer" = x; then \
 		maintainer="Nobody Nowhere <nobody@example.com>"; \
@@ -1148,5 +1151,9 @@
 	rm x_`echo $@ |sed 's%\.o$$%%'`.c
 
-cutest: internal.h $(OBJECTS) $(CUTEST_OBJECTS) sh_tiger_i.o $(srcsrc)/make-tests.sh
+
+cutest: $(SOURCES) $(CUTEST_SOURCES)
+	@$(MAKE) CUTEST='-DSH_CUTEST=1' intcutest
+
+intcutest: internal.h $(OBJECTS) $(CUTEST_OBJECTS) sh_tiger_i.o $(srcsrc)/make-tests.sh
 	cd $(srcsrc)/ && ./make-tests.sh >CuTestMain.c
 	@$(COMPILE) -o CuTestMain.o -c $(srcsrc)/CuTestMain.c; \
@@ -1154,7 +1161,8 @@
 	rm -f samhain.o; \
 	./encode $(XOR_CODE) $(srcsrc)/samhain.c; \
-	$(COMPILE) $(VFLAG) -DSH_CUTEST=1 -o samhain.o -c x_samhain.c; \
+	$(COMPILE) $(VFLAG) -o samhain.o -c x_samhain.c; \
 	rm x_samhain.c; \
 	$(LINK) sh_tiger_i.o $(CUTEST_OBJECTS) CuTestMain.o CuTest.o $(OBJECTS) $(LIBS_TRY); \
+	test -f ./intcutest && mv ./intcutest ./cutest; \
 	./cutest
 
@@ -1631,5 +1639,5 @@
 sh_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_static.h 
 sh_forward.o: $(srcsrc)/sh_forward.c Makefile config_xor.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_mail.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 
-sh_modules.o: $(srcsrc)/sh_modules.c Makefile config_xor.h $(srcinc)/sh_modules.h $(srcinc)/sh_utmp.h $(srcinc)/sh_mounts.h $(srcinc)/sh_userfiles.h $(srcinc)/sh_kern.h $(srcinc)/sh_suidchk.h 
+sh_modules.o: $(srcsrc)/sh_modules.c Makefile config_xor.h $(srcinc)/sh_modules.h $(srcinc)/sh_utmp.h $(srcinc)/sh_mounts.h $(srcinc)/sh_userfiles.h $(srcinc)/sh_kern.h $(srcinc)/sh_suidchk.h $(srcinc)/sh_processcheck.h $(srcinc)/sh_portcheck.h 
 sh_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 
 sh_kern.o: $(srcsrc)/sh_kern.c Makefile config_xor.h $(srcinc)/samhain.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 
@@ -1674,2 +1682,4 @@
 sh_prelude_old.o: $(srcsrc)/sh_prelude_old.c Makefile config_xor.h $(srcinc)/slib.h $(srcinc)/sh_mem.h $(srcinc)/sh_cat.h $(srcinc)/sh_error_min.h $(srcinc)/sh_prelude.h $(srcinc)/sh_static.h 
 sh_async.o: $(srcsrc)/sh_async.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_calls.h $(srcinc)/sh_error.h 
+sh_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)/CuTest.h 
+sh_portcheck.o: $(srcsrc)/sh_portcheck.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_mem.h $(srcinc)/sh_utils.h $(srcinc)/sh_modules.h $(srcinc)/CuTest.h 
