Hello community,

here is the log from the commit of package openwsman for openSUSE:Factory 
checked in at 2012-11-08 21:50:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openwsman (Old)
 and      /work/SRC/openSUSE:Factory/.openwsman.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "openwsman", Maintainer is "prus...@suse.com"

Changes:
--------
--- /work/SRC/openSUSE:Factory/openwsman/openwsman.changes      2012-09-14 
12:44:51.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.openwsman.new/openwsman.changes 2012-11-08 
21:50:58.000000000 +0100
@@ -1,0 +2,22 @@
+Wed Oct 10 07:23:50 UTC 2012 - kkae...@suse.com
+
+- Update to 2.3.6
+  - Features
+    - Plugins: Ability to redirect requests to a different WS-Management
+      server (Praveen Paladugu)
+  - Bugfixes
+    - Fix xml namespace in Fault message (Praveen Paladugu)
+    - Pass correct key values when creating a Cim_IndicationSubscription
+      (Santosh Bidaralli)
+    - verify_class_namespace: properly check for 'CIM' class schema
+      (Mayur Bhosle)
+    - Fix MaxElements namespace in Pull context (Praveen Paladugu)
+  - Bindings
+    - Ruby: fix crash in Options destructor
+    - Ruby: mark passing arrays via invoke as unsupported
+  - Building
+    - new cmake option: BUILD_BINDINGS (defaults to yes)
+    - honor BUILD_TESTS for all test directories 
+    - fix MaxcOS build (Dan Villiom Podlaski Christiansen)
+
+-------------------------------------------------------------------

Old:
----
  openwsman-2.3.5.tar.bz2

New:
----
  openwsman-2.3.6.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ openwsman.spec ++++++
--- /var/tmp/diff_new_pack.WB61O1/_old  2012-11-08 21:51:03.000000000 +0100
+++ /var/tmp/diff_new_pack.WB61O1/_new  2012-11-08 21:51:03.000000000 +0100
@@ -54,6 +54,7 @@
 BuildRequires:  pkgconfig
 BuildRequires:  ruby
 
+# RHEL6 is missing ruby-devel in OBS
 %if 0%{?rhel_version} != 600
 BuildRequires:  ruby-devel
 %if 0%{?fedora} != 17
@@ -88,7 +89,7 @@
 
 %if 0%{?suse_version} > 910
 BuildRequires:  ruby-devel
-%if 0%{?suse_version} < 1120
+%if 0%{?suse_version} < 1110
 # SLE 10 has Ruby 1.8.6 and runs into 
http://help.rubygems.org/discussions/problems/859-trying-to-install-rubygems
 BuildRequires:  rubygems <= 1.3.7
 %else
@@ -109,7 +110,7 @@
 %endif
 
 Requires(pre):  sed coreutils grep /bin/hostname
-Version:        2.3.5
+Version:        2.3.6
 Release:        0
 # Mandriva:
 # Release %mkrel 1
@@ -221,7 +222,7 @@
 %else
 # SLES 10 can't parse this :-/
 %if 0%{?ruby_sitelib} == 0
-%if ((0%{?fedora}>0) && (0%{?fedora} < 16)) || ((0%{?centos_version}>0) && 
(0%{?centos_version} < 600)) || ((0%{?rhel_version}>0) && (0%{?rhel_version} < 
500))
+%if (0%{?fedora} && 0%{?fedora} < 16) || (0%{?centos_version} && 
0%{?centos_version}<600) || (0%{?rhel_version} && 0%{?rhel_version}<500)
 # Fedora15, RHEL-5 and CentOS-5 don't have vendor lib
 # CMAKE checks for "ruby -r vendor-specific" and fails
 %{!?ruby_sitelib: %global ruby_sitelib %(ruby -r rbconfig -e 
'print(RbConfig::CONFIG["sitelibdir"])')}
@@ -332,11 +333,12 @@
 
 %post -n libwsman1 -p /sbin/ldconfig
 
-%postun -n libwsman1 -p /sbin/ldconfig
+%postun -n libwsman1
+/sbin/ldconfig
+exit 0
 
 # follow http://en.opensuse.org/openSUSE:Systemd_packaging_guidelines
 %if 0%{?has_systemd}
-
 %pre server
 if [-f /var/lib/systemd/migrated/%{name}]; then
 %service_add_pre %{name}.service
@@ -405,6 +407,7 @@
 %{python_sitearch}/*.so
 %{python_sitearch}/*.py*
 
+# RHEL6 is missing ruby-devel in OBS
 %if 0%{?rhel_version} != 600
 
 %files ruby

++++++ openwsman-2.3.5.tar.bz2 -> openwsman-2.3.6.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openwsman-2.3.5/CMakeLists.txt 
new/openwsman-2.3.6/CMakeLists.txt
--- old/openwsman-2.3.5/CMakeLists.txt  2012-08-11 23:01:46.000000000 +0200
+++ new/openwsman-2.3.6/CMakeLists.txt  2012-10-25 16:02:50.000000000 +0200
@@ -99,11 +99,13 @@
 SET( BUILD_RUBY_EXPLICIT ${BUILD_RUBY})
 SET( BUILD_PERL_EXPLICIT ${BUILD_PERL})
 SET( BUILD_JAVA_EXPLICIT ${BUILD_JAVA})
+SET( BUILD_SWIG_PLUGIN_EXPLICIT ${BUILD_SWIG_PLUGIN})
 
 # options
 
 OPTION( BUILD_LIBCIM "Build CIM plugin" YES )
 OPTION( BUILD_EXAMPLES "Build examples" YES )
+OPTION( BUILD_BINDINGS "Build client bindings and swig server plugin" YES )
 OPTION( BUILD_PYTHON "Build Python bindings" YES )
 OPTION( BUILD_RUBY "Build Ruby bindings" YES )
 IF( BUILD_RUBY )
@@ -119,6 +121,8 @@
 OPTION( ENABLE_EVENTING_SUPPORT "WS-Eventing wanted" YES )
 OPTION( WSMAN_DEBUG_VERBOSE "Verbose debug logging" NO )
 OPTION( ENABLE_IPV6 "Enable IPv6 support" YES )
+OPTION( BUILD_TESTS "Build tests" YES )
+
 
 IF (ENABLE_EVENTING_SUPPORT)
   SET(ENABLE_EVENTING_SUPPORT 1)
@@ -222,17 +226,25 @@
 ENDIF( BUILD_JAVA )
 
 # swig
-
-FIND_PACKAGE(SWIG)
-IF( NOT SWIG_EXECUTABLE)
-  FIND_PROGRAM(SWIG_EXECUTABLE
-    NAMES swig-1.3 swig
-    PATHS ${SWIG_DIR} ${SWIG_DIR}/.. ${SWIG_DIR}/../../bin /usr/bin 
/usr/local/bin ${CMAKE_INSTALL_PREFIX}/bin
-  )
-ENDIF( NOT SWIG_EXECUTABLE)
+IF( BUILD_BINDINGS )
+  FIND_PACKAGE(SWIG)
+  IF( NOT SWIG_EXECUTABLE)
+    FIND_PROGRAM(SWIG_EXECUTABLE
+      NAMES swig-1.3 swig
+      PATHS ${SWIG_DIR} ${SWIG_DIR}/.. ${SWIG_DIR}/../../bin /usr/bin 
/usr/local/bin ${CMAKE_INSTALL_PREFIX}/bin
+    )
+  ENDIF( NOT SWIG_EXECUTABLE)
+ENDIF( BUILD_BINDINGS )
 
 IF ( NOT SWIG_EXECUTABLE )
-  MESSAGE( STATUS "SWIG not found, skipping bindings." )
+  MESSAGE( STATUS "SWIG not found, skipping bindings and swig server plugin." )
+  IF (BUILD_SWIG_PLUGIN_EXPLICIT)
+    MESSAGE( FATAL "Cannot build SWIG server plugin" )
+  ENDIF (BUILD_SWIG_PLUGIN_EXPLICIT)
+  SET( BUILD_SWIG_PLUGIN NO )
+  IF( BUILD_PYTHON_EXPLICIT OR BUILD_RUBY_EXPLICIT OR BUILD_PERL_EXPLICIT OR 
BUILD_JAVA_EXPLICIT)
+    MESSAGE( ERROR "Cannot build client bindings" )
+  ENDIF( BUILD_PYTHON_EXPLICIT OR BUILD_RUBY_EXPLICIT OR BUILD_PERL_EXPLICIT 
OR BUILD_JAVA_EXPLICIT)
 ELSE ( NOT SWIG_EXECUTABLE )
   MESSAGE( STATUS "SWIG found at ${SWIG_EXECUTABLE}" )
   ADD_SUBDIRECTORY(bindings)
@@ -473,8 +485,10 @@
 add_subdirectory(src)
 add_subdirectory(doc)
 add_subdirectory(etc)
-add_subdirectory(tests)
 
+IF ( BUILD_TESTS )
+add_subdirectory(tests)
+ENDIF ( BUILD_TESTS )
 
 IF ( BUILD_EXAMPLES )
 add_subdirectory(examples)
@@ -482,8 +496,8 @@
 
 INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/include )
 
-SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Woverloaded-virtual" )
-SET( CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -g -Wall" )
+SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Woverloaded-virtual 
-Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes 
-Wnested-externs -Wpointer-arith -Wunused -Werror" )
+SET( CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -g -Wall -Wstrict-prototypes 
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith 
-Wunused -Werror" )
 SET( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -O3" )
 SET( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -O3" )
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openwsman-2.3.5/ChangeLog 
new/openwsman-2.3.6/ChangeLog
--- old/openwsman-2.3.5/ChangeLog       2012-08-11 23:01:46.000000000 +0200
+++ new/openwsman-2.3.6/ChangeLog       2012-10-10 09:29:29.000000000 +0200
@@ -1,7 +1,21 @@
 2.3.6
+- Features
+  - Plugins: Ability to redirect requests to a different WS-Management
+    server (Praveen Paladugu)
+- Bugfixes
+  - Fix xml namespace in Fault message (Praveen Paladugu)
+  - Pass correct key values when creating a Cim_IndicationSubscription
+    (Santosh Bidaralli)
+  - verify_class_namespace: properly check for 'CIM' class schema
+    (Mayur Bhosle)
+  - Fix MaxElements namespace in Pull context (Praveen Paladugu)
 - Bindings
   - Ruby: fix crash in Options destructor
-
+  - Ruby: mark passing arrays via invoke as unsupported
+- Building
+  - new cmake option: BUILD_BINDINGS (defaults to yes)
+  - honor BUILD_TESTS for all test directories 
+          
 2.3.5
 - Bugfixes
   - Release serializer lock only after use (Satya Chittidi)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openwsman-2.3.5/README.md 
new/openwsman-2.3.6/README.md
--- old/openwsman-2.3.5/README.md       2012-08-11 23:01:46.000000000 +0200
+++ new/openwsman-2.3.6/README.md       2012-11-07 10:23:13.000000000 +0100
@@ -29,7 +29,7 @@
 can be run in the foreground with debugging messages printed to stdout
 as well. This the help output when you run:
 
-    /usr/local/sbin/openwsmand --help
+    /usr/sbin/openwsmand --help
     Usage:
     openwsmand [OPTION...] WS-Management Server
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openwsman-2.3.5/VERSION.cmake 
new/openwsman-2.3.6/VERSION.cmake
--- old/openwsman-2.3.5/VERSION.cmake   2012-08-11 23:01:46.000000000 +0200
+++ new/openwsman-2.3.6/VERSION.cmake   2012-09-28 11:32:50.000000000 +0200
@@ -47,7 +47,7 @@
 # Package version 2.3.0
 SET(OPENWSMAN_MAJOR "2")
 SET(OPENWSMAN_MINOR "3")
-SET(OPENWSMAN_PATCH "5")
+SET(OPENWSMAN_PATCH "6")
 
 # Plugin API 2.2
 SET(OPENWSMAN_PLUGIN_API_MAJOR "2")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openwsman-2.3.5/autoconfiscate.sh 
new/openwsman-2.3.6/autoconfiscate.sh
--- old/openwsman-2.3.5/autoconfiscate.sh       2012-08-11 23:01:46.000000000 
+0200
+++ new/openwsman-2.3.6/autoconfiscate.sh       2012-10-25 15:12:13.000000000 
+0200
@@ -5,16 +5,13 @@
 mkdir -p m4
 
 if [ "$UNAME" = "Darwin" ]; then
-libtoolize --copy --force --automake
-aclocal-1.9
-autoheader-2.60
-automake-1.9 --add-missing --copy --foreign
-autoconf-2.60
-
+    LIBTOOLIZE=glibtoolize
 else
-libtoolize --copy --force --automake
+    LIBTOOLIZE=libtoolize
+fi
+
+$LIBTOOLIZE --copy --force --automake
 aclocal
 autoheader
 automake --add-missing --copy --foreign
 autoconf
-fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openwsman-2.3.5/bindings/ruby/CMakeLists.txt 
new/openwsman-2.3.6/bindings/ruby/CMakeLists.txt
--- old/openwsman-2.3.5/bindings/ruby/CMakeLists.txt    2012-08-11 
23:01:46.000000000 +0200
+++ new/openwsman-2.3.6/bindings/ruby/CMakeLists.txt    2012-10-25 
16:01:36.000000000 +0200
@@ -127,7 +127,6 @@
   COMMAND "mkdir" "-p" "lib/openwsman"
   COMMAND "cp" "${CMAKE_CURRENT_SOURCE_DIR}/openwsman.rb" "lib"
   COMMAND "cp" "${CMAKE_CURRENT_SOURCE_DIR}/openwsman/*.rb" "lib/openwsman"
-  COMMAND "cp" "${CMAKE_CURRENT_BINARY_DIR}/openwsman/*.rb" "lib/openwsman"
 
   DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/extconf.rb
   DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/openwsman.rb
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openwsman-2.3.5/configure.in 
new/openwsman-2.3.6/configure.in
--- old/openwsman-2.3.5/configure.in    2012-08-11 23:01:46.000000000 +0200
+++ new/openwsman-2.3.6/configure.in    2012-10-25 15:12:05.000000000 +0200
@@ -3,19 +3,23 @@
 dnl *******************************************
 
 AC_PREREQ(2.53)
-AC_INIT(openwsman, 2.3.0)
+AC_INIT(openwsman, 2.3.6)
 AC_CONFIG_SRCDIR(src/server/wsmand.c)
 AC_CANONICAL_HOST
 AC_CONFIG_MACRO_DIR([m4])
 
 dnl Package version information
 PACKAGE=openwsman
-VERSION_MAJOR=2
-VERSION_MINOR=2
-VERSION_RELEASE=4
-VERSION=${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_RELEASE}
+OPENWSMAN_MAJOR=2
+OPENWSMAN_MINOR=3
+OPENWSMAN_PATCH=6
+OPENWSMAN_VERSION=${OPENWSMAN_MAJOR}.${OPENWSMAN_MINOR}.${OPENWSMAN_PATCH}
+
+OPENWSMAN_PLUGIN_API_MAJOR=2
+OPENWSMAN_PLUGIN_API_MINOR=2
+OPENWSMAN_PLUGIN_API_VERSION=${OPENWSMAN_PLUGIN_API_MAJOR}.${OPENWSMAN_PLUGIN_API_MINOR}
 
-AM_INIT_AUTOMAKE(${PACKAGE}, ${VERSION})
+AM_INIT_AUTOMAKE(${PACKAGE}, ${OPENWSMAN_VERSION})
 
 AM_CONFIG_HEADER(wsman_config.h)
 AM_MAINTAINER_MODE
@@ -458,11 +462,23 @@
 AC_SUBST(PACKAGE_AUTH_DIR)
 
 AC_SUBST(PACKAGE)
-AC_SUBST(VERSION)
-AC_SUBST(VERSION_MAJOR)
-AC_SUBST(VERSION_MINOR)
-AC_SUBST(VERSION_RELEASE)
+AC_SUBST(OPENWSMAN_VERSION)
+AC_SUBST(OPENWSMAN_MAJOR)
+AC_SUBST(OPENWSMAN_MINOR)
+AC_SUBST(OPENWSMAN_PATCH)
 
+AC_SUBST(OPENWSMAN_PLUGIN_API_MINOR)
+AC_SUBST(OPENWSMAN_PLUGIN_API_MAJOR)
+AC_SUBST(OPENWSMAN_PLUGIN_API_VERSION)
+
+AC_DEFINE_UNQUOTED(OPENWSMAN_PLUGIN_API_VERSION,
+          ["$OPENWSMAN_PLUGIN_API_VERSION"],
+          [Plugin API version])
+
+
+PACKAGE_BUILDTS=`"/bin/date" "+%Y%m%d%H%M"`
+
+AC_DEFINE_UNQUOTED(PACKAGE_BUILDTS, ["$PACKAGE_BUILDTS"], [Build timestamp])
 
 
 AC_CHECK_LIB([cmpisfcc],  [cmciConnect], [have_sfcc="yes"],[have_sfcc="no"])
@@ -546,6 +562,7 @@
         tests/xml/Makefile
         examples/Makefile
        bindings/Makefile
+       bindings/version.i
        bindings/python/Makefile
        bindings/python/tests/Makefile
        bindings/ruby/Makefile
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openwsman-2.3.5/etc/openwsman.conf 
new/openwsman-2.3.6/etc/openwsman.conf
--- old/openwsman-2.3.5/etc/openwsman.conf      2012-08-11 23:01:46.000000000 
+0200
+++ new/openwsman-2.3.6/etc/openwsman.conf      2012-11-07 10:23:40.000000000 
+0100
@@ -60,7 +60,7 @@
 # Location of plugins
 #  defaults to /usr/lib(64)/openwsman/plugins
 #
-# plugin_dir = /usr/local/lib/openwsman/plugins
+# plugin_dir = /usr/lib/openwsman/plugins
 
 
 ##################################
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openwsman-2.3.5/include/u/Makefile.am 
new/openwsman-2.3.6/include/u/Makefile.am
--- old/openwsman-2.3.5/include/u/Makefile.am   2012-08-11 23:01:46.000000000 
+0200
+++ new/openwsman-2.3.6/include/u/Makefile.am   2012-10-25 15:12:05.000000000 
+0200
@@ -6,6 +6,6 @@
                                misc.h os.h uri.h \
                                uuid.h lock.h strings.h md5.h list.h \
                                hash.h base64.h iniparser.h  \
-                               debug.h uerr.h uoption.h gettimeofday.h 
syslog.h \
-                               pthreadx.h
+                               debug.h debug_internal.h uerr.h uoption.h 
gettimeofday.h \
+                               syslog.h pthreadx.h
  
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openwsman-2.3.5/include/wsman-server.h 
new/openwsman-2.3.6/include/wsman-server.h
--- old/openwsman-2.3.5/include/wsman-server.h  2012-08-11 23:01:46.000000000 
+0200
+++ new/openwsman-2.3.6/include/wsman-server.h  2012-10-25 15:12:13.000000000 
+0200
@@ -39,7 +39,7 @@
 #include "wsman-plugins.h"
 #include "wsman-subscription-repository.h"
 #include "wsman-event-pool.h"
-int continue_working;
+extern int continue_working;
 
 WsContextH wsman_init_plugins(WsManListenerH *listener);
 SubsRepositoryOpSetH wsman_init_subscription_repository(WsContextH cntx, char 
*uri);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openwsman-2.3.5/include/wsman-soap.h 
new/openwsman-2.3.6/include/wsman-soap.h
--- old/openwsman-2.3.5/include/wsman-soap.h    2012-08-11 23:01:46.000000000 
+0200
+++ new/openwsman-2.3.6/include/wsman-soap.h    2012-09-25 15:16:40.000000000 
+0200
@@ -476,6 +476,9 @@
                     WsmanFaultDetailType faultDetail,
                     char *fault_msg);
 void
+wsman_get_fault_status_from_doc(WsXmlDocH doc,WsmanStatus* status) ;
+
+void
 wsman_generate_fault_buffer( WsXmlDocH inDoc,
                             const char *encoding,
                            WsmanFaultCodeType faultCode,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openwsman-2.3.5/package/openwsman.spec.in 
new/openwsman-2.3.6/package/openwsman.spec.in
--- old/openwsman-2.3.5/package/openwsman.spec.in       2012-08-11 
23:01:46.000000000 +0200
+++ new/openwsman-2.3.6/package/openwsman.spec.in       2012-11-07 
10:20:06.000000000 +0100
@@ -15,7 +15,6 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
-# norootforbuild
 
 %if 0%{?suse_version} > 1140 || 0%{?fedora_version} > 14
 %define has_systemd 1
@@ -31,7 +30,6 @@
 BuildRequires:  sblim-sfcc-devel
 BuildRequires:  swig >= 1.3.30
 
-BuildRequires:  java-devel
 BuildRequires:  perl
 BuildRequires:  python-devel
 
@@ -56,6 +54,7 @@
 BuildRequires:  pkgconfig
 BuildRequires:  ruby
 
+# RHEL6 is missing ruby-devel in OBS
 %if 0%{?rhel_version} != 600
 BuildRequires:  ruby-devel
 %if 0%{?fedora} != 17
@@ -79,18 +78,18 @@
 
 %if 0%{?suse_version} > 1010
 BuildRequires:  fdupes
-BuildRequires:  libopenssl-devel
 BuildRequires:  libcurl-devel
+BuildRequires:  libopenssl-devel
 %else
 # SLE10
+BuildRequires:  curl-devel
 BuildRequires:  libidn-devel
 BuildRequires:  openssl-devel
-BuildRequires:  curl-devel
 %endif
 
 %if 0%{?suse_version} > 910
 BuildRequires:  ruby-devel
-%if 0%{?suse_version} < 1120
+%if 0%{?suse_version} < 1110
 # SLE 10 has Ruby 1.8.6 and runs into 
http://help.rubygems.org/discussions/problems/859-trying-to-install-rubygems
 BuildRequires:  rubygems <= 1.3.7
 %else
@@ -112,13 +111,13 @@
 
 Requires(pre):  sed coreutils grep /bin/hostname
 Version:        @VERSION@
-Release:        1
+Release:        0
 # Mandriva:
 # Release %mkrel 1
 Url:            http://www.openwsman.org/
+Summary:        Opensource Implementation of WS-Management
 License:        BSD-3-Clause
 Group:          System/Management
-Summary:        Opensource Implementation of WS-Management
 Source:         %{name}-%{version}.tar.bz2
 Source1:        %{name}.rpmlintrc
 %if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 
0%{?fedora} || 0%{?rhel}
@@ -136,9 +135,8 @@
 
 
 %package -n libwsman1
-License:        BSD-3-Clause
-Group:          System/Management
 Summary:        Opensource Implementation of WS-Management
+Group:          System/Management
 Provides:       openwsman = %{version}
 Obsoletes:      openwsman < %{version}
 
@@ -147,23 +145,23 @@
 (Common libraries)
 
 %package -n libwsman-devel
-License:        BSD-3-Clause
-Group:          Development/Libraries/C and C++
 Summary:        Opensource Implementation of WS-Management
+Group:          Development/Libraries/C and C++
 Provides:       openwsman-devel = %{version}
 Obsoletes:      openwsman-devel < %{version}
-Requires:       libwsman1 = %{version}
 Requires:       %{name}-server = %{version}
-Requires:       sblim-sfcc-devel libxml2-devel pam-devel
+Requires:       libwsman1 = %{version}
+Requires:       libxml2-devel
+Requires:       pam-devel
+Requires:       sblim-sfcc-devel
 
 %description -n libwsman-devel
 Opensource Implementation of WS-Management stack
 (Development files)
 
 %package -n libwsman_clientpp1
-License:        BSD-3-Clause
-Group:          System/Management
 Summary:        C++ bindings to Openwsman Client libraries
+Group:          System/Management
 Provides:       openwsman-client = %{version}
 Obsoletes:      openwsman-client < %{version}
 
@@ -172,33 +170,30 @@
 
 
 %package -n libwsman_clientpp-devel
-License:        BSD-3-Clause
-Group:          System/Management
 Summary:        C++ bindings to Openwsman Client libraries
-Requires:       libwsman_clientpp1 = %{version}
+Group:          System/Management
 Requires:       libwsman-devel = %{version}
+Requires:       libwsman_clientpp1 = %{version}
 
 %description -n libwsman_clientpp-devel
 Development files for C++ interface to OpenWSMAN client library.
 
 
 %package server
-License:        BSD-3-Clause
-Group:          System/Management
 Requires(pre):  sed coreutils grep diffutils /bin/hostname
 %if 0%{?suse_version}
 Requires(pre):  fillup
 %endif
 Summary:        Openwsman Server and service libraries
+Group:          System/Management
 
 %description server
 Openwsman Server and service libraries
 
 
 %package python
-License:        BSD-3-Clause
-Group:          Development/Libraries/Python
 Summary:        Python bindings for openwsman client API
+Group:          Development/Libraries/Python
 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from 
distutils.sysconfig import get_python_lib; print get_python_lib()")}
 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from 
distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
 %{!?py_requires: %define py_requires Requires: python}
@@ -210,8 +205,6 @@
 
 
 %package ruby
-License:        BSD-3-Clause
-Group:          System/Management
 Requires:       ruby
 %{!?ruby_version: %global ruby_version %(ruby -r rbconfig -e 
'print(RbConfig::CONFIG["ruby_version"])')}
 
@@ -223,6 +216,11 @@
 Requires:       ruby(abi) = %{ruby_version}
 %endif
 
+%if 0%{?suse_version} == 1010
+%{!?ruby_sitelib: %global ruby_sitelib %(ruby -r rbconfig -e 'vd = 
RbConfig::CONFIG["vendorlibdir"]; print(vd ? vd : 
RbConfig::CONFIG["sitelibdir"])')}
+%{!?ruby_sitearch: %global ruby_sitearch %(ruby -r rbconfig -e 'vad = 
RbConfig::CONFIG["vendorarchdir"]; print(vad ? vad : 
RbConfig::CONFIG["sitearchdir"])')}
+%else
+# SLES 10 can't parse this :-/
 %if 0%{?ruby_sitelib} == 0
 %if (0%{?fedora} && 0%{?fedora} < 16) || (0%{?centos_version} && 
0%{?centos_version}<600) || (0%{?rhel_version} && 0%{?rhel_version}<500)
 # Fedora15, RHEL-5 and CentOS-5 don't have vendor lib
@@ -234,15 +232,16 @@
 %{!?ruby_sitearch: %global ruby_sitearch %(ruby -r rbconfig -e 'vad = 
RbConfig::CONFIG["vendorarchdir"]; print(vad ? vad : 
RbConfig::CONFIG["sitearchdir"])')}
 %endif
 %endif
+%endif
+
 Summary:        Ruby bindings for openwsman client API
+Group:          System/Management
 
 %description ruby
 This package provides Ruby bindings to access the openwsman client API.
 
 
 %package perl
-License:        BSD-3-Clause
-Group:          System/Management
 %if 0%{?fedora}
 %define perl_version %(eval "`%{__perl} -V:version`"; echo $version)
 %define perl_requires perl(:MODULE_COMPAT_%{perl_version})
@@ -251,6 +250,7 @@
 Requires:       perl = %{perl_version}
 %endif
 Summary:        Perl bindings for openwsman client API
+Group:          System/Management
 
 %description perl
 This package provides Perl bindings to access the openwsman client API.
@@ -259,11 +259,10 @@
 %if 0%{?suse_version} == 0 || 0%{?suse_version} >= 1100
 
 %package java
-License:        BSD-3-Clause
-Group:          System/Management
 Requires:       java
 Requires:       libwsman1 = %{version}
 Summary:        Java bindings for openwsman client API
+Group:          System/Management
 
 %description java
 This package provides Java bindings to access the openwsman client API.
@@ -286,7 +285,7 @@
 export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -DNO_SSL_CALLBACK"
 %endif
 # SLES 10 needs explicit java bytecode target
-%if %0{?suse_version} == 1010
+%if 0%{?suse_version} == 1010 || 0%{?suse_version} == 1110 
 export EXPLICIT_TARGET=1.5
 %endif
 
@@ -300,7 +299,7 @@
   -DCMAKE_CXX_FLAGS_RELEASE:STRING="$RPM_OPT_FLAGS" \
   -DCMAKE_SKIP_RPATH=1 \
   -DPACKAGE_ARCHITECTURE=`uname -m` \
-  -DEXPLICIT_TARGET="$EXPLICIT_TARGET" \ 
+  -DEXPLICIT_TARGET="$EXPLICIT_TARGET" \
   -DLIB=%{_lib} \
   -DBUILD_RUBY_GEM=no \
   ..
@@ -334,11 +333,12 @@
 
 %post -n libwsman1 -p /sbin/ldconfig
 
-%postun -n libwsman1 -p /sbin/ldconfig
+%postun -n libwsman1
+/sbin/ldconfig
+exit 0
 
 # follow http://en.opensuse.org/openSUSE:Systemd_packaging_guidelines
 %if 0%{?has_systemd}
-
 %pre server
 if [-f /var/lib/systemd/migrated/%{name}]; then
 %service_add_pre %{name}.service
@@ -407,6 +407,9 @@
 %{python_sitearch}/*.so
 %{python_sitearch}/*.py*
 
+# RHEL6 is missing ruby-devel in OBS
+%if 0%{?rhel_version} != 600
+
 %files ruby
 %defattr(-,root,root)
 %if 0%{?mandriva_version}
@@ -421,6 +424,8 @@
 %{ruby_sitelib}/openwsman/*.rb
 %endif
 
+%endif
+
 %files perl
 %defattr(-,root,root)
 %{perl_vendorarch}/openwsman.so
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openwsman-2.3.5/src/cpp/WsmanFilter.h 
new/openwsman-2.3.6/src/cpp/WsmanFilter.h
--- old/openwsman-2.3.5/src/cpp/WsmanFilter.h   2012-08-11 23:01:46.000000000 
+0200
+++ new/openwsman-2.3.6/src/cpp/WsmanFilter.h   2012-10-25 15:12:13.000000000 
+0200
@@ -3,7 +3,7 @@
 
 #include <string>
 #include <vector>
-#include <malloc.h>
+#include <cstdlib>
 #include "WsmanEPR.h"
 #include "wsman-filter.h"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openwsman-2.3.5/src/lib/CMakeLists.txt 
new/openwsman-2.3.6/src/lib/CMakeLists.txt
--- old/openwsman-2.3.5/src/lib/CMakeLists.txt  2012-08-11 23:01:46.000000000 
+0200
+++ new/openwsman-2.3.6/src/lib/CMakeLists.txt  2012-10-08 16:53:50.000000000 
+0200
@@ -2,7 +2,9 @@
 # CMakeLists.txt for openwsman/src/lib
 #
 
+IF ( BUILD_TESTS )
 ADD_SUBDIRECTORY(test)
+ENDIF ( BUILD_TESTS )
 
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR} 
${CMAKE_BINARY_DIR} )
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openwsman-2.3.5/src/lib/wsman-faults.c 
new/openwsman-2.3.6/src/lib/wsman-faults.c
--- old/openwsman-2.3.5/src/lib/wsman-faults.c  2012-08-11 23:01:46.000000000 
+0200
+++ new/openwsman-2.3.6/src/lib/wsman-faults.c  2012-10-08 16:52:50.000000000 
+0200
@@ -54,6 +54,7 @@
 
 
 #define FAULT_XPATH_EXPR  "/s:Envelope/s:Body/s:Fault/s:Code/s:Value"
+#define FAULT_SUBCODE_VALUE_XPATH 
"/s:Envelope/s:Body/s:Fault/s:Code/s:Subcode/s:Value"
 
 WsmanFaultDetailTable fault_detail_table[] =
 {
@@ -602,5 +603,28 @@
 }
 
 
+void
+wsman_get_fault_status_from_doc (WsXmlDocH doc, WsmanStatus *status)
+{
+  int i;
+  char *subcode_value=ws_xml_get_xpath_value(doc, FAULT_SUBCODE_VALUE_XPATH);
+  char *subcode_value_msg =calloc(1,strlen(subcode_value));
+  char *start_pos = strchr(subcode_value,':');
+  int copy_len = strlen (subcode_value) - (int)(start_pos - subcode_value);
+  strcpy(subcode_value_msg, start_pos+1); 
+  if (strlen(subcode_value)== 0 ) return ;
+ 
+  int nfaults = sizeof (fault_code_table) / sizeof (fault_code_table[0]);
+  for (i = 0; i < nfaults; i++) {
+    if (strcmp (subcode_value_msg , fault_code_table[i].subCode) == 0) {
+      status->fault_code = fault_code_table[i].fault_code;
+      //some default values
+      status->fault_detail_code = 0;
+      status->fault_msg='\0';
+      return;
+    }
 
+  }
+  return;
+}
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openwsman-2.3.5/src/lib/wsman-libxml2-binding.c 
new/openwsman-2.3.6/src/lib/wsman-libxml2-binding.c
--- old/openwsman-2.3.5/src/lib/wsman-libxml2-binding.c 2012-08-11 
23:01:46.000000000 +0200
+++ new/openwsman-2.3.6/src/lib/wsman-libxml2-binding.c 2012-09-28 
11:16:59.000000000 +0200
@@ -325,8 +325,7 @@
                break;
 
        case XML_NS_URI:
-               if ((xmlNs =
-                                       (xmlNsPtr) xml_parser_ns_find(node, 
str, NULL, 1,
+               if ((xmlNs = (xmlNsPtr) xml_parser_ns_find(node, str, NULL, 1,
                                                1)) != NULL) {
                        xmlNode->ns = xmlNs;
                        retVal = 0;
@@ -397,6 +396,9 @@
        return (WsXmlNodeH) xmlNode;
 }
 
+/* check if namespace is defined (at document root)
+ * and evtl. (bAddAtRootIfNotFound!=0) add it to the root node
+ */
 
 WsXmlNsH
 xml_parser_ns_find(WsXmlNodeH node,
@@ -470,21 +472,33 @@
 {
        xmlNsPtr xmlNs = NULL;
        if (node && uri) {
-               if ((xmlNs =
-                                       (xmlNsPtr) xml_parser_ns_find(node, 
uri, NULL, 0,
-                                               0)) != NULL) {
+               if ((xmlNs = (xmlNsPtr) xml_parser_ns_find(node, uri, NULL, 0, 
0)) != NULL) {
+                        /* namespace is known */
                        if (xmlNs->prefix != NULL) {
                                xmlFree((char *) xmlNs->prefix);
                                xmlNs->prefix = NULL;
                        }
-
                        if (prefix != NULL) {
                                xmlNs->prefix = xmlStrdup(BAD_CAST prefix);
                        }
                } else {
-                       xmlNs =
-                               xmlNewNs((xmlNodePtr) node, BAD_CAST uri,
-                                               BAD_CAST prefix);
+                        /* create new namespace entry */
+                       xmlNs = xmlNewNs((xmlNodePtr) node, BAD_CAST uri, 
BAD_CAST prefix);
+                       /* since the 'xml:' name is supposed to be predefined, 
the above
+                         * function will return NULL when prefix == xml && uri 
== XML_XML_NAMESPACE.
+                         * Compensate for this here.
+                         */
+                       if (xmlNs == NULL && strcmp(prefix,"xml") == 0
+                            && strcmp(uri,XML_XML_NAMESPACE)== 0) {
+                               xmlNs = (xmlNsPtr) u_zalloc(sizeof(xmlNs));
+                               if (xmlNs == NULL) {
+                                       error("Couldn't create a new Namespace 
structure");     
+                                       return(NULL);
+                               }
+                               xmlNs->type = XML_LOCAL_NAMESPACE;
+                               xmlNs->href = xmlStrdup(uri);
+                               xmlNs->prefix = xmlStrdup(prefix);
+                       }
                }
        }
        return (WsXmlNsH) xmlNs;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openwsman-2.3.5/src/lib/wsman-soap.c 
new/openwsman-2.3.6/src/lib/wsman-soap.c
--- old/openwsman-2.3.5/src/lib/wsman-soap.c    2012-08-11 23:01:46.000000000 
+0200
+++ new/openwsman-2.3.6/src/lib/wsman-soap.c    2012-09-25 15:16:40.000000000 
+0200
@@ -1081,6 +1081,8 @@
        enumInfo = get_locked_enuminfo(soapCntx, _doc,
                op, WSENUM_RELEASE, &status);
 
+        ws_set_context_xml_doc_val(soapCntx, WSFW_INDOC, _doc);
+
        if (enumInfo == NULL) {
                doc = wsman_generate_fault( _doc,
                        status.fault_code, status.fault_detail_code, NULL);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openwsman-2.3.5/src/lib/wsman-xml.c 
new/openwsman-2.3.6/src/lib/wsman-xml.c
--- old/openwsman-2.3.5/src/lib/wsman-xml.c     2012-08-11 23:01:46.000000000 
+0200
+++ new/openwsman-2.3.6/src/lib/wsman-xml.c     2012-09-28 11:16:59.000000000 
+0200
@@ -80,6 +80,7 @@
        {XML_NS_CIM_BINDING, "wsmb"},
        {XML_NS_OPENWSMAN, "owsman"},
        {XML_NS_TRANSFER, "wxf"},
+       {XML_NS_XML_NAMESPACES,"xml"},
        {NULL, NULL}
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openwsman-2.3.5/src/plugins/CMakeLists.txt 
new/openwsman-2.3.6/src/plugins/CMakeLists.txt
--- old/openwsman-2.3.5/src/plugins/CMakeLists.txt      2012-08-11 
23:01:46.000000000 +0200
+++ new/openwsman-2.3.6/src/plugins/CMakeLists.txt      2012-10-25 
15:35:55.000000000 +0200
@@ -5,6 +5,7 @@
 
 add_subdirectory(identify)
 add_subdirectory(wsman)
+add_subdirectory(redirect)
 
 if(BUILD_LIBCIM)
 add_subdirectory(cim)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openwsman-2.3.5/src/plugins/cim/sfcc-interface.c 
new/openwsman-2.3.6/src/plugins/cim/sfcc-interface.c
--- old/openwsman-2.3.5/src/plugins/cim/sfcc-interface.c        2012-08-11 
23:01:46.000000000 +0200
+++ new/openwsman-2.3.6/src/plugins/cim/sfcc-interface.c        2012-09-13 
21:55:04.000000000 +0200
@@ -2505,26 +2505,26 @@
        value.ref = handler;
        CMAddKey(objectpath, "Handler",
                        &value, CMPI_ref);
+        instance = newCMPIInstance(objectpath, NULL);
        //set OnFatalErrorPolicy to "Ignore"
        value.uint16 = 2;
-       CMAddKey(objectpath, "OnFatalErrorPolicy",
+        CMSetProperty(instance, "OnFatalErrorPolicy",
                        &value, CMPI_uint16);
        //enable subscription
        value.uint16 = 2;
-       CMAddKey(objectpath, "SubscriptionState",
+        CMSetProperty(instance, "SubscriptionState",
                        &value, CMPI_uint16);
        if(subsInfo->expires) {
                struct timeval  tv;
                gettimeofday(&tv, NULL);
                value.uint64 = subsInfo->expires - tv.tv_sec;
-               CMAddKey(objectpath, "subscriptionDuration",
+                CMSetProperty(instance, "SubscriptionDuration",
                                &value, CMPI_uint64);
        }
        //set RepeatNotificationPolicy to None
        value.uint16 = 2;
-       CMAddKey(objectpath, "RepeatNotificationPolicy",
+        CMSetProperty(instance, "RepeatNotificationPolicy",
                        &value, CMPI_uint16);
-       instance = newCMPIInstance(objectpath, NULL);
        instance_r = cc->ft->createInstance(cc, objectpath, instance, &rc);
 
        /* Print the results */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openwsman-2.3.5/src/plugins/redirect/CMakeLists.txt 
new/openwsman-2.3.6/src/plugins/redirect/CMakeLists.txt
--- old/openwsman-2.3.5/src/plugins/redirect/CMakeLists.txt     1970-01-01 
01:00:00.000000000 +0100
+++ new/openwsman-2.3.6/src/plugins/redirect/CMakeLists.txt     2012-09-25 
15:18:55.000000000 +0200
@@ -0,0 +1,12 @@
+#
+# CMakeLists.txt for openwsman/src/plugins/redirect
+#
+
+
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR} 
${CMAKE_BINARY_DIR} )
+SET(redirect_SOURCES redirect.c redirect.h redirect_stubs.c)
+
+ADD_LIBRARY( redirect SHARED ${redirect_SOURCES} )
+
+SET_TARGET_PROPERTIES(redirect PROPERTIES VERSION 1.0.0 SOVERSION 1)
+INSTALL(TARGETS redirect DESTINATION ${PACKAGE_PLUGIN_DIR})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openwsman-2.3.5/src/plugins/redirect/redirect.c 
new/openwsman-2.3.6/src/plugins/redirect/redirect.c
--- old/openwsman-2.3.5/src/plugins/redirect/redirect.c 1970-01-01 
01:00:00.000000000 +0100
+++ new/openwsman-2.3.6/src/plugins/redirect/redirect.c 2012-10-08 
16:57:26.000000000 +0200
@@ -0,0 +1,280 @@
+/*
+ *  Copyright (c) 2006 Dell, Inc.
+ *  by Praveen K Paladugu <praveen_palad...@dell.com>
+ *  Licensed under the GNU General Public license, version 2.
+ */
+
+
+#include "wsman_config.h"
+
+#include "stdlib.h"
+#include "stdio.h"
+#include "string.h"
+#include "ctype.h"
+
+#include "u/libu.h"
+
+#include "wsman-xml-api.h"
+#include "wsman-soap.h"
+#include "wsman-xml-serializer.h"
+#include "wsman-dispatcher.h"
+#include "wsman-client-api.h"
+
+#include "redirect.h"
+
+#include "../../server/wsmand-daemon.h"
+
+struct __Redirect_Data
+{
+    char *server; 
+    char *username;
+    char *password;
+    char *url_path;
+    char *authentication_method;
+    char *cim_namespace;
+    char *cainfo, *sslkey, *cl_cert;
+    char *namespace;
+    int noverifypeer, noverifyhost;
+    int server_port;
+
+};
+
+static struct __Redirect_Data *redirect_data;
+
+SER_START_ITEMS(Redirect)
+SER_END_ITEMS(Redirect);
+
+//As the data value in endPoints is not used, setting it to NULL for now
+START_END_POINTS(Redirect)
+    END_POINT_TRANSFER_DIRECT_GET(Redirect, NULL),
+    END_POINT_TRANSFER_DIRECT_PUT(Redirect, NULL),
+    END_POINT_TRANSFER_DIRECT_CREATE(Redirect, NULL),
+    END_POINT_TRANSFER_DIRECT_DELETE(Redirect, NULL),
+    END_POINT_ENUMERATE(Redirect, NULL),
+    END_POINT_DIRECT_PULL(Redirect, NULL),
+    END_POINT_PULL(Redirect, NULL),
+    END_POINT_RELEASE(Redirect, NULL),
+    END_POINT_CUSTOM_METHOD(Redirect, NULL),
+FINISH_END_POINTS(Redirect);
+
+
+static list_t *
+set_namespaces(void) 
+{
+
+    int i;
+
+    list_t *l = list_create(LISTCOUNT_T_MAX);
+    WsSupportedNamespaces *ns = (WsSupportedNamespaces *)u_malloc(
+                       sizeof(WsSupportedNamespaces));
+
+    ns->class_prefix = NULL;
+    ns->ns = redirect_data->namespace;
+    lnode_t *node = lnode_create(ns);
+    list_append(l, node);
+    return l;
+}
+
+
+void get_endpoints(void *self, void **data) 
+{                              
+    WsDispatchInterfaceInfo *ifc =(WsDispatchInterfaceInfo *)data;     
+    ifc->flags = 0;
+    ifc->actionUriBase = NULL;
+    ifc->version = "2.2";
+    ifc->vendor = "Dell";
+    ifc->displayName = "Redirect";
+    ifc->notes = "Redirect Plugin";
+    ifc->compliance = XML_NS_WS_MAN;
+    ifc->wsmanResourceUri = NULL;
+    ifc->extraData = NULL;
+    ifc->namespaces = set_namespaces();
+    ifc->endPoints = Redirect_EndPoints;                       
+}
+
+
+int init( void *self, void **data )
+{
+    char* filename;
+    dictionary *ini;
+    filename = (char *) wsmand_options_get_config_file();
+    ini = iniparser_new(filename);
+
+    redirect_data =  malloc (sizeof(struct __Redirect_Data));
+    if (redirect_data == NULL){
+       error("Failed while allocating memory for redirect_data");      
+       return 0;
+    }
+
+    //Check if the conf file has the required fields populated.
+    if ( iniparser_getstring(ini, "redirect:server", NULL) ==NULL ||
+         iniparser_getstring(ini, "redirect:namespace", NULL) ==NULL
+       ){
+
+           error("The required inputs are not provided in the config file");
+           return 0;
+       }
+       
+    return 1;
+}
+
+void
+cleanup( void  *self, void *data )
+{
+    free(redirect_data);
+    return;
+}
+void set_config( void *self, dictionary *config )
+{
+
+    
+
+    if (config) {
+    redirect_data->server = iniparser_getstr (config, "redirect:server");
+    redirect_data->namespace = iniparser_getstr (config, "redirect:namespace");
+
+    redirect_data->username = iniparser_getstring (config, 
"redirect:username",NULL);
+    redirect_data->password = iniparser_getstring (config, 
"redirect:password",NULL);
+    redirect_data->url_path = iniparser_getstring (config, 
"redirect:url_path","/wsman");
+    redirect_data->authentication_method = iniparser_getstring (config, 
"redirect:authentication_method", "basic");
+    redirect_data->cim_namespace = iniparser_getstring (config, 
"redirect:cim_namespace","root/cimv2");
+    redirect_data->cainfo = iniparser_getstring (config, 
"redirect:cacert",NULL);
+    redirect_data->server_port = iniparser_getint (config, 
"redirect:port",5895);
+    redirect_data->noverifypeer = iniparser_getint (config, 
"redirect:noverifypeer", 0);
+    redirect_data->noverifyhost = iniparser_getint (config, 
"redirect:noverifyhost", 0);
+    redirect_data->sslkey = iniparser_getstring (config, "redirect:sslkey", 
NULL);
+    redirect_data->cl_cert = iniparser_getstring (config, "redirect:cl_cert", 
NULL);           
+    }  
+
+       
+}
+
+static char *get_remote_cl_cert()
+{
+       return redirect_data->cl_cert;
+}
+static char *get_remote_sslkey()
+{
+       return redirect_data->sslkey;
+}
+
+static char* get_remote_server()
+{
+       return redirect_data->server;
+
+}
+static int get_remote_noverifypeer()
+{
+       return redirect_data->noverifypeer;
+}
+static int get_remote_noverifyhost()
+{
+       return redirect_data->noverifyhost;
+}
+static char* get_remote_username()
+{
+       return redirect_data->username;
+}
+
+static char* get_remote_password()
+{
+       return redirect_data->password;
+
+}
+
+static char* get_remote_url_path()
+{
+       return redirect_data->url_path;
+}
+
+static char* get_remote_namespace()
+{
+       return redirect_data->namespace;
+}
+
+
+static char* get_remote_authentication_method()
+{
+       return redirect_data->authentication_method;
+}
+
+static char* get_remote_cim_namespace()
+{
+       return redirect_data->cim_namespace;
+}
+
+static char* get_remote_cainfo()
+{
+       return redirect_data->cainfo;
+}
+
+static int get_remote_server_port()
+{
+       return redirect_data->server_port;
+}
+
+
+WsManClient* setup_redirect_client(WsContextH cntx, char *ws_username, char 
*ws_password)
+{
+       
+    WsManClient *cl = malloc(sizeof(cl));
+
+    if (cl == NULL){
+       error("Error while allocating memory for client in redirect plugin");
+       return NULL;    
+    }
+
+       
+       cl = wsmc_create(
+               get_remote_server() ,
+                get_remote_server_port() ,
+                get_remote_url_path(),
+                get_remote_cainfo() ? "https" : "http",
+                get_remote_username() ? get_remote_username() : 
strdup(ws_username),
+                get_remote_password() ? get_remote_password() : 
strdup(ws_password) 
+         );
+
+
+       wsman_transport_set_auth_method(cl, get_remote_authentication_method());
+
+        if ( get_remote_cainfo() ) {
+                wsman_transport_set_cainfo(cl, get_remote_cainfo() );
+        }
+
+       if (get_remote_cl_cert()){
+               wsman_transport_set_cert(cl, get_remote_cert());
+               if (!get_remote_cainfo())
+                        debug("Warning: cainfo not set to enable SSL operation 
in Redirect Plugin\n");
+
+       }
+
+        if ( get_remote_sslkey())
+        {
+               wsman_transport_set_cert(cl, get_remote_sslkey());
+               if (!get_remote_cainfo())
+               {
+                       debug("Warning: cainfo not set to enable SSL operation 
in Redirect Plugin\n");
+               }
+       }
+
+
+        wsman_transport_set_verify_peer(cl, get_remote_cainfo()? 
!get_remote_noverifypeer() : 0);
+        wsman_transport_set_verify_host(cl, get_remote_cainfo() ? 
!get_remote_noverifyhost(): 0 );
+
+
+// No need for client options
+//        cl_options = wsmc_options_init();
+  //      cl_options->properties = hash_create(HASHCOUNT_T_MAX, 0, 0) ; 
//properties are only valid for put, get & create.. so skippping
+    //    cl_options->cim_ns = get_remote_cim_namespace() ;
+
+//Pass this option to request the Estimated Total num of Items in the response.
+      //  cl_options->flags |= FLAG_ENUMERATION_COUNT_ESTIMATION; 
+       // cl_options->max_elements = wsman_get_max_elements(cntx,NULL);
+                       
+       // cl_options->max_envelope_size = 
wsman_get_max_envelope_size(cntx,NULL);
+       // cl_options->timeout= wsman_get_operation_timeout(cntx, NULL) * 1000;
+
+
+    return cl; 
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openwsman-2.3.5/src/plugins/redirect/redirect.h 
new/openwsman-2.3.6/src/plugins/redirect/redirect.h
--- old/openwsman-2.3.5/src/plugins/redirect/redirect.h 1970-01-01 
01:00:00.000000000 +0100
+++ new/openwsman-2.3.6/src/plugins/redirect/redirect.h 2012-10-08 
16:55:08.000000000 +0200
@@ -0,0 +1,96 @@
+/*
+ *  Copyright (c) 2006 Dell, Inc.
+ *  by Praveen K Paladugu <praveen_palad...@dell.com>
+ *  Licensed under the GNU General Public license, version 2.
+ */
+
+
+#include "wsman-declarations.h"
+#include "wsman-xml-serializer.h"
+
+#define XML_REDIRECT_NS    "http://dummy.com/wbem/wscim/1/cim-schema/2";
+
+
+struct  __RedirectResult
+{
+       int result;
+};
+typedef struct __RedirectResult Redirect;
+
+// Service endpoint declaration
+int Redirect_Enumerate_EP(WsContextH cntx,
+                        WsEnumerateInfo* enumInfo,
+                        WsmanStatus *status, void *opaqueData);
+
+
+int Redirect_Pull_EP(WsContextH cntx, WsEnumerateInfo* enumInfo, 
+                   WsmanStatus *status, void *opaqueData);
+
+
+int Redirect_Get_EP( SoapOpH op, void* appData, void *opaqueData );
+
+int Redirect_Create_EP( SoapOpH op, void* appData, void *opaqueData );
+
+int Redirect_Delete_EP( SoapOpH op, void* appData, void *opaqueData );
+
+int Redirect_Put_EP( SoapOpH op, void* appData, void *opaqueData );
+
+int Redirect_Custom_EP( SoapOpH op, void* appData, void *opaqueData );
+
+int Redirect_transfer_action ( SoapOpH op, void* appData, void *opaqueData);
+
+int Redirect_Release_EP(WsContextH cntx,
+                        WsEnumerateInfo* enumInfo,
+                        WsmanStatus *status, void *opaqueData);
+
+/*int Redirect_Subscribe_EP(WsContextH cntx,
+               WsSubscribeInfo* subsInfo,
+               WsmanStatus *status,
+               void *opaqueData);
+
+int Redirect_Renew_EP(WsContextH cntx,
+               WsSubscribeInfo* subsInfo,
+               WsmanStatus *status,
+               void *opaqueData);
+
+int Redirect_UnSubscribe_EP(WsContextH cntx,
+               WsSubscribeInfo* subsInfo,
+               WsmanStatus *status,
+               void *opaqueData);
+
+int Redirect_Evt_Pull_EP(WsContextH cntx,WsSubscribeInfo* subsInfo,
+               WsmanStatus *status,
+               void *opaqueData);
+
+int Redirect_EventPoll_EP(WsEventThreadContextH threadcntx);
+*/
+
+
+
+
+
+SER_DECLARE_TYPE(Redirect);
+DECLARE_EP_ARRAY(Redirect);
+
+
+void get_endpoints(void *self, void **data);
+//int init (void *self, void **data );
+//void cleanup( void *self, void *data );
+//void set_config( void *self, dictionary *config );
+
+static char* get_remote_server();
+static char* get_remote_username();
+static char* get_remote_password();
+static char* get_remote_url_path();
+static char* get_remote_authentication_method();
+static char* get_remote_cim_namespace();
+static char* get_remote_cainfo();
+static int get_remote_server_port();
+static int get_remote_noverifypeer();
+static int get_remote_noverifyhost();
+static char* get_remote_sslkey();
+static char* get_remote_cl_cert();
+
+WsManClient* setup_redirect_client (WsContextH cntx, char *username, char 
*password);
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openwsman-2.3.5/src/plugins/redirect/redirect_stubs.c 
new/openwsman-2.3.6/src/plugins/redirect/redirect_stubs.c
--- old/openwsman-2.3.5/src/plugins/redirect/redirect_stubs.c   1970-01-01 
01:00:00.000000000 +0100
+++ new/openwsman-2.3.6/src/plugins/redirect/redirect_stubs.c   2012-09-28 
11:16:59.000000000 +0200
@@ -0,0 +1,335 @@
+/*
+ *  Copyright (c) 2006 Dell, Inc.
+ *  by Praveen K Paladugu <praveen_palad...@dell.com>
+ *  Licensed under the GNU General Public license, version 2.
+ */
+
+
+#include "wsman_config.h"
+
+#include "stdlib.h"
+#include "stdio.h"
+#include "string.h"
+#include "ctype.h"
+
+
+#include "u/libu.h"
+
+#include "wsman-xml-api.h"
+#include "wsman-soap.h"
+#include "wsman-xml.h"
+#include "wsman-client-api.h"
+#include "wsman-xml-serializer.h"
+
+#include <wsman-client-transport.h>
+#include <wsman-debug.h>
+
+#include "wsman-soap-envelope.h"
+#include "wsman-soap-message.h"
+#include "wsman-dispatcher.h"
+
+#include "redirect.h"
+
+
+WsXmlDocH redirect_generate_fault( WsXmlDocH in_doc, WsManClient *cl);
+char* redirect_fault_msg (char * last_error_string);
+
+//DEBUG
+static void xml_print( WsXmlDocH doc);
+
+int Redirect_transfer_action ( SoapOpH op,
+                void* appData,
+                void *opaqueData)
+{
+    //Same function to be called for Get, Put, Create, Delete Actions
+    WsmanMessage *msg = wsman_get_msg_from_op(op);
+    SoapH soap = soap_get_op_soap(op);
+    WsXmlDocH in_doc = soap_get_op_doc(op, 1); 
+    WsContextH cntx = ws_create_ep_context(soap, in_doc);
+    WsManClient *cl=NULL;
+    WsXmlDocH response=NULL;
+
+
+
+    debug ("Test Get Endpoint Called"); 
+    cl = setup_redirect_client(cntx, msg->auth_data.username, 
msg->auth_data.password );
+
+    wsman_send_request(cl,cntx->indoc);
+
+
+    if (wsmc_get_last_error(cl) != WS_LASTERR_OK ){
+       //CURL/ HTTP errors     
+       soap_set_op_doc(op, 
+           redirect_generate_fault( cntx->indoc , cl), 
+           0);
+
+           return 1;
+    }
+
+
+    response = wsmc_build_envelope_from_response(cl);
+  
+    soap_set_op_doc(op, 
+               ws_xml_duplicate_doc(response), 0);
+
+    wsmc_release(cl);
+
+    return 0;
+}
+
+
+int Redirect_Get_EP( SoapOpH op,
+                void* appData,
+                void *opaqueData)
+
+{
+       return Redirect_transfer_action(op,appData, opaqueData);
+
+}
+
+int Redirect_Create_EP( SoapOpH op,
+                void* appData,
+                void *opaqueData)
+
+{
+       return Redirect_transfer_action(op,appData, opaqueData);
+
+}
+
+int Redirect_Delete_EP( SoapOpH op,
+                void* appData,
+                void *opaqueData)
+
+{
+       return Redirect_transfer_action(op,appData, opaqueData);
+
+}
+
+
+
+int Redirect_Put_EP( SoapOpH op,
+                void* appData,
+                void *opaqueData)
+{
+       return Redirect_transfer_action(op,appData, opaqueData);
+}
+
+
+int Redirect_Enumerate_EP(WsContextH cntx, 
+                       WsEnumerateInfo* enumInfo,
+                       WsmanStatus *status, void *opaqueData)
+{
+
+    WsXmlNodeH r_header=NULL, r_node=NULL, r_body=NULL, r_opt=NULL;
+    WsXmlDocH r_response=NULL;
+    char *resource_uri, *remote_enumContext;
+    int op; 
+    WsManClient *cl=NULL;
+
+
+    //The redirected Enumeration request must have 
RequestTotalItemsCountEstimate enabled
+
+    r_header = ws_xml_get_soap_header(cntx->indoc);
+    if ( (r_node = ws_xml_get_child(r_header,0,XML_NS_WS_MAN, 
WSM_REQUEST_TOTAL )) == NULL )
+           ws_xml_add_child(r_header, XML_NS_WS_MAN, WSM_REQUEST_TOTAL, NULL); 
    
+
+
+    cl = setup_redirect_client(cntx,  enumInfo->auth_data.username, 
enumInfo->auth_data.password);
+
+
+    //Set the enumInfo flags based on the indoc. This is required while 
handling the response in wsenum_eunmerate_stub
+    r_body=ws_xml_get_soap_body(cntx->indoc);
+    if ( ( r_node = ws_xml_get_child(r_body ,0, XML_NS_ENUMERATION, 
WSENUM_ENUMERATE )) != NULL )
+    {
+           if ( (r_opt = 
ws_xml_get_child(r_node,0,XML_NS_WS_MAN,WSM_OPTIMIZE_ENUM )) != NULL )
+                   enumInfo->flags |= WSMAN_ENUMINFO_OPT ;
+
+    }
+
+
+    wsman_send_request(cl,cntx->indoc);
+
+    if (wsmc_get_last_error(cl) != WS_LASTERR_OK ){
+       //CURL or HTTP errors
+       enumInfo->pullResultPtr = NULL;
+       status->fault_code = WSMAN_INTERNAL_ERROR;
+       status->fault_detail_code = 0;
+       status->fault_msg = redirect_fault_msg( 
wsman_transport_get_last_error_string(  wsmc_get_last_error(cl) )  );
+            return 1;
+    }
+
+
+
+
+    r_response = ws_xml_duplicate_doc(wsmc_build_envelope_from_response(cl));
+
+ 
+    if (  wsman_is_fault_envelope(r_response)){
+        enumInfo->pullResultPtr = NULL;
+        wsman_get_fault_status_from_doc(r_response, status);
+       return 1;
+    }
+ 
+
+
+    //Get the Estimated Total No.of Items from the response.
+    r_header=ws_xml_get_soap_header(r_response);
+    r_node=ws_xml_get_child(r_header,0,XML_NS_WS_MAN, WSM_TOTAL_ESTIMATE );
+    enumInfo->totalItems=(!r_node) ? 0: atoi(ws_xml_get_node_text(r_node));
+
+
+    //Get the remote context
+    remote_enumContext = wsmc_get_enum_context(r_response);
+
+
+
+    //Set the pullResultPtr only if some Enum Items are returned, in optimized 
mode.
+    r_body= ws_xml_get_soap_body(r_response);
+
+    if (  (r_node = ws_xml_get_child(r_body,0,XML_NS_ENUMERATION, 
WSENUM_ENUMERATE_RESP )) != NULL && 
+                       ( ws_xml_get_child(r_node,0,XML_NS_WS_MAN,WSENUM_ITEMS) 
!= NULL)  )
+    
+    {
+
+       enumInfo->pullResultPtr = r_response; 
+
+       if( strlen(remote_enumContext) != 0 )
+           strncpy(enumInfo->enumId, remote_enumContext, 
strlen(remote_enumContext)+1);
+    
+       else  // If all the instances are returned, the context will be NULL
+           enumInfo->enumId[0]='\0';
+           
+    }
+    
+    else{
+           //If not items are returned, set the context and return. 
+           strncpy(enumInfo->enumId, remote_enumContext, 
strlen(remote_enumContext)+1);
+           ws_xml_destroy_doc(r_response);
+       
+    }
+    
+    wsmc_release(cl);
+
+    
+    return 0;
+
+}
+
+
+int Redirect_Release_EP(WsContextH cntx,
+                        WsEnumerateInfo* enumInfo,
+                        WsmanStatus *status, void *opaqueData)
+{
+
+
+    WsManClient *cl=NULL;
+    WsXmlDocH response=NULL;
+
+
+    cl = setup_redirect_client(cntx,  enumInfo->auth_data.username, 
enumInfo->auth_data.password);
+    
+    wsman_send_request(cl,cntx->indoc);
+    if (wsmc_get_last_error(cl) != WS_LASTERR_OK ){
+       //just return for now, as the release_stub is not handling the status 
codes.                    
+       return 1;
+    }  
+
+    response=wsmc_build_envelope_from_response(cl);
+
+    //The status value is not used in the release stub. So, just return, if 
fault or not.
+    return wsman_is_fault_envelope(response);
+}
+
+int Redirect_Pull_EP(WsContextH cntx, WsEnumerateInfo* enumInfo,
+                       WsmanStatus *status, void *opaqueData)
+{
+    WsXmlDocH doc=NULL,response=NULL;
+    WsManClient *cl=NULL;
+    int retVal=0;
+
+
+
+
+    cl = setup_redirect_client( cntx, enumInfo->auth_data.username, 
enumInfo->auth_data.password);
+
+
+    wsman_send_request(cl,cntx->indoc);
+
+    if (wsmc_get_last_error(cl) != WS_LASTERR_OK ){
+        //CURL or HTTP errors
+        enumInfo->pullResultPtr = NULL;
+        status->fault_code = WSMAN_INTERNAL_ERROR;
+        status->fault_detail_code = 0;
+        status->fault_msg = redirect_fault_msg( 
wsman_transport_get_last_error_string(  wsmc_get_last_error(cl) )  );
+            return 1;
+    }
+
+
+    response = ws_xml_duplicate_doc(wsmc_build_envelope_from_response(cl));
+
+   
+    if ( ! wsman_is_fault_envelope(response) )
+           enumInfo->pullResultPtr = response;
+    
+    else{
+           //If there a fault, return the status code.
+           enumInfo->pullResultPtr = NULL;
+           wsman_get_fault_status_from_doc (response, status);
+           retVal=1;
+    }
+
+    wsmc_release(cl);
+
+    return retVal;
+}
+
+
+
+int Redirect_Custom_EP( SoapOpH op,
+               void* appData,
+               void *opaqueData )
+{
+
+    //By passing the stubs. Called from process_inbound_operation
+   
+    //Fix the wsa:To element in the forwarded request?? Nothing is verifying 
the URL in this element anyway. 
+       return Redirect_transfer_action(op,appData, opaqueData);
+
+    
+    
+}
+
+
+static void xml_print( WsXmlDocH doc)
+{
+
+        ws_xml_dump_node_tree(stdout, ws_xml_get_doc_root(doc));
+        return;
+
+}
+
+WsXmlDocH redirect_generate_fault( WsXmlDocH in_doc, WsManClient *cl)
+{
+    
+    WS_LASTERR_Code last_error =wsmc_get_last_error(cl);
+    char *last_error_string = 
wsman_transport_get_last_error_string(last_error);
+    
+     
+    return wsman_generate_fault(in_doc, WSMAN_INTERNAL_ERROR, 0,
+       redirect_fault_msg(last_error_string) );
+
+
+}
+
+char* redirect_fault_msg (char * last_error_string)
+{
+    char *prepend_string = "Redirect Plugin: ";
+    char* fault_msg 
=calloc(1,strlen(prepend_string)+strlen(last_error_string)+2);
+
+    strncpy(fault_msg, prepend_string, strlen(prepend_string));
+    strncat(fault_msg, last_error_string, strlen(last_error_string));
+
+    return fault_msg;
+
+}
+       
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openwsman-2.3.5/src/plugins/wsman/CMakeLists.txt 
new/openwsman-2.3.6/src/plugins/wsman/CMakeLists.txt
--- old/openwsman-2.3.5/src/plugins/wsman/CMakeLists.txt        2012-08-11 
23:01:46.000000000 +0200
+++ new/openwsman-2.3.6/src/plugins/wsman/CMakeLists.txt        2012-10-08 
16:54:31.000000000 +0200
@@ -2,4 +2,6 @@
 # CMakeLists.txt for openwsman/src/plugins/wsman
 #
 
+IF ( BUILD_TESTS )
 add_subdirectory(test)
+ENDIF ( BUILD_TESTS )

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to