Hello community, here is the log from the commit of package sblim-sfcb checked in at Sat Sep 13 12:11:59 CEST 2008. -------- --- sblim-sfcb/sblim-sfcb.changes 2008-08-18 19:17:47.000000000 +0200 +++ /mounts/work_src_done/STABLE/sblim-sfcb/sblim-sfcb.changes 2008-09-12 06:39:02.323140000 +0200 @@ -1,0 +2,6 @@ +Wed Aug 27 10:11:54 MDT 2008 - bwhiteley@suse.de + +- update to 1.3.2preview +- Added RTLD_GLOBAL to ldflags when loading providers. + +------------------------------------------------------------------- Old: ---- sblim-sfcb-1.3.0-curl_7.18.patch sblim-sfcb-1.3.0-getErrSegment.patch sblim-sfcb-1.3.0-method_out_params.patch sblim-sfcb-1.3.0-SSL_opts.patch sblim-sfcb-1.3.0.tar.bz2 sblim-sfcb-1.3.0-XML_unescape_newline.patch New: ---- 2095972-sfcb_doesnt_start_cleanly.patch sblim-sfcb-1.3.2preview.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sblim-sfcb.spec ++++++ --- /var/tmp/diff_new_pack.W13494/_old 2008-09-13 12:11:39.000000000 +0200 +++ /var/tmp/diff_new_pack.W13494/_new 2008-09-13 12:11:39.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package sblim-sfcb (Version 1.3.0) +# spec file for package sblim-sfcb (Version 1.3.2) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -20,23 +20,19 @@ Summary: Small Footprint CIM Broker Name: sblim-sfcb -Version: 1.3.0 -Release: 23 +Version: 1.3.2 +Release: 1 Group: System/Management License: Other uncritical OpenSource License; CPL 1.0 Url: http://sblim.sf.net/ -Source0: ftp://dl.sourceforge.net/pub/s/sb/sblim/%{name}-%{version}.tar.bz2 +Source0: sblim-sfcb-1.3.2preview.tar.bz2 %if 0%{?suse_version} Source2: sblim-sfcb.init %endif -Patch0: sblim-sfcb-1.3.0-curl_7.18.patch Patch1: sblim-sfcb-1.3.0-uds_auth.patch Patch2: sblim-sfcb-1.3.0-root_only_auth.patch -Patch3: sblim-sfcb-1.3.0-method_out_params.patch -Patch4: sblim-sfcb-1.3.0-getErrSegment.patch -Patch5: sblim-sfcb-1.3.0-SSL_opts.patch -Patch6: sblim-sfcb-1.3.0-XML_unescape_newline.patch -Patch7: sblim-sfcb-1.3.0-dlopen_flags.patch +Patch3: sblim-sfcb-1.3.0-dlopen_flags.patch +Patch4: 2095972-sfcb_doesnt_start_cleanly.patch Provides: cimserver Provides: cim-server %if 0%{?suse_version} >= 1030 @@ -65,15 +61,11 @@ %prep -%setup -T -b 0 -n %{name}-%{version} -%patch0 -b .curl_7.18.patch +%setup -T -b 0 -n %{name}-1.3.2preview %patch1 -b .uds_auth.patch %patch2 -b .root_only_auth.patch -%patch3 -b .method_out_params.patch -%patch4 -b .getErrSegment.patch -%patch5 -b .SSL_opts.patch -%patch6 -b .XML_unescape_newline.patch -%patch7 -b .dlopen_flags.patch +%patch3 -b .dlopen_flags.patch +%patch4 -b .2095972-sfcb_doesnt_start_cleanly.patch export PATCH_GET=0 %build @@ -149,6 +141,9 @@ %files -f _pkg_list %changelog +* Wed Aug 27 2008 bwhiteley@suse.de +- update to 1.3.2preview +- Added RTLD_GLOBAL to ldflags when loading providers. * Mon Aug 18 2008 bwhiteley@suse.de - don't remove buildroot in %%install * Mon Aug 11 2008 bwhiteley@suse.de ++++++ 2095972-sfcb_doesnt_start_cleanly.patch ++++++ Index: control.c =================================================================== RCS file: /cvsroot/sblim/sfcb/control.c,v retrieving revision 1.23 diff -u -p -r1.23 control.c --- control.c 11 Jul 2008 22:12:28 -0000 1.23 +++ control.c 5 Sep 2008 23:53:57 -0000 @@ -208,6 +208,11 @@ int getControlChars(char *id, char **val { Control *ctl; int rc = -1; + + if (ct == NULL) { + setupControl(configfile); + } + if ((ctl = ct->ft->get(ct, id))) { if (ctl->type == 0 || ctl->type == 3) { *val = ctl->strValue; @@ -223,6 +228,11 @@ int getControlNum(char *id, long *val) { Control *ctl; int rc = -1; + + if (ct == NULL) { + setupControl(configfile); + } + if ((ctl = ct->ft->get(ct, id))) { if (ctl->type == 1) { *val = strtol(ctl->strValue,NULL,0); ++++++ sblim-sfcb-1.3.0-dlopen_flags.patch ++++++ --- /var/tmp/diff_new_pack.W13494/_old 2008-09-13 12:11:39.000000000 +0200 +++ /var/tmp/diff_new_pack.W13494/_new 2008-09-13 12:11:39.000000000 +0200 @@ -1,6 +1,6 @@ ---- ./providerDrv.c.orig 2008-08-13 21:34:42.000000000 -0600 -+++ ./providerDrv.c 2008-08-13 21:34:57.000000000 -0600 -@@ -2586,7 +2586,7 @@ +--- ./providerDrv.c.dlopen_flags.patch 2008-05-29 20:45:52.000000000 -0600 ++++ ./providerDrv.c 2008-08-27 10:00:02.000000000 -0600 +@@ -2593,7 +2593,7 @@ while (dir) { libraryName(dir, (char *) info->location, fullname); if (stat(fullname,&stbuf) == 0) { ++++++ sblim-sfcb-1.3.0-uds_auth.patch ++++++ --- /var/tmp/diff_new_pack.W13494/_old 2008-09-13 12:11:39.000000000 +0200 +++ /var/tmp/diff_new_pack.W13494/_new 2008-09-13 12:11:39.000000000 +0200 @@ -1,351 +1,11 @@ ---- ./control.c.uds_auth.patch 2007-11-12 17:47:59.000000000 -0700 -+++ ./control.c 2008-05-28 20:08:17.000000000 -0600 -@@ -59,6 +59,7 @@ - Control init[] = { - {"httpPort", 1, "5988"}, - {"enableHttp", 2, "true"}, -+ {"enableUds", 2, "true"}, - {"httpProcs", 1, "8"}, - {"httpsPort", 1, "5989"}, - {"enableHttps", 2, "false"}, -@@ -78,6 +79,7 @@ - {"provProcs", 1, "32"}, - {"basicAuthLib", 0, "sfcBasicAuthentication"}, - {"doBasicAuth", 2, "false"}, -+ {"doUdsAuth", 2, "false"}, - - {"useChunking", 2, "false"}, - {"chunkSize", 1, "50000"}, -@@ -100,6 +102,7 @@ - {"sslClientCertificate", 0, "ignore" }, - {"certificateAuthLib", 0, "sfcCertificateAuthentication"}, - {"localSocketPath", 0, "/tmp/sfcbLocalSocket"}, -+ {"httpSocketPath", 0, "/tmp/sfcbHttpSocket"}, - - {"traceFile", 0, "stderr"}, - {"traceLevel", 1, "0"}, ---- ./sfcb.cfg.pre.in.uds_auth.patch 2007-02-22 09:04:27.000000000 -0700 -+++ ./sfcb.cfg.pre.in 2008-05-28 20:08:17.000000000 -0600 -@@ -2,12 +2,14 @@ +--- ./sfcb.cfg.pre.in.orig 2008-08-27 09:54:44.000000000 -0600 ++++ ./sfcb.cfg.pre.in 2008-08-27 09:55:06.000000000 -0600 +@@ -2,7 +2,7 @@ # Sample Configuration for Small Footprint CIM Broker httpPort: 5988 enableHttp: @SFCB_CONF_HTTP@ +-enableUds: false +enableUds: true httpProcs: 8 httpsPort: 5989 enableHttps: @SFCB_CONF_HTTPS@ - httpsProcs: 8 - provProcs: 32 - doBasicAuth: @SFCB_CONF_DOBASICAUTH@ -+doUdsAuth: true - basicAuthLib: @SFCB_CONF_BASICAUTHLIB@ - useChunking: true - keepaliveTimeout: 1 ---- ./sfcBroker.c.uds_auth.patch 2008-04-07 13:35:08.000000000 -0600 -+++ ./sfcBroker.c 2008-05-28 20:08:17.000000000 -0600 -@@ -533,7 +533,7 @@ - int c, i; - long tmask = 0, sslMode=0,sslOMode=0, tracelevel=0; - char * tracefile = NULL; -- int enableHttp=0,enableHttps=0,useChunking=0,doBa=0,enableInterOp=0,httpLocalOnly=0; -+ int enableUds=0,enableHttp=0,enableHttps=0,useChunking=0,doBa=0,enableInterOp=0,httpLocalOnly=0; - long dSockets,sSockets,pSockets; - char *pauseStr; - -@@ -656,13 +656,16 @@ - - if (getControlBool("enableHttp", &enableHttp)) - enableHttp=1; -+ -+ if (getControlBool("enableUds", &enableUds)) -+ enableUds=1; - - #if defined USE_SSL - if (getControlBool("enableHttps", &enableHttps)) - enableHttps=0; - - sslMode=enableHttps; -- sslOMode=sslMode & !enableHttp; -+ sslOMode=sslMode & !enableHttp & !enableUds; - #else - mlogf(M_INFO,M_SHOW,"--- SSL not configured\n"); - enableHttps=0; ---- ./httpAdapter.c.uds_auth.patch 2008-04-02 10:00:26.000000000 -0600 -+++ ./httpAdapter.c 2008-05-28 20:27:58.000000000 -0600 -@@ -62,6 +62,7 @@ - static char *name; - static int debug; - static int doBa; -+static int doUdsAuth; - static int doFork = 0; - int noChunking = 0; - int sfcbSSLMode = 0; -@@ -800,7 +801,17 @@ - } - #endif - -- if (!discardInput && doBa) { -+ int authorized = 0; -+ if (!discardInput && doUdsAuth) { -+ struct ucred cr; -+ int cl = sizeof(cr); -+ if (getsockopt(conn_fd.socket, SOL_SOCKET, SO_PEERCRED, &cr, &cl) == 0) { -+ if (cr.uid == 0) { -+ authorized = 1; -+ } -+ } -+ } -+ if (!authorized && !discardInput && doBa) { - if (!(inBuf.authorization && baValidate(inBuf.authorization,&inBuf.principal))) { - char more[]="WWW-Authenticate: Basic realm=\"cimom\"\r\n"; - genError(conn_fd, &inBuf, 401, "Unauthorized", more); -@@ -1355,12 +1366,18 @@ - #else - struct sockaddr_in sin; - #endif -+ struct sockaddr_un sun; - -- socklen_t sz,sin_len; -- int i,ru; -+ socklen_t sz,sin_len,sun_len; -+ int i,ru,rc; - char *cp; - long procs, port; -- int listenFd, connFd; -+ int listenFd=-1, udsListenFd=-1, connFd; -+ int enableUds=0,enableHttp=0; -+ fd_set httpfds; -+ int maxfdp1; -+ -+ static char *udsPath=NULL; - - name = argv[0]; - debug = 1; -@@ -1382,6 +1399,8 @@ - else { - if (getControlNum("httpPort", &port)) - port = 5988; -+ if (getControlChars("httpSocketPath", &udsPath)) -+ udsPath = "/tmp/sfcbHttpSocket"; - hBase=htBase; - hMax=htMax; - } -@@ -1392,12 +1411,23 @@ - } else { - if (getControlNum("httpProcs", &procs)) - procs = 10; -+ if (getControlBool("enableHttp", &enableHttp)) -+ enableHttp=1; -+ if (getControlBool("enableUds", &enableUds)) -+ enableUds=1; -+ if (!enableUds) -+ udsPath = NULL; -+ if (!enableHttp) -+ port = -1; - } - initHttpProcCtl(procs,sslMode); - - if (getControlBool("doBasicAuth", &doBa)) - doBa=0; - -+ if (getControlBool("doUdsAuth", &doUdsAuth)) -+ doUdsAuth=0; -+ - if (getControlNum("keepaliveTimeout", &keepaliveTimeout)) - keepaliveTimeout = 15; - -@@ -1439,11 +1469,12 @@ - - if (sslMode) mlogf(M_INFO,M_SHOW,"--- %s HTTPS Daemon V" sfcHttpDaemonVersion " started - %d - port %ld\n", - name, currentProc,port); -- else mlogf(M_INFO,M_SHOW,"--- %s HTTP Daemon V" sfcHttpDaemonVersion " started - %d - port %ld\n", -- name, currentProc,port); -+ else mlogf(M_INFO,M_SHOW,"--- %s HTTP Daemon V" sfcHttpDaemonVersion " started - %d - port %ld, %s\n", -+ name, currentProc,port,udsPath); - - - if (doBa) mlogf(M_INFO,M_SHOW,"--- Using Basic Authentication\n"); -+ if (doUdsAuth) mlogf(M_INFO,M_SHOW,"--- Using Unix Socket Peer Cred Authentication\n"); - - if (keepaliveTimeout == 0) { - mlogf(M_INFO,M_SHOW,"--- Keep-alive timeout disabled\n"); -@@ -1452,51 +1483,80 @@ - mlogf(M_INFO,M_SHOW,"--- Maximum requests per connection: %ld\n",keepaliveMaxRequest); - } - --#ifdef USE_INET6 -- listenFd = socket(PF_INET6, SOCK_STREAM, IPPROTO_TCP); -- if (listenFd < 0) { -- mlogf(M_INFO,M_SHOW,"--- Using IPv4 address\n"); -- listenFd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); -+ ru = 1; -+ if (enableUds) { -+ udsListenFd = socket(PF_UNIX, SOCK_STREAM, 0); - } -+ if (enableHttp || sslMode) { -+#ifdef USE_INET6 -+ listenFd = socket(PF_INET6, SOCK_STREAM, IPPROTO_TCP); -+ if (listenFd < 0) { -+ mlogf(M_INFO,M_SHOW,"--- Using IPv4 address\n"); -+ listenFd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); -+ } - #else -- listenFd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); -+ listenFd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); - #endif -+ setsockopt(listenFd, SOL_SOCKET, SO_REUSEADDR, (char *) &ru, sizeof(ru)); -+ } - - sin_len = sizeof(sin); -- -- ru = 1; -- setsockopt(listenFd, SOL_SOCKET, SO_REUSEADDR, (char *) &ru, sizeof(ru)); -+ sun_len = sizeof(sun); - - memset(&sin,0,sin_len); -+ memset(&sun,0,sun_len); -+ -+ if (udsListenFd >= 0) { -+ if (getControlChars("httpSocketPath", &udsPath)) { -+ mlogf(M_ERROR,M_SHOW,"--- No unix socket path defined for HTTP\n"); -+ sleep(1); -+ kill(sfcbPid,3); -+ } -+ sun.sun_family=AF_UNIX; -+ strcpy(sun.sun_path,udsPath); -+ } - -- if (getControlBool("httpLocalOnly", &httpLocalOnly)) -- httpLocalOnly=0; -+ if (listenFd >= 0) { -+ if (getControlBool("httpLocalOnly", &httpLocalOnly)) -+ httpLocalOnly=0; - - #ifdef USE_INET6 -- sin.sin6_family = AF_INET6; -- if (httpLocalOnly) -- sin.sin6_addr = in6addr_loopback; -- else -- sin.sin6_addr = in6addr_any; -- sin.sin6_port = htons(port); -+ sin.sin6_family = AF_INET6; -+ if (httpLocalOnly) -+ sin.sin6_addr = in6addr_loopback; -+ else -+ sin.sin6_addr = in6addr_any; -+ sin.sin6_port = htons(port); - #else -- sin.sin_family = AF_INET; -- if (httpLocalOnly) { -- char* loopback_int = "127.0.0.1"; -- inet_aton(loopback_int, &sin.sin_addr); /* not INADDR_LOOPBACK ? */ -- } -- else -- sin.sin_addr.s_addr = INADDR_ANY; -- sin.sin_port = htons(port); -+ sin.sin_family = AF_INET; -+ if (httpLocalOnly) { -+ char* loopback_int = "127.0.0.1"; -+ inet_aton(loopback_int, &sin.sin_addr); /* not INADDR_LOOPBACK ? */ -+ } -+ else -+ sin.sin_addr.s_addr = INADDR_ANY; -+ sin.sin_port = htons(port); - #endif -- -- if (bind(listenFd, (struct sockaddr *) &sin, sin_len) || -- listen(listenFd, 0)) { -- mlogf(M_ERROR,M_SHOW,"--- Cannot listen on port %ld (%s)\n", port, strerror(errno)); -- sleep(1); -- kill(sfcbPid,3); - } - -+ if (listenFd >= 0) { -+ if (bind(listenFd, (struct sockaddr *) &sin, sin_len) || -+ listen(listenFd, 10)) { -+ mlogf(M_ERROR,M_SHOW,"--- Cannot listen on port %ld (%s)\n", port, strerror(errno)); -+ sleep(1); -+ kill(sfcbPid,3); -+ } -+ } -+ if (udsListenFd >= 0) { -+ unlink(udsPath); -+ if (bind(udsListenFd, (struct sockaddr *) &sun, sun_len) || -+ listen(udsListenFd, 10)) { -+ mlogf(M_ERROR,M_SHOW,"--- Cannot listen on unix socket %s (%s)\n", udsPath, strerror(errno)); -+ sleep(1); -+ kill(sfcbPid,3); -+ } -+ } -+ - if (!debug) { - int rc = fork(); - if (rc == -1) { -@@ -1558,23 +1618,56 @@ - } - #endif - -+ maxfdp1 = (listenFd > udsListenFd? listenFd : udsListenFd) + 1; - for (;;) { -- char *emsg; -- listen(listenFd, 1); -- sz = sizeof(sin); -- if ((connFd = accept(listenFd, (__SOCKADDR_ARG) & sin, &sz))<0) { -+ char *emsg; -+ // listen(listenFd, 1); -+ FD_ZERO(&httpfds); -+ if (listenFd >= 0) { -+ FD_SET(listenFd, &httpfds); -+ } -+ if (udsListenFd >= 0) { -+ FD_SET(udsListenFd, &httpfds); -+ } -+ rc = select(maxfdp1, &httpfds, NULL, NULL, NULL); -+ if (rc < 0) { - if (errno == EINTR || errno == EAGAIN) { - if (stopAccepting) break; - continue; -- } -- emsg=strerror(errno); -- mlogf(M_ERROR,M_SHOW,"--- accept error %s\n",emsg); -- _SFCB_ABORT(); -+ } - } -- _SFCB_TRACE(1, ("--- Processing http request")); -+ if (listenFd >= 0 && FD_ISSET(listenFd, &httpfds)) { -+ sz = sin_len; -+ if ((connFd = accept(listenFd, (__SOCKADDR_ARG) &sin, &sz))<0) { -+ if (errno == EINTR || errno == EAGAIN) { -+ if (stopAccepting) break; -+ continue; -+ } -+ emsg=strerror(errno); -+ mlogf(M_ERROR,M_SHOW,"--- accept error %s\n",emsg); -+ _SFCB_ABORT(); -+ } -+ _SFCB_TRACE(1, ("--- Processing http request")); - -- handleHttpRequest(connFd); -- close(connFd); -+ handleHttpRequest(connFd); -+ close(connFd); -+ } -+ if (udsListenFd >= 0 && FD_ISSET(udsListenFd, &httpfds)) { -+ sz = sun_len; -+ if ((connFd = accept(udsListenFd, (__SOCKADDR_ARG) &sun, &sz))<0) { -+ if (errno == EINTR || errno == EAGAIN) { -+ if (stopAccepting) break; -+ continue; -+ } -+ emsg=strerror(errno); -+ mlogf(M_ERROR,M_SHOW,"--- accept error %s\n",emsg); -+ _SFCB_ABORT(); -+ } -+ _SFCB_TRACE(1, ("--- Processing http request")); -+ -+ handleHttpRequest(connFd); -+ close(connFd); -+ } - } - - remProcCtl(); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org