Index: trunk/src/sh_database.c
===================================================================
--- trunk/src/sh_database.c	(revision 80)
+++ trunk/src/sh_database.c	(revision 81)
@@ -1535,12 +1535,14 @@
       do 
 	{
-	  if (*p <=  0x7F)
+	  if (*p <=  126 && *p >= 32)
 	    {
 	      if (escp == 0)
 		{
-		  if      (!((*p == '\'') || (*p == '\"') || (*p != '\\'))) 
+		  if      (!((*p == '\'') || (*p == '\"') || (*p == '\\'))) 
 		    /* do nothing */;
-		  else if (*p == '\\') escp = 1;
-		  else    retv = S_FALSE; /* (*p == '\'' || *p == '\"') */
+		  else if (*p == '\\') 
+		    escp = 1;
+		  else  
+		    retv = S_FALSE; /* (*p == '\'' || *p == '\"') */
 		}
 	      else /* escp == 1 */
@@ -1549,5 +1551,5 @@
 		}
 	    }
-	  else /* *p > 0x7F */
+	  else /* *p > 126 || *p < 32 */
 	    {
 	      retv = S_FALSE;
Index: trunk/src/sh_tools.c
===================================================================
--- trunk/src/sh_tools.c	(revision 80)
+++ trunk/src/sh_tools.c	(revision 81)
@@ -213,5 +213,5 @@
 	  ++p;
 	      
-	  if (c < 31 || c > 126)
+	  if (c < 32 || c > 126)
 	    {
 	      --i;
Index: trunk/test/testrun_1b.sh
===================================================================
--- trunk/test/testrun_1b.sh	(revision 80)
+++ trunk/test/testrun_1b.sh	(revision 81)
@@ -180,13 +180,13 @@
     #
     tmp=`egrep 'File original:.*name=etc.*path=/etc' test_log_prelude 2>/dev/null | wc -l`
-    if [ $tmp -ne 1 ]; then
+    if [ $tmp -lt 1 ]; then
 	[ -z "$verbose" ] || log_msg_fail "/etc";
     fi
     tmp=`egrep 'Classification text: Checking' test_log_prelude 2>/dev/null | wc -l`
-    if [ $tmp -ne 1 ]; then
+    if [ $tmp -lt 1 ]; then
 	[ -z "$verbose" ] || log_msg_fail "checking";
     fi
     tmp=`egrep 'Classification text: Checking' test_log_prelude 2>/dev/null | wc -l`
-    if [ $tmp -ne 1 ]; then
+    if [ $tmp -lt 1 ]; then
 	[ -z "$verbose" ] || log_msg_fail "checking";
     fi
Index: trunk/test/testrun_2c.sh
===================================================================
--- trunk/test/testrun_2c.sh	(revision 80)
+++ trunk/test/testrun_2c.sh	(revision 81)
@@ -28,4 +28,5 @@
 
     rm -f test_log_db
+    #
     echo "SELECT * FROM log WHERE entry_status = 'NEW' and log_time > '"${DATE}"';" | mysql --password=samhain -u samhain samhain >test_log_db
     #
