From: Chris B. <buc...@us...> - 2013-09-20 20:12:17
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "sfcb - Small Footprint CIM Broker". The branch, master has been updated via 369f536e58e5153cca68f0cf11bf02a055b6b30d (commit) via db99e571ab1c6107a313142248070e48337aa1ac (commit) via 10a7037b1bae925fed1df44ce4e68c8416a4114e (commit) from 66e4ab23134da838dec62f3d028de32652cc79ab (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 369f536e58e5153cca68f0cf11bf02a055b6b30d Author: buccella <buc...@li...> Date: Fri Sep 20 15:54:02 2013 -0400 [sfcb-tix:#75] fileRepository: show which directory could not be opened commit db99e571ab1c6107a313142248070e48337aa1ac Author: buccella <buc...@li...> Date: Fri Sep 20 14:33:27 2013 -0400 [sfcb-tix:#74] providerRegister: check for and prevent buffer overflows commit 10a7037b1bae925fed1df44ce4e68c8416a4114e Author: buccella <buc...@li...> Date: Fri Sep 20 14:16:05 2013 -0400 [sfcb-tix:#72] Make systemddir configurable ----------------------------------------------------------------------- Summary of changes: Makefile.am | 2 +- configure.ac | 5 +++++ contributions.txt | 3 +++ fileRepository.c | 2 +- providerRegister.c | 4 ++-- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index aa5074e..7b9a222 100644 --- a/Makefile.am +++ b/Makefile.am @@ -30,7 +30,7 @@ initdir=$(sysconfdir)/init.d pamdir=$(sysconfdir)/pam.d sfcblibdir=$(libdir)/sfcb cmpilibdir=$(libdir)/cmpi -systemddir=$(prefix)/share/systemd +systemddir=$(DESTDIR)@SYSTEMDDIR@ MANFILES=man/genSslCert.1 man/getSchema.1 man/sfcbd.1 man/sfcbmof.1 \ man/sfcbrepos.1 man/sfcbstage.1 man/sfcbunstage.1 man/sfcbuuid.1 \ diff --git a/configure.ac b/configure.ac index ee96ad8..98b7c2a 100644 --- a/configure.ac +++ b/configure.ac @@ -158,6 +158,11 @@ AC_SUBST(CIMSCHEMA_SUBDIRS) AC_DISABLE_STATIC +if test "$SYSTEMDDIR" == "" ; then + SYSTEMDDIR=$(prefix)/share/systemd +fi +AC_SUBST(SYSTEMDDIR) + if test "$enable_debug" != "yes" ; then CFLAGS="`echo $CFLAGS | sed -e 's/-g//'`" CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-g//'`" diff --git a/contributions.txt b/contributions.txt index 560514f..1136eac 100644 --- a/contributions.txt +++ b/contributions.txt @@ -120,6 +120,9 @@ Klaus Kampf, Novell 01/05/2013 [ 3599329 ] dlopen failed for sfcbCustomLib 01/15/2013 [ 3599437 ] missing include of <sys/resource.h> 09/18/2013 [sfcb-tix:#69] Fix logger for long-lived clients, was: "#2347 Don't spawn logger for clients" +09/20/2013 [sfcb-tix:#72] Make systemddir configurable +09/20/2013 [sfcb-tix:#74] providerRegister: check for and prevent buffer overflows +09/20/2013 [sfcb-tix:#75] fileRepository: show which directory could not be opened Mike Brasher, Inova ------------------- diff --git a/fileRepository.c b/fileRepository.c index 0a43ee7..97783d5 100644 --- a/fileRepository.c +++ b/fileRepository.c @@ -737,7 +737,7 @@ existingNameSpace(const char *ns) #endif if ((d = opendir(fn)) == NULL) { - perror("opendir"); + fprintf(stderr, "opendir: %s: %s\n", fn, strerror(errno)); return 0; } closedir(d); diff --git a/providerRegister.c b/providerRegister.c index 9930046..78d0f7b 100644 --- a/providerRegister.c +++ b/providerRegister.c @@ -191,7 +191,7 @@ newProviderRegister() 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) @@ -206,7 +206,7 @@ newProviderRegister() UtilHashTable_charKey | UtilHashTable_ignoreKeyCase); - while (fgets(fin, 1024, in)) { + while (fgets(fin, sizeof(fin), in)) { n++; if (stmt) free(stmt); hooks/post-receive -- sfcb - Small Footprint CIM Broker |