From: Chris B. <buc...@us...> - 2010-11-10 23:48:33
|
Update of /cvsroot/sblim/sfcb In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv12636 Modified Files: cimcClientSfcbLocal.c ChangeLog NEWS Log Message: [ 3097310 ] localConnect in cimcClientSfcbLocal.c accesses free'd memory Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.560 retrieving revision 1.561 diff -u -d -r1.560 -r1.561 --- NEWS 10 Nov 2010 20:30:33 -0000 1.560 +++ NEWS 10 Nov 2010 23:48:25 -0000 1.561 @@ -8,6 +8,7 @@ - 3101155 Failed to load provider libraries due to symbol conflicts - 3101148 SfcbLocal method parameter type conversion and validation - 3101154 Daemon clients failed SfcbLocal connect due to permission +- 3097310 localConnect in cimcClientSfcbLocal.c accesses free'd memory Changes in 1.3.9 ================ Index: cimcClientSfcbLocal.c =================================================================== RCS file: /cvsroot/sblim/sfcb/cimcClientSfcbLocal.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- cimcClientSfcbLocal.c 8 Nov 2010 23:43:14 -0000 1.37 +++ cimcClientSfcbLocal.c 10 Nov 2010 23:48:25 -0000 1.38 @@ -1802,6 +1802,7 @@ int localConnect(ClientEnv* ce, CMPIStatus *st) { static struct sockaddr_un serverAddr; + serverAddr.sun_path[0] = '\0'; int sock,rc=0,sfcbSocket; void *idData; unsigned long int l; @@ -1829,20 +1830,25 @@ if (socketName==NULL) { setupControl(NULL); rc=getControlChars("localSocketPath", &socketName); - sunsetControl(); - if (rc) { + if (rc == 0) { + strcpy(serverAddr.sun_path,socketName); + sunsetControl(); + } + else { if (st) { st->rc=CMPI_RC_ERR_FAILED; st->msg=ce->ft->newString(ce,"failed to open sfcb local socket",NULL); } fprintf(stderr,"--- Failed to open sfcb local socket (%d)\n",rc); + sunsetControl(); close(sock); CONNECT_UNLOCK_RETURN(-2); } } serverAddr.sun_family=AF_UNIX; - strcpy(serverAddr.sun_path,socketName); + if (serverAddr.sun_path == '\0') + strcpy(serverAddr.sun_path,socketName); if (connect(sock,(struct sockaddr*)&serverAddr, sizeof(serverAddr.sun_family)+strlen(serverAddr.sun_path))<0) { Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.633 retrieving revision 1.634 diff -u -d -r1.633 -r1.634 --- ChangeLog 10 Nov 2010 20:30:32 -0000 1.633 +++ ChangeLog 10 Nov 2010 23:48:25 -0000 1.634 @@ -1,5 +1,8 @@ 2010-11-10 Chris Buccella <buc...@li...> + * cimcClientSfcbLocal.c: + [ 3097310 ] localConnect in cimcClientSfcbLocal.c accesses free'd memory + * control.c, msgqueue.c, sfcb.cfg.pre.in: [ 3101154 ] Daemon clients failed SfcbLocal connect due to permission (patch by Chris Poblete) |