Index: trunk/docs/Changelog
===================================================================
--- trunk/docs/Changelog	(revision 561)
+++ trunk/docs/Changelog	(revision 562)
@@ -1,2 +1,7 @@
+4.4.4:
+	* fix more gcc 10 compiler warnings
+	* fix bug with signify-openbsd in client/server setup (reported
+	by Sdoba)
+
 4.4.3:
 	* allow console logging to a unix domain socket
Index: trunk/src/dnmalloc.c
===================================================================
--- trunk/src/dnmalloc.c	(revision 561)
+++ trunk/src/dnmalloc.c	(revision 562)
@@ -165,5 +165,5 @@
  *   HAVE_SYS_PARAM_H Define to #include <sys/param.h> (for pagesize)
  *
- *   HAVE_MALLOC_H    Define to #include <malloc.h> (for struct mallinfo)
+ *   HAVE_MALLOC_H    Define to #include <malloc.h> (for struct mallinfo2)
  *
  *   HAVE_FCNTL_H     Define to #include <fcntl.h>
@@ -531,5 +531,5 @@
 #define vALLOc      public_vALLOc
 #define pVALLOc     public_pVALLOc
-#define mALLINFo    public_mALLINFo
+#define mALLINFo2   public_mALLINFo2
 #define mALLOPt     public_mALLOPt
 #define mTRIm       public_mTRIm
@@ -547,5 +547,5 @@
 #define public_vALLOc    dlvalloc
 #define public_pVALLOc   dlpvalloc
-#define public_mALLINFo  dlmallinfo
+#define public_mALLINFo2 dlmallinfo2
 #define public_mALLOPt   dlmallopt
 #define public_mTRIm     dlmalloc_trim
@@ -561,5 +561,5 @@
 #define public_vALLOc    valloc
 #define public_pVALLOc   pvalloc
-#define public_mALLINFo  mallinfo
+#define public_mALLINFo2 mallinfo2
 #define public_mALLOPt   mallopt
 #define public_mTRIm     malloc_trim
@@ -791,25 +791,25 @@
 
 /*
-  This version of malloc supports the standard SVID/XPG mallinfo
+  This version of malloc supports the standard SVID/XPG mallinfo2
   routine that returns a struct containing usage properties and
   statistics. It should work on any SVID/XPG compliant system that has
-  a /usr/include/malloc.h defining struct mallinfo. (If you'd like to
+  a /usr/include/malloc.h defining struct mallinfo2. (If you'd like to
   install such a thing yourself, cut out the preliminary declarations
   as described above and below and save them in a malloc.h file. But
   there's no compelling reason to bother to do this.)
 
-  The main declaration needed is the mallinfo struct that is returned
-  (by-copy) by mallinfo().  The SVID/XPG malloinfo struct contains a
+  The main declaration needed is the mallinfo2 struct that is returned
+  (by-copy) by mallinfo2().  The SVID/XPG malloinfo2 struct contains a
   bunch of fields that are not even meaningful in this version of
-  malloc.  These fields are are instead filled by mallinfo() with
+  malloc.  These fields are are instead filled by mallinfo2() with
   other numbers that might be of interest.
 
   HAVE_MALLOC_H should be set if you have a
   /usr/include/malloc.h file that includes a declaration of struct
-  mallinfo.  If so, it is included; else an SVID2/XPG2 compliant
+  mallinfo2.  If so, it is included; else an SVID2/XPG2 compliant
   version is declared below.  These must be precisely the same for
-  mallinfo() to work.  The original SVID version of this struct,
-  defined on most systems with mallinfo, declares all fields as
-  ints. But some others define as unsigned long. If your system
+  mallinfo2() to work.  The original SVID version of this struct,
+  defined on most systems with mallinfo2, declares all fields as
+  size_2. But some others define as unsigned long. If your system
   defines the fields using a type of different width than listed here,
   you must #include your system version and #define
@@ -826,17 +826,17 @@
 #else
 
-/* SVID2/XPG mallinfo structure */
-
-struct mallinfo {
-  int arena;    /* non-mmapped space allocated from system */
-  int ordblks;  /* number of free chunks */
-  int smblks;   /* number of fastbin blocks */
-  int hblks;    /* number of mmapped regions */
-  int hblkhd;   /* space in mmapped regions */
-  int usmblks;  /* maximum total allocated space */
-  int fsmblks;  /* space available in freed fastbin blocks */
-  int uordblks; /* total allocated space */
-  int fordblks; /* total free space */
-  int keepcost; /* top-most, releasable (via malloc_trim) space */
+/* SVID2/XPG mallinfo2 structure */
+
+struct mallinfo2 {
+  size_t arena;    /* non-mmapped space allocated from system */
+  size_t ordblks;  /* number of free chunks */
+  size_t smblks;   /* number of fastbin blocks */
+  size_t hblks;    /* number of mmapped regions */
+  size_t hblkhd;   /* space in mmapped regions */
+  size_t usmblks;  /* maximum total allocated space */
+  size_t fsmblks;  /* space available in freed fastbin blocks */
+  size_t uordblks; /* total allocated space */
+  size_t fordblks; /* total free space */
+  size_t keepcost; /* top-most, releasable (via malloc_trim) space */
 };
 
@@ -1008,5 +1008,5 @@
 
 /*
-  mallinfo()
+  mallinfo2()
   Returns (by copy) a struct containing various summary statistics:
 
@@ -1031,7 +1031,7 @@
 */
 #if __STD_C
-struct mallinfo public_mALLINFo(void);
-#else
-struct mallinfo public_mALLINFo();
+struct mallinfo2 public_mALLINFo2(void);
+#else
+struct mallinfo2 public_mALLINFo2();
 #endif
 
@@ -1115,5 +1115,5 @@
 
   malloc_stats prints only the most commonly interesting statistics.
-  More information can be obtained by calling mallinfo.
+  More information can be obtained by calling mallinfo2.
 
 */
@@ -1366,5 +1366,5 @@
 static void     mSTATs();
 static int      mALLOPt(int, int);
-static struct mallinfo mALLINFo(void);
+static struct mallinfo2 mALLINFo2(void);
 #else
 static Void_t*  mALLOc();
@@ -1380,5 +1380,5 @@
 static void     mSTATs();
 static int      mALLOPt();
-static struct mallinfo mALLINFo();
+static struct mallinfo2 mALLINFo2();
 #endif
 
@@ -1687,12 +1687,12 @@
 }
 
-struct mallinfo public_mALLINFo() {
-  struct mallinfo m;
+struct mallinfo2 public_mALLINFo2() {
+  struct mallinfo2 m;
   if (MALLOC_PREACTION == 0) {
-    m = mALLINFo();
+    m = mALLINFo2();
     (void) MALLOC_POSTACTION;
     return m;
   } else {
-    struct mallinfo nm = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+    struct mallinfo2 nm = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
     return nm;
   }
@@ -5293,8 +5293,8 @@
 */
 
-DL_STATIC struct mallinfo mALLINFo()
+DL_STATIC struct mallinfo2 mALLINFo2()
 {
   mstate av = get_malloc_state();
-  static struct mallinfo mi;
+  static struct mallinfo2 mi;
   unsigned int i;
   mbinptr b;
@@ -5361,5 +5361,5 @@
 DL_STATIC void mSTATs()
 {
-  struct mallinfo mi = mALLINFo();
+  struct mallinfo2 mi = mALLINFo2();
 
   fprintf(stderr, "hashtable = %10lu MB\n", 
Index: trunk/src/sh_login_track.c
===================================================================
--- trunk/src/sh_login_track.c	(revision 561)
+++ trunk/src/sh_login_track.c	(revision 562)
@@ -402,5 +402,5 @@
   while(u)
     {
-      if (0 == strcmp(user, u->user))
+      if (0 == sl_strcmp(user, u->user))
 	{
 	  return u;
@@ -839,13 +839,15 @@
   else
     {
-      q = strchr(host, '.'); 
+      char * tmp = sh_util_strdup(host);
+      q = strchr(tmp, '.'); 
       if (q && *q)
 	{
 	  ++q;
 	  p = sh_util_strdup(q);
+	  SH_FREE(tmp);
 	}
       else
 	{
-	  p = sh_util_strdup(host);
+	  p = tmp;
 	}
     }
Index: trunk/src/sh_tools.c
===================================================================
--- trunk/src/sh_tools.c	(revision 561)
+++ trunk/src/sh_tools.c	(revision 562)
@@ -1386,4 +1386,5 @@
 }
 
+#ifdef SH_ENCRYPT
 static int probe_ok(int flag)
 {
@@ -1393,4 +1394,5 @@
   return S_FALSE;
 }
+#endif
 
 static unsigned char probe_header_set(unsigned char protocol)
@@ -1444,4 +1446,5 @@
 }
 
+#ifdef SH_ENCRYPT
 static int probe_ok(int flag)
 {
@@ -1450,4 +1453,6 @@
   return S_FALSE;
 }
+#endif
+
 #endif
 
Index: trunk/src/t-test0.c
===================================================================
--- trunk/src/t-test0.c	(revision 561)
+++ trunk/src/t-test0.c	(revision 562)
@@ -390,5 +390,5 @@
 		actions = RANDOM(&ld, ACTIONS_MAX);
 #if USE_MALLOC && MALLOC_DEBUG
-		if(actions < 2) { mallinfo(); }
+		if(actions < 2) { mallinfo2(); }
 #endif
 		for(j=0; j<actions; j++) {
Index: trunk/src/t-test1.c
===================================================================
--- trunk/src/t-test1.c	(revision 561)
+++ trunk/src/t-test1.c	(revision 562)
@@ -499,5 +499,5 @@
 		actions = RANDOM(&ld, ACTIONS_MAX);
 #if USE_MALLOC && MALLOC_DEBUG
-		if(actions < 2) { mallinfo(); }
+		if(actions < 2) { mallinfo2(); }
 #endif
 		for(j=0; j<actions; j++) {
Index: trunk/src/yulectl.c
===================================================================
--- trunk/src/yulectl.c	(revision 561)
+++ trunk/src/yulectl.c	(revision 562)
@@ -48,6 +48,8 @@
 #endif
 
+#define SH_PW_SIZE 15
+
 static int    sock     = -1;
-static char   password[15] = "";
+static char   password[SH_PW_SIZE] = "";
 static int    verbose = 0;
 
@@ -123,11 +125,8 @@
 static char * safe_copy(char * to, const char * from, size_t size)
 {
-  if (to && from)
-    {
-      strncpy (to, from, size);
-      if (size > 0)
-	to[size-1] = '\0';
-      else 
-	*to = '\0';
+  if (to && from && (size > 0))
+    {
+      strncpy (to, from, size-1);
+      to[size-1] = '\0';
     }
   return to;
@@ -144,5 +143,11 @@
    */
   name.sun_family = AF_UNIX;
-  strncpy (name.sun_path, serversock, sizeof(name.sun_path) - 1);
+  memcpy(name.sun_path, serversock, sizeof(name.sun_path));
+  name.sun_path[sizeof(name.sun_path)-1] = '\0';
+  if (strlen(serversock) > strlen(name.sun_path))
+    {
+      perror (_("ERROR: socket path too long"));
+      return -1;
+    }
   size = (offsetof (struct sockaddr_un, sun_path)
           + strlen (name.sun_path) + 1);
@@ -401,5 +406,5 @@
    */
   pw = getenv(_("YULECTL_PASSWORD"));
-  if (pw && strlen(pw) < 15)
+  if (pw && strlen(pw) < SH_PW_SIZE)
     {
       strcpy(password, pw);
@@ -413,5 +418,5 @@
     return -1;
 
-  if ( (strlen(home) + strlen(_("/.yulectl_cred")) + 1) > 4096)
+  if ( (strlen(home) + strlen(_("/.yulectl_cred")) + 1) > sizeof(home))
     {
       fprintf (stderr, "%s", _("ERROR: path for $HOME is too long.\n"));
@@ -451,5 +456,5 @@
   (void) rtrim(message2);
 
-  if (strlen(message2) > 14)
+  if (strlen(message2) > (SH_PW_SIZE -1))
     {
       fprintf (stderr, "%s", 
Index: trunk/test/testrun_1b.sh
===================================================================
--- trunk/test/testrun_1b.sh	(revision 561)
+++ trunk/test/testrun_1b.sh	(revision 562)
@@ -239,11 +239,13 @@
 do_test_1b_2 () {
 
-    rm -f $PW_DIR/test_log_prelude
-
-    [ -z "$verbose" ] || { echo " starting prelude-manager.."; echo " ($PM --textmod -l $PW_DIR/test_log_prelude --listen 127.0.0.1:5500 >/dev/null 2>&1 &)"; }
-    "$PM" --textmod -l $PW_DIR/test_log_prelude --listen 127.0.0.1:5500 >/dev/null 2>&1 &
-    PID=$!
-
-    five_sec_sleep
+    #rm -f $PW_DIR/test_log_prelude
+    test_log_prelude="/var/log/prelude/prelude-text.log"
+    echo -n >"${test_log_prelude}"
+    
+    #[ -z "$verbose" ] || { echo " starting prelude-manager.."; echo " ($PM --textmod -l $PW_DIR/test_log_prelude --listen 127.0.0.1:5500 >/dev/null 2>&1 &)"; }
+    #"$PM" --textmod -l $PW_DIR/test_log_prelude --listen 127.0.0.1:5500 >/dev/null 2>&1 &
+    #PID=$!
+
+    #five_sec_sleep
 
     ./samhain -t check -p none -l info --set-prelude-severity=info --prelude --server-addr 127.0.0.1:5500 >/dev/null
@@ -259,37 +261,37 @@
     else
 	[ -z "$quiet" ]   && log_msg_fail  "check...";
-	kill $PID
+	#kill $PID
 	return 1
     fi
     #
-    tmp=`egrep 'File original:.*name=etc.*path=/etc' test_log_prelude 2>/dev/null | wc -l`
+    tmp=`egrep 'File original:.*name=etc.*path=/etc' ${test_log_prelude} 2>/dev/null | wc -l`
     if [ $tmp -lt 1 ]; then
 	[ -z "$verbose" ] || log_msg_fail "/etc";
-	kill $PID
-	return 1
-    fi
-    tmp=`egrep 'Classification text: Checking' test_log_prelude 2>/dev/null | wc -l`
+	#kill $PID
+	return 1
+    fi
+    tmp=`egrep 'Classification text: Checking' ${test_log_prelude} 2>/dev/null | wc -l`
     if [ $tmp -lt 1 ]; then
 	[ -z "$verbose" ] || log_msg_fail "checking";
-	kill $PID
+	#kill $PID
 	return 1
     fi
     #
     if test "x$2" = "xmodrc"; then
-	tmp=`egrep 'Classification text: Service opened' test_log_prelude 2>/dev/null | wc -l`
+	tmp=`egrep 'Classification text: Service opened' ${test_log_prelude} 2>/dev/null | wc -l`
 	if [ $tmp -lt 1 ]; then
 	    [ -z "$verbose" ] || log_msg_fail "service";
-	    kill $PID
-	    return 1
-	fi
-	tmp=`egrep 'Service: port=5500' test_log_prelude 2>/dev/null | wc -l`
+	    #kill $PID
+	    return 1
+	fi
+	tmp=`egrep 'Service: port=5500' ${test_log_prelude} 2>/dev/null | wc -l`
 	if [ $tmp -lt 1 ]; then
 	    [ -z "$verbose" ] || log_msg_fail "port 5500";
-	    kill $PID
+	    #kill $PID
 	    return 1
 	fi
     fi
     #
-    kill $PID
+    #kill $PID
     return 0
 }
Index: trunk/test/testrun_1e.sh
===================================================================
--- trunk/test/testrun_1e.sh	(revision 561)
+++ trunk/test/testrun_1e.sh	(revision 562)
@@ -25,4 +25,6 @@
 MAXTEST=5; export MAXTEST
 
+test_log_prelude="/var/log/prelude/prelude-text.log"; export test_log_prelude
+
 PORTPOLICY_5="
 [ReadOnly]
@@ -42,5 +44,5 @@
 	log_skip 5 $MAXTEST 'logging to prelude (or use --really-all)'
     else
-	tmp=`egrep 'Service: port=5500 .unknown. protocol=tcp' test_log_prelude 2>/dev/null | wc -l`
+	tmp=`egrep 'Service: port=5500 .unknown. protocol=tcp' ${test_log_prelude} 2>/dev/null | wc -l`
 	if [ $tmp -lt 1 ]; then
 	    [ -z "$verbose" ] || log_msg_fail "port 5500";
@@ -187,4 +189,6 @@
 run_check_prelude()
 {
+    echo -n >"${test_log_prelude}"
+
     ./samhain -t check -p none -l info --set-prelude-severity=info --prelude --server-addr 127.0.0.1:5500 >/dev/null
  
@@ -322,7 +326,7 @@
 		  #
 		  #
-		  [ -z "$verbose" ] || { echo " starting prelude-manager.."; echo " ($PM --textmod -l $PW_DIR/test_log_prelude --listen 127.0.0.1:5500 >/dev/null 2>&1 &)"; }
-		  "$PM" --textmod -l $PW_DIR/test_log_prelude --listen 127.0.0.1:5500 >/dev/null 2>&1 &
-		  PRELUDEPID=$!
+		  #[ -z "$verbose" ] || { echo " starting prelude-manager.."; echo " ($PM --textmod -l $PW_DIR/test_log_prelude --listen 127.0.0.1:5500 >/dev/null 2>&1 &)"; }
+		  #"$PM" --textmod -l $PW_DIR/test_log_prelude --listen 127.0.0.1:5500 >/dev/null 2>&1 &
+		  #PRELUDEPID=$!
 		  #
 		  #
Index: trunk/test/testrun_2d.sh
===================================================================
--- trunk/test/testrun_2d.sh	(revision 561)
+++ trunk/test/testrun_2d.sh	(revision 562)
@@ -38,9 +38,9 @@
     # PGPASSWORD=samhain; export PGPASSWORD
     create_pgpass
-    psql -o test_log_db -U samhain -d samhain -c "SELECT * FROM log WHERE entry_status = 'NEW' and log_time > '${DATE}';"
+    psql -h localhost -o test_log_db -U samhain -d samhain -c "SELECT * FROM log WHERE entry_status = 'NEW' and log_time > '${DATE}';"
     #
     egrep "START.*Yule" test_log_db >/dev/null 2>&1
     if [ $? -ne 0 ]; then
-	[ -z "$verbose" ] || log_msg_fail "Server start (psql)";
+	[ -z "$verbose" ] || log_msg_fail "Server start (psql) DATE ${DATE}";
 	return 1
     fi
@@ -88,5 +88,5 @@
 	# PGPASSWORD="samhain"; export PGPASSWORD
 	create_pgpass
-	TEST=`psql -U samhain -d samhain -c "SELECT * FROM log LIMIT 1;" 2>/dev/null`
+	TEST=`psql -h localhost -U samhain -d samhain -c "SELECT * FROM log LIMIT 1;" 2>/dev/null`
 	if [ $? -ne 0 -o -z "$TEST" ]; then
 	    log_skip 1 $MAXTEST "psql not default setup"
@@ -112,4 +112,11 @@
     ORIGINAL="DatabaseSeverity=none"
     REPLACEMENT="DatabaseSeverity=info"
+    ex -s $RCFILE <<EOF
+%s/$ORIGINAL/$REPLACEMENT/g
+wq
+EOF
+    #
+    ORIGINAL="# setdbname=samhain"
+    REPLACEMENT="setdbhost=127.0.0.1"
     ex -s $RCFILE <<EOF
 %s/$ORIGINAL/$REPLACEMENT/g
