From: Chris B. <buc...@us...> - 2011-06-10 19:58:50
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv5352 Modified Files: control.c ChangeLog NEWS contributions.txt Log Message: [ 3165732 ] Add ability for client library to specify configuration file Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.588 retrieving revision 1.589 diff -u -d -r1.588 -r1.589 --- NEWS 10 Jun 2011 17:57:45 -0000 1.588 +++ NEWS 10 Jun 2011 19:58:47 -0000 1.589 @@ -16,6 +16,7 @@ - 3314383 Memory leak in CimResource_Enumerate_EP - 3047562 [patch] Create bzip2 tarballs on "make dist" - 3314762 Memory leak in method invoke using SFCB local interface +- 3165732 Add ability for client library to specify configuration file Changes in 1.3.11 ================= Index: control.c =================================================================== RCS file: /cvsroot/sblim/sfcb/control.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- control.c 9 Jun 2011 22:39:02 -0000 1.36 +++ control.c 10 Jun 2011 19:58:47 -0000 1.37 @@ -150,6 +150,7 @@ char fin[1024], *stmt = NULL; int i, m, n=0, err=0; CntlVals rv; + char *configFile; if (ct) return 0; @@ -162,12 +163,19 @@ } if (fn) { - strcpy(fin,fn); + if (strlen(fn) >= sizeof(fin)) + mlogf(M_ERROR,M_SHOW, "--- \"%s\" too long\n", fn); + strncpy(fin,fn,sizeof(fin)); } + else if ((configFile = getenv("SFCB_CONFIG_FILE")) != NULL && configFile[0] != '\0') { + if (strlen(configFile) >= sizeof(fin)) + mlogf(M_ERROR,M_SHOW, "--- \"%s\" too long\n", configFile); + strncpy(fin,configFile,sizeof(fin)); + } else { - strcpy(fin, SFCB_CONFDIR); - strcat(fin, "/sfcb.cfg"); + strncpy(fin, SFCB_CONFDIR "/sfcb.cfg", sizeof(fin)); } + fin[sizeof(fin)-1] = '\0'; if (fin[0]=='/') mlogf(M_INFO,M_SHOW,"--- Using %s\n",fin); else mlogf(M_INFO,M_SHOW,"--- Using ./%s\n",fin); Index: contributions.txt =================================================================== RCS file: /cvsroot/sblim/sfcb/contributions.txt,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- contributions.txt 10 Jun 2011 17:57:45 -0000 1.65 +++ contributions.txt 10 Jun 2011 19:58:47 -0000 1.66 @@ -187,3 +187,4 @@ Josef Moellers -------------- 11/17/2010 [ 3109469 ] Potential Buffer Overflow in msgqueue.c:localConnectServer() +06/10/2010 [ 3165732 ] Add ability for client library to specify configuration file Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.662 retrieving revision 1.663 diff -u -d -r1.662 -r1.663 --- ChangeLog 10 Jun 2011 17:57:45 -0000 1.662 +++ ChangeLog 10 Jun 2011 19:58:47 -0000 1.663 @@ -4,6 +4,10 @@ [ 3314762 ] Memory leak in method invoke using SFCB local interface (patch by Chris Poblete) + * control.c: + [ 3165732 ] Add ability for client library to specify configuration file + (patch by Josef Moellers) + 2011-06-09 Chris Buccella <buc...@li...> * control.c, cimcClientSfcbLocal.c: |