File pending-upstream.patch of Package sblim-sfcb

diff -wruN -x '*~' ../orig-sblim-sfcb-1.3.14/cimcClientSfcbLocal.c ./cimcClientSfcbLocal.c
--- ../orig-sblim-sfcb-1.3.14/cimcClientSfcbLocal.c	2012-03-29 16:39:53.000000000 +0200
+++ ./cimcClientSfcbLocal.c	2012-04-03 09:32:58.000000000 +0200
@@ -214,7 +214,6 @@
   if (cl->connection) CMRelease(cl->connection);
 
   free(cl);
-  closeLogging();
   return rc;
 }
 
@@ -1916,6 +1915,7 @@
 static void* release(ClientEnv* ce)
 {
    void *lib=ce->hdl;
+   closeLogging();
    CONNECT_LOCK();
    if (localConnectCount > 0) localConnectCount -= 1;
    if (localConnectCount == 0) {
diff -wruN -x '*~' ../orig-sblim-sfcb-1.3.14/configure.ac ./configure.ac
--- ../orig-sblim-sfcb-1.3.14/configure.ac	2012-03-31 01:37:23.000000000 +0200
+++ ./configure.ac	2012-04-03 09:32:58.000000000 +0200
@@ -24,12 +24,14 @@
 
 AC_INIT(Small Footprint CIM Broker, 1.3.14, sblim-devel@lists.sourceforge.net, sblim-sfcb)
 AC_CONFIG_SRCDIR([providerDrv.c])
+AC_CONFIG_MACRO_DIR([m4])
 
 #disable "seems to ignore the --datarootdir setting" warnings
 #AC_DEFUN([AC_DATAROOTDIR_CHECKED])
 
 AM_INIT_AUTOMAKE
 AM_CONFIG_HEADER([config.h])
+ACLOCAL_AMFLAGS=-I m4
 
 AC_ARG_ENABLE(debug,
 	[AC_HELP_STRING([--disable-debug],
diff -wruN -x '*~' ../orig-sblim-sfcb-1.3.14/fileRepository.c ./fileRepository.c
--- ../orig-sblim-sfcb-1.3.14/fileRepository.c	2012-03-08 22:20:27.000000000 +0100
+++ ./fileRepository.c	2012-04-03 09:32:58.000000000 +0200
@@ -594,7 +594,7 @@
 #endif
     
    if ((d=opendir(fn))==NULL) {
-      perror("opendir");
+      fprintf(stderr, "opendir: %s: %s\n", fn, strerror(errno));   
       return 0;
    }   
    closedir(d);
diff -wruN -x '*~' ../orig-sblim-sfcb-1.3.14/Makefile.am ./Makefile.am
--- ../orig-sblim-sfcb-1.3.14/Makefile.am	2012-03-01 00:12:44.000000000 +0100
+++ ./Makefile.am	2012-04-03 09:32:58.000000000 +0200
@@ -619,7 +619,7 @@
 test: testprep check testreport
 endif
 
-postinstall: install-cimschema create-sslkeys
+postinstall: #install-cimschema create-sslkeys
 	test -f $(DESTDIR)$(sfcbstatedir)/registration/providerRegister || $(INSTALL_DATA) $(DESTDIR)$(sfcbstatedir)/stage/default.reg $(DESTDIR)$(sfcbstatedir)/registration/providerRegister 
 if TEST_ENABLED
 	$(srcdir)/test/stageschema.sh -d $(srcdir)/test/schema -p $(prefix)
diff -wruN -x '*~' ../orig-sblim-sfcb-1.3.14/providerRegister.c ./providerRegister.c
--- ../orig-sblim-sfcb-1.3.14/providerRegister.c	2010-05-01 00:25:38.000000000 +0200
+++ ./providerRegister.c	2012-04-03 09:32:58.000000000 +0200
@@ -178,7 +178,7 @@
      dir = "/var/lib/sfcb/registration";
    }
 
-   strcpy(fin, dir);
+   strncpy(fin, dir, sizeof(fin)-18); /* 18 = strlen("/providerRegister")+1 */
    strcat(fin, "/providerRegister");
    in = fopen(fin, "r");
    if (in == NULL) 
@@ -192,7 +192,7 @@
       bb->ht = UtilFactory->newHashTable(61,
                   UtilHashTable_charKey | UtilHashTable_ignoreKeyCase);
 
-      while (fgets(fin, 1024, in)) {
+      while (fgets(fin, sizeof(fin), in)) {
          n++;
          if (stmt) free(stmt);
          stmt = strdup(fin);
diff -wruN -x '*~' ../orig-sblim-sfcb-1.3.14/sfcBroker.c ./sfcBroker.c
--- ../orig-sblim-sfcb-1.3.14/sfcBroker.c	2012-03-05 20:12:09.000000000 +0100
+++ ./sfcBroker.c	2012-04-03 09:32:58.000000000 +0200
@@ -637,7 +637,7 @@
 	       if (*optarg == '?') {
 		   fprintf(stdout, "---   Traceable Components:     Int       Hex\n");
 		   for (i = 0; traceIds[i].id; i++)
-		       fprintf(stdout, "--- \t%18s:    %d\t0x%05X\n", traceIds[i].id, traceIds[i].code, traceIds[i].code);
+		       fprintf(stdout, "--- \t%18s:    %d\t0x%07X\n", traceIds[i].id, traceIds[i].code, traceIds[i].code);
 		   exit(0);
 	       } else if (isdigit(*optarg)) {
 		   char *ep;