File pending-upstream.patch of Package sblim-sfcb
diff -wruN -x '*~' ../orig-sblim-sfcb-1.3.16/cimcClientSfcbLocal.c ./cimcClientSfcbLocal.c
--- ../orig-sblim-sfcb-1.3.16/cimcClientSfcbLocal.c 2012-12-06 00:29:02.000000000 +0100
+++ ./cimcClientSfcbLocal.c 2012-12-22 16:03:56.699719824 +0100
@@ -214,7 +214,6 @@
if (cl->connection) CMRelease(cl->connection);
free(cl);
- closeLogging();
return rc;
}
@@ -1921,6 +1920,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.16/configure.ac ./configure.ac
--- ../orig-sblim-sfcb-1.3.16/configure.ac 2012-12-21 23:12:47.000000000 +0100
+++ ./configure.ac 2012-12-22 16:03:56.703719825 +0100
@@ -24,12 +24,14 @@
AC_INIT(Small Footprint CIM Broker, 1.3.16, 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.16/fileRepository.c ./fileRepository.c
--- ../orig-sblim-sfcb-1.3.16/fileRepository.c 2012-03-08 22:20:27.000000000 +0100
+++ ./fileRepository.c 2012-12-22 16:03:56.703719825 +0100
@@ -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.16/Makefile.am ./Makefile.am
--- ../orig-sblim-sfcb-1.3.16/Makefile.am 2012-08-14 23:13:23.000000000 +0200
+++ ./Makefile.am 2012-12-22 16:03:56.703719825 +0100
@@ -616,7 +616,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.16/providerRegister.c ./providerRegister.c
--- ../orig-sblim-sfcb-1.3.16/providerRegister.c 2010-05-01 00:25:38.000000000 +0200
+++ ./providerRegister.c 2012-12-22 16:03:56.703719825 +0100
@@ -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.16/sfcBroker.c ./sfcBroker.c
--- ../orig-sblim-sfcb-1.3.16/sfcBroker.c 2012-11-21 18:18:04.000000000 +0100
+++ ./sfcBroker.c 2012-12-22 16:03:56.707719825 +0100
@@ -637,7 +640,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;