Index: /trunk/docs/Changelog
===================================================================
--- /trunk/docs/Changelog	(revision 163)
+++ /trunk/docs/Changelog	(revision 164)
@@ -1,2 +1,7 @@
+2.4.4:
+	* testsuite: add test for gpg fingerprint option
+	* sh_extern.c: add 'CloseCommand' for syntactic sugar, 
+	  add in testsuite
+
 2.4.3:
 	* sh_kern.c: don't require asm/segment.h for kernel check module
Index: /trunk/include/sh_extern.h
===================================================================
--- /trunk/include/sh_extern.h	(revision 163)
+++ /trunk/include/sh_extern.h	(revision 164)
@@ -73,4 +73,9 @@
 int sh_ext_setcommand(const char * cmd);
 
+/*
+ * -- explicitely close a command
+ */
+int sh_ext_close_command (const char * str);
+
 /* 
  * -- clean up the command list
Index: /trunk/src/sh_extern.c
===================================================================
--- /trunk/src/sh_extern.c	(revision 163)
+++ /trunk/src/sh_extern.c	(revision 164)
@@ -1060,4 +1060,16 @@
 
   SL_RETURN (0, _("sh_ext_cleanup"));
+}
+
+/*
+ * -- explicitely close a command
+ */
+int sh_ext_close_command (const char * str)
+{
+  (void) str;
+  if (ext_coms == NULL || ext_failed == (-1))
+    return (-1);
+  ext_failed = (-1);
+  return 0;
 }
 
Index: /trunk/src/sh_readconf.c
===================================================================
--- /trunk/src/sh_readconf.c	(revision 163)
+++ /trunk/src/sh_readconf.c	(revision 164)
@@ -742,4 +742,6 @@
   { N_("opencommand"),     SH_SECTION_EXTERNAL, SH_SECTION_NONE,  
     sh_ext_setcommand },
+  { N_("closecommand"),    SH_SECTION_EXTERNAL, SH_SECTION_NONE,  
+    sh_ext_close_command },
   { N_("setcommandline"),  SH_SECTION_EXTERNAL, SH_SECTION_NONE,  
     sh_ext_add_argv },
@@ -1108,6 +1110,7 @@
 
 static int sh_readconfig_line (char * line)
-{    
-  char * c;
+{
+  char * key;
+  char * value;
   char * tmp;
   int    i;
@@ -1117,4 +1120,11 @@
   int    modnum, modkey;
 #endif
+
+  static char  *dummy = N_("dummy");
+
+  static char  *closing[] = {
+    N_("closecommand"),
+    NULL
+  };
 
   static char  *ident[] = {
@@ -1157,10 +1167,50 @@
   SL_ENTER(_("sh_readconf_line"));
 
+  /* convert to lowercase                              */
+
+  tmp = line;
+  while (*tmp != '=' && *tmp != '\0')
+    {
+      *tmp = tolower( (int) *tmp);
+      ++tmp;
+    }
+
+  key = line;
+
   /* interpret line                                    */
 
-  c = strchr(line, '=');
-  if (c == NULL || (*c) == '\0')
-    {
-      if (line != NULL)
+  value = strchr(line, '=');
+
+  if (value == NULL || (*value) == '\0')
+    {
+      if (key != NULL)
+	{
+	  i = 0;
+	  while (closing[i] != NULL) 
+	    {
+	      if (sl_strncmp(key,_(closing[i]),sl_strlen(closing[i])-1) == 0)
+		{
+		  value = dummy;
+		  goto ok_novalue;
+		}
+	      ++i;
+	    }
+
+	  TPT(( 0, FIL__, __LINE__, _("msg=<ConfigFile: not key=value: %s>\n"),
+		line));
+	}
+      SL_RETURN(good_opt, _("sh_readconf_line"));
+    }
+  else
+    ++value;
+
+  /* skip leading whitespace
+   */
+  while ((*value) == ' ' || (*value) == '\t')
+    ++value;
+
+  if ((*value) == '\0')     /* no value                    */
+    {
+      if (key != NULL)
 	{
 	  TPT(( 0, FIL__, __LINE__, _("msg=<ConfigFile: not key=value: %s>\n"),
@@ -1169,30 +1219,6 @@
       SL_RETURN(good_opt, _("sh_readconf_line"));
     }
-  else
-    ++c;
-
-  /* skip leading whitespace
-   */
-  while ((*c) == ' ' || (*c) == '\t')
-    ++c;
-
-  if ((*c) == '\0')     /* no value                    */
-    {
-      if (line != NULL)
-	{
-	  TPT(( 0, FIL__, __LINE__, _("msg=<ConfigFile: not key=value: %s>\n"),
-		line));
-	}
-      SL_RETURN(good_opt, _("sh_readconf_line"));
-    }
-
-  /* convert to lowercase                              */
-
-  tmp = line;
-  while (*tmp != '=')
-    {
-      *tmp = tolower( (int) *tmp);
-      ++tmp;
-    }
+
+ ok_novalue:
 
   if (!sl_is_suid())
@@ -1210,12 +1236,12 @@
 	       ++modkey) 
 	    {
-	      if (sl_strncmp (line,   
+	      if (sl_strncmp (key,
 			      _(modList[modnum].conf_table[modkey].the_opt),
 			      sl_strlen(modList[modnum].conf_table[modkey].the_opt) ) == 0)
 		{
 		  good_opt = 0;
-		  if (0 != modList[modnum].conf_table[modkey].func(c))
+		  if (0 != modList[modnum].conf_table[modkey].func(value))
 		    sh_error_handle ((-1), FIL__, __LINE__, 0, MSG_EINVALS,
-				     _(modList[modnum].conf_table[modkey].the_opt), c);
+				     _(modList[modnum].conf_table[modkey].the_opt), value);
 		  if (!sl_is_suid())
 		    {
@@ -1237,8 +1263,8 @@
       i = 0;
       while (ident[i] != NULL) {
-	if (sl_strncmp (line, _(ident[i]), sl_strlen(ident[i])-1) == 0)
+	if (sl_strncmp (key, _(ident[i]), sl_strlen(ident[i])-1) == 0)
 	  {
 	    good_opt = 0;
-	    sh_error_set_iv (identnum[i], c);
+	    sh_error_set_iv (identnum[i], value);
 	    break;
 	  }
@@ -1253,11 +1279,11 @@
 	  if ((ext_table[i].section == read_mode || 
 	       ext_table[i].alt_section == read_mode) &&
-	      sl_strncmp (line, _(ext_table[i].optname), 
+	      sl_strncmp (key, _(ext_table[i].optname), 
 			  sl_strlen(ext_table[i].optname)) == 0)
 	    {
 	      good_opt = 0;
-	      if (0 != ext_table[i].func (c))
+	      if (0 != ext_table[i].func (value))
 		sh_error_handle ((-1), FIL__, __LINE__, 0, MSG_EINVALS,
-				 _(ext_table[i].optname), c);
+				 _(ext_table[i].optname), value);
 	      break;
 	    }
Index: /trunk/test/testext.sh
===================================================================
--- /trunk/test/testext.sh	(revision 163)
+++ /trunk/test/testext.sh	(revision 164)
@@ -94,4 +94,9 @@
 	echo "SetChecksum=$CHKSUM"          >> testrc_1ext
 	echo "SetFilterOr=ALERT"            >> testrc_1ext
+	echo "CloseCommand"                 >> testrc_1ext
+	echo "OpenCommand=$PW_DIR/test_ext" >> testrc_1ext
+	echo "SetType=log"                  >> testrc_1ext
+	echo "SetChecksum=$CHKSUM"          >> testrc_1ext
+	echo "SetFilterOr=ALERT"            >> testrc_1ext
     
 	rm -f $PW_DIR/test_ext.res
@@ -111,9 +116,9 @@
 
 	tmp=`cat $PW_DIR/test_ext.res | wc -l`
-	if [ $tmp -eq 4 ]; then
+	if [ $tmp -eq 8 ]; then
 	    tmp=`egrep 'RECV: \[EOF\]' $PW_DIR/test_ext.res | wc -l`
-	    if [ $tmp -eq 2 ]; then
+	    if [ $tmp -eq 4 ]; then
 		tmp=`egrep 'RECV: ALERT' $PW_DIR/test_ext.res | wc -l`
-		if [ $tmp -eq 2 ]; then
+		if [ $tmp -eq 4 ]; then
 		    log_ok 1 ${MAXTEST};
 		else
