Your message dated Sat, 03 Sep 2011 13:32:10 +0000
with message-id <[email protected]>
and subject line Bug#636878: fixed in cgsi-gsoap 1.3.4.2-1
has caused the Debian Bug report #636878,
regarding libcgsi-gsoap-dev: cgsi-plugin fails to register correctly within 
gSOAP
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
636878: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636878
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libcgsi-gsoap-dev
Version: 1.3.4.0-1
Severity: important


While trying to use the packaged cgsi_plugin library, I found that 
gSOAP was behaving as if the plugin was not registered.  After some 
debugging, I discovered that this was due to the package plugin 
failing to hook itself correctly into the "struct soap" structure's 
function pointers.

For correct behaviour, the cgsi_plugin library must (amongst other 
things) update the gSOAP context structure's 'fopen' member.  This 
allows the cgsi_plugin to intercept attempt to connect to the peer and 
establish the GSI connection.

I wrote a simple program to demonstrate the problem:



cat - > cgsi_plugin_test.c  << EOF
#include "stdio.h"
#include "cgsi_plugin.h"

/*
 *  How to compile:
 *
 *  gcc -Wall -o cgsi_plugin_test cgsi_plugin_test.c -lgsoap -lcgsi_plugin
 */

int main()
{
  struct soap soap;
  void *fopen_before;

  soap_init(&soap);

  printf("Before registering plugin:\n");
  printf("\tfopen: %p\n", soap.fopen);
  fopen_before = soap.fopen;

  printf("\nRegistring cgsi_plugin gSOAP plugin.\n");

  int flags = CGSI_OPT_DISABLE_NAME_CHECK | CGSI_OPT_DELEG_FLAG;
  if (soap_register_plugin_arg(&soap, client_cgsi_plugin, &flags)) {
    // if we fail to register, print some kind of feedback and exit
    soap_print_fault(&soap, stderr);
    return 1;
  }

  printf("\nAfter registering plugin:\n");
  printf("\tfopen: %p\n", soap.fopen);
  if( soap.fopen == fopen_before) {
    printf("ERROR: cgsi_plugin failed to hook itself into fopen\n");
  }

  printf("\nCheck for plugin-specific data:\n");
  void *data = soap_lookup_plugin(&soap, "CGSI_PLUGIN_CLIENT_1.0");
  printf("\tdata: %p\n", data);
  if( data == NULL) {
    printf("ERROR: cgsi_plugin failed to register\n");
  }

  soap_destroy(&soap);
  soap_end(&soap);

  /* From http://www.cs.fsu.edu/~engelen/soapdoc2.html

      "The soap_done function de-registers all plugin-ins,
       so this function should be called to cleanly
       terminate a gSOAP run-time context"

     Unfortunately, calling soap_done causes gSOAP to block
     indefinitely so we're forced to leave this step out.
  */

  // soap_done(&soap);

  return 0;
}

/* Dummy routines to satisfy linker for gSOAP dependencies */
struct Namespace namespaces[0];
const char ** soap_faultstring(struct soap *soap) {return NULL;}
int soap_getfault(struct soap *soap) {return 1;}
void soap_serializefault(struct soap *soap) {}
void soap_serializeheader(struct soap *soap) {}
void *soap_getelement(struct soap *soap, int *type) {return NULL;}
int soap_putfault(struct soap *soap) {return SOAP_OK;}
const char ** soap_faultdetail(struct soap *soap) {return NULL;}
const char ** soap_faultsubcode(struct soap *soap) {return NULL;}
void soap_markelement(struct soap *soap, const void *ptr, int type) {}
int soap_getheader(struct soap *soap) {return 1;}
const char ** soap_faultcode(struct soap *soap) {return NULL;}
int soap_putelement(struct soap *soap, const void *ptr, const char *tag,
                    int id, int type) {return SOAP_OK;}
int soap_putheader(struct soap *soap) {return SOAP_OK;}
EOF



Here is typical output when compiled as suggested and run against 
current sid:



Before registering plugin:
        fopen: 0xf7766f60

Registring cgsi_plugin gSOAP plugin.

After registering plugin:
        fopen: 0xf7766f60
ERROR: cgsi_plugin failed to hook itself into fopen

Check for plugin-specific data:
        data: 0x9affb50



If I compile cgsi_plugin from CVS and link against this version, I get 
the following output:



Before registering plugin:
        fopen: 0xf7748f60

Registring cgsi_plugin gSOAP plugin.

After registering plugin:
        fopen: 0xf7725725

Check for plugin-specific data:
        data: 0x97d1b50



I'm pretty sure I've used gSOAP with cgsi-plugin from Debain packages 
in the past.  I'm not sure what has changed so that it no longer works 
(at least, not for me).

I'm also at a loss to identify a likely cause for this problem.  It is 
as if the packaged cgsi-plugin attempts to write the replacement fopen 
method into the wrong memory location; but, if so, valgrind should 
notice this.  Running valgrind against the test-code fails to find any 
problem.  Altering the test-code to allocate the 'struct soap' 
variable from the heap (rather than the stack) and rerunning with 
Valgrind also fails to find any problem.

Cheers,

Paul.

-- System Information:
Debian Release: wheezy/sid
  APT prefers oldstable
  APT policy: (500, 'oldstable'), (500, 'unstable')
Architecture: i386 (x86_64)

Kernel: Linux 3.0.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libcgsi-gsoap-dev depends on:
ii  gsoap                         2.8.3-1    Development libraries and stub gen
ii  libcgsi-gsoap1                1.3.4.0-1  GSI plugin for gSOAP

libcgsi-gsoap-dev recommends no packages.

libcgsi-gsoap-dev suggests no packages.

-- no debconf information



--- End Message ---
--- Begin Message ---
Source: cgsi-gsoap
Source-Version: 1.3.4.2-1

We believe that the bug you reported is fixed in the latest version of
cgsi-gsoap, which is due to be installed in the Debian FTP archive:

cgsi-gsoap_1.3.4.2-1.debian.tar.gz
  to main/c/cgsi-gsoap/cgsi-gsoap_1.3.4.2-1.debian.tar.gz
cgsi-gsoap_1.3.4.2-1.dsc
  to main/c/cgsi-gsoap/cgsi-gsoap_1.3.4.2-1.dsc
cgsi-gsoap_1.3.4.2.orig.tar.gz
  to main/c/cgsi-gsoap/cgsi-gsoap_1.3.4.2.orig.tar.gz
libcgsi-gsoap-dev_1.3.4.2-1_amd64.deb
  to main/c/cgsi-gsoap/libcgsi-gsoap-dev_1.3.4.2-1_amd64.deb
libcgsi-gsoap1_1.3.4.2-1_amd64.deb
  to main/c/cgsi-gsoap/libcgsi-gsoap1_1.3.4.2-1_amd64.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Mattias Ellert <[email protected]> (supplier of updated cgsi-gsoap 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Thu, 01 Sep 2011 21:06:28 +0200
Source: cgsi-gsoap
Binary: libcgsi-gsoap1 libcgsi-gsoap-dev
Architecture: source amd64
Version: 1.3.4.2-1
Distribution: unstable
Urgency: low
Maintainer: Mattias Ellert <[email protected]>
Changed-By: Mattias Ellert <[email protected]>
Description: 
 libcgsi-gsoap-dev - GSI plugin for gSOAP - development files
 libcgsi-gsoap1 - GSI plugin for gSOAP
Closes: 636878
Changes: 
 cgsi-gsoap (1.3.4.2-1) unstable; urgency=low
 .
   * Update to version 1.3.4.2.
   * Build against new gsoap (Closes: #636878).
   * Build against new voms.
Checksums-Sha1: 
 065a25c3f2e558895f5c1dfd017245b987d83831 1346 cgsi-gsoap_1.3.4.2-1.dsc
 bd20c693336d95abcf486c2d1c5df0bbd83babbf 54450 cgsi-gsoap_1.3.4.2.orig.tar.gz
 08c85e59caf14d3fccaeb9a6e169fcc8b1a4ea08 3344 
cgsi-gsoap_1.3.4.2-1.debian.tar.gz
 53f1d7a76335f1240fff8239e52b4aa9ba272898 60362 
libcgsi-gsoap1_1.3.4.2-1_amd64.deb
 63385d7427b14ce5a1f4830d02f405c7bdfa0a33 79720 
libcgsi-gsoap-dev_1.3.4.2-1_amd64.deb
Checksums-Sha256: 
 a1b8a0870603de34e7ded89946b41add0aa2b54ceb63917abf261b8650a054b5 1346 
cgsi-gsoap_1.3.4.2-1.dsc
 3467baeb34f0f6afceab0b3797e16ac1f6a78aa14c1be39915c9009491464a6b 54450 
cgsi-gsoap_1.3.4.2.orig.tar.gz
 8000c9ba78882107271a963bc6e6ffb1e249505c98e2dee6afeecefef0f879d9 3344 
cgsi-gsoap_1.3.4.2-1.debian.tar.gz
 d47484269229c4824b41021d3daeb17973339226397ada367c51f3839e391cb5 60362 
libcgsi-gsoap1_1.3.4.2-1_amd64.deb
 eb3ee0e49094d6f47f95280ccc29efbe4cc58882ec931006823cdc9e4aea176d 79720 
libcgsi-gsoap-dev_1.3.4.2-1_amd64.deb
Files: 
 da93958b6168ff9d705d5804e702d920 1346 libs optional cgsi-gsoap_1.3.4.2-1.dsc
 85095b98219f4ac70b0831d81126dc25 54450 libs optional 
cgsi-gsoap_1.3.4.2.orig.tar.gz
 f7bb49dc97555c4e3162d06f0c4a41d7 3344 libs optional 
cgsi-gsoap_1.3.4.2-1.debian.tar.gz
 390cc89c2c856a393f7240444c6885c9 60362 libs optional 
libcgsi-gsoap1_1.3.4.2-1_amd64.deb
 aecc1dd2a8471e8ff40000f19ec78b27 79720 libdevel optional 
libcgsi-gsoap-dev_1.3.4.2-1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk5iKKwACgkQeJY7S99W//JyAACgtjmeqwlIa0ROYdxIxOs+9/4x
gI0AnA6T2I4LKrJutUxWS5E4cFbbmxiX
=s/dF
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to