This commit was manufactured by cvs2svn to create tag 'GLITE_RELEASE_1_0'. GLITE_RELEASE_1_0
authorcvs2svn <admin@example.com>
Mon, 4 Apr 2005 23:47:33 +0000 (23:47 +0000)
committercvs2svn <admin@example.com>
Mon, 4 Apr 2005 23:47:33 +0000 (23:47 +0000)
Sprout from master 2004-12-10 13:29:03 UTC Aleš Křenek <ljocha@ics.muni.cz> 'added missing IS.wsdl'
Cherrypick from master 2005-03-22 10:03:45 UTC Master Builder <glbuilder@cern.ch> 'Incremented build number [GLBUILDER]':
    org.glite.deployment.lb/CHANGELOG
    org.glite.deployment.lb/build.xml
    org.glite.deployment.lb/config/templates/glite-lb.cfg.xml
    org.glite.deployment.lb/project/build.number
    org.glite.deployment.lb/project/glite-lb.spec
    org.glite.deployment.lb/project/version.properties
Cherrypick from glite-lb-client-interface_branch_1_0_0 2005-04-03 04:43:42 UTC Master Builder <glbuilder@cern.ch> 'Incremented build number [GLBUILDER]':
    org.glite.lb.client-interface/Makefile
    org.glite.lb.client-interface/build.xml
    org.glite.lb.client-interface/interface/CountRef.h
    org.glite.lb.client-interface/interface/Event.h.T
    org.glite.lb.client-interface/interface/Job.h
    org.glite.lb.client-interface/interface/JobStatus.h.T
    org.glite.lb.client-interface/interface/LoggingExceptions.h
    org.glite.lb.client-interface/interface/Notification.h
    org.glite.lb.client-interface/interface/ServerConnection.h
    org.glite.lb.client-interface/interface/consumer.h
    org.glite.lb.client-interface/interface/context.h
    org.glite.lb.client-interface/interface/events.h.T
    org.glite.lb.client-interface/interface/jobstat.h.T
    org.glite.lb.client-interface/interface/notification.h
    org.glite.lb.client-interface/interface/notifid.h
    org.glite.lb.client-interface/interface/producer.h.T
    org.glite.lb.client-interface/interface/statistics.h
    org.glite.lb.client-interface/project/build.number
    org.glite.lb.client-interface/project/configure.properties.xml
    org.glite.lb.client-interface/project/version.properties
Cherrypick from glite-lb-client_branch_1_0_0 2005-04-03 04:49:46 UTC Master Builder <glbuilder@cern.ch> 'Incremented build number [GLBUILDER]':
    org.glite.lb.client/Makefile
    org.glite.lb.client/build.xml
    org.glite.lb.client/doc/README-acl
    org.glite.lb.client/doc/README-fake
    org.glite.lb.client/doc/README-notify
    org.glite.lb.client/examples/abort_job.c
    org.glite.lb.client/examples/change_acl.c
    org.glite.lb.client/examples/job_log_fake.cpp
    org.glite.lb.client/examples/job_status.c
    org.glite.lb.client/examples/producer_fake.c
    org.glite.lb.client/project/build.number
    org.glite.lb.client/project/version.properties
    org.glite.lb.client/src/ServerConnection.cpp
    org.glite.lb.client/src/logevent.c.T
    org.glite.lb.client/src/producer.c
    org.glite.lb.client/src/uiwrap.c.T
Cherrypick from glite-security-proxyrenewal_branch_1_0_0_RC1 2005-03-24 11:13:57 UTC Master Builder <glbuilder@cern.ch> 'Incremented build number [GLBUILDER]':
    org.glite.security.proxyrenewal/Makefile
    org.glite.security.proxyrenewal/build.xml
    org.glite.security.proxyrenewal/config/startup
    org.glite.security.proxyrenewal/project/build.number
    org.glite.security.proxyrenewal/project/version.properties
    org.glite.security.proxyrenewal/src/acstack.h
    org.glite.security.proxyrenewal/src/commands.c
    org.glite.security.proxyrenewal/src/newformat.h
    org.glite.security.proxyrenewal/src/renew.c
    org.glite.security.proxyrenewal/src/renewal_locl.h
    org.glite.security.proxyrenewal/src/renewd.c
    org.glite.security.proxyrenewal/src/renewd_locl.h
    org.glite.security.proxyrenewal/src/voms.c
Cherrypick from glite-lb-common_branch_1_1_0 2005-04-03 04:47:22 UTC Master Builder <glbuilder@cern.ch> 'Incremented build number [GLBUILDER]':
    org.glite.lb.common/Makefile
    org.glite.lb.common/build.xml
    org.glite.lb.common/interface/lb_gss.h
    org.glite.lb.common/project/build.number
    org.glite.lb.common/project/version.properties
    org.glite.lb.common/src/events.c.T
    org.glite.lb.common/src/il_log.c
    org.glite.lb.common/src/lb_gss.c
Cherrypick from glite-lb-logger_branch_1_0_0 2005-04-03 04:55:07 UTC Master Builder <glbuilder@cern.ch> 'Incremented build number [GLBUILDER]':
    org.glite.lb.logger/build.xml
    org.glite.lb.logger/project/build.number
    org.glite.lb.logger/project/version.properties
    org.glite.lb.logger/src/event_queue.c
    org.glite.lb.logger/src/event_store.c
    org.glite.lb.logger/src/il_master.c
    org.glite.lb.logger/src/interlogd.h
    org.glite.lb.logger/src/queue_thread.c
Cherrypick from glite-jp-primary_branch_1_0_0 2005-03-11 09:07:07 UTC Master Builder <glbuilder@cern.ch> 'Incremented build number [GLBUILDER]':
    org.glite.jp.primary/Makefile
    org.glite.jp.primary/build.xml
    org.glite.jp.primary/config/startup
    org.glite.jp.primary/doc/USAGE
    org.glite.jp.primary/doc/jpnode_install.txt
    org.glite.jp.primary/project/build.number
    org.glite.jp.primary/project/version.properties
Cherrypick from glite-deployment-lb_branch_1_2_2 2005-04-04 23:47:32 UTC Alberto Di Meglio <alberto.di.meglio@cern.ch> 'Release 1.2.2':
    org.glite.deployment.lb/config/scripts/glite-lb-config.py
    org.glite.deployment.lb/doc/release_notes/release_notes.doc
    org.glite.deployment.lb/doc/release_notes/release_notes.html
    org.glite.deployment.lb/doc/release_notes/release_notes.pdf
    org.glite.deployment.lb/project/glite-lb.sdf.xml.template
    org.glite.deployment.lb/project/lxscript-rpm.xsl
Cherrypick from glite-lb-ws-interface_branch_1_0_0 2005-04-03 16:29:31 UTC Alberto Di Meglio <alberto.di.meglio@cern.ch> 'Increased revision number':
    org.glite.lb.ws-interface/Makefile
    org.glite.lb.ws-interface/build.xml
    org.glite.lb.ws-interface/project/build.number
    org.glite.lb.ws-interface/project/version.properties
    org.glite.lb.ws-interface/src/LB.xml.T
    org.glite.lb.ws-interface/src/puke-ug.xsl
Cherrypick from glite-lb_branch_1_0_0_RC1 2005-04-03 16:57:43 UTC Alberto Di Meglio <alberto.di.meglio@cern.ch> 'Increased revision number':
    org.glite.lb/build.xml
    org.glite.lb/project/build.number
    org.glite.lb/project/dependencies.properties
    org.glite.lb/project/events.T
    org.glite.lb/project/types.T
    org.glite.lb/project/version.properties
Cherrypick from glite-wms-utils-exception_branch_1_0_0 2005-04-04 00:48:20 UTC Alberto Di Meglio <alberto.di.meglio@cern.ch> 'Increased revision number':
    org.glite.wms-utils.exception/build.xml
    org.glite.wms-utils.exception/configure.ac
    org.glite.wms-utils.exception/interface/glite/wmsutils/exception/Exception.h
    org.glite.wms-utils.exception/project/build.number
    org.glite.wms-utils.exception/project/version.properties
    org.glite.wms-utils.exception/src/Exception.cpp
Cherrypick from glite-jp_branch_1_0_0_RC1 2005-03-11 09:10:32 UTC Master Builder <glbuilder@cern.ch> 'Tagged dependencies properties file [GLBUILDER]':
    org.glite.jp/build.xml
    org.glite.jp/project/build.number
    org.glite.jp/project/dependencies.properties
    org.glite.jp/project/version.properties
Cherrypick from glite-lb-server_branch_1_0_0 2005-04-03 04:57:12 UTC Master Builder <glbuilder@cern.ch> 'Incremented build number [GLBUILDER]':
    org.glite.lb.server/Makefile
    org.glite.lb.server/build.xml
    org.glite.lb.server/project/build.number
    org.glite.lb.server/project/version.properties
Cherrypick from glite-jp-common_branch_1_0_0 2005-03-11 09:05:09 UTC Master Builder <glbuilder@cern.ch> 'Incremented build number [GLBUILDER]':
    org.glite.jp.common/build.xml
    org.glite.jp.common/project/build.number
    org.glite.jp.common/project/version.properties
Cherrypick from glite-jp-ws-interface_branch_1_0_0 2005-03-11 09:03:28 UTC Master Builder <glbuilder@cern.ch> 'Incremented build number [GLBUILDER]':
    org.glite.jp.ws-interface/build.xml
    org.glite.jp.ws-interface/project/build.number
    org.glite.jp.ws-interface/project/version.properties
Cherrypick from glite-lb-server-bones_branch_1_0_0 2005-04-03 04:53:22 UTC Master Builder <glbuilder@cern.ch> 'Incremented build number [GLBUILDER]':
    org.glite.lb.server-bones/build.xml
    org.glite.lb.server-bones/project/build.number
    org.glite.lb.server-bones/project/version.properties
Cherrypick from glite-wms-utils-jobid_branch_1_0_0 2005-04-03 01:12:39 UTC Master Builder <glbuilder@cern.ch> 'Incremented build number [GLBUILDER]':
    org.glite.wms-utils.jobid/build.xml
    org.glite.wms-utils.jobid/project/build.number
    org.glite.wms-utils.jobid/project/version.properties
Delete:
    org.glite.jp.index/.cvsignore
    org.glite.jp.index/Makefile
    org.glite.jp.index/build.xml
    org.glite.jp.index/project/JobProvenanceIS.wsdl
    org.glite.jp.index/project/build.properties
    org.glite.jp.index/project/configure.properties.xml
    org.glite.jp.index/project/properties.xml
    org.glite.jp.index/project/tar_exclude
    org.glite.jp.index/project/version.properties
    org.glite.jp.index/src/simple_server.c
    org.glite.jp.index/src/soap_ops.c
    org.glite.jp.index/src/typemap.dat
    org.glite.lb.client/examples/log_usertag_proxy.c
    org.gridsite.core/.cvsignore
    org.gridsite.core/CHANGES
    org.gridsite.core/INSTALL
    org.gridsite.core/LICENSE
    org.gridsite.core/README
    org.gridsite.core/VERSION
    org.gridsite.core/build.xml
    org.gridsite.core/doc/README.htcp-bin
    org.gridsite.core/doc/admin.html
    org.gridsite.core/doc/build-apache2.sh
    org.gridsite.core/doc/config.html
    org.gridsite.core/doc/findproxyfile.1
    org.gridsite.core/doc/gacl.html
    org.gridsite.core/doc/htcp.1
    org.gridsite.core/doc/htll.1
    org.gridsite.core/doc/htls.1
    org.gridsite.core/doc/htmkdir.1
    org.gridsite.core/doc/htrm.1
    org.gridsite.core/doc/httpd-fileserver.conf
    org.gridsite.core/doc/httpd-webserver.conf
    org.gridsite.core/doc/index.html
    org.gridsite.core/doc/install.html
    org.gridsite.core/doc/library.html
    org.gridsite.core/doc/module.html
    org.gridsite.core/doc/urlencode.1
    org.gridsite.core/doc/user.html
    org.gridsite.core/interface/gridsite-gacl.h
    org.gridsite.core/interface/gridsite.h
    org.gridsite.core/project/build.properties
    org.gridsite.core/project/configure.properties.xml
    org.gridsite.core/project/dependencies.properties
    org.gridsite.core/project/gridsite.core.csf.xml
    org.gridsite.core/project/properties.xml
    org.gridsite.core/project/taskdefs.xml
    org.gridsite.core/project/version.properties
    org.gridsite.core/src/Doxyfile
    org.gridsite.core/src/Makefile
    org.gridsite.core/src/delegation.h
    org.gridsite.core/src/doxygen.css
    org.gridsite.core/src/doxyheader.html
    org.gridsite.core/src/findproxyfile.c
    org.gridsite.core/src/gaclexample.c
    org.gridsite.core/src/gridsite.spec
    org.gridsite.core/src/grst-delegation.c
    org.gridsite.core/src/grst_admin.h
    org.gridsite.core/src/grst_admin_file.c
    org.gridsite.core/src/grst_admin_gacl.c
    org.gridsite.core/src/grst_admin_main.c
    org.gridsite.core/src/grst_gacl.c
    org.gridsite.core/src/grst_http.c
    org.gridsite.core/src/grst_x509.c
    org.gridsite.core/src/htcp
    org.gridsite.core/src/htcp.c
    org.gridsite.core/src/htproxyput.c
    org.gridsite.core/src/mod_gridsite.c
    org.gridsite.core/src/mod_ssl-private.h
    org.gridsite.core/src/proxyput-example.c
    org.gridsite.core/src/real-gridsite-admin.cgi
    org.gridsite.core/src/roffit
    org.gridsite.core/src/urlencode.c

194 files changed:
org.glite.deployment.lb/CHANGELOG [new file with mode: 0644]
org.glite.deployment.lb/build.xml
org.glite.deployment.lb/config/scripts/glite-lb-config.py
org.glite.deployment.lb/config/templates/glite-lb.cfg.xml
org.glite.deployment.lb/doc/release_notes/release_notes.doc
org.glite.deployment.lb/doc/release_notes/release_notes.html
org.glite.deployment.lb/doc/release_notes/release_notes.pdf
org.glite.deployment.lb/project/build.number [new file with mode: 0644]
org.glite.deployment.lb/project/glite-lb.sdf.xml.template
org.glite.deployment.lb/project/glite-lb.spec
org.glite.deployment.lb/project/lxscript-rpm.xsl
org.glite.deployment.lb/project/version.properties
org.glite.jp.common/build.xml
org.glite.jp.common/project/build.number [new file with mode: 0644]
org.glite.jp.common/project/version.properties
org.glite.jp.index/.cvsignore [deleted file]
org.glite.jp.index/Makefile [deleted file]
org.glite.jp.index/build.xml [deleted file]
org.glite.jp.index/project/JobProvenanceIS.wsdl [deleted file]
org.glite.jp.index/project/build.properties [deleted file]
org.glite.jp.index/project/configure.properties.xml [deleted file]
org.glite.jp.index/project/properties.xml [deleted file]
org.glite.jp.index/project/tar_exclude [deleted file]
org.glite.jp.index/project/version.properties [deleted file]
org.glite.jp.index/src/simple_server.c [deleted file]
org.glite.jp.index/src/soap_ops.c [deleted file]
org.glite.jp.index/src/typemap.dat [deleted file]
org.glite.jp.primary/Makefile
org.glite.jp.primary/build.xml
org.glite.jp.primary/config/startup [new file with mode: 0644]
org.glite.jp.primary/doc/USAGE [new file with mode: 0644]
org.glite.jp.primary/doc/jpnode_install.txt [new file with mode: 0644]
org.glite.jp.primary/project/build.number [new file with mode: 0644]
org.glite.jp.primary/project/version.properties
org.glite.jp.ws-interface/build.xml
org.glite.jp.ws-interface/project/build.number [new file with mode: 0644]
org.glite.jp.ws-interface/project/version.properties
org.glite.jp/build.xml
org.glite.jp/project/build.number [new file with mode: 0644]
org.glite.jp/project/dependencies.properties
org.glite.jp/project/version.properties
org.glite.lb.client-interface/Makefile
org.glite.lb.client-interface/build.xml
org.glite.lb.client-interface/interface/CountRef.h
org.glite.lb.client-interface/interface/Event.h.T
org.glite.lb.client-interface/interface/Job.h
org.glite.lb.client-interface/interface/JobStatus.h.T
org.glite.lb.client-interface/interface/LoggingExceptions.h
org.glite.lb.client-interface/interface/Notification.h
org.glite.lb.client-interface/interface/ServerConnection.h
org.glite.lb.client-interface/interface/consumer.h
org.glite.lb.client-interface/interface/context.h
org.glite.lb.client-interface/interface/events.h.T
org.glite.lb.client-interface/interface/jobstat.h.T
org.glite.lb.client-interface/interface/notification.h
org.glite.lb.client-interface/interface/notifid.h
org.glite.lb.client-interface/interface/producer.h.T
org.glite.lb.client-interface/interface/statistics.h
org.glite.lb.client-interface/project/build.number [new file with mode: 0644]
org.glite.lb.client-interface/project/configure.properties.xml
org.glite.lb.client-interface/project/version.properties
org.glite.lb.client/Makefile
org.glite.lb.client/build.xml
org.glite.lb.client/doc/README-acl [new file with mode: 0644]
org.glite.lb.client/doc/README-fake
org.glite.lb.client/doc/README-notify [new file with mode: 0644]
org.glite.lb.client/examples/abort_job.c [new file with mode: 0644]
org.glite.lb.client/examples/change_acl.c [new file with mode: 0644]
org.glite.lb.client/examples/job_status.c [new file with mode: 0644]
org.glite.lb.client/examples/log_usertag_proxy.c [deleted file]
org.glite.lb.client/examples/producer_fake.c
org.glite.lb.client/project/build.number [new file with mode: 0644]
org.glite.lb.client/project/version.properties
org.glite.lb.client/src/ServerConnection.cpp
org.glite.lb.client/src/logevent.c.T
org.glite.lb.client/src/producer.c
org.glite.lb.client/src/uiwrap.c.T
org.glite.lb.common/Makefile
org.glite.lb.common/build.xml
org.glite.lb.common/interface/lb_gss.h
org.glite.lb.common/project/build.number [new file with mode: 0644]
org.glite.lb.common/project/version.properties
org.glite.lb.common/src/events.c.T
org.glite.lb.common/src/il_log.c
org.glite.lb.common/src/lb_gss.c
org.glite.lb.logger/build.xml
org.glite.lb.logger/project/build.number [new file with mode: 0644]
org.glite.lb.logger/project/version.properties
org.glite.lb.logger/src/event_queue.c
org.glite.lb.logger/src/event_store.c
org.glite.lb.logger/src/il_master.c
org.glite.lb.logger/src/interlogd.h
org.glite.lb.logger/src/queue_thread.c
org.glite.lb.server-bones/build.xml
org.glite.lb.server-bones/project/build.number [new file with mode: 0644]
org.glite.lb.server-bones/project/version.properties
org.glite.lb.server/Makefile
org.glite.lb.server/build.xml
org.glite.lb.server/project/build.number [new file with mode: 0644]
org.glite.lb.server/project/version.properties
org.glite.lb.ws-interface/Makefile
org.glite.lb.ws-interface/build.xml
org.glite.lb.ws-interface/project/build.number [new file with mode: 0644]
org.glite.lb.ws-interface/project/version.properties
org.glite.lb.ws-interface/src/LB.xml.T [new file with mode: 0644]
org.glite.lb.ws-interface/src/puke-ug.xsl [new file with mode: 0644]
org.glite.lb/build.xml
org.glite.lb/project/build.number [new file with mode: 0644]
org.glite.lb/project/dependencies.properties
org.glite.lb/project/events.T
org.glite.lb/project/types.T
org.glite.lb/project/version.properties
org.glite.security.proxyrenewal/Makefile
org.glite.security.proxyrenewal/build.xml
org.glite.security.proxyrenewal/config/startup
org.glite.security.proxyrenewal/project/build.number [new file with mode: 0644]
org.glite.security.proxyrenewal/project/version.properties
org.glite.security.proxyrenewal/src/acstack.h [new file with mode: 0755]
org.glite.security.proxyrenewal/src/commands.c
org.glite.security.proxyrenewal/src/newformat.h [new file with mode: 0755]
org.glite.security.proxyrenewal/src/renew.c
org.glite.security.proxyrenewal/src/renewal_locl.h
org.glite.security.proxyrenewal/src/renewd.c
org.glite.security.proxyrenewal/src/renewd_locl.h
org.glite.security.proxyrenewal/src/voms.c [new file with mode: 0644]
org.glite.wms-utils.exception/build.xml
org.glite.wms-utils.exception/configure.ac
org.glite.wms-utils.exception/interface/glite/wmsutils/exception/Exception.h
org.glite.wms-utils.exception/project/build.number [new file with mode: 0644]
org.glite.wms-utils.exception/project/version.properties
org.glite.wms-utils.exception/src/Exception.cpp
org.glite.wms-utils.jobid/build.xml
org.glite.wms-utils.jobid/project/build.number [new file with mode: 0644]
org.glite.wms-utils.jobid/project/version.properties
org.gridsite.core/.cvsignore [deleted file]
org.gridsite.core/CHANGES [deleted file]
org.gridsite.core/INSTALL [deleted file]
org.gridsite.core/LICENSE [deleted file]
org.gridsite.core/README [deleted file]
org.gridsite.core/VERSION [deleted file]
org.gridsite.core/build.xml [deleted file]
org.gridsite.core/doc/README.htcp-bin [deleted file]
org.gridsite.core/doc/admin.html [deleted file]
org.gridsite.core/doc/build-apache2.sh [deleted file]
org.gridsite.core/doc/config.html [deleted file]
org.gridsite.core/doc/findproxyfile.1 [deleted file]
org.gridsite.core/doc/gacl.html [deleted file]
org.gridsite.core/doc/htcp.1 [deleted file]
org.gridsite.core/doc/htll.1 [deleted file]
org.gridsite.core/doc/htls.1 [deleted file]
org.gridsite.core/doc/htmkdir.1 [deleted file]
org.gridsite.core/doc/htrm.1 [deleted file]
org.gridsite.core/doc/httpd-fileserver.conf [deleted file]
org.gridsite.core/doc/httpd-webserver.conf [deleted file]
org.gridsite.core/doc/index.html [deleted file]
org.gridsite.core/doc/install.html [deleted file]
org.gridsite.core/doc/library.html [deleted file]
org.gridsite.core/doc/module.html [deleted file]
org.gridsite.core/doc/urlencode.1 [deleted file]
org.gridsite.core/doc/user.html [deleted file]
org.gridsite.core/interface/gridsite-gacl.h [deleted file]
org.gridsite.core/interface/gridsite.h [deleted file]
org.gridsite.core/project/build.properties [deleted file]
org.gridsite.core/project/configure.properties.xml [deleted file]
org.gridsite.core/project/dependencies.properties [deleted file]
org.gridsite.core/project/gridsite.core.csf.xml [deleted file]
org.gridsite.core/project/properties.xml [deleted file]
org.gridsite.core/project/taskdefs.xml [deleted file]
org.gridsite.core/project/version.properties [deleted file]
org.gridsite.core/src/Doxyfile [deleted file]
org.gridsite.core/src/Makefile [deleted file]
org.gridsite.core/src/delegation.h [deleted file]
org.gridsite.core/src/doxygen.css [deleted file]
org.gridsite.core/src/doxyheader.html [deleted file]
org.gridsite.core/src/findproxyfile.c [deleted file]
org.gridsite.core/src/gaclexample.c [deleted file]
org.gridsite.core/src/gridsite.spec [deleted file]
org.gridsite.core/src/grst-delegation.c [deleted file]
org.gridsite.core/src/grst_admin.h [deleted file]
org.gridsite.core/src/grst_admin_file.c [deleted file]
org.gridsite.core/src/grst_admin_gacl.c [deleted file]
org.gridsite.core/src/grst_admin_main.c [deleted file]
org.gridsite.core/src/grst_gacl.c [deleted file]
org.gridsite.core/src/grst_http.c [deleted file]
org.gridsite.core/src/grst_x509.c [deleted file]
org.gridsite.core/src/htcp [deleted file]
org.gridsite.core/src/htcp.c [deleted file]
org.gridsite.core/src/htproxyput.c [deleted file]
org.gridsite.core/src/mod_gridsite.c [deleted file]
org.gridsite.core/src/mod_ssl-private.h [deleted file]
org.gridsite.core/src/proxyput-example.c [deleted file]
org.gridsite.core/src/real-gridsite-admin.cgi [deleted file]
org.gridsite.core/src/roffit [deleted file]
org.gridsite.core/src/urlencode.c [deleted file]

diff --git a/org.glite.deployment.lb/CHANGELOG b/org.glite.deployment.lb/CHANGELOG
new file mode 100644 (file)
index 0000000..e14ac8a
--- /dev/null
@@ -0,0 +1,20 @@
+DATE: 21-03-2005 17:21\r
+[dimeglio] Implemented status method\r
+\r
+DATE: 21-03-2005 00:32\r
+[dimeglio] Added PERL5LIB env var\r
+\r
+DATE: 17-03-2005 17:33\r
+[gdiez] Stopping and starting the database before the index creation (just after the database is created and the user granted)\r
+\r
+DATE: 09-03-2005 23:05\r
+[dimeglio] Moved creation of indices inside database creation (if database\r
+                  exists indices are not recreated)\r
+\r
+DATE: 02-03-2005 11:05\r
+[dimeglio] Started CHANGELOG\r
+[dimeglio] Fixed formatting, improved display of message using glib.printXxxMessage functions\r
+[dimeglio] Fixed some problems when starting/stopping services\r
+[dimeglio] GLITE_USER parameter not exposed anymore in config file, use same user parameters\r
+                  as WMS to allow installation on same node\r
+[dimeglio] Increased module version number to 1.2.0
\ No newline at end of file
index 0ceaee9..874c661 100644 (file)
 
        Revision history:
        $Log$
+       Revision 1.5  2004/10/17 22:34:39  dimeglio
+       Use new installer script format
+       Use global filters
+       Use RH standard expat rpm in sdf template
+       
        Revision 1.4  2004/10/14 16:07:53  dimeglio
        Removed wms.thirdparty-globus-ssl-utils
        
@@ -84,6 +89,7 @@
                 Load version file 
                 ========================================= -->
        <property file="${module.version.file}"/>
+               <property file="${module.build.file}"/>
 
        <!-- ==============================================
                 Local private targets
index d6f2af6..dc63571 100644 (file)
@@ -6,7 +6,7 @@
 # For license conditions see the license file or http://eu-egee.org/license.html
 #
 ################################################################################
-# glite-lb-config v. 0.2.0
+# glite-lb-config v. 1.2.2
 #
 # Post-installation script for configuring the gLite Logging and Bookkeping Server
 # Robert Harakaly < robert.harakaly@cern.ch >
 #
 ################################################################################
 
-import os,string
+import os,string,pwd
 import sys, posix, getopt,time
 
 sys.path.append(".")
 from gLiteInstallerLib import gLib 
+from gliteRgmaServicetool import gliteRgmaServicetool
 import mysql as MySQL
 
 # Set global variables here 
 global params                         # all config values from the XML file
+global rgmaServicetool
 
 class glite_lb:
 
     def __init__(self):
         self.mysql = MySQL.Mysql()
         self.verbose = 0
-        self.version = "0.2.0"
+        self.version = "1.2.2"
         self.name = "glite-lb"
         self.friendly_name = "gLite Logging and Bookkeeping"
         
@@ -95,6 +97,9 @@ python %s-config [OPTION...]""" % (self.name, os.environ['GLITE_LOCATION'], \
         print '    -c, --checkconf     print the service configuration'
         print '    -v, --version       print the version of the configuration script'
         print '    -h, --help          print this usage information'
+        print '    --start             start the service'
+        print '    --stop              stop the service'
+        print '    --status            check service status'
         print '\n'
 
     #-------------------------------------------------------------------------------
@@ -102,65 +107,222 @@ python %s-config [OPTION...]""" % (self.name, os.environ['GLITE_LOCATION'], \
     #-------------------------------------------------------------------------------
 
     def start(self):
+
         self.mysql.start()
+        time.sleep(5)
+
+        if not os.path.exists('/tmp/mysql.sock'):
+            os.symlink('/var/lib/mysql/mysql.sock', '/tmp/mysql.sock')
+            
+        pid = glib.getPID('bkserverd')
+        if pid != 0:
+            print 'The gLite LB Server service is already running. Restarting...'
+            os.system('%s/etc/init.d/glite-lb-bkserverd stop' % os.environ['GLITE_LOCATION'])
+        else:
+            print 'Starting the gLite LB Server service...'
+
         os.system('%s/etc/init.d/glite-lb-bkserverd start' % os.environ['GLITE_LOCATION'])
+
+        pid = glib.getPID('bkserverd')
+
+        if (pid != 0):
+            print "The gLite LB Server service has been started               ",
+            glib.printOkMessage()
+        else:
+            glib.printErrorMessage("Could not start the gLite LB Server service")
+            glib.printErrorMessage("Please verify and re-run the script                        "),
+            glib.printFailedMessage()
+            return 1
+        
+        #-------------------------------------------------------------------
+        # Start Servicetool
+        #-------------------------------------------------------------------
+        
+        pid = glib.getPID('rgma-servicetool')
+        if (pid != 0):
+               print 'The gLite R-GMA Servicetool service is already running. Restarting...'
+               rgmaServicetool.stop()
+        else:
+            print "Starting the gLite R-GMA Servicetool service"
+
+        rgmaServicetool.start()
+
+        
+        # Check that the daemon is running
+       
+        pid = glib.getPID('rgma-servicetool')
+
+        if (pid != 0):
+            print "The gLite R-GMA Servicetool service has been started               ",
+            glib.printOkMessage()
+        else:
+            glib.printErrorMessage("Could not start the gLite R-GMA Servicetool service")
+            glib.printErrorMessage("Please verify and re-run the script                        "),
+            glib.printFailedMessage()
+            return 1
         
         return 0
         
     def stop(self):
-        os.system('%s/etc/init.d/glite-lb-bkserverd stop' % os.environ['GLITE_LOCATION'])
+
+        pid = glib.getPID('bkserverd')
+        if (pid != 0):
+            os.system('%s/etc/init.d/glite-lb-bkserverd stop' % os.environ['GLITE_LOCATION'])
+
+        pid = glib.getPID('bkserverd')
+        if (pid != 0):
+            print 'Could not stop the LB Server service            ',
+            glib.printFailedMessage()
+        else:
+            print 'The LB Server service has been stopped            ',
+            glib.printOkMessage()
+        
         self.mysql.stop()
+
+        #-------------------------------------------------------------------
+        # Stop the servicetool
+        #-------------------------------------------------------------------
+
+        pid = glib.getPID('rgma-servicetool')
+        if (pid != 0):
+            rgmaServicetool.stop()
+
+        pid = glib.getPID('rgma-servicetool')
+        if (pid != 0):
+            print 'Could not stop the R-GMA Servicetool service            ',
+            glib.printFailedMessage()
+        else:
+            print 'The R-GMA Servicetool service has been stopped            ',
+            glib.printOkMessage()
         
         return 0
         
+    def status(self):
+
+        error_level = 0
+
+        retval = os.system('%s/etc/init.d/glite-lb-bkserverd status' % os.environ['GLITE_LOCATION'])
+        if retval != 0:
+            error_level = 1
+
+        return error_level
+        
     def configure(self):
-        # Create all directories needed
-        if params.has_key('dirlist'):
-           dirlist = string.split(params['dirlist'],',')
-           for d in dirlist:
-              glib.check_dir(d,0777)
-        glib.check_dir(params['GLITE_CERT_DIR'])
-         
+        
+        #--------------------------------------------------------
+        # Installs the Security Utilities
+        #--------------------------------------------------------
+        
+        if os.system("python %s/glite-security-utils-config.py --subservice" % glib.getScriptPath()):
+            print "\nInstalling gLite Security Utilities                   ",
+            glib.printFailedMessage()
+            return 1
+
+        print "\nInstalling gLite Security Utilities                   ",
+        glib.printOkMessage()
+        
         # Create the GLITE_USER if it doesn't exists
-        print "Creating/Verifying the GLITE_USER account %s" % params['GLITE_USER']
-        glib.add_user(params['GLITE_USER'],params['GLITE_USER'])
-        (uid,gid) = glib.get_user_info(params['GLITE_USER'])
+        print "\nCreating/Verifying the GLITE_USER account %s" % os.environ['GLITE_USER']
+        (uid,gid) = glib.get_user_info(os.environ['GLITE_USER'])
         glib.check_dir(os.environ['GLITE_LOCATION_VAR'],0755, uid, gid)
-        glib.check_dir("/home/%s/.certs" % params['GLITE_USER'],0755, uid, gid)
-        lb_cert_path = pwd.getpwnam(params['GLITE_USER'])[5] + "/" + params['user.certificate.path']
+        lb_cert_path = pwd.getpwnam(os.environ['GLITE_USER'])[5] + "/" + params['user.certificate.path']
+        glib.check_dir(lb_cert_path ,0755, uid, gid)
+        glib.printOkMessage()
 
+        # Create all directories needed
+        print "\nVerify CA certificates directory            ",
+        glib.check_dir(os.environ['GLITE_CERT_DIR'])
+        glib.printOkMessage()
+         
         # Copy certificates
-        glib.check_dir( lb_cert_path, 0755, uid, gid)
+        print "\nCopy host certificates to GLITE_USER home directory as service certificates",
         os.system("cp %s %s %s/" % (params['host.certificate.file'], params['host.key.file'], lb_cert_path))
         os.chown("%s/hostcert.pem" % lb_cert_path, uid,gid)
+        os.chmod("%s/hostcert.pem" % lb_cert_path, 0644)
         os.chown("%s/hostkey.pem" % lb_cert_path, uid,gid)
-        glib.export('GLITE_HOST_CERT',"%s/hostcert.pem" % lb_cert_path)
-        glib.export('GLITE_HOST_KEY',"%s/hostkey.pem" % lb_cert_path)
-                
+        os.chmod("%s/hostkey.pem" % lb_cert_path, 0400)
+        glib.printOkMessage()
+
         # Create the MySQL database
+        print "\nCreate/Verify the %s database" % params['lb.database.name']
         self.mysql.stop()
         time.sleep(5)
         self.mysql.start()
         
-        print '#-------------------------------------------------------------------'
-        print ('Creating MySQL %s database.' % params['lb.database.name'])
-        print '#-------------------------------------------------------------------'
-        
-        os.system('/usr/bin/mysqlaccess %s %s' % (params['lb.database.username'], params['lb.database.name']))
-        file = open('/tmp/mysql_ct', 'w')
-        text = ['CREATE DATABASE %s;\n' % params['lb.database.name'], 
-                   'GRANT ALL PRIVILEGES ON %s.* TO %s@localhost IDENTIFIED BY "";\n' % (params['lb.database.name'],params['lb.database.username']),
-                   'USE %s;\n' % params['lb.database.name'],
-                   '\. %s/etc/glite-lb-dbsetup.sql\n' % os.environ['GLITE_LOCATION']]
-
-        file.writelines(text)
-        file.close()
-        os.system('/usr/bin/mysql < /tmp/mysql_ct')
-        os.system('/bin/rm /tmp/mysql_ct')
         if not os.path.exists('/tmp/mysql.sock'):
             os.symlink('/var/lib/mysql/mysql.sock', '/tmp/mysql.sock')
+
+        # Check if database exists
+        if self.mysql.existsDB(params['lb.database.name']) != 0:
+            # Create database
+            print ('\n==> Creating MySQL %s database\n' % params['lb.database.name'])
+    
+            if os.path.exists('/bin/rm /tmp/mysql_ct'):
+                os.remove('/tmp/mysql_ct')
+            
+            file = open('/tmp/mysql_ct', 'w')
+            text = ['CREATE DATABASE %s;\n' % params['lb.database.name'], 
+                       'GRANT ALL PRIVILEGES ON %s.* TO %s@localhost IDENTIFIED BY "";\n' \
+                       % (params['lb.database.name'],params['lb.database.username']),
+                       'USE %s;\n' % params['lb.database.name'],
+                       '\. %s/etc/glite-lb-dbsetup.sql\n' % os.environ['GLITE_LOCATION']]
+    
+            file.writelines(text)
+            file.close()
+            os.system('/usr/bin/mysql < /tmp/mysql_ct')
+            os.system('/bin/rm /tmp/mysql_ct')
+            
+            #Starting and stopping the database before the index creation
+            self.mysql.stop()
+            time.sleep(5)
+            self.mysql.start()
+
+            #Creating the indexes
+            print 'Creating the index configuration file %s/etc/glite-lb-index.conf            ' % os.environ['GLITE_LOCATION'],
+            path = "%s/etc/glite-lb-index.conf" % os.environ['GLITE_LOCATION']
+            pathBak = "%s/etc/glite-lb-index.conf.bak" % os.environ['GLITE_LOCATION']
+        
+            if os.path.exists(pathBak):
+                os.remove(pathBak)
+            if os.path.exists(path):
+                os.rename(path,pathBak)
+            file = open(path, 'w')
+            file.write("[\n")
+            file.write("        JobIndices = {\n")
+            for index in params['lb.index.list']:
+                file.write("                [ type = \"system\"; name = \"%s\" ],\n" % index)
+            file.write("        }\n")
+            file.write("]\n")
+            file.close()
+            glib.printOkMessage()
+            
+            print "Running glite-lb-bkindex                    ",    
+            if os.system('%s/bin/glite-lb-bkindex -r %s/etc/glite-lb-index.conf' % (os.environ['GLITE_LOCATION'],os.environ['GLITE_LOCATION'])):
+                glib.printFailedMessage()
+                return 1
+            else:
+                glib.printOkMessage()
+        
+        else:
+            print "\n==> MySQL database %s already exist\n" % params['lb.database.name']
+            
         self.mysql.stop()
-         
+    
+        #-------------------------------------------------------------------
+        # RGMA servicetool: configure servicetool
+        #-------------------------------------------------------------------
+        
+        print "Configuring the R-GMA Servicetool..."
+    
+        if rgmaServicetool.configure(glib):
+            # error in configuring services
+            print "Configuring the R-GMA Servicetool...                ",
+            glib.printFailedMessage()
+            return 1
+    
+        print "Configuring the R-GMA Servicetool...                ",
+        glib.printOkMessage()
+            
         return 0
         
 #-------------------------------------------------------------------------------
@@ -181,17 +343,28 @@ def set_env():
     if not os.path.exists(os.environ['GLITE_LOCATION_TMP']):
         os.mkdir(os.environ['GLITE_LOCATION_TMP'],0755)
 
-    (uid,gid) = glib.add_user(params['GLITE_USER'])
-    lb_cert_path = pwd.getpwnam(params['GLITE_USER'])[5] + "/" + params['user.certificate.path']
+    if not params.has_key('glite.user.group'):
+        params['glite.user.group'] = ''
+    (uid,gid) = glib.add_user(params['glite.user.name'],params['glite.user.group'])
+    glib.export('GLITE_USER',params['glite.user.name'])
+    lb_cert_path = pwd.getpwnam(os.environ['GLITE_USER'])[5] + "/" + params['user.certificate.path']
     glib.export('GLITE_HOST_CERT',"%s/hostcert.pem" % lb_cert_path)
     glib.export('GLITE_HOST_KEY',"%s/hostkey.pem" % lb_cert_path)
-    glib.export('GLOBUS_LOCATION',params['GLOBUS_LOCATION'])
     glib.export('GLITE_CERT_DIR',params['ca.certificates.dir'])
 
+    glib.export('GLOBUS_LOCATION',params['GLOBUS_LOCATION'])
+    glib.export('GPT_LOCATION',params['GPT_LOCATION'])
+    
+    glib.export('JAVA_HOME')
+
     # bin and lib paths
-    glib.addEnvPath("PATH","/usr/bin/:%s/bin:%s/externals/bin:%s/bin" % (os.environ['GLOBUS_LOCATION'],os.environ['GLITE_LOCATION'],os.environ['GLITE_LOCATION']))
+    glib.addEnvPath("PATH","/usr/bin/:%s/bin:%s/bin:%s/externals/bin:%s/bin" \
+        % (os.environ['JAVA_HOME'],os.environ['GLOBUS_LOCATION'],os.environ['GLITE_LOCATION'],os.environ['GLITE_LOCATION']))
     glib.addEnvPath("LD_LIBRARY_PATH","/usr/lib:%s/lib:%s/externals/lib:%s/lib" % (os.environ['GLOBUS_LOCATION'], os.environ['GLITE_LOCATION'],os.environ['GLITE_LOCATION']))
 
+    # Perl
+    glib.addEnvPath("PERL5LIB", "%s/lib/perl:%s/lib/perl5" % (os.environ['GPT_LOCATION'],os.environ['GLITE_LOCATION']))
+
     # Set environment
     glib.setUserEnv()
     
@@ -201,13 +374,6 @@ def set_env():
 
 if __name__ == '__main__':
 
-    # Command line opts if any
-    try:
-        opts, args = getopt.getopt(sys.argv[1:], 'chv', ['checkconf', 'help', 'version','stop','start'])
-    except getopt.GetoptError:
-        usage(msg = "Unknown options(s)")
-        sys.exit(1)
-
     # The script must be run as root
     if not os.geteuid()==0:
         print '"\nThis script must be run as root\n'
@@ -218,8 +384,16 @@ if __name__ == '__main__':
     
     # Load parameters
     params = {}
+    try:
+        opts, args = getopt.getopt(sys.argv[1:], '', ['siteconfig='])
+        for o, a in opts:
+            if o == "--siteconfig":
+                params['site.config.url'] = a
+                break
+    except getopt.GetoptError:
+        pass
     if glib.loadConfiguration("%s/../glite-lb.cfg.xml" % glib.getScriptPath(),params):
-        print "Configuration files not found.\nPlease verify if the configuration files are copied from the templates directory\n"
+        print "An error occurred while configuring the service"
         sys.exit(1)
     
     verbose = 0
@@ -234,7 +408,17 @@ if __name__ == '__main__':
     # Instantiate the service classes
     service = glite_lb()
     service.verbose = verbose
+    # Instantiate the rgma servicetool class
+    rgmaServicetool = gliteRgmaServicetool()
+    rgmaServicetool.verbose = verbose  
     
+    # Command line opts if any
+    try:
+        opts, args = getopt.getopt(sys.argv[1:], 'chv', ['checkconf', 'help', 'version','stop','start','status','siteconfig='])
+    except getopt.GetoptError:
+        service.usage(msg = "Unknown options(s)")
+        sys.exit(1)
+
     # Check cli options
     for o, a in opts:
         if o in ("-h", "--help"):
@@ -248,18 +432,22 @@ if __name__ == '__main__':
             service.showVersion()
             glib.print_params(params)
             sys.exit(0)
-        if o == "--stop":
+       if o in ("stop", "--stop"): 
             service.stop()
             sys.exit(0)
-        if o == "--start":
+       if o in ("start", "--start"):
             service.start()
             sys.exit(0)
+        if o == "--status":
+            sys.exit(service.status())
+                
 
     # Check certificates
     if params.has_key('glite.installer.checkcerts'):
         if params['glite.installer.checkcerts'] == "true":
             if glib.check_certs(params) != 0:
-                print "Certificate files are not found\n" 
+                print "An error occurred while configuring the %s service" \
+                    % service.friendly_name
                 sys.exit(1)
     
     # Print configuration parameters
@@ -272,14 +460,20 @@ if __name__ == '__main__':
         
     # Configure the service
     if service.configure() == 0:
-        print "%s configuration successfully completed\n" % service.friendly_name
+        print "\n%s configuration successfully completed                " % service.friendly_name,
+        glib.printOkMessage()
+        glib.registerService()
     else:
-        print "An error occurred while configuring the %s" % service.friendly_name
+        print "\nAn error occurred while configuring the %s            " % service.friendly_name,
+        glib.printFailedMessage()
         sys.exit(1)
         
     # Start the service
-    # service.stop()
-    if service.start() != 0:
-        print "An error occurred while starting the %s" % service.friendly_name
+    if service.start() == 0:
+        print "\nThe %s was successfully started           " % service.friendly_name,
+        glib.printOkMessage()
+    else:
+        print "\nAn error occurred while starting the %s            " % service.friendly_name,
+        glib.printFailedMessage()
         sys.exit(1)
 
index 44a7dad..747a6b4 100644 (file)
@@ -6,7 +6,22 @@
                <!-- User-defined parameters - Please change them -->
                <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
 
-               <!-- gLite configuration -->
+               <!--  gLite services user accounts  -->
+               <glite.user.name 
+                       description="Name of the user account used to run the gLite services
+                       on this LB node"
+                       value="changeme"/>
+
+               <glite.user.group
+                       description="Group of the user specified in the 'glite.user.name'
+                       parameter. Leave it empty of comment it out to use the same as 'glite.user.name'"
+                       value="changeme"/>
+               
+               <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
+               <!-- Advanced parameters - Change them if you know what you're doing -->
+               <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
+
+               <!-- Installer configuration -->
                <glite.installer.verbose
                        description="Enable verbose output"
                        value="true"/>
                        description="Enable check of host certificates"
                        value="true"/>
 
-               <GLITE_USER
-                       description="The account used to run the LB daemons"
-                       value="changeme"/>
-                       
-               <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
-               <!-- Optimization parameters - Change them if you know what you're doing -->
-               <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
-
                <!-- MySQL DB -->
                <lb.database.name
                        description="The mySQL database name to create for storing LB data
-                                               Now it must be set to the default value"
+                       In this version it must be set to the given value"
                        value="lbserver20"/>
+
+               <lb.index.list
+                       description="Definitions of indices on all the currently supported indexed system attributes">
+                       
+                       <value>owner</value>
+                       <value>location</value>
+                       <value>destination</value>
+
+               </lb.index.list>
                        
                <lb.database.username
                        description="The username to be used to access the local mySQL server
-                                               Now it must be set to the default value"
+                       In this version it must be set to the given value"
                        value="lbserver"/>
                        
-               <GLOBUS_LOCATION
-                       description="The location of the Globus Toolkit"
-                       value="/opt/globus"/>
-                                               
                <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
                <!-- System parameters - You should leave these alone -->
                <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->               
-               <dirlist value='/opt/glite/var'/>
+       
        </parameters>
-</config>
\ No newline at end of file
+
+       <!--RGMA service publishing: log server -->
+       <instance name="lb.rgma" service="rgma-servicetool">
+               <parameters>
+               
+                       <rgma.servicetool.enable
+                               description="Publish log server via RGMA servicetool. If this variable is set to 'false': the other
+                               values of this instance are not taken into account.[Example: 'true'] [Type: 'boolean']"
+                               
+                               value="true"/>
+                               
+                       <rgma.servicetool.name
+                               description="RGMA servicetool variable: Name of the service. This should be globally unique.
+                               Example: your.host.name_Logging_Bookkeeping_Server
+                               [Type: 'String']"
+
+                               value="changeme"/>
+
+                       <rgma.servicetool.url_endpoint
+                               description="RGMA servicetool variable: URL to contact the service at. 
+                               This should be unique for each service. Use example and adapt host. 
+                               Example: http://your.host.name:0/LB/LBServer
+                               [Type: 'string']"
+
+                               value="changeme"/>
+
+                       <rgma.servicetool.service_type
+                               description="RGMA servicetool variable: The service type. This should be uniquely defined for 
+                               each service type. Currently two methods of type naming are recommended:
+                               (1) The targetNamespace from the WSDL document, followed by a space and then the service name.
+                               (2) A URL owned by the body or individual who defines the service type.
+                               Example: Logging and Bookkeeping Server
+                               [Type: 'string']"
+
+                               value="Logging and Bookkeeping Server"/>
+
+                       <rgma.servicetool.service_version
+                               description="RGMA servicetool variable: Service version in the form 'major.minor.patch'
+                               Example: 1.2.3
+                               [Type: 'string']"
+
+                               value="0.0.0"/>
+
+                       <rgma.servicetool.publish_interval
+                               description="RGMA servicetool variable: How often to check and publish service status.
+                               Example: 60
+                               [Type: 'string'] [Unit: 'seconds']"
+                               
+                               value="20"/>
+
+                       <rgma.servicetool.status_script
+                               description="RGMA servicetool variable: Script to run when determining the service status. 
+                               This script should return an exit code of 0 to indicate the service is OK, other values
+                               should indicate an error. The first line of the standard output should be a brief message 
+                               describing the service status (e.g. 'Accepting connections')
+                               Example: ${GLITE_LOCATION}/etc/init.d/glite-lb-bkserverd status
+                               [Type: 'string']"
+
+                               value="${GLITE_LOCATION}/etc/init.d/glite-lb-bkserverd status"/>
+
+                       <rgma.servicetool.status_interval
+                               description="RGMA servicetool variable: How often to check and publish service status.
+                               Example: 30
+                               [Type: 'string'] [Unit: 'seconds']"
+
+                               value="30"/>
+
+                       <rgma.servicetool.url_wsdl
+                               description="RGMA servicetool variable: URL of a WSDL document for the service (leave blank if the 
+                               service has no WSDL).
+                               Example: http://example.rl.ac.uk/service?WSDL
+                               [Type: 'string']"
+
+                               value=""/>
+
+                       <rgma.servicetool.url_semantics
+                               description="RGMA servicetool variable: URL of a document containing a detailed description of the service
+                               and how it should be used.
+                               Example: http://example.rl.ac.uk/service/semantics.html
+                               [Type: 'string']"
+
+                               value="n/a"/>
+
+               </parameters>
+       </instance>
+                                               
+</config>
index 5fc59f7..dd0cc43 100644 (file)
Binary files a/org.glite.deployment.lb/doc/release_notes/release_notes.doc and b/org.glite.deployment.lb/doc/release_notes/release_notes.doc differ
index 1db7585..989792a 100644 (file)
@@ -20,8 +20,7 @@
        {font-family:Times;
        panose-1:2 2 6 3 5 4 5 2 3 4;}
 @font-face
-       {font-family:"Univers \(W1\)";
-       panose-1:0 0 0 0 0 0 0 0 0 0;}
+       {font-family:"Univers \(W1\)";}
  /* Style Definitions */
  p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin-top:2.0pt;
@@ -492,429 +491,528 @@ text-transform:uppercase'>gLite Logging &amp; Bookkeeping Server</span></p>
 <h1><span lang=FR>1. </span><span lang=FR>Release Description</span></h1>
 
 <p class=MsoNormal>This release contains the gLite Logging &amp; Bookkeeping
-Server module v. 0.2.0. The following sections provide additional information about
+Server module v. 1.2.2. The following sections provide additional information about
 the release content, the module dependencies, the know bugs and issues and a
 list of bugs closed since the previous release. For information about
 installing and using the gLite Logging &amp; Bookkeeping Server, please refer
 to the gLite Installation and User Guides. </p>
 
-<h1>2. Release contents</h1>
+<h1><span lang=FR>2. </span><span lang=FR>Changes in this Release</span></h1>
 
-<p class=MsoNormal>The gLite Logging &amp; Bookkeeping Server v. 0.2.0 is
+<p class=MsoNormal>This release introduces the following changes:</p>
+
+<p class=MsoNormal>&nbsp;</p>
+
+<ul style='margin-top:0mm' type=disc>
+ <li class=MsoNormal>Implemented status method</li>
+ <li class=MsoNormal>Added definition of PERL5LIB env var</li>
+ <li class=MsoNormal>Stopping and starting the database before the index
+     creation (just after the database is created and the user granted) to fix
+     access denied error</li>
+ <li class=MsoNormal>Moved creation of indices inside database creation (if
+     database exists indices must not be recreated)</li>
+ <li class=MsoNormal>GLITE_USER parameter is not exposed anymore in the
+     configuration file; instead the module uses the same user parameters as
+     WMS to allow installation on same node</li>
+ <li class=MsoNormal>LB admin tools are now installed in sbin, not in bin</li>
+ <li class=MsoNormal>Bug fixes (see below for the complete lists)</li>
+</ul>
+
+<h1>3. Release contents</h1>
+
+<p class=MsoNormal>The gLite Logging &amp; Bookkeeping Server v. 1.2.2 is
 composed of the following gLite components:</p>
 
 <p class=MsoNormal>&nbsp;</p>
 
-<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0 width=634
- style='width:475.4pt;border-collapse:collapse;border:none'>
+<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0 width=621
+ style='width:466.1pt;border-collapse:collapse;border:none'>
  <tr>
-  <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
+  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>Component name</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>Component name</span></p>
   </td>
-  <td width=63 valign=top style='width:47.5pt;border:solid windowtext 1.0pt;
+  <td width=54 valign=top style='width:40.15pt;border:solid windowtext 1.0pt;
   border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>Version</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>Version</span></p>
   </td>
-  <td width=393 valign=top style='width:294.9pt;border:solid windowtext 1.0pt;
+  <td width=415 valign=top style='width:310.95pt;border:solid windowtext 1.0pt;
   border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>File</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>File</span></p>
   </td>
  </tr>
  <tr>
-  <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
+  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>org.glite.deployment.lb</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>org.glite.deployment.lb</span></p>
   </td>
-  <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
-  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>0.2.0</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.2.2</span></p>
   </td>
-  <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
+  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/I20041126/installers/glite-lb_installer.sh">http://glite.web.cern.ch/glite/packages/I20041210/installers/glite-lb_installer.sh</a>
+  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/installers/glite-lb_installer.sh">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/installers/glite-lb_installer.sh</a>
   </span></p>
   <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:10.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/I20041210/bin/rhel30/noarch/RPMS/glite-lb-config-0.2.0-1.noarch.rpm">http://glite.web.cern.ch/glite/packages/I20041210/bin/rhel30/noarch/RPMS/glite-lb-config-0.2.0-1.noarch.rpm</a></span></span></p>
+  style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/noarch/RPMS/glite-lb-config-1.2.2-1.noarch.rpm">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/noarch/RPMS/glite-lb-config-1.2.2-1.noarch.rpm</a></span></span></p>
   </td>
  </tr>
  <tr>
-  <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
+  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>org.glite.deployment.config</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>org.glite.deployment.config</span></p>
   </td>
-  <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
-  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>0.3.0</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.0.0</span></p>
   </td>
-  <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
+  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:10.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/I20041210/bin/rhel30/noarch/RPMS/glite-%20config-0.3.0-1.noarch.rpm">http://glite.web.cern.ch/glite/packages/I20041210/bin/rhel30/noarch/RPMS/glite-
-  config-0.3.0-1.noarch.rpm</a></span></span></p>
+  style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/noarch/RPMS/glite-config-1.0.0-1.noarch.rpm">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/noarch/RPMS/glite-config-1.0.0-1.noarch.rpm</a></span></span></p>
   </td>
  </tr>
  <tr>
-  <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
+  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=FR style='font-size:10.0pt'>glite-lb-client-interface</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>org.glite.lb.client-interface</span></p>
   </td>
-  <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
-  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=FR style='font-size:10.0pt'>0.3.1</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.0.2</span></p>
   </td>
-  <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
+  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:10.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/I20041210/bin/rhel30/i386/RPMS/glite-lb-client-interface-0.3.1-2.i386.rpm">http://glite.web.cern.ch/glite/packages/I20041210/bin/rhel30/i386/RPMS/glite-lb-client-interface-0.3.1-2.i386.rpm</a></span></span></p>
+  style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-client-interface-1.0.2-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-client-interface-1.0.2-1.i386.rpm</a></span></span></p>
   </td>
  </tr>
  <tr>
-  <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
+  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=FR style='font-size:10.0pt'>glite-lb-common</span></p>
+  <p class=MsoNormal><span lang=FR style='font-size:8.0pt'>org.glite.lb.</span><span
+  lang=EN-US style='font-size:8.0pt'>common</span></p>
   </td>
-  <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
-  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=FR style='font-size:10.0pt'>0.4.1</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.1.4</span></p>
   </td>
-  <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
+  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=FR style='font-size:
-  10.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/I20041210/bin/rhel30/i386/RPMS/glite-lb-common-0.4.1-2.i386.rpm">http://glite.web.cern.ch/glite/packages/I20041210/bin/rhel30/i386/RPMS/glite-lb-common-0.4.1-2.i386.rpm</a></span></span></p>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
+  style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-common-1.1.4-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-common-1.1.4-1.i386.rpm</a></span></span></p>
   </td>
  </tr>
  <tr>
-  <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
+  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>glite-lb-logger</span></p>
+  <p class=MsoNormal><span lang=FR style='font-size:8.0pt'>org.glite.lb.</span><span
+  lang=EN-US style='font-size:8.0pt'>logger</span></p>
   </td>
-  <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
-  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>0.4.1</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.0.1</span></p>
   </td>
-  <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
+  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=FR style='font-size:
-  10.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/I20041210/bin/rhel30/i386/RPMS/glite-lb-logger-0.4.1-3.i386.rpm">http://glite.web.cern.ch/glite/packages/I20041210/bin/rhel30/i386/RPMS/glite-lb-logger-0.4.1-3.i386.rpm</a></span></span></p>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=IT style='font-size:
+  8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-logger-1.0.1-1.i386.rpm"><span
+  lang=FR>http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-logger-1.0.1-1.i386.rpm</span></a></span></span></p>
   </td>
  </tr>
  <tr>
-  <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
+  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=FR style='font-size:10.0pt'>glite-lb-server</span></p>
+  <p class=MsoNormal><span lang=FR style='font-size:8.0pt'>org.glite.lb.server</span></p>
   </td>
-  <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
-  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=FR style='font-size:10.0pt'>0.6.2</span></p>
+  <p class=MsoNormal><span lang=FR style='font-size:8.0pt'>1.0.1</span></p>
   </td>
-  <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
+  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span class=MsoHyperlink><span lang=FR style='font-size:
-  10.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/I20041210/bin/rhel30/i386/RPMS/glite-lb-server-0.6.2-4.i386.rpm">http://glite.web.cern.ch/glite/packages/I20041210/bin/rhel30/i386/RPMS/glite-lb-server-0.6.2-4.i386.rpm</a></span></span></p>
+  8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-server-1.0.1-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-server-1.0.1-1.i386.rpm</a></span></span></p>
   </td>
  </tr>
  <tr>
-  <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
+  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>glite-lb-server-bones</span></p>
+  <p class=MsoNormal><span lang=FR style='font-size:8.0pt'>org.glite.lb.</span><span
+  lang=EN-US style='font-size:8.0pt'>server-bones</span></p>
   </td>
-  <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
-  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>0.1.0</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.0.0</span></p>
   </td>
-  <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
+  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:10.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/I20041126/bin/rhel30/i386/RPMS/glite-lb-server-bones-0.1.0-1.i386.rpm">http://glite.web.cern.ch/glite/packages/I20041210/bin/rhel30/i386/RPMS/glite-lb-server-bones-0.1.0-1.i386.rpm</a></span></span></p>
+  style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-server-bones-1.0.0-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-server-bones-1.0.0-1.i386.rpm</a></span></span></p>
   </td>
  </tr>
  <tr>
-  <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
+  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>glite-lb-ws-interface</span></p>
+  <p class=MsoNormal><span lang=FR style='font-size:8.0pt'>org.glite.lb.</span><span
+  lang=EN-US style='font-size:8.0pt'>ws-interface</span></p>
   </td>
-  <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
-  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>0.1.0</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.0.1</span></p>
   </td>
-  <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
+  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:10.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/I20041210/bin/rhel30/i386/RPMS/glite-lb-ws-interface-0.1.0-0.i386.rpm">http://glite.web.cern.ch/glite/packages/I20041210/bin/rhel30/i386/RPMS/glite-lb-ws-interface-0.1.0-0.i386.rpm</a></span></span></p>
+  style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-ws-interface-1.0.1-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-lb-ws-interface-1.0.1-1.i386.rpm</a></span></span></p>
   </td>
  </tr>
  <tr>
-  <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
+  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>glite-security-proxyrenewal</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>org.glite.security.proxyrenewal</span></p>
   </td>
-  <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
-  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>0.1.1</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.0.11</span></p>
   </td>
-  <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
+  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:10.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/I20041210/bin/rhel30/i386/RPMS/glite-security-proxyrenewal-0.1.1-1.i386.rpm">http://glite.web.cern.ch/glite/packages/I20041210/bin/rhel30/i386/RPMS/glite-security-proxyrenewal-0.1.1-1.i386.rpm</a></span></span></p>
+  style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-security-proxyrenewal-1.0.11-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-security-proxyrenewal-1.0.11-1.i386.rpm</a></span></span></p>
   </td>
  </tr>
  <tr>
-  <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
+  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>glite-wms-utils-exception</span></p>
+  <p class=MsoNormal><span lang=FR style='font-size:8.0pt'>org.glite.wms-utils.exception</span></p>
   </td>
-  <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
-  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>0.1.2</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.0.1</span></p>
   </td>
-  <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
+  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:10.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/I20041126/bin/rhel30/i386/RPMS/glite-wms-utils-exception-0.1.2-1.i386.rpm">http://glite.web.cern.ch/glite/packages/I20041210/bin/rhel30/i386/RPMS/glite-wms-utils-exception-0.1.2-1.i386.rpm</a></span></span></p>
+  style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-wms-utils-exception-1.0.1-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-wms-utils-exception-1.0.1-1.i386.rpm</a></span></span></p>
   </td>
  </tr>
  <tr>
-  <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
+  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>glite-wms-utils-jobid</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>org.glite.wms-utils.jobid</span></p>
   </td>
-  <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
-  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>0.1.2</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.0.0</span></p>
   </td>
-  <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
+  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:10.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/I20041126/bin/rhel30/i386/RPMS/glite-wms-utils-jobid-0.1.2-1.i386.rpm">http://glite.web.cern.ch/glite/packages/I20041210/bin/rhel30/i386/RPMS/glite-wms-utils-jobid-0.1.2-1.i386.rpm</a></span></span></p>
+  style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-wms-utils-jobid-1.0.0-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-wms-utils-jobid-1.0.0-1.i386.rpm</a></span></span></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=FR style='font-size:8.0pt'>org.glite.security.voms</span></p>
+  </td>
+  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.2.32</span></p>
+  </td>
+  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
+  style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-security-voms-1.2.32-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/glite-security-voms-1.2.32-1.i386.rpm</a></span></span></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=153 valign=top style='width:115.0pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>org.gridsite.core</span></p>
+  </td>
+  <td width=54 valign=top style='width:40.15pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.1.5</span></p>
+  </td>
+  <td width=415 valign=top style='width:310.95pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
+  style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/gridsite-1.1.5-1.i386.rpm">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/bin/rhel30/i386/RPMS/gridsite-1.1.5-1.i386.rpm</a></span></span></p>
   </td>
  </tr>
 </table>
 
 <p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
 
-<h1>3. Dependencies</h1>
+<h1>4. Dependencies</h1>
 
-<p class=MsoNormal>The gLite Logging &amp; Bookkeeping Server module has the
-following dependencies:</p>
+<p class=MsoNormal>The gLite Logging &amp; Bookkeeping Server v. 1.2.2 module
+has the following dependencies:</p>
 
 <p class=MsoNormal>&nbsp;</p>
 
-<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0 width=640
- style='width:480.3pt;border-collapse:collapse;border:none'>
+<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0 width=621
+ style='width:466.1pt;border-collapse:collapse;border:none'>
  <tr>
-  <td width=187 valign=top style='width:140.1pt;border:solid windowtext 1.0pt;
+  <td width=158 valign=top style='width:118.6pt;border:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
-  10.0pt'>Component name</span></p>
+  8.0pt'>Component name</span></p>
   </td>
-  <td width=66 valign=top style='width:49.6pt;border:solid windowtext 1.0pt;
+  <td width=66 valign=top style='width:49.25pt;border:solid windowtext 1.0pt;
   border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>Version</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>Version</span></p>
   </td>
-  <td width=387 valign=top style='width:290.6pt;border:solid windowtext 1.0pt;
+  <td width=398 valign=top style='width:298.25pt;border:solid windowtext 1.0pt;
   border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>RPM file name</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>RPM file name</span></p>
   </td>
  </tr>
  <tr>
-  <td width=187 valign=top style='width:140.1pt;border:solid windowtext 1.0pt;
+  <td width=158 valign=top style='width:118.6pt;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
-  style='font-size:10.0pt'>gLite Security Utilities</span></p>
+  style='font-size:8.0pt'>gLite Security Utilities</span></p>
   </td>
-  <td width=66 valign=top style='width:49.6pt;border-top:none;border-left:none;
-  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  <td width=66 valign=top style='width:49.25pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>0.2.0</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>1.0.0</span></p>
   </td>
-  <td width=387 valign=top style='width:290.6pt;border-top:none;border-left:
+  <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:10.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/I20041210/installers/glite-security-utils_installer.sh">http://glite.web.cern.ch/glite/packages/I20041210/installers/glite-security-utils_installer.sh</a></span></span></p>
+  style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/installers/glite-security-utils_installer.sh">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/installers/glite-security-utils_installer.sh</a></span></span></p>
   </td>
  </tr>
  <tr>
-  <td width=187 valign=top style='width:140.1pt;border:solid windowtext 1.0pt;
+  <td width=158 valign=top style='width:118.6pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
+  style='font-size:8.0pt'>gLite </span><span style='font-size:8.0pt'>R-GMA </span><span
+  lang=EN-US style='font-size:8.0pt'>Service Publisher</span></p>
+  </td>
+  <td width=66 valign=top style='width:49.25pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=EN-US style='font-size:8.0pt'>4.1.5</span></p>
+  </td>
+  <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
+  style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/R1.0/R20050331/installers/glite-rgma-servicetool_installer.sh">http://glite.web.cern.ch/glite/packages/R1.0/R20050331/installers/glite-rgma-servicetool_installer.sh</a></span></span></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=158 valign=top style='width:118.6pt;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
-  10.0pt'>GPT</span></p>
+  8.0pt'>GPT</span></p>
   </td>
-  <td width=66 valign=top style='width:49.6pt;border-top:none;border-left:none;
-  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  <td width=66 valign=top style='width:49.25pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>VDT 1.2.0</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>VDT 1.2.2</span></p>
   </td>
-  <td width=387 valign=top style='width:290.6pt;border-top:none;border-left:
+  <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:10.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/gpt-VDT1.2.0rh9-1.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/gpt-<span
-  lang=EN-GB>VDT1.2.0rh9</span>-1.i386.rpm</a></span></span></p>
+  style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/gpt-VDT1.2.2rh9-1.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/gpt-<span
+  lang=EN-GB>VDT1.2.2rh9</span>-1.i386.rpm</a></span></span></p>
   </td>
  </tr>
  <tr>
-  <td width=187 valign=top style='width:140.1pt;border:solid windowtext 1.0pt;
+  <td width=158 valign=top style='width:118.6pt;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
-  10.0pt'>VDT Globus Essentials</span></p>
+  8.0pt'>VDT Globus Essentials</span></p>
   </td>
-  <td width=66 valign=top style='width:49.6pt;border-top:none;border-left:none;
-  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  <td width=66 valign=top style='width:49.25pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>VDT 1.2.0</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>VDT 1.2.2</span></p>
   </td>
-  <td width=387 valign=top style='width:290.6pt;border-top:none;border-left:
+  <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:10.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/vdt_globus_essentials-VDT1.2.0rh9-1.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/vdt_globus_essentials-<span
-  lang=EN-GB>VDT1.2.0rh9</span>-1.i386.rpm</a></span></span></p>
+  style='font-size:8.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/vdt_globus_essentials-VDT1.2.2rh9-1.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/vdt_globus_essentials-<span
+  lang=EN-GB>VDT1.2.2rh9</span>-1.i386.rpm</a></span></span></p>
   </td>
  </tr>
  <tr>
-  <td width=187 valign=top style='width:140.1pt;border:solid windowtext 1.0pt;
+  <td width=158 valign=top style='width:118.6pt;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
-  10.0pt'>MySQL-server</span></p>
+  8.0pt'>MySQL-server</span></p>
   </td>
-  <td width=66 valign=top style='width:49.6pt;border-top:none;border-left:none;
-  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  <td width=66 valign=top style='width:49.25pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>4.0.20</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>4.0.20</span></p>
   </td>
-  <td width=387 valign=top style='width:290.6pt;border-top:none;border-left:
+  <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:10.0pt'><a
+  style='font-size:8.0pt'><a
   href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/MySQL-server-4.0.20-0.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/MySQL-server-<span
   lang=EN-GB>4.0.20</span>-0.i386.rpm</a></span></span></p>
   </td>
  </tr>
  <tr>
-  <td width=187 valign=top style='width:140.1pt;border:solid windowtext 1.0pt;
+  <td width=158 valign=top style='width:118.6pt;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
-  10.0pt'>MySQL-client</span></p>
+  8.0pt'>MySQL-client</span></p>
   </td>
-  <td width=66 valign=top style='width:49.6pt;border-top:none;border-left:none;
-  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  <td width=66 valign=top style='width:49.25pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>4.0.20</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>4.0.20</span></p>
   </td>
-  <td width=387 valign=top style='width:290.6pt;border-top:none;border-left:
+  <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:10.0pt'><a
+  style='font-size:8.0pt'><a
   href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/MySQL-client-4.0.20-0.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/MySQL-client-<span
   lang=EN-GB>4.0.20</span>-0.i386.rpm</a></span></span></p>
   </td>
  </tr>
  <tr>
-  <td width=187 valign=top style='width:140.1pt;border:solid windowtext 1.0pt;
+  <td width=158 valign=top style='width:118.6pt;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
-  10.0pt'>ares</span></p>
+  8.0pt'>ares</span></p>
   </td>
-  <td width=66 valign=top style='width:49.6pt;border-top:none;border-left:none;
-  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  <td width=66 valign=top style='width:49.25pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>1.1.1</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>1.1.1</span></p>
   </td>
-  <td width=387 valign=top style='width:290.6pt;border-top:none;border-left:
+  <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:10.0pt'><a
+  style='font-size:8.0pt'><a
   href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/ares-1.1.1-EGEE.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/ares-<span
   lang=EN-GB>1.1.1</span>-EGEE.i386.rpm</a></span></span></p>
   </td>
  </tr>
  <tr>
-  <td width=187 valign=top style='width:140.1pt;border:solid windowtext 1.0pt;
+  <td width=158 valign=top style='width:118.6pt;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
-  10.0pt'>myproxy</span></p>
+  8.0pt'>myproxy</span></p>
   </td>
-  <td width=66 valign=top style='width:49.6pt;border-top:none;border-left:none;
-  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  <td width=66 valign=top style='width:49.25pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>1.14</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>1.14</span></p>
   </td>
-  <td width=387 valign=top style='width:290.6pt;border-top:none;border-left:
+  <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:10.0pt'><a
+  style='font-size:8.0pt'><a
   href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/myproxy-1.14-EGEE.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/myproxy-<span
   lang=EN-GB>1.14</span>-EGEE.i386.rpm</a></span></span></p>
   </td>
  </tr>
  <tr>
-  <td width=187 valign=top style='width:140.1pt;border:solid windowtext 1.0pt;
+  <td width=158 valign=top style='width:118.6pt;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
-  10.0pt'>perl-Expect.pm</span></p>
+  8.0pt'>perl-Expect.pm</span></p>
   </td>
-  <td width=66 valign=top style='width:49.6pt;border-top:none;border-left:none;
-  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  <td width=66 valign=top style='width:49.25pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'>1.01</span></p>
+  <p class=MsoNormal><span style='font-size:8.0pt'>1.01</span></p>
   </td>
-  <td width=387 valign=top style='width:290.6pt;border-top:none;border-left:
+  <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:10.0pt'><a
+  style='font-size:8.0pt'><a
   href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/per-Expect.pm-1.01-9.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/per-Expect.pm-<span
   lang=EN-GB>1.01</span>-9.i386.rpm</a></span></span></p>
   </td>
  </tr>
+ <tr>
+  <td width=158 valign=top style='width:118.6pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  8.0pt'>Java SDK/JRE</span></p>
+  </td>
+  <td width=66 valign=top style='width:49.25pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:8.0pt'>1.4.2</span></p>
+  </td>
+  <td width=398 valign=top style='width:298.25pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
+  style='font-size:8.0pt'>http://java.sun.com/j2se/1.4.2/download.html</span></span></p>
+  </td>
+ </tr>
 </table>
 
 <p class=MsoNormal>&nbsp;</p>
 
-<h1>4. Known bugs and issues</h1>
+<h1>5. Known bugs and issues</h1>
 
 <p class=MsoNormal align=left style='text-align:left'>This release has the
 following bugs and issues. Bug numbers refer to the gLite Bug Tracking system
@@ -924,175 +1022,436 @@ href="https://savannah.cern.ch/bugs/?group=jra1mdw">https://savannah.cern.ch/bug
 
 <p class=MsoNormal align=left style='text-align:left'>&nbsp;</p>
 
+<ul style='margin-top:0mm' type=disc>
+ <li class=MsoNormal style='text-align:left'>No removal procedure is provided
+     with this release apart from the removal of the RPMS. Any account, group
+     or other resource created during the module configuration must be manually
+     cleaned.</li>
+</ul>
+
+<p class=MsoNormal align=left style='text-align:left'>&nbsp;</p>
+
+<p class=MsoNormal align=left style='text-align:left'>Known open bugs:</p>
+
+<p class=MsoNormal align=left style='text-align:left'>&nbsp;</p>
+
 <table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
  style='border-collapse:collapse;border:none'>
  <tr>
-  <td width=106 valign=top style='width:79.3pt;border:solid windowtext 1.0pt;
+  <td width=59 valign=top style='width:44.05pt;border:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'>Bug number</span></p>
   </td>
-  <td width=513 valign=top style='width:385.1pt;border:solid windowtext 1.0pt;
+  <td width=534 valign=top style='width:400.8pt;border:solid windowtext 1.0pt;
   border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'>Description</span></p>
   </td>
+  <td width=26 valign=top style='width:19.55pt;border:solid windowtext 1.0pt;
+  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
  </tr>
  <tr>
-  <td width=106 valign=top style='width:79.3pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5125"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#5125</span></a></span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6412"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#6412</span></a></span></p>
   </td>
-  <td width=513 valign=top style='width:385.1pt;border-top:none;border-left:
+  <td width=534 valign=top style='width:400.8pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5125"><span
-  style='color:windowtext;text-decoration:none'>glite-lb-bkserverd
-  start/stop/status displays usage options</span></a>&nbsp;</span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6412"><span
+  style='color:windowtext;text-decoration:none'>--start and --stop options not
+  documented in glite-ce-config.py, glite-lb-config.py</span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
   </td>
  </tr>
  <tr>
   <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5202"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#5202</span></a></span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7053"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#7053</span></a></span></p>
   </td>
   <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
   border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5202"><span
-  style='color:windowtext;text-decoration:none'>no RPM provides the
-  lb-local-logger daemon - </span></a>&nbsp;</span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7053"><span
+  style='color:windowtext;text-decoration:none'>LB configuration fails if the
+  mysql root pwd is set</span></a>&nbsp;</span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
   </td>
  </tr>
  <tr>
-  <td width=106 valign=top style='width:79.3pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5248"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#5248</span></a></span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7180"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#7180</span></a></span></p>
   </td>
-  <td width=513 valign=top style='width:385.1pt;border-top:none;border-left:
+  <td width=534 valign=top style='width:400.8pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5248"><span
-  style='color:windowtext;text-decoration:none'>When running
-  &quot;glite-lb-bkserverd start&quot;, glite-lb-bkserverd doesn't start in
-  background</span></a>&nbsp;</span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7180"><span
+  style='color:windowtext;text-decoration:none'>Logging &amp; Bookkeping UI </span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
   </td>
  </tr>
  <tr>
   <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5833"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#5833</span></a></span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7237"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#7237</span></a></span></p>
   </td>
-  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
-  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5833"><span
-  style='color:windowtext;text-decoration:none'>all jobs in SUBMITTED after a
-  job storm</span></a>&nbsp;</span></p>
+  <td width=534 valign=top style='width:400.8pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7237"><span
+  style='color:windowtext;text-decoration:none'>Intermittent errors with job
+  submission</span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
   </td>
  </tr>
  <tr>
   <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5903"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#5903</span></a></span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7300"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#7300</span></a></span></p>
   </td>
   <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
   border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5903"><span
-  style='color:windowtext;text-decoration:none'>glite-lb-bkserverd script gives
-  bash: /root/.bashrc: Permission denied error </span></a>&nbsp;</span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7300"><span
+  style='color:windowtext;text-decoration:none'>update of the lb instructions
+  at the end of the installer script </span></a>&nbsp;</span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
   </td>
  </tr>
  <tr>
   <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5904"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#5904</span></a></span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7305"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#7305</span></a></span></p>
   </td>
   <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
   border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5904"><span
-  style='color:windowtext;text-decoration:none'>glite-lb-bkserverd does not
-  check default location for credentials</span></a>&nbsp;</span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7305"><span
+  style='color:windowtext;text-decoration:none'>lb.database.username paramenter
+  in config file</span></a>&nbsp;</span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
   </td>
  </tr>
  <tr>
   <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5926"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#5926</span></a></span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7307"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#7307</span></a></span></p>
   </td>
   <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
   border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5926"><span
-  style='color:windowtext;text-decoration:none'>Default user should not be used
-  in the init.d scripts</span></a>&nbsp;</span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7307"><span
+  style='color:windowtext;text-decoration:none'>lb config script does _not_
+  fail if mysql root password is set</span></a>&nbsp;</span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
   </td>
  </tr>
  <tr>
   <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5932"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#5932</span></a></span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7321"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#7321</span></a></span></p>
   </td>
   <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
   border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5932"><span
-  style='color:windowtext;text-decoration:none'>credential file created in
-  /var/tmp is unnecessary</span></a>&nbsp;</span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7321"><span
+  style='color:windowtext;text-decoration:none'>creation of indices fails
+  randomly</span></a>&nbsp;</span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
   </td>
  </tr>
  <tr>
   <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5934"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#5934</span></a></span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7324"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#7324</span></a></span></p>
   </td>
   <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
   border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5934"><span
-  style='color:windowtext;text-decoration:none'>service start and stop notifications
-  are inconsistent for glite-lb-bkserverd init,d script</span></a>&nbsp;</span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7324"><span
+  style='color:windowtext;text-decoration:none'>lb-bkserver is running with no
+  pid</span></a>&nbsp;</span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7389"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#7389</span></a></span></p>
+  </td>
+  <td width=534 valign=top style='width:400.8pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7389"><span
+  style='color:windowtext;text-decoration:none'>LB server and WMS local logger
+  related issues</span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
   </td>
  </tr>
 </table>
 
-<p class=MsoNormal align=left style='text-align:left'>&nbsp;</p>
+<p class=MsoNormal>&nbsp;</p>
 
-<p class=MsoNormal align=left style='text-align:left'>No removal procedure is
-provided with this release apart from the removal of the RPMS. Any account,
-group or other resource created during the module configuration must be
-manually cleaned.</p>
+<p class=MsoNormal>Bugs fixed in this or previous releases, but not yet officially
+tested:</p>
+
+<p class=MsoNormal>&nbsp;</p>
+
+<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
+ style='border-collapse:collapse;border:none'>
+ <tr>
+  <td width=58 valign=top style='width:43.3pt;border:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>Bug number</span></p>
+  </td>
+  <td width=535 valign=top style='width:401.55pt;border:solid windowtext 1.0pt;
+  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>Description</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border:solid windowtext 1.0pt;
+  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5850"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#5850</span></a></span></p>
+  </td>
+  <td width=535 valign=top style='width:401.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5850"><span
+  style='color:windowtext;text-decoration:none'>glite-lb-config.py has
+  glite.location and globus.location not set in params[]</span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5908"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#5908</span></a></span></p>
+  </td>
+  <td width=535 valign=top style='width:401.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5908"><span
+  style='color:windowtext;text-decoration:none'>Environment variables set via
+  the configuration script are not passed to daemon startup scripts</span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6075"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#6075</span></a></span></p>
+  </td>
+  <td width=535 valign=top style='width:401.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6075"><span
+  style='color:windowtext;text-decoration:none'>glite-lb-config.py crashes with
+  KeyError: GLITE_CERT_DIR</span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6366"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#6366</span></a></span></p>
+  </td>
+  <td width=535 valign=top style='width:401.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6366"><span
+  style='color:windowtext;text-decoration:none'>LB install script:: Fails but
+  no error reported</span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6415"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#6415</span></a></span></p>
+  </td>
+  <td width=535 valign=top style='width:401.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6415"><span
+  style='color:windowtext;text-decoration:none'>glite-lb-bkserver does not
+  start and blocks execution of glite-lb-config.py</span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6689"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#6689</span></a></span></p>
+  </td>
+  <td width=535 valign=top style='width:401.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6689"><span
+  style='color:windowtext;text-decoration:none'>glite-proxy-renewd starts the
+  daemon glite-proxy-renewd as GLITE_USER which is glite-lb i.e. wrong</span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6722"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#6722</span></a></span></p>
+  </td>
+  <td width=535 valign=top style='width:401.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6722"><span
+  style='color:windowtext;text-decoration:none'>glite-job-status -all doesn't
+  work</span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7296"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#7296</span></a></span></p>
+  </td>
+  <td width=535 valign=top style='width:401.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7296"><span
+  style='color:windowtext;text-decoration:none'>glite-lb-config.py crashes with
+  a TypeError exception</span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+</table>
 
 <p class=MsoNormal align=left style='margin:0mm;margin-bottom:.0001pt;
 text-align:left;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;
 font-family:"Courier New"'>&nbsp;</span></p>
 
-<h1>5. Bugs closed since last release</h1>
+<h1>6. Bugs closed since last release</h1>
 
 <p class=MsoNormal align=left style='text-align:left'>This release fixes the
-following bugs and issues. Since there are no previous public releases, this
-list refers to the previous development release. Bug numbers refer to the gLite
-Bug Tracking system database hosted on the CERN Savannah system at <a
+following bugs and issues. Bug numbers refer to the gLite Bug Tracking system
+database hosted on the CERN Savannah system at <a
 href="https://savannah.cern.ch/bugs/?group=jra1mdw">https://savannah.cern.ch/bugs/?group=jra1mdw</a>
  </p>
 
@@ -1101,96 +1460,1190 @@ href="https://savannah.cern.ch/bugs/?group=jra1mdw">https://savannah.cern.ch/bug
 <table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
  style='border-collapse:collapse;border:none'>
  <tr>
-  <td width=121 valign=top style='width:90.45pt;border:solid windowtext 1.0pt;
+  <td width=103 valign=top style='width:77.45pt;border:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'>Bug number</span></p>
   </td>
-  <td width=499 valign=top style='width:373.95pt;border:solid windowtext 1.0pt;
+  <td width=516 valign=top style='width:386.95pt;border:solid windowtext 1.0pt;
   border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'>Description</span></p>
   </td>
  </tr>
  <tr>
-  <td width=121 valign=top style='width:90.45pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5833"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#5833</span></a></span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5833"><span
+  style='color:windowtext;text-decoration:none'>all jobs in SUBMITTED after a
+  job storm</span></a>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=4627"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#4627</span></a></span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5897"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#5897</span></a></span></p>
   </td>
-  <td width=499 valign=top style='width:373.95pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5897"><span
+  style='color:windowtext;text-decoration:none'>I20041203 LB installation
+  script has a missing dependency </span></a>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=4627"><span
-  style='color:windowtext;text-decoration:none'>no licence found in lb packages</span></a>&nbsp;</span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5910"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#5910</span></a></span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5910"><span
+  style='color:windowtext;text-decoration:none'>glite-lb configuration scripts
+  don't set GLITE_USER environment</span></a>&nbsp;</span></p>
   </td>
  </tr>
  <tr>
-  <td width=121 valign=top style='width:90.45pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5236"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#5236</span></a></span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5925"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#5925</span></a></span></p>
   </td>
-  <td width=499 valign=top style='width:373.95pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5925"><span
+  style='color:windowtext;text-decoration:none'>Running glite-lb script removes
+  mysql.sock file </span></a>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6416"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#6416</span></a></span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6416"><span
+  style='color:windowtext;text-decoration:none'>the BKserver on the LB machine
+  needs a symlink and the script doesn't check for it</span></a>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7032"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#7032</span></a></span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7032"><span
+  style='color:windowtext;text-decoration:none'>The LB installer fails with an
+  RPM not found message</span></a>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5236"><span
-  style='color:windowtext;text-decoration:none'>LB install/config documentation
-  has some errors</span></a>&nbsp;</span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7152"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#7152</span></a></span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7152"><span
+  style='color:windowtext;text-decoration:none'>The LB installer tries to
+  install gridsite with a wrong rpm name</span></a>&nbsp;</span></p>
   </td>
  </tr>
  <tr>
   <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5912"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#5912</span></a></span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7351"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#7351</span></a></span></p>
   </td>
   <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
   border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5912"><span
-  style='color:windowtext;text-decoration:none'>glite-lb-bkserver daemon looks
-  hangs is /tmp/mysql.sock is not present</span></a>&nbsp;</span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7351"><span
+  style='color:windowtext;text-decoration:none'>Star/restart of LB services </span></a>&nbsp;</span></p>
   </td>
  </tr>
  <tr>
-  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7401"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#7401</span></a></span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7401"><span
+  style='color:windowtext;text-decoration:none'>The first time the LB config
+  script is run it fails creating the db indices</span></a>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7423"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#7423</span></a></span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7423"><span
+  style='color:windowtext;text-decoration:none'>'/etc/rc.d/init.d/gLite status'
+  not working correctly in LB</span></a>&nbsp;</span></p>
+  </td>
+ </tr>
+</table>
+
+<p class=MsoNormal align=left style='text-align:left'>&nbsp;</p>
+
+<b><span style='font-size:12.0pt;font-family:Arial;text-transform:uppercase;
+layout-grid-mode:line'><br clear=all style='page-break-before:always'>
+</span></b>
+
+<h1>7. Previous Releases</h1>
+
+<h2>7.1. Release 1.1.0</h2>
+
+<h3><span lang=FR>7.1.1. </span><span lang=FR>Release Description</span></h3>
+
+<p class=MsoNormal>This release contains the gLite Logging &amp; Bookkeeping
+Server module v. 1.1.0. The following sections provide additional information about
+the release content, the module dependencies, the know bugs and issues and a
+list of bugs closed since the previous release. For information about
+installing and using the gLite Logging &amp; Bookkeeping Server, please refer
+to the gLite Installation and User Guides. </p>
+
+<h3><span lang=FR>7.1.2. </span><span lang=FR>Changes in this Release</span></h3>
+
+<p class=MsoNormal>This release introduces the following changes:</p>
+
+<p class=MsoNormal>&nbsp;</p>
+
+<ul style='margin-top:0mm' type=disc>
+ <li class=MsoNormal>The gLite init.d script has been added to the deployment
+     module. The script is installed and activated by the configuration scripts
+     to start all LB services at boot-time</li>
+ <li class=MsoNormal>Bug fixes (see below for the complete lists)</li>
+</ul>
+
+<h3>7.1.3. Release contents</h3>
+
+<p class=MsoNormal>The gLite Logging &amp; Bookkeeping Server v. 1.1.0 is
+composed of the following gLite components:</p>
+
+<p class=MsoNormal>&nbsp;</p>
+
+<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0 width=634
+ style='width:475.4pt;border-collapse:collapse;border:none'>
+ <tr>
+  <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>Component name</span></p>
+  </td>
+  <td width=63 valign=top style='width:47.5pt;border:solid windowtext 1.0pt;
+  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>Version</span></p>
+  </td>
+  <td width=393 valign=top style='width:294.9pt;border:solid windowtext 1.0pt;
+  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>File</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>org.glite.deployment.lb</span></p>
+  </td>
+  <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
+  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>1.1.0</span></p>
+  </td>
+  <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/I20041126/installers/glite-lb_installer.sh">http://glite.web.cern.ch/glite/packages/I20050225/installers/glite-lb_installer.sh</a>
+  </span></p>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
+  style='font-size:10.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/I20050218/bin/rhel30/noarch/RPMS/glite-lb-config-1.1.0-1.noarch.rpm">http://glite.web.cern.ch/glite/packages/I20050225/bin/rhel30/noarch/RPMS/glite-lb-config-1.1.0-1.noarch.rpm</a></span></span></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>org.glite.deployment.config</span></p>
+  </td>
+  <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
+  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>0.8.2</span></p>
+  </td>
+  <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
+  style='font-size:10.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/I20050225/bin/rhel30/noarch/RPMS/glite-%20config-0.8.2-1.noarch.rpm">http://glite.web.cern.ch/glite/packages/I20050225/bin/rhel30/noarch/RPMS/glite-
+  config-0.8.2-1.noarch.rpm</a></span></span></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=FR style='font-size:10.0pt'>org.glite.lb.client-interface</span></p>
+  </td>
+  <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
+  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=FR style='font-size:10.0pt'>1.0.1</span></p>
+  </td>
+  <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
+  style='font-size:10.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/I20050218/bin/rhel30/i386/RPMS/glite-lb-client-interface-1.0.1-1.i386.rpm">http://glite.web.cern.ch/glite/packages/I20050225/bin/rhel30/i386/RPMS/glite-lb-client-interface-1.0.1-1.i386.rpm</a></span></span></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=FR style='font-size:10.0pt'>org.glite.lb.</span><span
+  lang=EN-US style='font-size:10.0pt'>common</span></p>
+  </td>
+  <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
+  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>1.1.3</span></p>
+  </td>
+  <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
+  style='font-size:10.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/I20050218/bin/rhel30/i386/RPMS/glite-lb-common-1.1.3-1.i386.rpm">http://glite.web.cern.ch/glite/packages/I20050225/bin/rhel30/i386/RPMS/glite-lb-common-1.1.3-1.i386.rpm</a></span></span></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=FR style='font-size:10.0pt'>org.glite.lb.</span><span
+  lang=EN-US style='font-size:10.0pt'>logger</span></p>
+  </td>
+  <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
+  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>1.0.1</span></p>
+  </td>
+  <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=FR style='font-size:
+  10.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/I20050218/bin/rhel30/i386/RPMS/glite-lb-logger-1.0.1-1.i386.rpm">http://glite.web.cern.ch/glite/packages/I20050225/bin/rhel30/i386/RPMS/glite-lb-logger-1.0.1-1.i386.rpm</a></span></span></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=FR style='font-size:10.0pt'>org.glite.lb.server</span></p>
+  </td>
+  <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
+  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=FR style='font-size:10.0pt'>1.0.1</span></p>
+  </td>
+  <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=FR style='font-size:
+  10.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/I20050218/bin/rhel30/i386/RPMS/glite-lb-server-1.0.1-1.i386.rpm">http://glite.web.cern.ch/glite/packages/I20050225/bin/rhel30/i386/RPMS/glite-lb-server-1.0.1-1.i386.rpm</a></span></span></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=FR style='font-size:10.0pt'>org.glite.lb.</span><span
+  lang=EN-US style='font-size:10.0pt'>server-bones</span></p>
+  </td>
+  <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
+  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>1.0.0</span></p>
+  </td>
+  <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
+  style='font-size:10.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/I20050107/bin/rhel30/i386/RPMS/glite-lb-server-bones-1.0.0-1.i386.rpm">http://glite.web.cern.ch/glite/packages/I20050225/bin/rhel30/i386/RPMS/glite-lb-server-bones-1.0.0-1.i386.rpm</a></span></span></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=FR style='font-size:10.0pt'>org.glite.lb.</span><span
+  lang=EN-US style='font-size:10.0pt'>ws-interface</span></p>
+  </td>
+  <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
+  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>1.0.0</span></p>
+  </td>
+  <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
+  style='font-size:10.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/I20050107/bin/rhel30/i386/RPMS/glite-lb-ws-interface-1.0.0-1.i386.rpm">http://glite.web.cern.ch/glite/packages/I20050225/bin/rhel30/i386/RPMS/glite-lb-ws-interface-1.0.0-1.i386.rpm</a></span></span></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=FR style='font-size:10.0pt'>org.glite.security.</span><span
+  lang=EN-US style='font-size:10.0pt'>proxyrenewal</span></p>
+  </td>
+  <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
+  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>1.0.1</span></p>
+  </td>
+  <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
+  style='font-size:10.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/I20050218/bin/rhel30/i386/RPMS/glite-security-proxyrenewal-1.0.1-1.i386.rpm">http://glite.web.cern.ch/glite/packages/I20050225/bin/rhel30/i386/RPMS/glite-security-proxyrenewal-1.0.1-1.i386.rpm</a></span></span></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=FR style='font-size:10.0pt'>org.glite.wms-utils.exception</span></p>
+  </td>
+  <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
+  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>1.0.0</span></p>
+  </td>
+  <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
+  style='font-size:10.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/I20050107/bin/rhel30/i386/RPMS/glite-wms-utils-exception-1.0.0-1.i386.rpm">http://glite.web.cern.ch/glite/packages/I20050225/bin/rhel30/i386/RPMS/glite-wms-utils-exception-1.0.0-1.i386.rpm</a></span></span></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>org.glite.wms-utils.jobid</span></p>
+  </td>
+  <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
+  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>1.0.0</span></p>
+  </td>
+  <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
+  style='font-size:10.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/I20050107/bin/rhel30/i386/RPMS/glite-wms-utils-jobid-1.0.0-1.i386.rpm">http://glite.web.cern.ch/glite/packages/I20050225/bin/rhel30/i386/RPMS/glite-wms-utils-jobid-1.0.0-1.i386.rpm</a></span></span></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=FR style='font-size:10.0pt'>org.glite.security.voms</span></p>
+  </td>
+  <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
+  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>1.2.29</span></p>
+  </td>
+  <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
+  style='font-size:10.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/I20050218/bin/rhel30/i386/RPMS/glite-security-voms-1.2.29-22.i386.rpm">http://glite.web.cern.ch/glite/packages/I20050225/bin/rhel30/i386/RPMS/glite-security-voms-1.2.29-22.i386.rpm</a></span></span></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>org.gridsite.core</span></p>
+  </td>
+  <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
+  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>1.1.5</span></p>
+  </td>
+  <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
+  style='font-size:10.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/I20050218/bin/rhel30/i386/RPMS/gridsite-1.1.5-1.i386.rpm">http://glite.web.cern.ch/glite/packages/I20050225/bin/rhel30/i386/RPMS/gridsite-1.1.5-1.i386.rpm</a></span></span></p>
+  </td>
+ </tr>
+</table>
+
+<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
+
+<h3>7.1.4. Dependencies</h3>
+
+<p class=MsoNormal>The gLite Logging &amp; Bookkeeping Server module has the
+following dependencies:</p>
+
+<p class=MsoNormal>&nbsp;</p>
+
+<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0 width=640
+ style='width:480.3pt;border-collapse:collapse;border:none'>
+ <tr>
+  <td width=187 valign=top style='width:140.1pt;border:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt'>Component name</span></p>
+  </td>
+  <td width=66 valign=top style='width:49.6pt;border:solid windowtext 1.0pt;
+  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>Version</span></p>
+  </td>
+  <td width=387 valign=top style='width:290.6pt;border:solid windowtext 1.0pt;
+  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>RPM file name</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=187 valign=top style='width:140.1pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
+  style='font-size:10.0pt'>gLite Security Utilities</span></p>
+  </td>
+  <td width=66 valign=top style='width:49.6pt;border-top:none;border-left:none;
+  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>0.6.1</span></p>
+  </td>
+  <td width=387 valign=top style='width:290.6pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
+  style='font-size:10.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/I20050218/installers/glite-security-utils_installer.sh">http://glite.web.cern.ch/glite/packages/I20050225/installers/glite-security-utils_installer.sh</a></span></span></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=187 valign=top style='width:140.1pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
+  style='font-size:10.0pt'>gLite </span><span style='font-size:10.0pt'>R-GMA </span><span
+  lang=EN-US style='font-size:10.0pt'>Service Publisher</span></p>
+  </td>
+  <td width=66 valign=top style='width:49.6pt;border-top:none;border-left:none;
+  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>4.1.2</span></p>
+  </td>
+  <td width=387 valign=top style='width:290.6pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
+  style='font-size:10.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/I20050225/installers/glite-rgma-servicetool_installer.sh">http://glite.web.cern.ch/glite/packages/I20050225/installers/glite-rgma-servicetool_installer.sh</a></span></span></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=187 valign=top style='width:140.1pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt'>GPT</span></p>
+  </td>
+  <td width=66 valign=top style='width:49.6pt;border-top:none;border-left:none;
+  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>VDT 1.2.2</span></p>
+  </td>
+  <td width=387 valign=top style='width:290.6pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
+  style='font-size:10.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/gpt-VDT1.2.0rh9-1.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/gpt-<span
+  lang=EN-GB>VDT1.2.0rh9</span>-1.i386.rpm</a></span></span></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=187 valign=top style='width:140.1pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt'>VDT Globus Essentials</span></p>
+  </td>
+  <td width=66 valign=top style='width:49.6pt;border-top:none;border-left:none;
+  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>VDT 1.2.2</span></p>
+  </td>
+  <td width=387 valign=top style='width:290.6pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
+  style='font-size:10.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/vdt_globus_essentials-VDT1.2.0rh9-1.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/vdt_globus_essentials-<span
+  lang=EN-GB>VDT1.2.0rh9</span>-1.i386.rpm</a></span></span></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=187 valign=top style='width:140.1pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt'>MySQL-server</span></p>
+  </td>
+  <td width=66 valign=top style='width:49.6pt;border-top:none;border-left:none;
+  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>4.0.20</span></p>
+  </td>
+  <td width=387 valign=top style='width:290.6pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
+  style='font-size:10.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/MySQL-server-4.0.20-0.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/MySQL-server-<span
+  lang=EN-GB>4.0.20</span>-0.i386.rpm</a></span></span></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=187 valign=top style='width:140.1pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt'>MySQL-client</span></p>
+  </td>
+  <td width=66 valign=top style='width:49.6pt;border-top:none;border-left:none;
+  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>4.0.20</span></p>
+  </td>
+  <td width=387 valign=top style='width:290.6pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
+  style='font-size:10.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/MySQL-client-4.0.20-0.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/MySQL-client-<span
+  lang=EN-GB>4.0.20</span>-0.i386.rpm</a></span></span></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=187 valign=top style='width:140.1pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt'>ares</span></p>
+  </td>
+  <td width=66 valign=top style='width:49.6pt;border-top:none;border-left:none;
+  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>1.1.1</span></p>
+  </td>
+  <td width=387 valign=top style='width:290.6pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
+  style='font-size:10.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/ares-1.1.1-EGEE.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/ares-<span
+  lang=EN-GB>1.1.1</span>-EGEE.i386.rpm</a></span></span></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=187 valign=top style='width:140.1pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt'>myproxy</span></p>
+  </td>
+  <td width=66 valign=top style='width:49.6pt;border-top:none;border-left:none;
+  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>1.14</span></p>
+  </td>
+  <td width=387 valign=top style='width:290.6pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
+  style='font-size:10.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/myproxy-1.14-EGEE.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/myproxy-<span
+  lang=EN-GB>1.14</span>-EGEE.i386.rpm</a></span></span></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=187 valign=top style='width:140.1pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal align=left style='text-align:left'><span style='font-size:
+  10.0pt'>perl-Expect.pm</span></p>
+  </td>
+  <td width=66 valign=top style='width:49.6pt;border-top:none;border-left:none;
+  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>1.01</span></p>
+  </td>
+  <td width=387 valign=top style='width:290.6pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
+  style='font-size:10.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/per-Expect.pm-1.01-9.i386.rpm">http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/per-Expect.pm-<span
+  lang=EN-GB>1.01</span>-9.i386.rpm</a></span></span></p>
+  </td>
+ </tr>
+</table>
+
+<p class=MsoNormal>&nbsp;</p>
+
+<h3>7.1.5. Known bugs and issues</h3>
+
+<p class=MsoNormal align=left style='text-align:left'>This release has the
+following bugs and issues. Bug numbers refer to the gLite Bug Tracking system
+database hosted on the CERN Savannah system at <a
+href="https://savannah.cern.ch/bugs/?group=jra1mdw">https://savannah.cern.ch/bugs/?group=jra1mdw</a>
+.</p>
+
+<p class=MsoNormal align=left style='text-align:left'>&nbsp;</p>
+
+<ul style='margin-top:0mm' type=disc>
+ <li class=MsoNormal style='text-align:left'>No removal procedure is provided
+     with this release apart from the removal of the RPMS. Any account, group
+     or other resource created during the module configuration must be manually
+     cleaned.</li>
+ <li class=MsoNormal style='text-align:left'>No inet.d scripts are installed or
+     activated in this release. This will be fixed in the next release</li>
+</ul>
+
+<p class=MsoNormal align=left style='text-align:left'>&nbsp;</p>
+
+<p class=MsoNormal align=left style='text-align:left'>Known open bugs:</p>
+
+<p class=MsoNormal align=left style='text-align:left'>&nbsp;</p>
+
+<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
+ style='border-collapse:collapse;border:none'>
+ <tr>
+  <td width=58 valign=top style='width:43.55pt;border:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>Bug number</span></p>
+  </td>
+  <td width=535 valign=top style='width:401.3pt;border:solid windowtext 1.0pt;
+  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>Description</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border:solid windowtext 1.0pt;
+  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6057"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#6057</span></a></span></p>
+  </td>
+  <td width=535 valign=top style='width:401.3pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6057"><span
+  style='color:windowtext;text-decoration:none'>glite-lb configuration scripts
+  has missing dependency (CGI.pm)</span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6415"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#6415</span></a></span></p>
+  </td>
+  <td width=535 valign=top style='width:401.3pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6415"><span
+  style='color:windowtext;text-decoration:none'>glite-lb-bkserver does not
+  start and blocks execution of glite-lb-config.py</span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6722"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#6722</span></a></span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6722"><span
+  style='color:windowtext;text-decoration:none'>glite-job-status -all doesn't
+  work</span></a>&nbsp;</span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6838"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#6838</span></a></span></p>
+  </td>
+  <td width=535 valign=top style='width:401.3pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6838"><span
+  style='color:windowtext;text-decoration:none'>There are no test reports
+  provided for the L&amp;B Server in gLite v1.0.6 RC1 (Integration Build
+  I20050204)</span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7032"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#7032</span></a></span></p>
+  </td>
+  <td width=535 valign=top style='width:401.3pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7032"><span
+  style='color:windowtext;text-decoration:none'>The LB installer fails with an
+  RPM not found message</span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7039"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#7039</span></a></span></p>
+  </td>
+  <td width=535 valign=top style='width:401.3pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7039"><span
+  style='color:windowtext;text-decoration:none'>Problem if LD_LIBRARY_PATH is
+  unset</span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7053"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#7053</span></a></span></p>
+  </td>
+  <td width=535 valign=top style='width:401.3pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7053"><span
+  style='color:windowtext;text-decoration:none'>LB configuration fails if the
+  mysql root pwd is set</span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7180"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#7180</span></a></span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=7180"><span
+  style='color:windowtext;text-decoration:none'>Logging &amp; Bookkeping UI </span></a>&nbsp;</span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+</table>
+
+<p class=MsoNormal>&nbsp;</p>
+
+<p class=MsoNormal>Bugs fixed in this or previous releases, but not yet tested:</p>
+
+<p class=MsoNormal>&nbsp;</p>
+
+<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
+ style='border-collapse:collapse;border:none'>
+ <tr>
+  <td width=59 valign=top style='width:44.45pt;border:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>Bug number</span></p>
+  </td>
+  <td width=534 valign=top style='width:400.4pt;border:solid windowtext 1.0pt;
+  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>Description</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border:solid windowtext 1.0pt;
+  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5833"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#5833</span></a></span></p>
+  </td>
+  <td width=534 valign=top style='width:400.4pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5833"><span
+  style='color:windowtext;text-decoration:none'>all jobs in SUBMITTED after a
+  job storm</span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5850"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#5850</span></a></span></p>
+  </td>
+  <td width=534 valign=top style='width:400.4pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5850"><span
+  style='color:windowtext;text-decoration:none'>glite-lb-config.py has
+  glite.location and globus.location not set in params[]</span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5897"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#5897</span></a></span></p>
+  </td>
+  <td width=534 valign=top style='width:400.4pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5897"><span
+  style='color:windowtext;text-decoration:none'>I20041203 LB installation
+  script has a missing dependency </span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5901"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#5901</span></a></span></p>
+  </td>
+  <td width=534 valign=top style='width:400.4pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5901"><span
+  style='color:windowtext;text-decoration:none'>mysqlaccess command fails with
+  Broken pipe if mysql socket file is in /tmp </span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5908"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#5908</span></a></span></p>
+  </td>
+  <td width=534 valign=top style='width:400.4pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5908"><span
+  style='color:windowtext;text-decoration:none'>Environment variables set via
+  the configuration script are not passed to daemon startup scripts</span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5910"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#5910</span></a></span></p>
+  </td>
+  <td width=534 valign=top style='width:400.4pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5910"><span
+  style='color:windowtext;text-decoration:none'>glite-lb configuration scripts
+  don't set GLITE_USER environment</span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5925"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#5925</span></a></span></p>
+  </td>
+  <td width=534 valign=top style='width:400.4pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5925"><span
+  style='color:windowtext;text-decoration:none'>Running glite-lb script removes
+  mysql.sock file </span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6075"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#6075</span></a></span></p>
+  </td>
+  <td width=534 valign=top style='width:400.4pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6075"><span
+  style='color:windowtext;text-decoration:none'>glite-lb-config.py crashes with
+  KeyError: GLITE_CERT_DIR</span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6366"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#6366</span></a></span></p>
+  </td>
+  <td width=534 valign=top style='width:400.4pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6366"><span
+  style='color:windowtext;text-decoration:none'>LB install script:: Fails but
+  no error reported</span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6412"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#6412</span></a></span></p>
+  </td>
+  <td width=534 valign=top style='width:400.4pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6412"><span
+  style='color:windowtext;text-decoration:none'>--start and --stop options not
+  documented in glite-ce-config.py, glite-lb-config.py</span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6416"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#6416</span></a></span></p>
+  </td>
+  <td width=534 valign=top style='width:400.4pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6416"><span
+  style='color:windowtext;text-decoration:none'>the BKserver on the LB machine
+  needs a symlink and the script doesn't check for it</span></a>&nbsp;</span></p>
+  </td>
+  <td width=26 valign=top style='width:19.55pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>&nbsp;</span></p>
+  </td>
+ </tr>
+</table>
+
+<p class=MsoNormal align=left style='margin:0mm;margin-bottom:.0001pt;
+text-align:left;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;
+font-family:"Courier New"'>&nbsp;</span></p>
+
+<h3>7.1.6. Bugs closed since last release</h3>
+
+<p class=MsoNormal align=left style='text-align:left'>This release fixes the
+following bugs and issues. Bug numbers refer to the gLite Bug Tracking system
+database hosted on the CERN Savannah system at <a
+href="https://savannah.cern.ch/bugs/?group=jra1mdw">https://savannah.cern.ch/bugs/?group=jra1mdw</a>
+ </p>
+
+<p class=MsoNormal align=left style='text-align:left'>&nbsp;</p>
+
+<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
+ style='border-collapse:collapse;border:none'>
+ <tr>
+  <td width=120 valign=top style='width:89.9pt;border:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5930"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#5930</span></a></span></p>
+  <p class=MsoNormal><span style='font-size:10.0pt'>Bug number</span></p>
   </td>
-  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
-  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5930"><span
-  style='color:windowtext;text-decoration:none'>running start on started
-  service is not an error. </span></a>&nbsp;</span></p>
+  <td width=499 valign=top style='width:374.5pt;border:solid windowtext 1.0pt;
+  border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'>Description</span></p>
   </td>
  </tr>
 </table>
 
 <p class=MsoNormal align=left style='text-align:left'>&nbsp;</p>
 
-<h1>6. Previous Releases</h1>
-
-<h2>6.1. Release 0.1.0</h2>
+<h2>7.2. Release 1.0.0</h2>
 
-<h3><span lang=FR>6.1.1. </span><span lang=FR>Release Description</span></h3>
+<h3><span lang=FR>7.2.1. </span><span lang=FR>Release Description</span></h3>
 
 <p class=MsoNormal>This release contains the gLite Logging &amp; Bookkeeping
-Server module v. 0.1.0. The following sections provide additional information
+Server module v. 1.0.0. The following sections provide additional information
 about the release content, the module dependencies, the know bugs and issues
 and a list of bugs closed since the previous release. For information about
 installing and using the gLite Logging &amp; Bookkeeping Server, please refer
 to the gLite Installation and User Guides. </p>
 
-<h3>6.1.2. <span lang=FR>Release</span> contents</h3>
+<h3><span lang=FR>7.2.2. </span><span lang=FR>Changes in this Release</span></h3>
 
-<p class=MsoNormal>The gLite Logging &amp; Bookkeeping Server v. 0.1.0 is
+<p class=MsoNormal>This release doesn\92t contain any functional changes. It
+contains a number of bug fixes in the components and the deployment module to
+be submitted to testing.</p>
+
+<p class=MsoNormal>However, the version number has been changed to match the
+final release number 1.0.0.</p>
+
+<h3>7.2.3. Release contents</h3>
+
+<p class=MsoNormal>The gLite Logging &amp; Bookkeeping Server v. 0.3.1 is
 composed of the following gLite components:</p>
 
 <p class=MsoNormal>&nbsp;</p>
@@ -1219,17 +2672,17 @@ composed of the following gLite components:</p>
   <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
   border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>0.1.0</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>1.0.0</span></p>
   </td>
   <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/I20041126/installers/glite-lb_installer.sh">http://glite.web.cern.ch/glite/packages/I20041126/installers/glite-lb_installer.sh</a>
+  href="http://glite.web.cern.ch/glite/packages/I20041126/installers/glite-lb_installer.sh">http://glite.web.cern.ch/glite/packages/I20050114/installers/glite-lb_installer.sh</a>
   </span></p>
   <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
   style='font-size:10.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/I20041126/bin/rhel30/noarch/RPMS/glite-lb-config-0.1.0-1.noarch.rpm">http://glite.web.cern.ch/glite/packages/I20041126/bin/rhel30/noarch/RPMS/glite-lb-config-0.1.0-1.noarch.rpm</a></span></span></p>
+  href="http://glite.web.cern.ch/glite/packages/I20050114/bin/rhel30/noarch/RPMS/glite-lb-config-1.0.0-1.noarch.rpm">http://glite.web.cern.ch/glite/packages/I20050114/bin/rhel30/noarch/RPMS/glite-lb-config-1.0.0-1.noarch.rpm</a></span></span></p>
   </td>
  </tr>
  <tr>
@@ -1240,15 +2693,15 @@ composed of the following gLite components:</p>
   <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
   border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>0.1.0</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>0.4.1</span></p>
   </td>
   <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
   style='font-size:10.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/I20041126/bin/rhel30/noarch/RPMS/glite-ce-config-0.1.0-1.noarch.rpm">http://glite.web.cern.ch/glite/packages/I20041126/bin/rhel30/noarch/RPMS/glite-
-  config-0.1.0-1.noarch.rpm</a></span></span></p>
+  href="http://glite.web.cern.ch/glite/packages/I20050107/bin/rhel30/noarch/RPMS/glite-%20config-0.4.1-1.noarch.rpm">http://glite.web.cern.ch/glite/packages/I20050114/bin/rhel30/noarch/RPMS/glite-
+  config-0.4.1-1.noarch.rpm</a></span></span></p>
   </td>
  </tr>
  <tr>
@@ -1259,14 +2712,32 @@ composed of the following gLite components:</p>
   <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
   border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=FR style='font-size:10.0pt'>0.3.0</span></p>
+  <p class=MsoNormal><span lang=FR style='font-size:10.0pt'>1.0.0</span></p>
+  </td>
+  <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
+  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
+  style='font-size:10.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/I20050107/bin/rhel30/i386/RPMS/glite-lb-client-interface-1.0.0-1.i386.rpm">http://glite.web.cern.ch/glite/packages/I20050114/bin/rhel30/i386/RPMS/glite-lb-client-interface-1.0.0-1.i386.rpm</a></span></span></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
+  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>glite-lb-common</span></p>
+  </td>
+  <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
+  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>1.1.0</span></p>
   </td>
   <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
   style='font-size:10.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/I20041126/bin/rhel30/i386/RPMS/glite-lb-client-interface-0.3.0-2.i386.rpm">http://glite.web.cern.ch/glite/packages/I20041126/bin/rhel30/i386/RPMS/glite-lb-client-interface-0.3.0-2.i386.rpm</a></span></span></p>
+  href="http://glite.web.cern.ch/glite/packages/I20050107/bin/rhel30/i386/RPMS/glite-lb-common-1.1.0-1.i386.rpm">http://glite.web.cern.ch/glite/packages/I20050114/bin/rhel30/i386/RPMS/glite-lb-common-1.1.0-1.i386.rpm</a></span></span></p>
   </td>
  </tr>
  <tr>
@@ -1277,86 +2748,86 @@ composed of the following gLite components:</p>
   <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
   border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>0.3.0</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>1.0.0</span></p>
   </td>
   <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span class=MsoHyperlink><span lang=FR style='font-size:
   10.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/I20041126/bin/rhel30/i386/RPMS/glite-lb-logger-0.3.0-3.i386.rpm">http://glite.web.cern.ch/glite/packages/I20041126/bin/rhel30/i386/RPMS/glite-lb-logger-0.3.0-3.i386.rpm</a></span></span></p>
+  href="http://glite.web.cern.ch/glite/packages/I20050107/bin/rhel30/i386/RPMS/glite-lb-logger-1.0.0-1.i386.rpm">http://glite.web.cern.ch/glite/packages/I20050114/bin/rhel30/i386/RPMS/glite-lb-logger-1.0.0-1.i386.rpm</a></span></span></p>
   </td>
  </tr>
  <tr>
   <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>glite-lb-common</span></p>
+  <p class=MsoNormal><span lang=FR style='font-size:10.0pt'>glite-lb-server</span></p>
   </td>
   <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
   border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>0.3.0</span></p>
+  <p class=MsoNormal><span lang=FR style='font-size:10.0pt'>1.0.0</span></p>
   </td>
   <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:10.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/I20041126/bin/rhel30/i386/RPMS/glite-lb-common-0.3.0-2.i386.rpm">http://glite.web.cern.ch/glite/packages/I20041126/bin/rhel30/i386/RPMS/glite-lb-common-0.3.0-2.i386.rpm</a></span></span></p>
+  <p class=MsoNormal><span class=MsoHyperlink><span lang=FR style='font-size:
+  10.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/I20050107/bin/rhel30/i386/RPMS/glite-lb-server-1.0.0-1.i386.rpm">http://glite.web.cern.ch/glite/packages/I20050114/bin/rhel30/i386/RPMS/glite-lb-server-1.0.0-1.i386.rpm</a></span></span></p>
   </td>
  </tr>
  <tr>
   <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>glite-lb-server</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>glite-lb-server-bones</span></p>
   </td>
   <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
   border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>0.5.2</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>1.0.0</span></p>
   </td>
   <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
   style='font-size:10.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/I20041126/bin/rhel30/i386/RPMS/glite-lb-server-0.5.2-4.i386.rpm">http://glite.web.cern.ch/glite/packages/I20041126/bin/rhel30/i386/RPMS/glite-lb-server-0.5.2-4.i386.rpm</a></span></span></p>
+  href="http://glite.web.cern.ch/glite/packages/I20050107/bin/rhel30/i386/RPMS/glite-lb-server-bones-1.0.0-1.i386.rpm">http://glite.web.cern.ch/glite/packages/I20050114/bin/rhel30/i386/RPMS/glite-lb-server-bones-1.0.0-1.i386.rpm</a></span></span></p>
   </td>
  </tr>
  <tr>
   <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>glite-lb-server-bones</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>glite-lb-ws-interface</span></p>
   </td>
   <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
   border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>0.1.0</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>1.0.0</span></p>
   </td>
   <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
   style='font-size:10.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/I20041126/bin/rhel30/i386/RPMS/glite-lb-server-bones-0.1.0-1.i386.rpm">http://glite.web.cern.ch/glite/packages/I20041126/bin/rhel30/i386/RPMS/glite-lb-server-bones-0.1.0-1.i386.rpm</a></span></span></p>
+  href="http://glite.web.cern.ch/glite/packages/I20050107/bin/rhel30/i386/RPMS/glite-lb-ws-interface-1.0.0-1.i386.rpm">http://glite.web.cern.ch/glite/packages/I20050114/bin/rhel30/i386/RPMS/glite-lb-ws-interface-1.0.0-1.i386.rpm</a></span></span></p>
   </td>
  </tr>
  <tr>
   <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>glite-wms-utils-jobid</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>glite-security-proxyrenewal</span></p>
   </td>
   <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
   border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>0.1.2</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>1.0.0</span></p>
   </td>
   <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
   style='font-size:10.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/I20041126/bin/rhel30/i386/RPMS/glite-wms-utils-jobid-0.1.2-1.i386.rpm">http://glite.web.cern.ch/glite/packages/I20041126/bin/rhel30/i386/RPMS/glite-wms-utils-jobid-0.1.2-1.i386.rpm</a></span></span></p>
+  href="http://glite.web.cern.ch/glite/packages/I20050107/bin/rhel30/i386/RPMS/glite-security-proxyrenewal-1.0.0-1.i386.rpm">http://glite.web.cern.ch/glite/packages/I20050114/bin/rhel30/i386/RPMS/glite-security-proxyrenewal-1.0.0-1.i386.rpm</a></span></span></p>
   </td>
  </tr>
  <tr>
@@ -1367,39 +2838,39 @@ composed of the following gLite components:</p>
   <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
   border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>0.1.2</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>1.0.0</span></p>
   </td>
   <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
   style='font-size:10.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/I20041126/bin/rhel30/i386/RPMS/glite-wms-utils-exception-0.1.2-1.i386.rpm">http://glite.web.cern.ch/glite/packages/I20041126/bin/rhel30/i386/RPMS/glite-wms-utils-exception-0.1.2-1.i386.rpm</a></span></span></p>
+  href="http://glite.web.cern.ch/glite/packages/I20050107/bin/rhel30/i386/RPMS/glite-wms-utils-exception-1.0.0-1.i386.rpm">http://glite.web.cern.ch/glite/packages/I20050114/bin/rhel30/i386/RPMS/glite-wms-utils-exception-1.0.0-1.i386.rpm</a></span></span></p>
   </td>
  </tr>
  <tr>
   <td width=177 valign=top style='width:133.0pt;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>glite-security-proxyrenewal</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>glite-wms-utils-jobid</span></p>
   </td>
   <td width=63 valign=top style='width:47.5pt;border-top:none;border-left:none;
   border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>0.1.0</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>1.0.0</span></p>
   </td>
   <td width=393 valign=top style='width:294.9pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
   style='font-size:10.0pt'><a
-  href="http://glite.web.cern.ch/glite/packages/I20041126/bin/rhel30/i386/RPMS/glite-security-proxyrenewal-0.1.0-1.i386.rpm">http://glite.web.cern.ch/glite/packages/I20041126/bin/rhel30/i386/RPMS/glite-security-proxyrenewal-0.1.0-1.i386.rpm</a></span></span></p>
+  href="http://glite.web.cern.ch/glite/packages/I20050107/bin/rhel30/i386/RPMS/glite-wms-utils-jobid-1.0.0-1.i386.rpm">http://glite.web.cern.ch/glite/packages/I20050114/bin/rhel30/i386/RPMS/glite-wms-utils-jobid-1.0.0-1.i386.rpm</a></span></span></p>
   </td>
  </tr>
 </table>
 
 <p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
 
-<h3>6.1.3. <span lang=FR>Dependencies</span></h3>
+<h3>7.2.4. Dependencies</h3>
 
 <p class=MsoNormal>The gLite Logging &amp; Bookkeeping Server module has the
 following dependencies:</p>
@@ -1432,13 +2903,14 @@ following dependencies:</p>
   <td width=66 valign=top style='width:49.6pt;border-top:none;border-left:none;
   border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>0.2.0</span></p>
+  <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'>0.4.0</span></p>
   </td>
   <td width=387 valign=top style='width:290.6pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US
-  style='font-size:10.0pt'>http://glite.web.cern.ch/glite/packages/I20041126/installers/glite-security-utils_installer.sh</span></span></p>
+  style='font-size:10.0pt'><a
+  href="http://glite.web.cern.ch/glite/packages/I20050107/installers/glite-security-utils_installer.sh">http://glite.web.cern.ch/glite/packages/I20050114/installers/glite-security-utils_installer.sh</a></span></span></p>
   </td>
  </tr>
  <tr>
@@ -1585,7 +3057,7 @@ following dependencies:</p>
 
 <p class=MsoNormal>&nbsp;</p>
 
-<h3>6.1.4. Known bugs and issues</h3>
+<h3>7.2.5. Known bugs and issues</h3>
 
 <p class=MsoNormal align=left style='text-align:left'>This release has the
 following bugs and issues. Bug numbers refer to the gLite Bug Tracking system
@@ -1598,39 +3070,38 @@ href="https://savannah.cern.ch/bugs/?group=jra1mdw">https://savannah.cern.ch/bug
 <table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
  style='border-collapse:collapse;border:none'>
  <tr>
-  <td width=121 valign=top style='width:90.45pt;border:solid windowtext 1.0pt;
+  <td width=85 valign=top style='width:63.6pt;border:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'>Bug number</span></p>
   </td>
-  <td width=499 valign=top style='width:373.95pt;border:solid windowtext 1.0pt;
+  <td width=534 valign=top style='width:400.8pt;border:solid windowtext 1.0pt;
   border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'>Description</span></p>
   </td>
  </tr>
  <tr>
-  <td width=121 valign=top style='width:90.45pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5125"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#5125</span></a></span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5202"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#5202</span></a></span></p>
   </td>
-  <td width=499 valign=top style='width:373.95pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5125"><span
-  style='color:windowtext;text-decoration:none'>glite-lb-bkserverd
-  start/stop/status displays usage options</span></a>&nbsp;</span></p>
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5202"><span
+  style='color:windowtext;text-decoration:none'>no RPM provides the
+  lb-local-logger daemon - </span></a>&nbsp;</span></p>
   </td>
  </tr>
  <tr>
-  <td width=121 valign=top style='width:90.45pt;border:solid windowtext 1.0pt;
+  <td width=85 valign=top style='width:63.6pt;border:solid windowtext 1.0pt;
   border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
   href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5248"><span
   style='color:windowtext;text-decoration:none'>&nbsp;#5248</span></a></span></p>
   </td>
-  <td width=499 valign=top style='width:373.95pt;border-top:none;border-left:
+  <td width=534 valign=top style='width:400.8pt;border-top:none;border-left:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
   <p class=MsoNormal><span style='font-size:10.0pt'><a
@@ -1640,6 +3111,215 @@ href="https://savannah.cern.ch/bugs/?group=jra1mdw">https://savannah.cern.ch/bug
   background</span></a>&nbsp;</span></p>
   </td>
  </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5833"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#5833</span></a></span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5833"><span
+  style='color:windowtext;text-decoration:none'>all jobs in SUBMITTED after a
+  job storm</span></a>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5850"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#5850</span></a></span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5850"><span
+  style='color:windowtext;text-decoration:none'>glite-lb-config.py has
+  glite.location and globus.location not set in params[]</span></a>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5897"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#5897</span></a></span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5897"><span
+  style='color:windowtext;text-decoration:none'>I20041203 LB installation
+  script has a missing dependency </span></a>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5900"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#5900</span></a></span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5900"><span
+  style='color:windowtext;text-decoration:none'>location of mysql.sock file </span></a>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5901"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#5901</span></a></span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5901"><span
+  style='color:windowtext;text-decoration:none'>mysqlaccess command fails with
+  Broken pipe if mysql socket file is in /tmp </span></a></span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5903"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#5903</span></a></span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5903"><span
+  style='color:windowtext;text-decoration:none'>glite-lb-bkserverd script gives
+  bash: /root/.bashrc: Permission denied error </span></a>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5904"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#5904</span></a></span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5904"><span
+  style='color:windowtext;text-decoration:none'>glite-lb-bkserverd does not
+  check default location for credentials</span></a>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5910"><span
+  style='color:windowtext;text-decoration:none'>#5910</span></a></span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5910"><span
+  style='color:windowtext;text-decoration:none'>glite-lb configuration scripts
+  don't set GLITE_USER environment</span></a>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5925"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#5925</span></a></span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5925"><span
+  style='color:windowtext;text-decoration:none'>Running glite-lb script removes
+  mysql.sock file </span></a>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5926"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#5926</span></a></span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5926"><span
+  style='color:windowtext;text-decoration:none'>Default user should not be used
+  in the init.d scripts</span></a>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5932"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#5932</span></a></span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5932"><span
+  style='color:windowtext;text-decoration:none'>credential file created in
+  /var/tmp is unnecessary</span></a>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5934"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#5934</span></a></span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5934"><span
+  style='color:windowtext;text-decoration:none'>service start and stop
+  notifications are inconsistent for glite-lb-bkserverd init,d script</span></a>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6057"><span
+  style='color:windowtext;text-decoration:none'>&nbsp;#6057</span></a></span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6057"><span
+  style='color:windowtext;text-decoration:none'>glite-lb configuration scripts
+  has missing dependency (CGI.pm)</span></a>&nbsp;</span></p>
+  </td>
+ </tr>
+ <tr>
+  <td valign=top style='border:solid windowtext 1.0pt;border-top:none;
+  padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6075"><span
+  style='color:windowtext;text-decoration:none'>#6075</span></a></span></p>
+  </td>
+  <td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;
+  border-right:solid windowtext 1.0pt;padding:0mm 5.4pt 0mm 5.4pt'>
+  <p class=MsoNormal><span style='font-size:10.0pt'><a
+  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=6075"><span
+  style='color:windowtext;text-decoration:none'>glite-lb-config.py crashes with
+  KeyError: GLITE_CERT_DIR</span></a>&nbsp;</span></p>
+  </td>
+ </tr>
 </table>
 
 <p class=MsoNormal align=left style='text-align:left'>&nbsp;</p>
@@ -1653,12 +3333,11 @@ manually cleaned.</p>
 text-align:left;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;
 font-family:"Courier New"'>&nbsp;</span></p>
 
-<h3>6.1.5. Bugs closed since last release</h3>
+<h3>7.2.6. Bugs closed since last release</h3>
 
 <p class=MsoNormal align=left style='text-align:left'>This release fixes the
-following bugs and issues. Since there are no previous public releases, this
-list refers to the previous development release. Bug numbers refer to the gLite
-Bug Tracking system database hosted on the CERN Savannah system at <a
+following bugs and issues. Bug numbers refer to the gLite Bug Tracking system
+database hosted on the CERN Savannah system at <a
 href="https://savannah.cern.ch/bugs/?group=jra1mdw">https://savannah.cern.ch/bugs/?group=jra1mdw</a>
  </p>
 
@@ -1667,44 +3346,13 @@ href="https://savannah.cern.ch/bugs/?group=jra1mdw">https://savannah.cern.ch/bug
 <table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
  style='border-collapse:collapse;border:none'>
  <tr>
-  <td width=121 valign=top style='width:90.45pt;border:solid windowtext 1.0pt;
+  <td width=120 valign=top style='width:89.9pt;border:solid windowtext 1.0pt;
   padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal>Bug number</p>
+  <p class=MsoNormal><span style='font-size:10.0pt'>Bug number</span></p>
   </td>
-  <td width=499 valign=top style='width:373.95pt;border:solid windowtext 1.0pt;
+  <td width=499 valign=top style='width:374.5pt;border:solid windowtext 1.0pt;
   border-left:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal>Description</p>
-  </td>
- </tr>
- <tr>
-  <td width=121 valign=top style='width:90.45pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=4627"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#4627</span></a></p>
-  </td>
-  <td width=499 valign=top style='width:373.95pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=4627"><span
-  style='color:windowtext;text-decoration:none'>no licence found in lb packages</span></a>&nbsp;</p>
-  </td>
- </tr>
- <tr>
-  <td width=121 valign=top style='width:90.45pt;border:solid windowtext 1.0pt;
-  border-top:none;padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5236"><span
-  style='color:windowtext;text-decoration:none'>&nbsp;#5236</span></a></p>
-  </td>
-  <td width=499 valign=top style='width:373.95pt;border-top:none;border-left:
-  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
-  padding:0mm 5.4pt 0mm 5.4pt'>
-  <p class=MsoNormal><a
-  href="https://savannah.cern.ch/bugs/?func=detailitem&amp;item_id=5236"><span
-  style='color:windowtext;text-decoration:none'>LB install/config documentation
-  has some errors</span></a>&nbsp;</p>
+  <p class=MsoNormal><span style='font-size:10.0pt'>Description</span></p>
   </td>
  </tr>
 </table>
index 353c3a2..4b071fa 100644 (file)
Binary files a/org.glite.deployment.lb/doc/release_notes/release_notes.pdf and b/org.glite.deployment.lb/doc/release_notes/release_notes.pdf differ
diff --git a/org.glite.deployment.lb/project/build.number b/org.glite.deployment.lb/project/build.number
new file mode 100644 (file)
index 0000000..0c26c70
--- /dev/null
@@ -0,0 +1,2 @@
+#Tue Mar 22 11:03:41 CET 2005
+module.build=211
index 9fd493f..098c107 100644 (file)
@@ -10,9 +10,9 @@
                <service name="glite-lb-service">
                        <components>
                            <component name="glite-config"
-                                       version="0.3.0"
-                                       age="1"
-                                       build="1"
+                                       version="@org.glite.deployment.config.info.version@"
+                                       age="@org.glite.deployment.config.info.age@"
+                                       build="@org.glite.deployment.config.info.build@"
                                        arch="noarch"/>
                                        
                 <component name="glite-lb-config"
                         arch="noarch"/>
 
                                <component name="glite-lb-client-interface"
-                                       version="@org.glite.lb.client-interface.version@"
-                                       age="@org.glite.lb.client-interface.age@"
-                                       build="@org.glite.lb.client-interface.build@"
+                                       version="@org.glite.lb.client-interface.info.version@"
+                                       age="@org.glite.lb.client-interface.info.age@"
+                                       build="@org.glite.lb.client-interface.info.build@"
                                        arch="i386"/>
 
                                <component name="glite-lb-ws-interface"
-                                       version="@org.glite.lb.ws-interface.version@"
-                                       age="@org.glite.lb.ws-interface.age@"
-                                       build="@org.glite.lb.ws-interface.build@"
+                                       version="@org.glite.lb.ws-interface.info.version@"
+                                       age="@org.glite.lb.ws-interface.info.age@"
+                                       build="@org.glite.lb.ws-interface.info.build@"
                                        arch="i386"/>
                        
                                <component name="glite-lb-logger"
-                                       version="@org.glite.lb.logger.version@"
-                                       age="@org.glite.lb.logger.age@"
-                                       build="@org.glite.lb.logger.build@"
+                                       version="@org.glite.lb.logger.info.version@"
+                                       age="@org.glite.lb.logger.info.age@"
+                                       build="@org.glite.lb.logger.info.build@"
                                        arch="i386"/>
                
                                <component name="glite-lb-common"
-                                       version="@org.glite.lb.common.version@"
-                                       age="@org.glite.lb.common.age@"
-                                       build="@org.glite.lb.common.build@"
+                                       version="@org.glite.lb.common.info.version@"
+                                       age="@org.glite.lb.common.info.age@"
+                                       build="@org.glite.lb.common.info.build@"
                                        arch="i386"/>
        
                                <component name="glite-lb-server"
-                                       version="@org.glite.lb.server.version@"
-                                       age="@org.glite.lb.server.age@"
-                                       build="@org.glite.lb.server.build@"
+                                       version="@org.glite.lb.server.info.version@"
+                                       age="@org.glite.lb.server.info.age@"
+                                       build="@org.glite.lb.server.info.build@"
                                        arch="i386"/>
                                           
                                <component name="glite-lb-server-bones"
-                                       version="@org.glite.lb.server-bones.version@"
-                                       age="@org.glite.lb.server-bones.age@"
-                                       build="@org.glite.lb.server-bones.build@"
+                                       version="@org.glite.lb.server-bones.info.version@"
+                                       age="@org.glite.lb.server-bones.info.age@"
+                                       build="@org.glite.lb.server-bones.info.build@"
                                        arch="i386"/>
                                           
                                <component name="glite-wms-utils-jobid"
-                                       version="@org.glite.wms-utils.jobid.version@"
-                                       age="@org.glite.wms-utils.jobid.age@"
-                                       build="@org.glite.wms-utils.jobid.build@"
+                                       version="@org.glite.wms-utils.jobid.info.version@"
+                                       age="@org.glite.wms-utils.jobid.info.age@"
+                                       build="@org.glite.wms-utils.jobid.info.build@"
                                        arch="i386"/>
        
                                <component name="glite-wms-utils-exception"
-                                       version="@org.glite.wms-utils.exception.version@"
-                                       age="@org.glite.wms-utils.exception.age@"
-                                       build="@org.glite.wms-utils.exception.build@"
+                                       version="@org.glite.wms-utils.exception.info.version@"
+                                       age="@org.glite.wms-utils.exception.info.age@"
+                                       build="@org.glite.wms-utils.exception.info.build@"
                                        arch="i386"/>
        
                                <component name="glite-security-proxyrenewal"
-                                       version="@org.glite.security.proxyrenewal.version@"
-                                       age="@org.glite.security.proxyrenewal.age@"
-                                       build="@org.glite.security.proxyrenewal.build@"
+                                       version="@org.glite.security.proxyrenewal.info.version@"
+                                       age="@org.glite.security.proxyrenewal.info.age@"
+                                       build="@org.glite.security.proxyrenewal.info.build@"
                                        arch="i386"/>
-       
+                               <component name="glite-security-voms"
+                    version="@org.glite.security.voms.info.version@"
+                    age="@org.glite.security.voms.info.age@"
+                    build="@org.glite.security.voms.info.build@"
+                    arch="i386"/>
+                <component name="gridsite"
+                    version="@org.gridsite.core.info.version@"
+                    age="@org.gridsite.core.info.age@"
+                                       build="@org.gridsite.core.info.build@"
+                    arch="i386"/>
                        </components>
                        <dependencies>
                                <external name="MySQL-server"
                                        age="EGEE"
                                        arch="i386"/>                             
                                <external name="vdt_globus_essentials"
-                                       version="VDT1.2.0rh9"
+                                       version="VDT1.2.2rh9"
                                        age="1"
                                        arch="i386"/>
                                <external name="gpt"
-                                       version="VDT1.2.0rh9"
+                                       version="VDT1.2.2rh9"
                                        age="1"
                                        arch="i386"/>                                            
                                <external name="myproxy"
                                        arch="i386"/>
                        </dependencies>
                </service>
+
+               <!-- Security Utilities -->
+        <service name="glite-security-utils">
+                <subservice name="glite-security-utils"/>
+        </service>
+               <!-- RGMA servicetool -->
+        <service name="glite-rgma-servicetool">
+                <subservice name="glite-rgma-servicetool"/>
+        </service>
        </services>
        <dependencies>
-         <!-- glite service tool -->
        </dependencies>
 </node>
index cf7c650..a4bc55e 100644 (file)
@@ -8,7 +8,7 @@ Group:System/Application
 Prefix:/opt/glite
 BuildArch:noarch
 BuildRoot:%{_builddir}/%{name}-%{version}
-Requires: glite-lb-common, glite-lb-logger, glite-lb-server, glite-security-proxyrenewal, glite-lb-client-interface, MySQL-server, MySQL-client, expat, ares,vdt_globus_essentials, glite-wms-utils-jobid, glite-wms-utils-exception, myproxy, perl-Expect.pm 
+Requires: glite-config, glite-rgma-servicetool-config, glite-lb-client-interface, glite-lb-ws-interface, glite-lb-logger, glite-lb-common, glite-lb-server, glite-lb-server-bones, glite-wms-utils-jobid, glite-wms-utils-exception, glite-security-proxyrenewal, glite-security-voms, gridsite, MySQL-server, MySQL-client, ares, vdt_globus_essentials, gpt, myproxy, perl-Expect.pm
 
 AutoReqProv:no
 Source:glite-lb.tar.gz
index 79eb3dc..e20f297 100644 (file)
@@ -9,6 +9,7 @@
                omit-xml-declaration="yes"/>
 
        <!-- Definition of variables and parameters -->
+       <xsl:param name="installers"/>
        <xsl:param name="repository"/>
        <xsl:param name="ext-repository"/>
 
@@ -52,10 +53,24 @@ function parseRPMList()
         RPMLIST=$newRPMLIST
 }
 
+#Parse the SCRIPTLIST to execute all scripts
+function parseScriptList()
+{
+        for i in $SCRIPTLIST
+        do
+               if [ "$INSTALL" = "true" ]; then
+                        $i
+               else
+                        $i -u
+               fi
+        done
+}
 
 #Downloads and install the module RPMS
 function install()
 {
+
+       INSTALL=true
        version
        echo
        echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@@ -75,6 +90,14 @@ function install()
        
        <xsl:for-each select="node/services/service">
 
+       # Download <xsl:value-of select="@name"/> scripts from repository
+                <xsl:for-each select=".">
+                        <xsl:apply-templates select="subservice">
+                                <xsl:with-param name="install">true</xsl:with-param>
+                        </xsl:apply-templates>
+                </xsl:for-each>
+
+
        # Download <xsl:value-of select="@name"/> dependencies RPMS from repository
                <xsl:for-each select="dependencies">
                        <xsl:apply-templates>
@@ -90,6 +113,10 @@ function install()
                </xsl:for-each>
 
        </xsl:for-each>
+
+       # Download and install subservices
+        parseScriptList
+
                
        # Install all RPMS
        echo
@@ -98,12 +125,35 @@ function install()
        echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        echo
        parseRPMList
-       rpm -Uvh $RPMLIST
-       echo
-       echo Done!
+       if [ ! -z "$RPMLIST" ]; then
+               rpm -Uvh $RPMLIST
+               rpm_return=$?
+       else
+               echo All required RPMS are already installed
+               rpm_return=0
+       fi
+       if [ "$rpm_return" == "0" ]; then
+               echo
+               echo Done!
+               echo
+               echo Before using the gLite LB, please create or update the configuration
+               echo file /opt/glite/etc/config/glite-lb.cfg.xml
+               echo and run the configuration script
+               echo /opt/glite/etc/config/scripts/glite-lb-config.py.
+               echo A template is provided in
+               echo /opt/glite/etc/config/templates/glite-lb.cfg.xml
+       else
+               echo
+               echo An error occurred while installing the LB RPMS.
+               echo Most likely one or more of the RPMS to be installed require
+               echo additional dependencies or are older than already installed packages.
+               echo Please refer to the rpm error message above for more details.
+       fi
        echo
-       echo For more information refer to the gLite Installation and User Guides or to the gLite web site \(http:\/\/www.glite.org\)
-       echo Please report problems and comments to the gLite Team at project-eu-egee-middleware-integration-support@cern.ch
+       echo For more information refer to the gLite Installation and User Guides
+       echo or to the gLite web site \(http:\/\/www.glite.org\)
+       echo Please report problems and comments to the gLite Team at
+       echo project-eu-egee-glite-bugs@cern.ch
 
        cd ..
 }
@@ -144,8 +194,16 @@ function uninstall()
        echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        echo
        rpm -ev $RPMLIST
-       echo
-       echo Done!
+       if [ "$?" == "0" ]; then
+               echo
+               echo Done!
+       else
+               echo
+               echo An error occurred while removing the LB RPMS.
+               echo Most likely one or more of the RPMS to be removed have
+               echo dependent packages.
+               echo Please refer to the rpm error message above for more details.
+       fi
 }
 
 ###############################################################################
@@ -209,6 +267,28 @@ install
 exit 0
        </xsl:template>
 
+       <xsl:template name="subservices" match="subservice">
+                <xsl:param name="install"/>
+                <xsl:variable name="package"><xsl:value-of select="@name"/>_installer.sh</xsl:variable>
+                <xsl:choose>
+                        <xsl:when test="$install = 'true'">
+wget -N --non-verbose <xsl:value-of select="$installers"/><xsl:value-of select="$package"/>
+if [ ! -f "<xsl:value-of select="$package"/>" ]
+then
+        echo
+        echo ERROR: <xsl:value-of select="$package"/> could not be downloaded!
+        exit 1
+fi
+chmod u+x <xsl:value-of select="$package"/>
+SCRIPTLIST="$SCRIPTLIST ./<xsl:value-of select="$package"/>"
+                        </xsl:when>
+                        <xsl:otherwise>
+SCRIPTLISTUn="$SCRIPTLISTUn ./<xsl:value-of select="$package"/> -u "
+                        </xsl:otherwise>
+                </xsl:choose>
+        </xsl:template>
+
+
        <xsl:template name="dependencies" match="external">
                <xsl:param name="install"/>
                <xsl:variable name="package"><xsl:value-of select="@name"/>-<xsl:value-of select="@version"/>-<xsl:value-of select="@age"/>.<xsl:value-of select="@arch"/>.rpm</xsl:variable>
index 61f3e64..4e52c78 100644 (file)
@@ -1,4 +1,4 @@
-#Thu Dec 09 08:14:11 CET 2004
-module.version=0.2.0
-module.build=68
-module.age=1
+
+module.version = 1.2.2
+module.age = 1
+                               
\ No newline at end of file
index f20263f..61af5c7 100755 (executable)
@@ -12,6 +12,9 @@
 
        Revision history:
        $Log$
+       Revision 1.2  2004/11/22 13:36:42  dimeglio
+       First version of this file
+       
        Revision 1.1.1.1  2004/10/15 09:49:02  akrenek
 -->
 
@@ -71,6 +74,8 @@
                 Load version file 
             ========================================= -->
        <property file="${module.version.file}"/>
+               <property file="${module.build.file}"/>
+       <property file="${module.build.file}" />
                
        <!-- ==============================================
                 Local private targets
diff --git a/org.glite.jp.common/project/build.number b/org.glite.jp.common/project/build.number
new file mode 100644 (file)
index 0000000..fe10a1d
--- /dev/null
@@ -0,0 +1,2 @@
+#Fri Mar 11 10:05:06 CET 2005
+module.build=89
index 999300f..bc58475 100644 (file)
@@ -1,4 +1,4 @@
-#Fri Dec 10 13:33:53 CET 2004
-module.version=0.1.0
-module.build=3
-module.age=1
+
+module.version = 1.0.0
+module.age = 1
+                               
\ No newline at end of file
diff --git a/org.glite.jp.index/.cvsignore b/org.glite.jp.index/.cvsignore
deleted file mode 100644 (file)
index 3a4edf6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-.project
diff --git a/org.glite.jp.index/Makefile b/org.glite.jp.index/Makefile
deleted file mode 100644 (file)
index 3b893cd..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-# defaults
-top_srcdir=.
-builddir=build
-top_builddir=${top_srcdir}/${builddir}
-stagedir=.
-distdir=.
-globalprefix=glite
-lbprefix=lb
-package=glite-lb-server
-version=0.0.0
-PREFIX=/opt/glite
-
-glite_location=/opt/glite
-globus_prefix=/opt/globus
-nothrflavour=gcc32
-thrflavour=gcc32pthr
-expat_prefix=/opt/expat
-ares_prefix=/opt/ares
-gsoap_prefix=/software/gsoap-2.6
-
-CC=gcc
-
--include Makefile.inc
-
-
-VPATH=${top_srcdir}/src:${top_srcdir}/examples:${top_srcdir}/test:${top_srcdir}/project:${jpproject}
-
-GLOBUS_LIBS:=-L${globus_prefix}/lib \
-       -lglobus_common_${nothrflavour} \
-       -lglobus_gssapi_gsi_${nothrflavour}
-
-DEBUG:=-g -O0  -DDEBUG
-
-CFLAGS:=${DEBUG} -I. -I${gsoap_prefix}/include -I${stagedir}/include
-LDFLAGS:=-L${stagedir}/lib
-
-LINK:=libtool --mode=link ${CC} ${LDFLAGS} 
-LINKXX:=libtool --mode=link ${CXX} ${LDFLAGS} 
-INSTALL:=libtool --mode=install install
-
-
-daemon:=glite-jp-indexd
-example:=jpis-test
-soap_prefix:=jpis_
-
-SRCS:= simple_server.c soap_ops.c \
-       ${soap_prefix}C.c \
-       ${soap_prefix}Server.c
-
-EXA_SRCS:=jpis-test.c ${soap_prefix}C.c ${soap_prefix}Client.c
-
-
-OBJS:=${SRCS:.c=.o} stdsoap2.o
-EXA_OBJS:=${EXA_SRCS:.c=.o} stdsoap2.o
-
-COMMONLIB:=-lglite_jp_common
-
-default all: compile
-
-compile: ${daemon} ${example}
-
-${daemon}: ${OBJS}
-       ${LINK} -o $@ ${OBJS} ${COMMONLIB} ${GLOBUS_LIBS}
-
-${example}: ${EXA_OBJS}
-       ${LINK} -o $@ ${EXA_OBJS}
-
-JobProvenanceIS.xh: JobProvenanceIS.wsdl JobProvenanceTypes.wsdl typemap.dat
-       cp  ${jpproject}/JobProvenanceTypes.wsdl .
-       ${gsoap_prefix}/bin/wsdl2h -t ${top_srcdir}/src/typemap.dat -c -o $@ $<
-       rm -f JobProvenanceTypes.wsdl
-
-${soap_prefix}C.c ${soap_prefix}H.h: JobProvenanceIS.xh
-       ${gsoap_prefix}/bin/soapcpp2 -w -c -p ${soap_prefix} JobProvenanceIS.xh
-
-#$(SOAP_PREFIX)H.h $(SOAP_PREFIX)C.c: LB.xh
-#        $(GSOAP_BIN_PATH)/soapcpp2 -w -c -p $(SOAP_PREFIX) LB.xh
-#
-#LB.xh: LB.wsdl typemap.dat
-#         $(GSOAP_BIN_PATH)/wsdl2h -c -o $@ LB.wsdl
-#
-
-
-check: 
-       -echo nothing yet
-
-doc:
-
-stage: compile
-       ${INSTALL} -m 755 ${daemon} ${stagedir}/bin
-
-dist: distsrc distbin
-
-# FIXME: just copied from LB
-distsrc:
-       mkdir -p ${top_srcdir}/${package}-${version}
-       cd ${top_srcdir} && GLOBIGNORE="${package}-${version}" && cp -Rf * ${package}-${version}
-       cd ${top_srcdir} && tar -czf ${distdir}/${package}-${version}_src.tar.gz --exclude-from=project/tar_exclude ${package}-${version}
-       rm -rf ${top_srcdir}/${package}-${version}
-
-distbin:
-       $(MAKE) install PREFIX=`pwd`/tmpbuilddir${stagedir}
-       save_dir=`pwd`; cd tmpbuilddir${stagedir} && tar -czf $$save_dir/${top_srcdir}/${distdir}/${package}-${version}_bin.tar.gz *; cd $$save_dir
-       rm -rf tmpbuilddir
-        
-install:
-       -mkdir -p ${PREFIX}/bin ${PREFIX}/etc ${PREFIX}/etc/init.d
-       for p in bkserverd bkindex; do \
-               ${INSTALL} -m 755 "glite_lb_$$p" "${PREFIX}/bin/glite-lb-$$p"; \
-       done
-
-       for f in dbsetup.sql index.conf.template; do \
-               ${INSTALL} -m 644 ${top_srcdir}/config/"glite-lb-$$f" ${PREFIX}/etc; \
-       done
-
-       ${INSTALL} -m 755 ${top_srcdir}/config/startup ${PREFIX}/etc/init.d/glite-lb-bkserverd
-
-clean:
-
-soap_ops.o jpis-test.o simple_server.o: ${soap_prefix}H.h
-
-# we have no real config.h but have to force gSoap not to use
-# linux ftime with broken (aka obsolete) DST information
-
-stdsoap2.o: ${gsoap_prefix}/devel/stdsoap2.c
-       test -f config.h || touch config.h
-       @echo 'The following warning "time_t (de)serialization is not MT safe on this platform" is harmless'
-       ${CC} -o $@ -c -DHAVE_CONFIG_H ${CFLAGS} ${gsoap_prefix}/devel/stdsoap2.c
-
diff --git a/org.glite.jp.index/build.xml b/org.glite.jp.index/build.xml
deleted file mode 100755 (executable)
index 547659a..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-       Copyright (c) Members of the EGEE Collaboration. 2004 
-       See http://eu-egee.org/partners/ for details on the copyright holders
-       For license conditions see the license file or http://eu-egee.org/license.html
-
-       Build file for the gLite JP Index module
-       
-       Authors: Ales Krenek <ljocha@ics.muni.cz>
-       Version info: $Id$
-       Release: $Name$
-
-       Revision history:
-       $Log$
-       Revision 1.1.1.1  2004/10/15 09:49:13  akrenek
--->
-
-<project name="index" default="dist">
-       
-       <!-- =========================================
-                Builds the GLite JP Index Module
-            ========================================= -->
-       
-       <!-- =========================================
-            Import properties (order is important)
-            ========================================= -->
-
-       <!-- import baseline & user properties -->
-       <import file="../org.glite/project/baseline.properties.xml" />
-
-       <!-- import component build properties,
-                       component properties &
-                       component common properties -->
-       <import file="./project/properties.xml"/>
-       
-       <!-- import subsystem build properties,
-                       subsystem properties &
-                       subsystem common properties -->
-       <import file="${subsystem.properties.file}"/>
-
-       <!-- import global build properties &
-                       global properties -->
-       <import file="${global.properties.file}" />
-               
-       <!-- =========================================
-                Load dependency property files (order is important)
-            ========================================= -->
-       <property file="${user.dependencies.file}"/>
-       <property file="${component.dependencies.file}" />
-       <property file="${subsystem.dependencies.file}" />
-       <property file="${global.dependencies.file}"/>
-       
-       <!-- =========================================
-                 Load configure options (order is important)
-             ========================================= -->
-        <import file="${global.configure.options.file}"/>
-        <import file="${component.configure.options.file}"/>
-       
-       <!-- =========================================
-                Import task definitions (order is important)
-            ========================================= -->
-       <import file="${subsystem.taskdefs.file}" />
-       <import file="${global.taskdefs.file}" />
-                       
-       <!-- =========================================
-                Load common targets
-            ========================================= -->
-       <import file="${global.targets-simple_make.file}" />
-
-       <!-- =========================================
-                Load version file 
-            ========================================= -->
-       <property file="${module.version.file}"/>
-               
-       <!-- ==============================================
-                Local private targets
-            ============================================== -->
-       
-       <target name="localinit"
-               description="Module specific initialization tasks">
-
-               <antcall target="lbmakefiles" />
-       </target>
-               
-       <target name="localcompile"
-               description="Module specific compile tasks">
-       </target>
-       
-       <target name="localclean"
-               description="Module specific cleaning tasks">
-       </target>
-       
-</project>             
diff --git a/org.glite.jp.index/project/JobProvenanceIS.wsdl b/org.glite.jp.index/project/JobProvenanceIS.wsdl
deleted file mode 100644 (file)
index 26f97a4..0000000
+++ /dev/null
@@ -1,531 +0,0 @@
-<WSDL:definitions
-       xmlns:tns="http://glite.org/wsdl/services/jp"
-       xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-       xmlns:jp="http://glite.org/wsdl/types/jp"
-       xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
-       xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"
-       xmlns="http://schemas.xmlsoap.org/wsdl/"
-       targetNamespace="http://glite.org/wsdl/services/jp"
-       name="JobProvenance">
-
-       <WSDL:types>
-               <schema
-                       targetNamespace="http://glite.org/wsdl/types/jp"
-                       xmlns="http://www.w3.org/2001/XMLSchema"
-                       elementFormDefault="unqualified" attributeFormDefault="unqualified">
-                       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
-
-                       <simpleType name="Attribute">
-                               <restriction base="xsd:string">
-                               </restriction>
-                       </simpleType>
-                       <simpleType name="UploadClass">
-                               <restriction base="xsd:string">
-                                       <enumeration value="INPUT-SANDBOX"/>
-                                       <enumeration value="OUTPUT-SANDBOX"/>
-                                       <enumeration value="JOB-LOG"/>
-                               </restriction>
-                       </simpleType>
-                       <simpleType name="QueryOp">
-                               <restriction base="xsd:string">
-                                       <enumeration value="EQUAL"/>
-                                       <enumeration value="UNEQUAL"/>
-                                       <enumeration value="LESS"/>
-                                       <enumeration value="GREATER"/>
-                                       <enumeration value="WITHIN"/>
-                               </restriction>
-                       </simpleType>
-                       <complexType name="TagValue">
-                               <sequence>
-                                       <element name="name" type="xsd:string" minOccurs="1" maxOccurs="1" nillable="true"/>
-                                       <element name="sequence" type="xsd:int" minOccurs="0" maxOccurs="1"/>
-                                       <element name="timestamp" type="xsd:dateTime" minOccurs="0" maxOccurs="1" nillable="true"/>
-                                       <element name="stringValue" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>
-                                       <element name="blobValue" type="xsd:base64Binary" minOccurs="0" maxOccurs="1" nillable="true"/>
-                               </sequence>
-                       </complexType>
-                       <complexType name="Attributes">
-                               <sequence>
-                                       <element name="item" type="jp:Attribute" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
-                               </sequence>
-                       </complexType>
-                       <complexType name="GenericJPFaultType">
-                               <sequence>
-                                       <element name="source" type="xsd:string" minOccurs="1" maxOccurs="1"/>
-                                       <element name="code" type="xsd:int" minOccurs="1" maxOccurs="1"/>
-                                       <element name="text" type="xsd:string" minOccurs="1" maxOccurs="1"/>
-                                       <element name="description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
-                                       <element name="reason" type="jp:GenericJPFaultType" minOccurs="0" maxOccurs="1"/>
-                               </sequence>
-                       </complexType>
-                       <complexType name="PrimaryQueryElement">
-                               <sequence>
-                                       <element name="attr" type="jp:Attribute" minOccurs="1" maxOccurs="1"/>
-                                       <element name="op" type="jp:QueryOp" minOccurs="1" maxOccurs="1"/>
-                                       <element name="value" type="xsd:string" minOccurs="1" maxOccurs="1"/>
-                               </sequence>
-                       </complexType>
-                       <complexType name="PrimaryQuery">
-                               <sequence>
-                                       <element name="item" type="jp:PrimaryQueryElement" minOccurs="0" maxOccurs="unbounded"/>
-                               </sequence>
-                       </complexType>
-                       <complexType name="IndexQueryRecord">
-                               <sequence>
-                                       <element name="op" type="jp:QueryOp" minOccurs="1" maxOccurs="1"/>
-                                       <element name="value" type="xsd:string" minOccurs="1" maxOccurs="1"/>
-                               </sequence>
-                       </complexType>
-                       <complexType name="IndexQueryElement">
-                               <sequence>
-                                       <element name="attr" type="jp:Attribute" minOccurs="1" maxOccurs="1"/>
-                                       <element name="record" type="jp:IndexQueryRecord" minOccurs="1"  maxOccurs="unbounded"/>
-                               </sequence>
-                       </complexType>
-                       <complexType name="IndexQuery">
-                               <sequence>
-                                       <element name="item" type="jp:IndexQueryElement" minOccurs="1" maxOccurs="unbounded"/>
-                               </sequence>
-                       </complexType>
-                       <complexType name="JobRecord">
-                               <sequence>
-                                       <element name="jobid" type="xsd:string" minOccurs="1" maxOccurs="1"/>
-                                       <element name="PSContact" type="xsd:string" minOccurs="1" maxOccurs="1"/>
-                               </sequence>
-                       </complexType>
-                       <complexType name="JobRecords">
-                               <sequence>
-                                       <element name="record" type="jp:JobRecord" minOccurs="0" maxOccurs="unbounded"/>
-                               </sequence>
-                       </complexType>
-
-                       <complexType name="AttrUpdate">
-                               <sequence>
-                                       <element name="name" type="xsd:string" minOccurs="1" maxOccurs="1"/>
-                                       <element name="value" type="xsd:string" minOccurs="0" maxOccurs="1"/>
-                               </sequence>
-                       </complexType>
-                       <complexType name="AttrUpdates">
-                               <sequence>
-                                       <element name="item" type="jp:AttrUpdate" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
-                               </sequence>
-                       </complexType>
-                       <complexType name="JobUpdate">
-                               <sequence>
-                                       <element name="jobid" type="xsd:string" minOccurs="1" maxOccurs="1"/>
-                                       <element name="attributes" type="jp:AttrUpdates" minOccurs="1" maxOccurs="1"/>
-                                       <element name="tags" type="jp:AttrUpdates" minOccurs="1" maxOccurs="1"/>
-                               </sequence>
-                       </complexType>
-                       <complexType name="UpdateJobsData">
-                               <sequence>
-                                       <element name="job" type="jp:JobUpdate" minOccurs="0" maxOccurs="unbounded"/>
-                               </sequence>
-                       </complexType>
-                               
-                       <complexType name="FeedIndexResponse">
-                               <sequence>
-                                       <element name="feedId" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>
-                                       <element name="expires" type="xsd:dateTime" minOccurs="0" maxOccurs="1" nillable="true"/>
-                               </sequence>
-                       </complexType>
-                       <complexType name="GetJobResponse">
-                               <sequence>
-                                       <element name="jobLog" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>
-                                       <element name="inputSandbox" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>
-                                       <element name="outputSandbox" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>
-                                       <element name="tags" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>
-                               </sequence>
-                       </complexType>
-                       <complexType name="StartUploadResponse">
-                               <sequence>
-                                       <element name="destination" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>
-                                       <element name="commitBefore" type="xsd:dateTime" minOccurs="0" maxOccurs="1" nillable="true"/>
-                               </sequence>
-                       </complexType>
-                       <element name="GenericJPFault" type="jp:GenericJPFaultType"/>
-               </schema>
-       </WSDL:types>
-       <message name="RegisterJobRequest">
-               <part name="x" type="xsd:string"/>
-       </message>
-       <message name="StartUploadRequest">
-               <part name="uclass" type="jp:UploadClass"/>
-               <part name="commitTimeout" type="xsd:duration"/>
-               <part name="contentType" type="xsd:string"/>
-       </message>
-       <message name="StartUploadResponse">
-               <part name="destination" type="xsd:string"/>
-               <part name="commitBefore" type="xsd:dateTime"/>
-       </message>
-       <message name="CommitUploadRequest">
-               <part name="destination" type="xsd:string"/>
-       </message>
-       <message name="RecordTagRequest">
-               <part name="jobid" type="xsd:string"/>
-               <part name="tag" type="jp:TagValue"/>
-       </message>
-       <message name="FeedIndexRequest">
-               <part name="destination" type="xsd:string"/>
-               <part name="attributes" type="jp:Attributes"/>
-               <part name="conditions" type="jp:PrimaryQuery"/>
-               <part name="continuous" type="xsd:boolean"/>
-       </message>
-       <message name="FeedIndexResponse">
-               <part name="feedId" type="xsd:string"/>
-               <part name="expires" type="xsd:dateTime"/>
-       </message>
-       <message name="FeedIndexRefreshRequest">
-               <part name="feedId" type="xsd:string"/>
-       </message>
-       <message name="GetJobRequest">
-               <part name="jobid" type="xsd:string"/>
-       </message>
-       <message name="GetJobResponse">
-               <part name="jobLog" type="xsd:string"/>
-               <part name="inputSandbox" type="xsd:string"/>
-               <part name="outputSandbox" type="xsd:string"/>
-               <part name="tags" type="xsd:string"/>
-       </message>
-       <message name="GenericJPFault">
-               <part name="fault" element="jp:GenericJPFault"/>
-       </message>
-       <message name="EmptyResponse"/>
-       <portType name="JobProvenancePS_PortType">
-               <operation name="RegisterJob">
-                       <documentation>Register job with JP primary storage.
-Job registration in LB is propagated to JP immediately so that JP is aware of the job,
-despite no furhter information is available in it.
-
-Input: JobId
-
-Output: N/A
-
-Faults: GenericJPFault
-                       </documentation>
-                       <input message="tns:RegisterJobRequest"/>
-                       <output message="tns:EmptyResponse"/>
-                       <fault name="f" message="tns:GenericJPFault"/>
-               </operation>
-               <operation name="StartUpload">
-                       <documentation>Initiate upload of of sandbox/dump of job life log from LB.
-WM component responsible for job sandbox management and LB server call JP to declare
-intention to upload intput/output sandbox and job life log.
-
-Input:
-
-uclass: type of the upload - INPUT_SANDBOX, OUTPUT_SANDBOX, JOB_LOG
-
-commitTimeout: upper limit on time for which JP waits for committing this upload transaction
-
-contentType: MIME type of the uploaded file
-
-Output:
-
-destination: URL where the client should upload the file
-
-commitBefore: acutual time when the upload transaction times out
-
-Faults: GenericJPFault
-
-
-Initiate upload of of sandbox/dump of job life log from LB.</documentation>
-                       <input message="tns:StartUploadRequest"/>
-                       <output message="tns:StartUploadResponse"/>
-                       <fault name="f" message="tns:GenericJPFault"/>
-               </operation>
-               <operation name="CommitUpload">
-                       <documentation>Confirm upload.
-Should be called after a file upload initiaded with StartUpload is finished.
-
-Input:
-
-destination: Upload destination URL (to match with the original request)
-
-Output:
-
-Faults: GenericJPFault
-                       </documentation>
-                       <input message="tns:CommitUploadRequest"/>
-                       <output message="tns:EmptyResponse"/>
-                       <fault name="f" message="tns:GenericJPFault"/>
-               </operation>
-               <operation name="RecordTag">
-                       <documentation>Record a value of user tag.
-JP tags are either standalone or override values of their LB counterparts.
-However, JP tag values are still distinguishable those inherited from LB.
-JP tags may be either strings or blobs.
-
-Input:
-
-jobid:
-
-tag: structure containing name, timestamp, optional sequence number to order tag values
-without relying on timestamps, and string or blob value.
-
-Output: N/A
-
-Faults: GenericJPFault
-                       </documentation>
-                       <input message="tns:RecordTagRequest"/>
-                       <output message="tns:EmptyResponse"/>
-                       <fault name="f" message="tns:GenericJPFault"/>
-               </operation>
-               <operation name="FeedIndex">
-                       <documentation>Start feeding JP index server.
-Called by the index server to start batch feed, and optionally also subscribe for incremental feed.
-
-JP index server subscribes with JP primary storage using a query
-containing conditions on primary metadata and a list of queryable attributes
-of the index server (i.e. data which should be sent to the index server).
-
-When a matching job record is created or modified within the primary storage
-the job record data are sent to the subscribed index server.
-
-The subscription is soft-state, it expires after certain time unless refreshed by the client explicitely.
-
-In the batch mode the query has the same form
-with additional flag asking for all matching records (i.e.\ not only
-arriving afterwards).
-
-Input:
-
-destination: where to send the job record data
-
-attributes: which job record attributes should be sent to the requesting index server
-
-conditions: list of query conditions. Each conditions has the form Attribute Operator Value,
-where Attribute is any of job record attributes and Operator is one of EQUAL, UNEQUAL, LESS, GREATER, WITHIN.
-
-continuous: flag determining that the query is incremental (not batch) 
-
-Output:
-
-feedId: unique Id of the feed request, to be used in refresh, cancelation etc.
-
-expires: when the feed times out. Must be refreshed before this time.
-
-Faults: GenericJPFault
-                       </documentation>
-                       <input message="tns:FeedIndexRequest"/>
-                       <output message="tns:FeedIndexResponse"/>
-                       <fault name="f" message="tns:GenericJPFault"/>
-               </operation>
-               <operation name="FeedIndexRefresh">
-                       <documentation>Extend batch feed subscription (used by index server)
-
-Input: feedId returned previously by FeedIndex
-
-Output: the same as for FeedIndex
-
-Faults: GenericJPFault
-                       </documentation>
-                       <input message="tns:FeedIndexRefreshRequest"/>
-                       <output message="tns:FeedIndexResponse"/>
-                       <fault name="f" message="tns:GenericJPFault"/>
-               </operation>
-               <operation name="GetJob">
-                       <documentation>Retrieve job record URL's when jobid is known
-Used either to bypass JP index server query for this specific case, or after the index server query to
-retrieve actual job record.
-
-Input: jobid
-
-Output:
-
-jobLog, inputSandbox, outputSandbox, tags: URL's to components of the job record.
-
-Faults: GenericJPFault
-                       </documentation>
-                       <input message="tns:GetJobRequest"/>
-                       <output message="tns:GetJobResponse"/>
-                       <fault name="f" message="tns:GenericJPFault"/>
-               </operation>
-       </portType>
-       <binding name="JobProvenancePS" type="tns:JobProvenancePS_PortType">
-               <SOAP:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
-               <operation name="RegisterJob">
-                       <SOAP:operation style="rpc"/>
-                       <input>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </input>
-                       <output>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </output>
-                       <fault name="f">
-                               <SOAP:fault name="f" use="literal"/>
-                       </fault>
-               </operation>
-               <operation name="StartUpload">
-                       <SOAP:operation style="rpc"/>
-                       <input>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </input>
-                       <output>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </output>
-                       <fault name="f">
-                               <SOAP:fault name="f" use="literal"/>
-                       </fault>
-               </operation>
-               <operation name="CommitUpload">
-                       <SOAP:operation style="rpc"/>
-                       <input>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </input>
-                       <output>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </output>
-                       <fault name="f">
-                               <SOAP:fault name="f" use="literal"/>
-                       </fault>
-               </operation>
-               <operation name="RecordTag">
-                       <SOAP:operation style="rpc"/>
-                       <input>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </input>
-                       <output>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </output>
-                       <fault name="f">
-                               <SOAP:fault name="f" use="literal"/>
-                       </fault>
-               </operation>
-               <operation name="FeedIndex">
-                       <SOAP:operation style="rpc"/>
-                       <input>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </input>
-                       <output>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </output>
-                       <fault name="f">
-                               <SOAP:fault name="f" use="literal"/>
-                       </fault>
-               </operation>
-               <operation name="FeedIndexRefresh">
-                       <SOAP:operation style="rpc"/>
-                       <input>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </input>
-                       <output>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </output>
-                       <fault name="f">
-                               <SOAP:fault name="f" use="literal"/>
-                       </fault>
-               </operation>
-               <operation name="GetJob">
-                       <SOAP:operation style="rpc"/>
-                       <input>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </input>
-                       <output>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </output>
-                       <fault name="f">
-                               <SOAP:fault name="f" use="literal"/>
-                       </fault>
-               </operation>
-       </binding>
-       <service name="JobProvenancePS">
-               <documentation>Job Provenance Primary Storage service</documentation>
-               <port name="JobProvenancePS" binding="tns:JobProvenancePS">
-                       <SOAP:address location="http://localhost:10001"/>
-               </port>
-       </service>
-
-       <message name="QueryJobsRequest">
-               <part name="conditions" type="jp:IndexQuery"/>
-       </message>
-
-       <message name="QueryJobsResponse">
-               <part name="jobs" type="jp:JobRecords"/>
-       </message>
-               
-       <message name="UpdateJobsRequest">
-               <part name="feedId" type="xsd:string"/>
-               <part name="data" type="jp:UpdateJobsData"/>
-               <part name="feedDone" type="xsd:boolean"/>
-       </message>
-       
-       <portType name="JobProvenanceIS_PortType">
-               <operation name="UpdateJobs">
-                       <documentation>Store or update information on jobs within the JP index server.
-Called directly by the primary storage, used for both batch and incremental feed.
-
-Input:
-
-data: list of job record updates. Each contains jobid, list of JP attribute values and user tag values.
-
-feedDone: flag indicating end of batch feed. (In order to avoid potential problems with buffer allocation
-the huge dataset of batch feed is split into reasonable chunks and delivered with more UpdateJobs calls.)
-
-Output: N/A
-
-Faults: GenericJPFault
-
-
-                       </documentation>
-                       <input message="tns:UpdateJobsRequest"/>
-                       <output message="tns:EmptyResponse"/>
-                       <fault name="f" message="tns:GenericJPFault"/>
-               </operation>
-               <operation name="QueryJobs">
-                       <documentation>Retrieve pointers to job records of jobs matching a query.
-Input: conditions - list of lists of query conditions.
-       Elements of the inner lists refer to a single job attribute, the conditions are or-ed.
-       Elements of the outer list may refer to different job attributes, they are and-ed.
-
-Output:
-
-jobs: list of JobId, PSContact (URL of the primary storage which manges this job) pairs
-
-Faults: GenericJPFault
-                       </documentation>
-                       <input message="tns:QueryJobsRequest"/>
-                       <output message="tns:QueryJobsResponse"/>
-                       <fault name="f" message="tns:GenericJPFault"/>
-               </operation>
-       </portType>
-
-       <binding name="JobProvenanceIS" type="tns:JobProvenanceIS_PortType">
-               <SOAP:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
-               <operation name="UpdateJobs">
-                       <SOAP:operation style="rpc"/>
-                       <input>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </input>
-                       <output>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </output>
-                       <fault name="f">
-                               <SOAP:fault name="f" use="literal"/>
-                       </fault>
-               </operation>
-               <operation name="QueryJobs">
-                       <SOAP:operation style="rpc"/>
-                       <input>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </input>
-                       <output>
-                               <SOAP:body use="literal" namespace="http://glite.org/wsdl/services/jp"/>
-                       </output>
-                       <fault name="f">
-                               <SOAP:fault name="f" use="literal"/>
-                       </fault>
-               </operation>
-       </binding>
-
-       <service name="JobProvenanceIS">
-               <documentation>Job Provenance Index service</documentation>
-               <port name="JobProvenanceIS" binding="tns:JobProvenanceIS">
-                       <SOAP:address location="http://localhost:10001"/>
-               </port>
-       </service>
-               
-
-</WSDL:definitions>
diff --git a/org.glite.jp.index/project/build.properties b/org.glite.jp.index/project/build.properties
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/org.glite.jp.index/project/configure.properties.xml b/org.glite.jp.index/project/configure.properties.xml
deleted file mode 100644 (file)
index 72af8f4..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-       Copyright (c) Members of the EGEE Collaboration. 2004 
-       See http://eu-egee.org/partners/ for details on the copyright holders
-       For license conditions see the license file or http://eu-egee.org/license.html
-
-       Configuration options for the gLite JP Index module
-       
-       Authors: Ales Krenek <ljocha@ics.muni.cz>
-       Version info: $Id$
-       Release: $Name$
-
-       Revision history:
-       $Log$
-       Revision 1.2  2004/11/22 14:00:37  dimeglio
-       Updated to use standard files
-       Fixed names (was using common instead of real module name)
-       
-       Revision 1.1.1.1  2004/10/15 09:49:13  akrenek
--->
-
-       <!-- ======================================================
-         Define extra properties here ...
-         ====================================================== -->
-        
-       <project name="JP Common configuration options">                                                                        
-               <target name="lbmakefiles">
-                       <exec executable="ln" failonerror="true">
-                               <arg line="-fs ${component.dir}/Makefile ${module.build.dir}/Makefile"/>
-                       </exec>
-                       <echo file="${module.build.dir}/Makefile.inc">
-top_srcdir=..
-builddir=build
-stagedir=${stage.abs.dir}
-distdir=${dist.dir}
-globalprefix=${global.prefix}
-lbprefix=${subsystem.prefix}
-package=${module.package.name}
-PREFIX=${install.dir}
-version=${module.version}
-glite_location=${with.glite.location}
-globus_prefix=${with.globus.prefix}
-expat_prefix=${with.expat.prefix}
-gsoap_prefix=${with.gsoap.prefix}
-ares_prefix=${with.ares.prefix}
-thrflavour=${with.globus.thr.flavor}
-nothrflavour=${with.globus.nothr.flavor}
-cppunit=${with.cppunit.prefix}
-jpproject=${subsystem.project.dir}
-project=${component.project.dir}
-                       </echo>
-           </target>
-       </project>
diff --git a/org.glite.jp.index/project/properties.xml b/org.glite.jp.index/project/properties.xml
deleted file mode 100755 (executable)
index 5f56392..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-       Copyright (c) Members of the EGEE Collaboration. 2004 
-       See http://eu-egee.org/partners/ for details on the copyright holders
-       For license conditions see the license file or http://eu-egee.org/license.html
-
-       Common build properties file for the gLite JP Index component
-       
-       Authors: Ales Krenek <ljocha@ics.muni.cz>
-       Version info: $Id$
-       Release: $Name$ 
-       
-       Revision history:
-       $Log$
-       Revision 1.1.1.1  2004/10/15 09:49:13  akrenek
--->
-
-<project name="JP Index component common properties">
-
-       <!-- Include build properties to allow overwriting 
-            of properties for subsystem                    -->
-       <property file="project/build.properties" />    
-
-       <!-- ======================================================
-          Define corresponding subsystem properties
-                ====================================================== -->
-
-       <!-- Subsystem name -->
-       <property name="subsystem.name" value="${jp.subsystem.name}"/>
-               
-       <!-- Subsystem prefix -->
-       <property name="subsystem.prefix" value="${jp.subsystem.prefix}"/>
-
-       <!-- ======================================================
-          Define component properties
-                ====================================================== -->
-                               
-       <!-- Component name prefix -->
-       <property name="component.prefix" value="index" />
-                       
-       <!-- ======================================================
-          Define general component properties
-                ====================================================== -->
-       
-       <import file="${component.general.properties.file}" />
-                                               
-       <!-- ======================================================
-                Define extra properties here ...
-                ====================================================== -->
-                
-                                                               
-</project>
diff --git a/org.glite.jp.index/project/tar_exclude b/org.glite.jp.index/project/tar_exclude
deleted file mode 100644 (file)
index e1fcd1a..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-tar_exclude
-CVS
-build.xml
-build
-build.properties
-properties.xml
-configure.properties.xml
-.cvsignore
-.project
-.cdtproject
diff --git a/org.glite.jp.index/project/version.properties b/org.glite.jp.index/project/version.properties
deleted file mode 100644 (file)
index a0d1638..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#Fri Dec 10 13:35:33 CET 2004
-module.version=0.1.0
-module.build=2
-module.age=1
diff --git a/org.glite.jp.index/src/simple_server.c b/org.glite.jp.index/src/simple_server.c
deleted file mode 100644 (file)
index ccaa5a7..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#include "glite/jp/types.h"
-#include "glite/jp/context.h"
-
-#include "jpis_H.h"
-
-int main() {
-   struct soap soap;
-   int i, m, s; // master and slave sockets
-
-   glite_jp_context_t  ctx;
-
-   soap_init(&soap);
-   glite_jp_init_context(&ctx);
-   soap.user = (void *) ctx;
-
-   srand48(time(NULL)); /* feed id generation */
-
-   m = soap_bind(&soap, NULL, 8902, 100);
-   if (m < 0)
-      soap_print_fault(&soap, stderr);
-   else
-   {
-      fprintf(stderr, "Socket connection successful: master socket = %d\n", m);
-      for (i = 1; ; i++) {
-         s = soap_accept(&soap);
-         if (s < 0) {
-            soap_print_fault(&soap, stderr);
-            break;
-         }
-         soap_serve(&soap); // process RPC request
-         soap_destroy(&soap); // clean up class instances
-         soap_end(&soap); // clean up everything and close socket
-        glite_jp_run_deferred(ctx);
-      }
-   }
-   soap_done(&soap); // close master socket
-
-   return 0;
-}
diff --git a/org.glite.jp.index/src/soap_ops.c b/org.glite.jp.index/src/soap_ops.c
deleted file mode 100644 (file)
index 5af7352..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-#include <stdio.h>
-#include <fcntl.h>
-
-#include "glite/jp/types.h"
-#include "glite/jp/context.h"
-
-#include "jpis_H.h"
-#include "JobProvenanceIS.nsmap"
-
-static struct jptype__GenericJPFaultType *jp2s_error(struct soap *soap,
-               const glite_jp_error_t *err)
-{
-       struct jptype__GenericJPFaultType *ret = NULL;
-       if (err) {
-               ret = soap_malloc(soap,sizeof *ret);
-               memset(ret,0,sizeof *ret);
-               ret->code = err->code;
-               ret->source = soap_strdup(soap,err->source);
-               ret->text = soap_strdup(soap,strerror(err->code));
-               ret->description = soap_strdup(soap,err->desc);
-               ret->reason = jp2s_error(soap,err->reason);
-       }
-       return ret;
-}
-
-static void err2fault(const glite_jp_context_t ctx,struct soap *soap)
-{
-       char    *et;
-       struct SOAP_ENV__Detail *detail = soap_malloc(soap,sizeof *detail);
-       struct _GenericJPFault *f = soap_malloc(soap,sizeof *f);
-
-
-       f->jptype__GenericJPFault = jp2s_error(soap,ctx->error);
-
-       detail->__type = SOAP_TYPE__GenericJPFault;
-       detail->value = f;
-       detail->__any = NULL;
-
-       soap_receiver_fault(soap,"Oh, shit!",NULL);
-       if (soap->version == 2) soap->fault->SOAP_ENV__Detail = detail;
-       else soap->fault->detail = detail;
-}
-
-static void s2jp_tag(const struct jptype__TagValue *stag,glite_jp_tagval_t *jptag)
-{
-       memset(jptag,0,sizeof *jptag);
-       jptag->name = strdup(stag->name);
-       jptag->sequence = stag->sequence ? *stag->sequence : 0;
-       jptag->timestamp = stag->timestamp ? *stag->timestamp : 0;
-       if (stag->stringValue) jptag->value = strdup(stag->stringValue);
-       else if (stag->blobValue) {
-               jptag->binary = 1;
-               jptag->size = stag->blobValue->__size;
-               jptag->value = (char *) stag->blobValue->__ptr;
-       }
-}
-
-#define CONTEXT_FROM_SOAP(soap,ctx) glite_jp_context_t ctx = (glite_jp_context_t) ((soap)->user)
-
-SOAP_FMAC5 int SOAP_FMAC6 jpsrv__UpdateJobs(
-       struct soap *soap,
-       char *feed_id,
-       struct jptype__UpdateJobsData *jobs,
-       enum xsd__boolean done
-)
-{
-       printf("%s items %d jobid %s\n",__FUNCTION__,jobs->__sizejob,
-                       jobs->job[0]->jobid);
-       return SOAP_OK;
-}
-
-SOAP_FMAC5 int SOAP_FMAC6 jpsrv__QueryJobs(
-       struct soap *soap,
-       struct jptype__IndexQuery *query,
-       struct jpsrv__QueryJobsResponse *resp
-)
-{
-       puts(__FUNCTION__);
-       return SOAP_OK;
-}
-
diff --git a/org.glite.jp.index/src/typemap.dat b/org.glite.jp.index/src/typemap.dat
deleted file mode 100644 (file)
index 7032cb2..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-jpsrv = http://glite.org/wsdl/services/jp
-jptype = http://glite.org/wsdl/types/jp
index 2e9b3c4..688afe0 100644 (file)
@@ -129,10 +129,11 @@ distbin:
        rm -rf tmpbuilddir
         
 install:
-       -mkdir -p ${PREFIX}/bin ${PREFIX}/etc ${PREFIX}/examples ${PREFIX}/etc/init.d
+       -mkdir -p ${PREFIX}/bin ${PREFIX}/etc ${PREFIX}/examples ${PREFIX}/etc/init.d ${PREFIX}/share/doc/${package}-${version}
+       
        ${INSTALL} -m 755 ${daemon} ${PREFIX}/bin
        ${INSTALL} -m 755 jpps-test ${PREFIX}/examples/glite-jp-primary-test
-
+       ${INSTALL} ${top_srcdir}/doc/USAGE ${PREFIX}/share/doc/${package}-${version}
 
 clean:
 
index 28c0d13..a256e16 100755 (executable)
 
        Revision history:
        $Log$
+       Revision 1.3  2004/11/22 14:00:19  dimeglio
+       Updated to use standard files
+       Fixed names (was using common instead of real module name)
+       
        Revision 1.2  2004/11/22 13:55:30  dimeglio
        First version of this file
        Use central subsystem definition
@@ -75,6 +79,8 @@
                 Load version file 
             ========================================= -->
        <property file="${module.version.file}"/>
+               <property file="${module.build.file}"/>
+       <property file="${module.build.file}" />
                
        <!-- ==============================================
                 Local private targets
diff --git a/org.glite.jp.primary/config/startup b/org.glite.jp.primary/config/startup
new file mode 100644 (file)
index 0000000..e525edf
--- /dev/null
@@ -0,0 +1,90 @@
+#!/bin/sh
+
+GLITE_LOCATION=${GLITE_LOCATION:-/opt/glite}
+GLITE_LOCATION_VAR=${GLITE_LOCATION_VAR:-${GLITE_LOCATION}/var}
+
+[ -f /etc/glite.conf ] && . /etc/glite.conf
+[ -f $GLITE_LOCATION/etc/glite-wms.conf ] && . $GLITE_LOCATION/etc/glite-wms.conf
+
+[ -f $GLITE_LOCATION/etc/jp.conf ] && . $GLITE_LOCATION/etc/jp.conf
+[ -f $GLITE_LOCATION_VAR/etc/jp.conf ] && . $GLITE_LOCATION_VAR/etc/jp.conf
+
+[ -f $HOME/.glite.conf ] && . $HOME/.glite.conf
+
+unset creds ftp_port
+ftp_port=${GLITE_JP_FTP_PORT:-8902}
+
+
+start()
+{
+       if test -z "$GLITE_USER" ;then
+               echo 'Error: GLITE_USER is not set'
+               echo FAILED
+               return 1
+       fi
+       if test -z "$GLITE_JP_PRIMARY_INTERNAL" -o -z "$GLITE_JP_PRIMARY_URL" -o -z "$GLITE_JP_PRIMARY_GRIDMAP";then
+               echo 'Error: Glite JP parameter is not set'
+               echo FAILED
+               return 1
+       fi
+
+       [ -n "$GLITE_HOST_CERT" -a -n "$GLITE_HOST_KEY" ] &&
+               creds="$GLITE_HOST_CERT -k $GLITE_HOST_KEY"
+
+       if test -z "$creds"; then
+               if su - $GLITE_USER -c "test -r /etc/grid-security/hostkey.pem -a -r /etc/grid-security/hostcert.pem"; then
+                       echo "$0: WARNING: /etc/grid-security/hostkey.pem readable by $GLITE_USER"
+                       #creds="-c /etc/grid-security/hostcert.pem -k /etc/grid-security/hostkey.pem"
+                       X509_USER_CERT=/etc/grid-security/hostcert.pem
+                       X509_USER_KEY=/etc/grid-security/hostkey.pem
+               fi
+       fi
+
+       [ -z "$creds" ] && echo $0: WARNING: No credentials specified. Using default lookup which is dangerous. >&2
+
+       echo -n Starting in.ftpd ...
+       su - $GLITE_USER -c "X509_USER_CERT=\"$X509_USER_CERT\" X509_USER_KEY=\"$X509_USER_KEY\" \
+               \$GLOBUS_LOCATION/sbin/in.ftpd -a -S -p $ftp_port" && echo " done" || echo " FAILED"
+       
+       echo -n Starting glite-jp-primarystoraged ...
+       su - $GLITE_USER -c "X509_USER_CERT=\"$X509_USER_CERT\" X509_USER_KEY=\"$X509_USER_KEY\" \
+               $GLITE_LOCATION/bin/glite-jp-primarystoraged \
+               -I \"$GLITE_JP_PRIMARY_INTERNAL\" -E \"$GLITE_JP_PRIMARY_URL\" -G \"$GLITE_JP_PRIMARY_GRIDMAP\"
+               " && echo " done" || echo " FAILED"
+
+}
+
+stop()
+{
+       echo -n Stopping glite-jp-primarystoraged ...
+       killall glite-jp-primarystoraged
+       echo done
+}
+
+status()
+{
+       retcode=0
+        if netstat -an --inet | grep "^tcp .* 0.0.0.0:${ftp_port} .*LISTEN" >/dev/null 2>&1 ;then
+               echo in.ftpd running
+       else
+               echo in.ftpd not running
+               retcode=1
+       fi
+
+        if netstat -an --inet | grep "^tcp .* 0.0.0.0:${GLITE_JP_PRIMARY_PORT:-8901} .*LISTEN" >/dev/null 2>&1 ;then
+               echo glite-jp-primarystoraged running
+       else
+               echo glite-jp-primarystoraged not running
+               retcode=1
+       fi
+       return $retcode
+}
+
+case x$1 in
+       xstart) start;;
+       xstop)  stop;;
+       xrestart) stop; start;;
+       xstatus) status;;
+       x*)     echo usage: $0 start,stop,restart,status >&2
+               exit 1;;
+esac
diff --git a/org.glite.jp.primary/doc/USAGE b/org.glite.jp.primary/doc/USAGE
new file mode 100644 (file)
index 0000000..6d89729
--- /dev/null
@@ -0,0 +1,100 @@
+PURPOSE, EXPECTED USAGE, AND LIMITATIONS
+
+The purpose of the Job Provenance service (JP) is keeping track of the
+definition of submitted jobs, execution conditions and environment, and
+important points of the job life cycle for a long period (months to years).
+Those data can be used for debugging, post-mortem analysis, comparison of job
+execution within an evolving environment, as well as assisted re-execution of
+jobs. Only data of completed (either successful or failed) jobs are handled;
+tracking jobs during their active life is the task of L&B and Job Monitoring
+services.
+
+In general, gathered data are stored (i.e. copied) within the JP storage in
+order to really conserve a partial snapshot of the Grid environment when the
+job was executed, independently of changes of other Grid services. Obviously
+there are practical limitations of the extent to which it is feasible to record
+the entire job execution environment. (In the ideal case this would encompass a
+snapshot of the entire Grid!) We restrict the recorded data to those that are
+processed or somehow affect processing of the Workload Management and Computing
+Element services. On the other hand, snapshots of the state of other Grid
+services are not done, namely queries to the Data Catalog and their results are
+not stored, as well as contents of data files downloaded from and uploaded to
+Storage Elementsonly references to those are recorded if required.
+
+The JP Primary Storage, as the name suggests, is the primary interface for
+raw data storage. It is complemented with JP Index service, designed to
+provide indexing and execute various queries on these data.
+
+
+ENCOMPASSED DATA
+
+Currently, JP is designed to gather the following data:
+
+- JOB LIFE LOG is taken over from the L&B database (see Sect. 8.3.5) after job
+  completion. Among other information useful mainly for debugging and detailed
+  analysis of job execution it contains the complete definition of the job (in
+  terms of the submitted JDL), various timestamps (e.g. when the job was
+  submitted, matched for a particular CE, started and finished execution),
+  information on the chosen CE (or more of them, if the job was resubmitted),
+  various IDs assigned to the job (Condor, Globus, LRMS, ...), and the
+  result of execution including the return code.  Another important information
+  available in L&B are the user-defined annotations (tags) which can be
+  specified either statically upon job submission, during its execution, or even
+  overridden after the job terminates.
+
+- INPUT/OUTPUT SANDBOX. The input sandbox of a job contains miscellaneous files
+  required for execution, and the output sandbox may contain various output
+  files, e.g. debug logs, or even a core file in the case of crash.
+
+- JP TAGS. JP tags are arbitrary "name=value" pairs attached to a singl job. 
+  They are either standalone or override values of their LB counterparts.
+  However, JP tag values are still distinguishable those inherited from LB.
+  JP tags may be either strings or blobs.
+
+
+JP PRIMARY STORAGE INTERFACES AND OPERATIONS
+
+JP primary storage service exposes two interfaces:
+- WS control and query interface,
+- bulk file transfer interface (currently gsiftp).
+
+WS interface operations (see JobProvenancePS.wsdl for details):
+
+- RegisterJob - create the basic job record with JP primary.
+
+       Normally called by L&B upon job registration wigh L&B.
+
+- StartUpload - initiates upload of input/output sandbox or job log.
+       JP responds with upload destination URL, which points to its
+       bulk file transfer interface, and a time limit for the upload.
+
+       Normally called by L&B (job log) and WMS NS (sandboxes).
+
+- CommitUpload - confirm upload operation. This must be called after the
+       upload is done, and within the given time limit. If not done so,
+       the destination URL becomes invalid and any (partially) uploaded
+       file is discarded.
+
+       Normally called by L&B (job log) and WMS NS (sandboxes).
+
+- RecordTag - Record a value of JP user tag. 
+
+       Called by any component which needs it.
+
+- FeedIndex - start feeding data into JP index server.
+
+       Called internally by JP index.
+
+- GetJob - Based on known JobId retrieve URL's of the job record (i.e. job log,
+       input/output sandboxes, and JP tags).
+
+       Mainly called by the user, either standalone, or after querying
+       index server.
+       
+
+
+EXAMPLE PROGRAM
+
+The installed example program glite-jp-primary-test is a simple client
+calling all the service WS operations. Run "glite-jp-primary-test -?"
+for its current usage help.
diff --git a/org.glite.jp.primary/doc/jpnode_install.txt b/org.glite.jp.primary/doc/jpnode_install.txt
new file mode 100644 (file)
index 0000000..3c947a0
--- /dev/null
@@ -0,0 +1,72 @@
+
+
+  Job Provenance primary storage quick installation guide
+
+
+0) Start from a fresh install of Scientific Linux CERN release 3.
+
+1) Create non-privileged user 'glite', group 'glite'.
+
+       groupadd glite
+       adduser -g glite glite
+       
+   and make sure NTPD is running on the machine and synchronise with
+   a trusted NTP hierarchy...
+       
+2) _Install globus_ 
+   
+   Use these rpms from the EGEE external repository: 
+   http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/)
+       
+       gpt-VDT1.2.0rh9-1
+       vdt_globus_essentials-VDT1.2.0rh9-1
+       vdt_globus_info_essentials-VDT1.2.0rh9-1
+       vdt_globus_sdk-VDT1.2.0rh9-1
+       vdt_globus_data_server-VDT1.2.0rh9-1.i386.rpm
+
+3) Install a copy of host key and certificate under ~glite/.cert/host{cert,key}.pem 
+   and make sure glite.glite is the owner of both the .cert subdir and
+   the certificates inside it.
+   (Make sure that the original ones are put under /etc/grid-security
+   and that as usual are owned by root).
+
+   Install the rpms of the CA certificates that you need 
+   (http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/ca_*)
+   
+   Set these variables in the 'glite' and root login scripts:
+       GLITE_HOST_CERT=/home/glite/.cert/hostcert.pem
+       GLITE_HOST_KEY=/home/glite/.cert/hostkey.pem
+       GLITE_CERT_DIR=/etc/grid-security/certificates   
+
+
+3b) Install CRL update script (take the rpm as usual from
+   http://glite.web.cern.ch/glite/packages/externals/bin/rhel30/RPMS/)
+   
+   edg-fetch-crl
+
+       
+4) INSTALL and configure JP servers
+   Create the following directories:
+
+   Install the following rpm:
+
+   glite-jp-primary
+
+   Configure properly /opt/glite/etc/jp.conf
+   (e.g. 
+       GLITE_JP_FTP_PORT=8902
+       GLITE_JP_PRIMARY_INTERNAL=/home/glite/jp
+       GLITE_JP_PRIMARY_GRIDMAP=/home/glite
+       GLITE_JP_PRIMARY_URL=ftp://jpnode.somewhere.org:$GLITE_JP_FTP_PORT/jp
+
+   Create the $GLITE_JP_PRIMARY_INTERNAL dir if it doesn't exist (it must be
+   owned by glite.glite and writable by the glite user).      
+
+All the JP services should now be startable with:
+
+/opt/glite/etc/init.d/glite-jp-primary start
+
+Services are stopped with:
+
+/opt/glite/etc/init.d/glite-jp-primary stop
+
diff --git a/org.glite.jp.primary/project/build.number b/org.glite.jp.primary/project/build.number
new file mode 100644 (file)
index 0000000..5a47012
--- /dev/null
@@ -0,0 +1,2 @@
+#Fri Mar 11 10:07:01 CET 2005
+module.build=89
index 1343828..bc58475 100644 (file)
@@ -1,4 +1,4 @@
-#Fri Dec 10 13:37:05 CET 2004
-module.version=0.1.0
-module.build=3
-module.age=1
+
+module.version = 1.0.0
+module.age = 1
+                               
\ No newline at end of file
index 44d86eb..e931a6f 100644 (file)
@@ -20,6 +20,9 @@
 
        Revision history:
        $Log$
+       Revision 1.1.1.1  2004/12/10 09:32:29  akrenek
+       
+       
        Revision 1.5  2004/07/20 16:08:30  flammer
        Changed incorrect my_... instead of .._template entries for subsystem and component.
        
@@ -95,6 +98,7 @@
                 Load version file 
             ========================================= -->
        <property file="${module.version.file}"/>
+               <property file="${module.build.file}"/>
        
        <!-- ==============================================
                 Local private targets
diff --git a/org.glite.jp.ws-interface/project/build.number b/org.glite.jp.ws-interface/project/build.number
new file mode 100644 (file)
index 0000000..0c6b21f
--- /dev/null
@@ -0,0 +1,2 @@
+#Fri Mar 11 10:03:25 CET 2005
+module.build=86
index e78612b..c4d8683 100755 (executable)
@@ -1,3 +1,4 @@
-module.version = 0.0.0
-module.build = 0
-module.age = 0
\ No newline at end of file
+
+module.version = 1.0.0
+module.age = 0
+                               
\ No newline at end of file
index 7871c14..213ab9c 100644 (file)
 
        Revision history:
        $Log$
+       Revision 1.3.2.1  2004/12/14 17:07:32  zurek
+       index component desactivated
+       
+       Revision 1.3  2004/12/10 09:46:41  akrenek
+       included ws-interface
+       
        Revision 1.2  2004/12/01 18:36:00  zsalvet
        Add component targets.
        
@@ -72,6 +78,8 @@
                 Load version file 
             ========================================= -->
        <property file="${module.version.file}"/>
+               <property file="${module.build.file}"/>
+       <property file="${module.build.file}" />
                        
        <!-- ===============================================
                  Public common targets
        <target name="buildmodules" depends="envset,
                                                ws-interface,
                                                common,
-                                               index,
                                                primary">
                <echo append="true" file="${global.project.dir}/cruisecontrol-stub.xml">
        &lt;project name="${subsystem.name}" type="post-subsystem" packageName="${global.prefix}-${subsystem.prefix}"/&gt;
diff --git a/org.glite.jp/project/build.number b/org.glite.jp/project/build.number
new file mode 100644 (file)
index 0000000..1b90634
--- /dev/null
@@ -0,0 +1,2 @@
+#Fri Mar 11 10:09:00 CET 2005
+module.build=89
index ab3b83f..108e038 100644 (file)
@@ -1,12 +1,17 @@
+
 ###################################################################
 # System dependencies
 ###################################################################
 
-org.glite.version              = HEAD
-org.glite.jp.version           = HEAD
+       
+
+       org.glite.version                               = glite_B_1_0_0_89
+       org.glite.jp.version                            = glite-jp_B_1_0_0_89
+               
+       org.glite.jp.ws-interface.version                               = glite-jp-ws-interface_B_1_0_0_86
+                               
+       org.glite.jp.common.version                             = glite-jp-common_B_1_0_0_89
+                               
+       org.glite.jp.primary.version                            = glite-jp-primary_B_1_0_0_89
+                               
 
-# Component dependencies tag = do not remove this line =
-org.glite.jp.ws-interface.version      = HEAD
-org.glite.jp.common.version    = HEAD
-org.glite.jp.index.version     = HEAD
-org.glite.jp.primary.version   = HEAD
index 75e32e6..bc58475 100644 (file)
@@ -1,4 +1,4 @@
-#Fri Dec 10 13:38:38 CET 2004
-module.version=0.1.0
-module.build=3
-module.age=1
+
+module.version = 1.0.0
+module.age = 1
+                               
\ No newline at end of file
index 39d467d..f4fc58a 100644 (file)
@@ -58,12 +58,13 @@ doc: generate
        doxygen C.dox
        doxygen CPP.dox
 
-install:
+install: generate doc
        -mkdir -p ${PREFIX}/${STAGETO}
        -mkdir -p ${PREFIX}/share/doc/${package}-${version}
        install -m 644 ${GEN_H} ${PREFIX}/${STAGETO}
        install -m 644 ${top_srcdir}/LICENSE ${PREFIX}/share/doc/${package}-${version}
        cd ${top_srcdir}/interface && install -m 644 ${STATIC_H} ${PREFIX}/${STAGETO}
+       cd ${top_srcdir}/doc && cp -r C CPP ${PREFIX}/share/doc/${package}-${version}
 
 clean:
        rm -f *.h
index f0f6a1a..22ebc3a 100755 (executable)
@@ -20,6 +20,9 @@
 
        Revision history:
        $Log$
+       Revision 1.6  2004/10/18 19:16:09  zsalvet
+       RPM descriptions
+       
        Revision 1.5  2004/08/05 15:22:34  dimeglio
        Changed default target from compile to dist
        
@@ -90,6 +93,7 @@
                 Load version file 
             ========================================= -->
        <property file="${module.version.file}"/>
+               <property file="${module.build.file}"/>
                
        <!-- ==============================================
                 Local private targets
index a8f61cf..13250ee 100644 (file)
@@ -1,26 +1,47 @@
 #ifndef __EDG_WORKLOAD_LOGGING_CLIENT_COUNTREF_HPP__
 #define __EDG_WORKLOAD_LOGGING_CLIENT_COUNTREF_HPP__
 
+/**
+ * Switching into glite.lb namespace (couple with EWL_END_NAMESPACE).
+ */
 #define EWL_BEGIN_NAMESPACE namespace glite { namespace lb {
+
+/**
+ * Leave the glite.lb namespace.
+ */
 #define EWL_END_NAMESPACE } }
 
-EWL_BEGIN_NAMESPACE;
+EWL_BEGIN_NAMESPACE
 
+/** Class implementing simple reference counting mechanism.
+ * 
+ * This class is used instead of simple pointers to enable sharing of
+ * objects using simple reference counting mechanism. It encapsulates
+ * the given (pointer to) object and remembers the number of
+ * references to it. Taking and getting rid of the reference to
+ * encapsulated object is explicit by calling member functions use()
+ * and release().
+ */
 template<typename T>
 class CountRef {
 public:
-       CountRef(void *);
+       CountRef(void *); 
 //     CountRef(void *,void (*)(void *));
 
-       void use(void);
+       void use(void); 
        void release(void);
 
-       void    *ptr;
+       void    *ptr; /**< Pointer to the encapsulated object. */
+
 private:
        int     count;
 //     void    (*destroy)(void *);
 };
 
+/** 
+ * Encapsulate the given object and set reference count to 1.
+ *
+ */
 template <typename T>
 CountRef<T>::CountRef(void *p)
 {
@@ -28,6 +49,12 @@ CountRef<T>::CountRef(void *p)
        count = 1;
 }
 
+/** Decrease the reference count, possibly deallocating the
+ * encapsulated object.
+ *
+ * This method should be called when the holder no longer plans to use
+ * the encapsulated object, instead of deleting it.
+ */
 template <typename T>
 void CountRef<T>::release(void)
 {
@@ -37,12 +64,17 @@ void CountRef<T>::release(void)
        }
 }
 
+/** Increase the number of references to the object.
+ *
+ * This method should be called every time the pointer (ie. this
+ * instance) is copied.
+ */
 template <typename T>
 void CountRef<T>::use(void)
 {
        count++;
 }
 
-EWL_END_NAMESPACE;
+EWL_END_NAMESPACE
 
 #endif
index 64b4958..714a7c0 100644 (file)
 #include "glite/lb/events.h"
 #include "glite/lb/notifid.h"
 
-EWL_BEGIN_NAMESPACE;
-
+EWL_BEGIN_NAMESPACE
+
+/** Class representing one event in the L&B database.
+ *
+ * This class represents a L&B event, which is basically list of
+ * attribute -- value pairs. For each particular event type (returned
+ * by name()) there is a list of allowed attributes (returned by
+ * getAttrs()). The Event class provides methods for reading these
+ * attributes, but no means of changing the 
+ * event are provided; this class is used as a result of L&B queries.
+ */
 class Event {
        friend class Job;
        friend class ServerConnection;
        friend class CountRef<Event>;
 public:
-       /** Event type codes.
-        * Identify which of the event fields are valid.
+       /** Event type codes
+        * identify which of the event fields are valid.
         */
-
        enum Type {
-               UNDEF = 0,
+               UNDEF = 0, /**< Undefined event type. */
 @@@{
        for my $e ($event->getTypesOrdered) {
                my $u = uc $e;
@@ -43,10 +51,15 @@ public:
                gen "\t\t$u,\t/**< $c */\n";
        }
 @@@}
-               TYPE_MAX
+               TYPE_MAX /**< Limit for checking type validity. */
        };
 
-       /** Event attribute symbolic identifier. */
+       /** Event attribute symbolic identifier. 
+        * These symbols provide symbolic names for event
+        * attributes. In braces are shown the event types for which the
+        * attribute is defined, for each event type the attribute
+        * meaning is described.
+        */
        enum Attr {
 @@@{
        for (sort {$a cmp $b} getAllFields $event) {
@@ -59,14 +72,15 @@ public:
                        selectType $event $t;
                        my $cc = getFieldComment $event $_;
                        $t = 'common' if $t eq '_common_';
-                       $c .= "\t * $t: $cc\n";
+                       $c .= "\t * \\n\[$t\] $cc\n";
                }
                $c .= "\t */\n";
 
                gen "$c\t\t$u,\n";
        }
 @@@}
-               ATTR_MAX
+               ATTR_MAX /**< Limit for checking attribute code
+                           validity. */
        };
 
 @@@{
@@ -75,10 +89,12 @@ public:
                        my $ff;
                        my $ut;
                        my $utf;
+                       my $fc;
                        if ($t eq '_common_') {
                                $ff = $f;
                                $ut = '';
                                $utf = '';
+                               $fc = '';
                        }
                        else {
                                selectType $event $t;
@@ -86,9 +102,11 @@ public:
                                $ff = getField $event;
                                $ut = uc $t . '_';
                                $utf = ucfirst $t;
+                               $fc = $event->getFieldComment($f);
                        }
                        if ($ff->{codes}) {
                                gen qq{
+!       /** $fc */
 !      enum ${utf}Code \{
 };
                                for (@{$ff->{codes}}) {
@@ -104,38 +122,117 @@ public:
        }
 @@@}
 
-       enum AttrType { INT_T, STRING_T, TIMEVAL_T, PORT_T, LOGSRC_T, JOBID_T, NOTIFID_T };
+       /** Symbolic names for types of attribute values. */
+       enum AttrType { INT_T,           /**< Integer value. */
+                       STRING_T,        /**< String value.  */
+                       TIMEVAL_T,       /**< Time value (ie. struct
+                                           timeval). */
+                       PORT_T,          /**< Service port  (integer). */
+                       LOGSRC_T,        /**< Source of the event
+                                           (integer). */
+                       JOBID_T,         /**< JobId value. */
+                       NOTIFID_T        /**< NotifId value. */
+       };
 
-       Type    type;
+       Type    type; /**< Type of the event as defined by Type. */
 
+       /** Default constructor.
+        *
+        * Initializes an empty event.
+        */
        Event(void);
+
+       /** Constructor from corresponding C type.
+        *
+        * Initializes the object from the corresponding C struct, in
+        * fact holding the pointer to it.
+        */
         Event(edg_wll_Event *);
+
+       /** Copy constructor.
+        *
+        * Creates a copy of the object by sharing the C struct
+        * with the original.
+        */
        Event(const Event &);
+
+       /** Destructor.
+        *
+        * Releases the C struct (possibly deallocating it).
+        */
        ~Event(void);
 
 
-       /** Assign new Event to an existing instance. */
+       /** Assign new Event to an existing instance. 
+        *
+        * The original data are released and new ones are made
+        * accessible.
+        * \returns Reference to this object.
+        */
        Event & operator= (const Event &);
 
-       /** String representation of the event type */
+       /** String representation of the event type.
+        * 
+        * Returns string representing the event type.
+        * \returns Name of the event.
+        * \throw Exception Invalid event type.
+        */
        const std::string & name(void) const;
 
-       /** Retrieve integer attribute */
-       int     getValInt(Attr) const;
-
-       /** Retrieve string attribute */
-       std::string getValString(Attr) const;
+       /** Retrieve integer attribute.
+        * 
+        * Retrieves value for attributes of integer type.
+        * \param[in] name Name of the attribute to retrieve.
+        * \returns Integer value of the attribute.
+        * \throw Exception Invalid event type or attribute not
+        * defined for this event.
+        */
+       int     getValInt(Attr name) const;
+
+       /** Retrieve string attribute.
+        *
+        * Retrieves value for attributes of string type.
+        * \param[in] name Name of the attribute to retrieve.
+        * \returns String value of the attribute.
+        * \throw Exception Invalid event type or attribute not
+        * defined for this event.
+        */
+       std::string getValString(Attr name) const;
 
-        /** Retrieve time attribute */
-        struct timeval getValTime(Attr) const;
+        /** Retrieve time attribute.
+        *
+        * Retrieves value for attributes of timeval type.
+        * \param[in] name Name of the attribute to retrieve.
+        * \returns struct timeval  value of the attribute.
+        */
+        struct timeval getValTime(Attr name) const;
                
-        /** Retrieve jobid attribute */
-        const glite::wmsutils::jobid::JobId getValJobId(Attr) const;
-
-       /** Attribute name */
-       const std::string & getAttrName(Attr) const;
+        /** Retrieve jobid attribute 
+        *
+        * Retrieves value for attributes of JobId type.
+        * \param[in] name Name of the attribute to retrieve.
+        * \returns JobId value of the attribute.
+        * \throw Exception Invalid event type or attribute not
+        * defined for this event.
+        */
+        const glite::wmsutils::jobid::JobId getValJobId(Attr name) const;
+
+       /** Attribute name.
+        *
+        * Retrieves string representation of the attribute name.
+        * \param[in] name Symbolic name of the attribute.
+        * \returns String name of the attribute.
+        * \throw Exception Invalid event type or attribute not
+        * defined for this event.
+        */
+       const std::string & getAttrName(Attr name) const;
 
-       /** List of attributes and types valid for this instance */
+       /** List of attributes and types valid for this instance.
+        *
+        * Retrieves description of all attributes defined for this event.
+        * \returns Vector of Attr -- AttrType pairs.
+        * \throw Exception Invalid event type.
+        */
        const std::vector<std::pair<Attr,AttrType> >  & getAttrs(void) const;
 
 private:
@@ -143,6 +240,6 @@ private:
        CountRef<Event> *flesh;
 };
 
-EWL_END_NAMESPACE;
+EWL_END_NAMESPACE
 
 #endif
index 8f69ed8..7228822 100644 (file)
  * @version $Revision$
  */
 
-EWL_BEGIN_NAMESPACE;
+EWL_BEGIN_NAMESPACE
 
-/** L&B job.
- * Implementation of L&B job-specific calls.
- * Connection to the server is maintained transparently.
-*/
-  
+/** Class encapsulating the job info stored in the L&B database.
+ *
+ * This class is the primary interface for getting information about
+ * jobs stored in the L&B database. It is constructed from known job
+ * id, which uniquely identifies the job as well as the bookkeeping
+ * server where the job data is stored. The Job class provides methods
+ * for obtaining the data from the bookkeeping server and for setting
+ * various parameters of the connection to the bookkeeping server.
+ *
+ * All query methods have their counterpart in C functions taking
+ * taking edg_wll_Context and edg_wll_JobId as their first parameters
+ * (in fact, those functions are used to do the actual work).
+ */
 class Job {
 public:
-  Job(void);
-  Job(const glite::wmsutils::jobid::JobId &);
-  ~Job();
-  
-  /** Assign new JobId to an existing instance.
-   * Connection to server is preserved if possible.
-   */
+
+       /** Default constructor.
+        *
+        * Initializes the job as empty, not representing anything.
+        */
+       Job(void);
+       
+       /** Constructor from job id.
+        *
+        * Initializes the job to obtain information for the given job id.
+        * \param[in] jobid             The job id of the job this object will
+        * represent.
+        * \throws Exception Could not copy the job id.
+        */
+       Job(const glite::wmsutils::jobid::JobId &jobid);
+
+
+       /** Destructor.
+        *
+        * All the actual work is done by member destructors, namely ServerConnection.
+        */
+       ~Job();
   
-  Job & operator= (const glite::wmsutils::jobid::JobId &);
+       /** Assign new job id  to an existing instance.
+        *
+        * Redirect this instance to obtain information about
+        * different job; connection to the server is preserved, if
+        * possible. 
+        * \param[in] jobid             New job id.
+        * \returns Reference to this object.
+        * \throws Exception Could not copy the job id.
+        */
+       Job & operator= (const glite::wmsutils::jobid::JobId &jobid);
 
-/**
- * Status retrieval bitmasks. Used ORed as Job::status() argument,
- * determine which status fields are actually retrieved.
- */
-  static const int STAT_CLASSADS;       /**< various job description fields */
-  static const int STAT_CHILDREN;       /**< list of subjob JobId's */
-  static const int STAT_CHILDSTAT;      /**< apply the flags recursively to subjobs */
+       /*
+        * Status retrieval bitmasks. Used ORed as Job::status() argument,
+        * determine which status fields are actually retrieved.
+        */
+       static const int STAT_CLASSADS;       /**< Include the job
+                                              * description in the
+                                              * query result. */
+       static const int STAT_CHILDREN;       /**< Include the list of
+                                              * subjob id's in the
+                                              * query result. */
+       static const int STAT_CHILDSTAT;      /**< Apply the flags
+                                              * recursively to
+                                              * subjobs.  */
 
-  /** Return job status */
-  JobStatus status(int) const;
+       /** Return job status.
+        *
+        * Obtain the job status (as JobStatus) from the bookkeeping
+        * server.
+        * \param[in] flags             Specify details of the query.
+        * \returns Status of the job.
+        * \throws Exception Could not query the server.
+        * \see STAT_CLASSADS, STAT_CHILDREN, STAT_CHILDSTAT
+        */
+       JobStatus status(int flags) const;
   
-  /** Return all events corresponding to this job */
-  void log(std::vector<Event> &) const;
-  const std::vector<Event> log(void) const;
+       /** Return all events corresponding to this job 
+        * 
+        * Obtain all events corresponding to the job that are stored
+        * in the bookkeeping server database. The maximum number of
+        * returned events can be set by calling setParam().
+        * \param[out] events           Vector of events (of type Event).
+        * \throws Exception Could not query the server.
+        */
+       void log(std::vector<Event> &events) const;
+
+       /** Return all events corresponding to this job 
+        * 
+        * Obtain all events corresponding to the job that are stored
+        * in the bookkeeping server database. The maximum number of
+        * returned events can be set by calling setParam().
+        * \returns Vector of events (of type Event).
+        * \throws Exception Could not query the server.
+        */
+       const std::vector<Event> log(void) const;
   
-  /** Return last known address of a listener associated to the job.
-   * \param name name of the listener
-   * \return hostname and port number
-   */
-  const std::pair<std::string,uint16_t> queryListener(const std::string & name) const;
+       /** Return last known address of a listener associated to the job.
+        *
+        * Obtains the information about last listener that has been
+        * registered for this job in the bookkeeping server database.
+        * \param[in] name              Name of the listener.
+        * \returns Hostname and port number of the registered
+        * listener.
+        * \throws Exception Could not query the server.
+        */
+       const std::pair<std::string,uint16_t> queryListener(const std::string &name) const;
   
-  /** Manipulate LB parameters, the same as for edg_wll_Context in C */
-  void setParam(edg_wll_ContextParam, int); 
-  void setParam(edg_wll_ContextParam, const std::string); 
-  void setParam(edg_wll_ContextParam, const struct timeval &); 
-
-  int getParamInt(edg_wll_ContextParam) const;
-  std::string getParamString(edg_wll_ContextParam) const;
-  struct timeval getParamTime(edg_wll_ContextParam) const;
+       /** 
+        * Manipulate LB parameters. 
+        *
+        * This method sets integer typed parameters for the server connection.
+        *
+        * \param[in] ctx               Symbolic name of the parameter to change.
+        * \param[in] val               New value of the parameter.
+        */
+       void setParam(edg_wll_ContextParam ctx, int val); 
+
+       /** 
+        * Manipulate LB parameters. 
+        *
+        * This method sets string typed parameters for the server connection.
+        *
+        * \param[in] ctx               Symbolic name of the parameter to change.
+        * \param[in] val               New value of the parameter.
+        */
+       void setParam(edg_wll_ContextParam ctx, const std::string val); 
+
+       /** 
+        * Manipulate LB parameters. 
+        *
+        * This method sets timeval typed parameters for the server connection.
+        *
+        * \param[in] ctx               Symbolic name of the parameter to change.
+        * \param[in] val               New value of the parameter.
+        */
+       void setParam(edg_wll_ContextParam ctx, const struct timeval &val); 
+
+       /** 
+        * Get LB parameters. 
+        *
+        * Obtain value of the named integer parameter.
+        *
+        * \param[in] ctx               Symbolic name of the paramater to obtain.
+        * \return Value of the parameter.
+        */
+       int getParamInt(edg_wll_ContextParam ctx) const;
+
+       /** 
+        * Get LB parameters. 
+        *
+        * Obtain value of the named string parameter.
+        *
+        * \param[in] ctx               Symbolic name of the paramater to obtain.
+        * \return Value of the parameter.
+        */
+       std::string getParamString(edg_wll_ContextParam ctx) const;
+
+       /** 
+        * Get LB parameters. 
+        *
+        * Obtain value of the named timeval parameter.
+        *
+        * \param[in] ctx               Symbolic name of the paramater to obtain.
+        * \return Value of the parameter.
+        */
+       struct timeval getParamTime(edg_wll_ContextParam ctx) const;
   
 private:
   ServerConnection     server;
   glite::wmsutils::jobid::JobId                        jobId;
 };
 
-EWL_END_NAMESPACE;
+EWL_END_NAMESPACE
 
 #endif
index 8b63de1..f183a33 100644 (file)
 
 EWL_BEGIN_NAMESPACE;
 
-/**
- * Description of job status.
- * The status is computed from a sequence of logged events
+/** Class representing status of job.
+ * 
+ * This class is used to represent all information about the job status
+ * as computed and stored in the bookkeeping server's database. Job
+ * status is, like Event, list of attribute -- value pairs. One of the
+ * attributes is the job's state as seen by the L&B, ie. something
+ * like <tt>RUNNING</tt> or  * <tt>DONE</tt>, other attributes contain
+ * more information about the job.
+ *
+ * The JobStatus class provides methods for reading values of these
+ * attributes and it is used as a result of server queries.
  */
-
-
 class JobStatus {
        friend class Job;
        friend class CountRef<JobStatus>;
 public:
+
+       /** Symbolic names of job states. */
        enum Code {
-               UNDEF = 0,      /**< indicates invalid, i.e. uninitialized instance */
+               UNDEF = 0,      /**< Indicates invalid, i.e. uninitialized instance. */
 @@@{
        for my $stat ($status->getTypesOrdered)
        {
@@ -41,9 +49,14 @@ public:
 };
        }
 @@@}
-               CODE_MAX
+               CODE_MAX /**< Limit for range checking. */
        };
 
+       /** Symbolic names of attributes.
+        *
+        * These constants are used for naming individual attributes
+        * when invoking their access methods.
+        */
        enum Attr {
 @@@{
        selectType $status '_common_';
@@ -56,7 +69,7 @@ public:
                gen "\t/** $f->{comment} */\n\t\t$u,\n";
        }
 @@@}
-               ATTR_MAX
+                ATTR_MAX /**< Limit for range checking. */
        };
 
 @@@{
@@ -80,61 +93,176 @@ public:
                }
        }
 @@@}
-       enum AttrType { INT_T, 
-                       STRING_T, 
-                       TIMEVAL_T, 
-                       BOOL_T,
-                       JOBID_T,
-                       INTLIST_T, 
-                       STRLIST_T, 
-                       TAGLIST_T, 
-                       STSLIST_T 
+       /** Symbolic names of attribute types.
+        *
+        * These constants are used to name the various attribute
+        * types.
+        */
+       enum AttrType { INT_T, /**< Integer type. */
+                       STRING_T, /**< String type. */
+                       TIMEVAL_T, /**< <tt>struct timeval</tt> type. */
+                       BOOL_T, /**< Boolean type (true or false). */
+                       JOBID_T, /**< Job id type. */
+                       INTLIST_T, /**< List of integer values. */
+                       STRLIST_T, /**< List of string values. */
+                       TAGLIST_T, /**< List of user tags. */
+                       STSLIST_T  /**< List of states. */
        };
   
-       /** Numeric status code */
+       /** Numeric status code. 
+        *
+        * This code represents the state of the job.
+        * \see Code.
+        */
        Code    status;
   
-       /** String representation of the status code */
+       /** Get state name.
+        *
+        * Returns string representation of the job's state.
+        */
        const std::string & name(void) const;
   
-       /** Retrieve integer attribute */
-       int     getValInt(Attr) const;
+       /** Access method for attribute values.
+        *
+        * Retrieve integer value of named attribute.
+        * \param[in] name Symbolic name of attribute.
+        * \returns Value of attribute.
+        * \throws LoggingException Invalid attribute name.
+        */
+       int     getValInt(Attr name) const;
   
-       /** Retrieve string attribute */
-       std::string getValString(Attr) const;
+       /** Access method for attribute values.
+        *
+        * Retrieve string value of named attribute.
+        * \param[in] name Symbolic name of attribute.
+        * \returns Value of attribute.
+        * \throws LoggingException Invalid attribute name.
+        */
+       std::string getValString(Attr name) const;
   
-       /** Retrieve time attribute */
-       struct timeval  getValTime(Attr) const;
+       /** Access method for attribute values.
+        *
+        * Retrieve <tt>struct timeval</tt>  value of named attribute.
+        * \param[in] name Symbolic name of attribute.
+        * \returns Value of attribute.
+        * \throws LoggingException Invalid attribute name.
+        */
+       struct timeval  getValTime(Attr name) const;
   
-       /** Retrieve jobid attribute */
-       const glite::wmsutils::jobid::JobId  getValJobId(Attr) const;
+       /** Access method for attribute values.
+        *
+        * Retrieve JobId value of named attribute.
+        * \param[in] name Symbolic name of attribute.
+        * \returns Value of attribute.
+        * \throws LoggingException Invalid attribute name.
+        */
+       const glite::wmsutils::jobid::JobId  getValJobId(Attr name) const;
 
-       /** Retrieve bool attribute */
-       bool getValBool(Attr) const;
+       /** Access method for attribute values.
+        *
+        * Retrieve <tt>bool</tt> value of named attribute.
+        * \param[in] name Symbolic name of attribute.
+        * \returns Value of attribute.
+        * \throws LoggingException Invalid attribute name.
+        */
+       bool getValBool(Attr name) const;
 
-       /** Retrieve int list attribute */
-       const std::vector<int> getValIntList(Attr) const;
+       /** Access method for attribute values.
+        *
+        * Retrieve integer values of named attribute.
+        * \param[in] name Symbolic name of attribute.
+        * \returns Value of attribute.
+        * \throws LoggingException Invalid attribute name.
+        */
+       const std::vector<int> getValIntList(Attr name) const;
 
-       /** Retrieve string list attribute */
-       const std::vector<std::string> getValStringList(Attr) const;
+       /** Access method for attribute values.
+        *
+        * Retrieve string values of named attribute.
+        * \param[in] name Symbolic name of attribute.
+        * \returns Value of attribute.
+        * \throws LoggingException Invalid attribute name.
+        */
+       const std::vector<std::string> getValStringList(Attr name) const;
 
-       /** Retrieve tag list attribute */
-       const std::vector<std::pair<std::string,std::string> > getValTagList(Attr) const;
+       /** Access method for attribute values.
+        *
+        * Retrieve user tags values of named attribute.
+        * \param[in] name Symbolic name of attribute.
+        * \returns Value of attribute.
+        * \throws LoggingException Invalid attribute name.
+        */
+       const std::vector<std::pair<std::string,std::string> > getValTagList(Attr name) const;
 
-       /** Retrieve job status list attribute */
-       const std::vector<JobStatus> getValJobStatusList(Attr) const;
+       /** Access method for attribute values.
+        *
+        * Retrieve status values of named attribute.
+        * \param[in] name Symbolic name of attribute.
+        * \returns Value of attribute.
+        * \throws LoggingException Invalid attribute name.
+        */
+       const std::vector<JobStatus> getValJobStatusList(Attr name) const;
 
-       /** Attribute name */
-       const std::string& getAttrName(Attr) const;
+       /** Get name of attribute.
+        *
+        * Retrieve string representation of symbolic name of attribute.
+        * \param[in] name Symbolic name of attribute.
+        * \returns Name of attribute.
+        * \throws LoggingException Invalid attribute name.
+        */
+       const std::string& getAttrName(Attr name) const;
   
-       /** List of attributes and types valid for this instance */
+       /** List of attributes and their types valid for this
+        * instance.
+        *
+        * Returns the vector of (attribute, attribute type) pairs
+        * that this instance of JobStatus contains. 
+        * \returns List of attributes.
+        */
        const std::vector<std::pair<Attr,AttrType> >& getAttrs(void) const;
   
+       /** Default constructor.
+        *
+        * Initializes an empty instance.
+        */
        JobStatus(void);
-       JobStatus(const JobStatus &);
-       JobStatus & operator=(const JobStatus &);
-       JobStatus(const edg_wll_JobStat &);
-       JobStatus & operator=(const edg_wll_JobStat&);
+
+        /** Copy constructor.
+        *
+        * Creates identical copy of the original object.
+        * The underlying C struct edg_wll_JobStatus is shared using
+        * the CountRef mechanism.
+        * \param[in] orig Original.
+        */
+       JobStatus(const JobStatus &orig);
+
+       /** Assignment operator.
+        *
+        * Creates identical copy of the original object.
+        * The underlying C struct edg_wll_JobStatus is shared using
+        * the CountRef mechanism.
+        * \param[in] orig Original.
+        */
+       JobStatus & operator=(const JobStatus &orig);
+
+        /** Constructor from the C type.
+        *
+        * Encapsulates the given struct.
+        * \param[in] src C struct that holds the status.
+        */
+       JobStatus(const edg_wll_JobStat &src);
+
+        /** Assignment from the C type.
+        *
+        * Encapsulates the given struct.
+        * \param[in] src C struct that holds the status.
+        */
+       JobStatus & operator=(const edg_wll_JobStat& src);
+
+        /** Destructor.
+        *
+        * Releases the encapsulated C struct.
+        */
        virtual ~JobStatus();
 
 protected:
index 1d22a2e..b44985f 100644 (file)
 
 #include <pthread.h>
 
-EWL_BEGIN_NAMESPACE;
-
+EWL_BEGIN_NAMESPACE
+
+/** Base class for all exceptions thrown by the L&B C++ classes.
+ *
+ * This class serves as a common base for all exceptions thrown by the
+ * L&B C++ API classes. In case when the exception is constructed from
+ * another exception (creating chained exception list), the error
+ * message is created by concatenating the error message of the
+ * original exception and the new error message. All the other
+ * functionality (printing error message, logging it, printing stack
+ * trace) is inherited from the base class glite::wmsutils::exception::Exception.
+ */
 class Exception: public glite::wmsutils::exception::Exception {
 public:
        
-       /* constructor for mandatory fields */
+       /** Constructor for mandatory fields.
+        *
+        * Updates all the mandatory fields and names the exception.
+        * \param[in] source            Source filename where the exception was raised.
+        * \param[in] line_number       Line in the source that caused the exception.
+        * \param[in] method            Name of the method that raised the exception.
+        * \param[in] code              Error code giving the reason for exception.
+        * \param[in] exception         Error message describing the exception.
+        */
        Exception(const std::string& source,
                  int line_number,
                  const std::string& method,
                  int   code,
                  const std::string& exception) 
                : glite::wmsutils::exception::Exception(source, 
-                                                             line_number, 
-                                                             method, 
-                                                             code, 
-                                                             "glite::lb::Exception")
+                                                       line_number, 
+                                                       method, 
+                                                       code, 
+                                                       "glite::lb::Exception")
                { error_message = exception; };
        
-       /* constructor for mandatory fields AND exception chain */
+       /** Constructor for mandatory fields and the exception chain.
+        *
+        * Updates all the mandatory fields, names the exception and
+        * adds the original exception's error message to the current
+        * one.
+        * \param[in] source            Source filename where the exception was raised.
+        * \param[in] line_number       Line in the source that caused the exception.
+        * \param[in] method            Name of the method that raised the exception.
+        * \param[in] code              Error code giving the reason for exception.
+        * \param[in] exception         Error message describing the exception.
+        * \param[in] exc               Originally raised exception.
+        */
        Exception(const std::string& source,
                  int line_number,
                  const std::string& method,
@@ -37,18 +66,33 @@ public:
                  const std::string& exception,
                  const glite::wmsutils::exception::Exception &exc)
                : glite::wmsutils::exception::Exception(source, 
-                                                             line_number, 
-                                                             method, 
-                                                             code, 
-                                                             "glite::lb::Exception")
+                                                       line_number, 
+                                                       method, 
+                                                       code, 
+                                                       "glite::lb::Exception")
                { error_message = exception + ": " + exc.what(); };
 };
 
 
+/** Exception encapsulating error states originating in the L&B.
+ *
+ * This class is simple child of the base Exception class, adding no
+ * new functionality. Its purpose is to differentiate the error
+ * conditions originating in the L&B subsystem from other errors (such
+ * as system ones).
+ */
 class LoggingException: public Exception {
 public:
        
-       /* constructor for mandatory fields */
+       /** Constructor for mandatory fields.
+        *
+        * Updates all the mandatory fields and names the exception.
+        * \param[in] source            Source filename where the exception was raised.
+        * \param[in] line_number       Line in the source that caused the exception.
+        * \param[in] method            Name of the method that raised the exception.
+        * \param[in] code              Error code giving the reason for exception.
+        * \param[in] exception         Error message describing the exception.
+        */
        LoggingException(const std::string& source,
                         int line_number,
                         const std::string& method,
@@ -57,7 +101,18 @@ public:
                : Exception(source, line_number, method, code, exception)
                {};
        
-       /* constructor for mandatory fields AND exception chain */
+       /** Constructor for mandatory fields and the exception chain.
+        *
+        * Updates all the mandatory fields, names the exception and
+        * adds the original exception's error message to the current
+        * one.
+        * \param[in] source            Source filename where the exception was raised.
+        * \param[in] line_number       Line in the source that caused the exception.
+        * \param[in] method            Name of the method that raised the exception.
+        * \param[in] code              Error code giving the reason for exception.
+        * \param[in] exception         Error message describing the exception.
+        * \param[in] exc               Originally raised exception.
+        */
        LoggingException(const std::string& source,
                         int line_number,
                         const std::string& method,
@@ -69,10 +124,24 @@ public:
 };
 
 
+/** Exceptions caused by system errors.
+ *
+ * This class represents error conditions caused by failing system
+ * calls. The error message is augmented with the system error message
+ * obtained by calling strerror().
+ */
 class OSException: public Exception {
 public:
        
-       /* constructor for mandatory fields */
+       /** Constructor for mandatory fields.
+        *
+        * Updates all the mandatory fields and names the exception.
+        * \param[in] source            Source filename where the exception was raised.
+        * \param[in] line_number       Line in the source that caused the exception.
+        * \param[in] method            Name of the method that raised the exception.
+        * \param[in] code              Error code giving the reason for exception.
+        * \param[in] exception         Error message describing the exception.
+        */
        OSException(const std::string& source,
                    int line_number,
                    const std::string& method,
@@ -85,7 +154,18 @@ public:
                            exception + ": " + strerror(code))
                {};
        
-       /* constructor for mandatory fields AND exception chain */
+       /** Constructor for mandatory fields and the exception chain.
+        *
+        * Updates all the mandatory fields, names the exception and
+        * adds the original exception's error message to the current
+        * one.
+        * \param[in] source            Source filename where the exception was raised.
+        * \param[in] line_number       Line in the source that caused the exception.
+        * \param[in] method            Name of the method that raised the exception.
+        * \param[in] code              Error code giving the reason for exception.
+        * \param[in] exception         Error message describing the exception.
+        * \param[in] exc               Originally raised exception.
+        */
        OSException(const std::string& source,
                    int line_number,
                    const std::string& method,
@@ -101,14 +181,31 @@ public:
 };
 
 
+/** Mandatory exception fields.
+ *
+ * This defines the mandatory parameters for all exception
+ * constructors (filename, line, method name).
+ */
 #define EXCEPTION_MANDATORY                           \
        __FILE__,                                     \
         __LINE__,                                     \
         std::string(CLASS_PREFIX) + __FUNCTION__         
 
+/** Stacking exceptions.
+ *
+ * This was originally used for creating the exception chain; now the
+ * same result is achieved by adding the nested exception to the
+ * constructor parameter list.
+ */
 #define STACK_ADD                                     
 
-/* note: we can use __LINE__ several times in macro, it is expanded into one row */
+/** Utility macro to throw LoggingException.
+ *
+ * This macro is used to obtain the L&B error message and throw the
+ * appropriate exception.
+ * Note: we can use __LINE__ several times in macro, it is expanded into
+ * one row.
+ */
 #define throw_exception(context, exception)           \
 { STACK_ADD;                                          \
   {                                                   \
@@ -134,11 +231,16 @@ public:
   }                                                  \
 }
  
+/** Utility macro to check result of L&B calls.
+ *
+ * Checks return value of L&B calls and throws exception if the code
+ * failed.
+ */
 #define check_result(code, context, desc)             \
   if((code)) throw_exception((context), desc)
 
 
 
-EWL_END_NAMESPACE;
+EWL_END_NAMESPACE
 
 #endif
index b8e8b27..6fea744 100644 (file)
@@ -9,7 +9,7 @@
 #include "glite/lb/JobStatus.h"
 
 
-EWL_BEGIN_NAMESPACE
+EWL_BEGIN_NAMESPACE
 
 
 /** Manage LB notifications.
@@ -23,18 +23,18 @@ public:
         */
        Notification();
 
-       /** Create from server,port pair
+       /** Create from server host,port pair
         * to be used for new notifications, i.e. with Register()
-        * \param host
-        * \param port
+        * \param[in] host              host
+        * \param[in] port              port
         */
-       Notification(const std::string,const u_int16_t);
+       Notification(const std::string host,const u_int16_t port);
 
        /** Create from NotifId
         * to be used for existing notifications, i.e. with Bind()
-        * \param notifId
+        * \param[in] notifId           NotifId
         */
-       Notification(const std::string);
+       Notification(const std::string notifId);
 
        ~Notification();
 
@@ -45,11 +45,14 @@ public:
        /** Add this job to the list.
         * Local operation only, Register() has to be called
         * to propagate changes to server 
+        * \param[in] jobId             JobId
         */
-       void addJob(const glite::wmsutils::jobid::JobId &); 
+       void addJob(const glite::wmsutils::jobid::JobId &jobId); 
 
-       /** Remove job from the list, local op again. */
-       void removeJob(const glite::wmsutils::jobid::JobId &);
+       /** Remove job from the list, local op again. 
+        * \param[in] jobId             JobId
+        */
+       void removeJob(const glite::wmsutils::jobid::JobId &jobId);
 
        /** Get jobs on the list */
        std::string getJobs();
@@ -67,9 +70,9 @@ public:
 
        /** Bind to the existing notification at the server
         * i.e. change the receiving local address
-        * \param address_override
+        * \param[in] address           address override
         */
-       void Bind(const std::string);
+       void Bind(const std::string address);
 
        /** Receive notification.
         * Blocks at most the specified timeout (maybe 0 for local polling).
@@ -88,6 +91,6 @@ private:
 };
 
 
-EWL_END_NAMESPACE;
+EWL_END_NAMESPACE
 
 #endif
index 333d0bd..43f6607 100644 (file)
 #include "glite/lb/JobStatus.h"
 #include "glite/lb/consumer.h"
 
-EWL_BEGIN_NAMESPACE;
-
-/** Auxiliary class to hold an atomic query condition. */
+EWL_BEGIN_NAMESPACE
+
+/** Auxiliary class to hold atomic query condition. 
+ *
+ * This class is used to construct queries to the L&B database. Each
+ * query is composed of multiple atomic conditions in the form of
+ * 'attribute' 'predicate' 'value'. QueryRecord represents such an
+ * atomic condition. 
+ */
 class QueryRecord {
 public:
        friend class ServerConnection;
        friend edg_wll_QueryRec *convertQueryVector(const std::vector<QueryRecord> &in);
 
        /* IMPORTANT: must match lbapi.h */
+       /** Symbolic names of queryable attributes. 
+        *
+        * The queryable attributes correspond to the table columns in
+        * the bookkeeping server database, they relate both to the
+        * event records  and job records.
+        * \see Event::Attr
+        */
        enum Attr {
                UNDEF=0,        /**< Not-defined value, used to terminate lists etc. */
-               JOBID,          /**< Job Id \see _edg_wll_QueryRec */
-               OWNER,          /**< Job owner \see _edg_wll_QueryRec */
-               STATUS,         /**< Current job status */
-               LOCATION,       /**< Where is the job processed */
-               DESTINATION,    /**< Destination CE */
-               DONECODE,       /**< Minor done status (OK,fail,cancel) */
-               USERTAG,        /**< User tag (not implemented yet) */
-               TIME,           /**< Timestamp \see _edg_wll_QueryRec */
-               LEVEL,          /**< Logging level (see "dglog.h") * \see _edg_wll_QueryRec */
-               HOST,           /**< Where the event was generated */
-               SOURCE,         /**< Source component */
-               INSTANCE,       /**< Instance of the source component */
-               EVENT_TYPE,     /**< Event type \see _edg_wll_QueryRec */
-               CHKPT_TAG,      /**< Checkpoint tag */
+               JOBID,          /**< Job id. */
+               OWNER,          /**< Job owner (certificate subject). */
+               STATUS,         /**< Current job status code. */
+               LOCATION,       /**< Where is the job being processed. */
+               DESTINATION,    /**< Destination CE. */
+               DONECODE,       /**< Minor done status (OK,fail,cancel). */
+               USERTAG,        /**< User tag. */
+               TIME,           /**< Timestamp of the event. */
+               LEVEL,          /**< Logging level. */
+               HOST,           /**< Hostname where the event was generated. */
+               SOURCE,         /**< Source component that sent the event. */
+               INSTANCE,       /**< Instance of the source component. */
+               EVENT_TYPE,     /**< Event type. */
+               CHKPT_TAG,      /**< Checkpoint tag. */
                RESUBMITTED,    /**< Job was resubmitted */
-               PARENT,         /**< Job was resubmitted */
-               EXITCODE,       /**< Unix exit code */
+               PARENT,         /**< Id of the parent job. */
+               EXITCODE,       /**< Job system exit code. */
        };
 
+       /** Symbolic names of predicates.
+        *
+        * These are the predicates used for creating atomic query
+        * conditions.
+        */
        enum Op {
-               EQUAL=EDG_WLL_QUERY_OP_EQUAL,
-               LESS=EDG_WLL_QUERY_OP_LESS,
-               GREATER=EDG_WLL_QUERY_OP_GREATER,
-               WITHIN=EDG_WLL_QUERY_OP_WITHIN,
-               UNEQUAL=EDG_WLL_QUERY_OP_UNEQUAL
+               EQUAL=EDG_WLL_QUERY_OP_EQUAL, /**< Equal. */
+               LESS=EDG_WLL_QUERY_OP_LESS, /**< Less than. */
+               GREATER=EDG_WLL_QUERY_OP_GREATER, /**< Greater than. */
+               WITHIN=EDG_WLL_QUERY_OP_WITHIN, /**< Within the
+                                                  range. */
+               UNEQUAL=EDG_WLL_QUERY_OP_UNEQUAL /**< Not equal. */
        };
   
+
+       /** Default constructor.
+        *
+        * Initializes empty query condition.
+        */
        QueryRecord();
 
-       /* copy and assignment */
-       QueryRecord(const QueryRecord &);
-       QueryRecord& operator=(const QueryRecord &);
+       /** Copy constructor
+        * 
+        * Initializes an exact copy of the object.
+        * \param[in] src               Original object.
+        */
+       QueryRecord(const QueryRecord &src);
+
+       /** Assignment operator.
+        *
+        * Initializes an exact copy of the object.
+        * \param[in] src               Original object.
+        * \returns Reference to this object.
+        */
+       QueryRecord& operator=(const QueryRecord &src);
+
+       /** Constructor for condition on string typed value.
+        *
+        * Initializes the object to hold condition on string typed
+        * attribute value.
+        * \param[in] name              Name of the attribute.
+        * \param[in] op                Symbolic name of the predicate.
+        * \param[in] value             Actual value.
+        * \throw Exception Invalid value type for given attribute.
+        */
+       QueryRecord(const Attr name, const Op op, const std::string &value);
+
+       /** Constructor for condition on integer typed value.
+        *
+        * Initializes the object to hold condition on integer typed
+        * attribute value.
+        * \param[in] name              Name of the attribute.
+        * \param[in] op                Symbolic name of the predicate.
+        * \param[in] value             Actual value.
+        * \throw Exception Invalid value type for given attribute.
+        */
+       QueryRecord(const Attr name, const Op op, const int value);
+
+       /** Constructor for condition on timeval typed value.
+        *
+        * Initializes the object to hold condition on timeval typed
+        * attribute value.
+        * \param[in] name              Name of the attribute.
+        * \param[in] op                Symbolic name of the predicate.
+        * \param[in] value             Actual value.
+        * \throw Exception Invalid value type for given attribute.
+        */
+       QueryRecord(const Attr name, const Op op, const struct timeval &value);
+
+       /** Constructor for condition on JobId typed value.
+        *
+        * Initializes the object to hold condition on JobId typed
+        * attribute value.
+        * \param[in] name              Name of the attribute.
+        * \param[in] op                Symbolic name of the predicate.
+        * \param[in] value             Actual value.
+        * \throw Exception Invalid value type for given attribute.
+        */
+       QueryRecord(const Attr name, const Op op, const glite::wmsutils::jobid::JobId &value);
 
-       /* constructors for simple attribute queries */
-       QueryRecord(const Attr, const Op, const std::string &);
-       QueryRecord(const Attr, const Op, const int);
-       QueryRecord(const Attr, const Op, const struct timeval &);
-       QueryRecord(const Attr, const Op, const glite::wmsutils::jobid::JobId&);
        /* this one is for attr==TIME and particular state */
-       QueryRecord(const Attr, const Op, const int, const struct timeval &);
+       /** Constructor for condition on timeval typed value.
+        *
+        * Initializes the object to hold condition on the time the job 
+        * stays in given state.
+        * \param[in] name              Name of the attribute.
+        * \param[in] op                Symbolic name of the predicate.
+        * \param[in] state             State of thet job.
+        * \param[in] value             Actual value.
+        * \throw Exception Invalid value type for given attribute.
+        */
+       QueryRecord(const Attr name, const Op op, const int state, const struct timeval &value);
        
        /* constructors for WITHIN operator */
-       QueryRecord(const Attr, const Op, const std::string &, const std::string &);
-       QueryRecord(const Attr, const Op, const int, const int);
-       QueryRecord(const Attr, const Op, const struct timeval &, const struct timeval &);
-       QueryRecord(const Attr, const Op, const int, const struct timeval &, const struct timeval &);
+       /** Constructor for condition on string typed interval.
+        *
+        * Initializes the object to hold condition on string typed
+        * attribute interval.
+        * \param[in] name              Name of the attribute.
+        * \param[in] op                Symbolic name of the predicate.
+        * \param[in] value_min         Low interval boundary.
+        * \param[in] value_max         High interval boundary.
+        * \throw Exception Invalid value type for given attribute.
+        */
+       QueryRecord(const Attr name, const Op op, const std::string &value_min, const std::string &value_max);
+
+       /** Constructor for condition on integer typed interval.
+        *
+        * Initializes the object to hold condition on integer typed
+        * attribute interval.
+        * \param[in] name              Name of the attribute.
+        * \param[in] op                Symbolic name of the predicate.
+        * \param[in] value_min         Low interval boundary.
+        * \param[in] value_max         High interval boundary.
+        * \throw Exception Invalid value type for given attribute.
+        */
+       QueryRecord(const Attr name, const Op op, const int value_min, const int value_max);
+
+       /** Constructor for condition on timeval typed interval.
+        *
+        * Initializes the object to hold condition on timeval typed
+        * attribute interval.
+        * \param[in] name              Name of the attribute.
+        * \param[in] op                Symbolic name of the predicate.
+        * \param[in] value_min         Low interval boundary.
+        * \param[in] value_max         High interval boundary.
+        * \throw Exception Invalid value type for given attribute.
+        */
+       QueryRecord(const Attr name, const Op op, const struct timeval &value_min, const struct timeval &value_max);
+
+       /** Constructor for condition on timeval typed interval for
+        * given state.
+        *
+        * Initializes the object to hold condition on the time job
+        * stayed in given state.
+        * \param[in] name              Name of the attribute.
+        * \param[in] op                Symbolic name of the predicate.
+        * \param[in] state             State of thet job.
+        * \param[in] value_min         Low interval boundary.
+        * \param[in] value_max         High interval boundary.
+        * \throw Exception Invalid value type for given attribute.
+        */
+       QueryRecord(const Attr name, const Op op, const int state, const struct timeval &value_min, const struct timeval &value_max);
 
        /* convenience for user tags */
-       QueryRecord(const std::string &, const Op, const std::string &);
-       QueryRecord(const std::string &, const Op, const std::string &, const std::string &);
+       /** Convenience constructor for condition on user tags.
+        *
+        * Initializes the object to hold condition on the value of
+        * user tag.
+        * \param[in] tag               Name of the tag.
+        * \param[in] op                Symbolic name of the predicate.
+        * \param[in] value             Value of the tag.
+        */
+       QueryRecord(const std::string &tag, const Op op, const std::string &value);
+
+       /** Convenience constructor for condition on user tags.
+        *
+        * Initializes the object to hold condition on the value of
+        * user tag.
+        * \param[in] tag               Name of the tag.
+        * \param[in] op                Symbolic namen of the predicate.
+        * \param[in] value_min         Minimal value of the tag.
+        * \param[in] value_max         Maximal value of the tag.
+        * \throws Exception Predicate is not WITHIN.
+        */
+       QueryRecord(const std::string &tag, const Op op, const std::string &value_min, const std::string &value_max);
        
+       /** Destructor.
+        *
+        * The actual work is done by member destructors.
+        */
        ~QueryRecord();
   
-       static const std::string AttrName(const Attr) ;
+       /** Return the string representation of symbolic attribute
+        * name.
+        * \param[in] attr              Symbolic attribute name.
+        * \returns Printable attribute name.
+        */
+       static const std::string AttrName(const Attr attr) ;
   
 protected:
 
@@ -103,95 +260,262 @@ private:
 };
 
 
-/** Supported aggregate operations */
+/** Supported aggregate operations. */
 enum AggOp { AGG_MIN=1, AGG_MAX, AGG_COUNT };
 
 
 /**
- * Connection to the L&B server.
- * Maintain connection to the server.
- * Implement non job-specific API calls
+ * Class representing a connection to the L&B server.
+ *
+ * This class serves as an interface for queries not related to
+ * particular job. The address of the bookkeeping server to query can
+ * be set arbitrarily during the lifetime of this object, connection
+ * to the server is maintained automatically by the underlying C API
+ * layer. This class can be thought of also as an encapsulation of
+ * edg_wll_Context from L&B C API.
+ *
+ * ServerConnection's methods correlate to the L&B C API functions
+ * taking edg_wll_Context as their first argument and not having
+ * edg_wll_JobId as the second argument.
+ * \see edg_wll_Context
  */
-
 class ServerConnection {
 public:
+       /** \defgroup query Methods for querying the bookkeeping
+        * server.
+        *
+        * These methods serve for obtaining data from the bookkeeping
+        * server. The L&B service queries come in two flavors: 
+        * \li conjunctive query, as in <tt>(cond1) or (cond2)</tt>
+        * \li conjunction of disjunctive queries, as in <tt>( (cond1)
+        * or (cond2) ) and ( (cond3) or (cond4) )</tt>
+        * Methods for both query flavors are provided.
+        *
+        * Query methods actually do communicate with the server and
+        * they are synchronous; their completion can take some time
+        * not exceeding the query timeout.
+        */
+
+        /** \defgroup property Methods for setting and getting
+        * connection properties.
+        *
+        * These methods are used for setting and obtaining various
+        * parameters of the communication (timeouts, user
+        * certificates, limits). Both general methods (taking the
+        * symbolic name of the parameter as an argument) and
+        * convenience methods (for some parameters) are provided.
+        *
+        * The methods are local, no communication takes place.
+        */
+
        friend class Job;
 
+       /** Default constructor.
+        *
+        * Initializes the context to default values.
+        * \throws OSException Initialization failed.
+        */
        ServerConnection(void);
 
-       /* DEPRECATED: do not use
-        * connections are now handled automagically inside the implementation
+       /** DEPRECATED.
+        * 
+        * \throws Exception Always.
         */
        ServerConnection(const std::string &);
 
-       /** Open connection to a given server */
+       /** DEPRECATED.
+        * 
+        * \throws Exception Always.
+        */
        void open(const std::string &);
 
-       /** Close the current connection */
+       /** DEPRECATED.
+        * 
+        * \throws Exception Always.
+        */
        void close(void);
 
        /* END DEPRECATED */
 
        /* set & get parameter methods */
 
-       /* consumer parameter settings */
-       void setQueryServer(const std::string&, int);
-       void setQueryTimeout(int);
-
-       void setX509Proxy(const std::string&);
-       void setX509Cert(const std::string&, const std::string&);
-
+        /** Set bookkeeping server address.
+        * \ingroup property
+        *
+        * Directs the instance to query the given bookkeping server.
+        * \param[in]  host Hostname of the server.
+        * \param[in]  port Service port.
+        * \throws LoggingException Setting parameters failed.
+        */
+       void setQueryServer(const std::string& host, int port);
+
+        /** Set query timeout.
+        * \ingroup property
+        *
+        * Sets the time interval to wait for server response.
+        * \param[in] time Time in seconds before the query expires.
+        * \throws LoggingException Setting parameters failed.
+        */
+       void setQueryTimeout(int time);
+
+       /** Set user's proxy certificate.
+        * \ingroup property
+        *
+        * Instructs the instance to authenticate to the server using
+        * user's X509 proxy certificate.
+        * \param[in] proxy Name of file containing the user's proxy certificate.
+        * \throws LoggingException Setting paramater failed.
+        */
+       void setX509Proxy(const std::string& proxy);
+
+       /** Set user's certificate.
+        * \ingroup property
+        *
+        * Instructs the instance to authenticate to the server using
+        * users's full X509 certificate (which is not a good thing).
+        * \param[in] cert Name of file containing the user's certificate.
+        * \param[in] key Name of file containing the user's private
+        * key.
+        * \throws LoggingException Setting parameters failed.
+        */
+       void setX509Cert(const std::string& cert, const std::string& key);
+
+       /** Get address of the bookkeeping server.
+        * \ingroup property
+        *
+        * Returns address of the bookkeeping server this instance is
+        * bound to.
+        * \returns Address (hostname,port).
+        * \throws LoggingException Getting parameter failed.
+        */
        std::pair<std::string, int> getQueryServer() const;
+
+       /** Get query timeout.
+        * \ingroup property
+        *
+        * Returns the time interval this instance waits for server
+        * response.
+        * \returns Number of seconds to wait.
+        * \throws LoggingException Getting parameter failed.
+        */
        int getQueryTimeout() const;
 
+       /** Get user's proxy.
+        * \ingroup property
+        *
+        * Returns filename of the user's X509 proxy certificate used
+        * to authenticate to the server.
+        * \returns Filename of the proxy certificate.
+        * \throws LoggingException Getting parameter failed.
+        */
        std::string getX509Proxy() const;
+
+       /** Get user's X509 certificate.
+        * \ingroup property
+        *
+        * Returns filenames of the user's full X509 certificate used
+        * to authenticate to the server.
+        * \returns Pair of (certificate, key) filenames.
+        * \throws LoggingException Getting parameter failed.
+        */
        std::pair<std::string, std::string> getX509Cert() const;
 
        /* end of set & get */
 
+       /** Destructor.
+        *
+        * Closes the connections and frees the context.
+        */
        virtual ~ServerConnection();
 
 
        /* consumer API */
 
        /** Retrieve the set of single indexed attributes.
-        * outer vector elements correspond to indices
-        * inner vector elements correspond to index columns
-        * if .first of the pair is USERTAG, .second is its name
-        * if .first is TIME, .second is state name
-        * otherwise .second is meaningless (empty string anyway)
+        * \ingroup query
+        *
+        * Returns the set of attributes that are indexed on the
+        * server. Every query must contain at least one indexed
+        * attribute for performance reason; exception to this rule
+        * requires setting appropriate paramater on the server and is
+        * not advised.
+        *
+        * In the vector returned, outer elements correspond to indices,
+        * inner vector elements correspond to index
+        * columns. 
+        * If <tt>.first</tt> of the pair is USERTAG, <tt>.second</tt> is its name;
+        * if <tt>.first</tt> is TIME, <tt>.second</tt> is state name
+        * otherwise <tt>.second</tt> is meaningless (empty string anyway).
         */
        std::vector<std::vector<std::pair<QueryRecord::Attr,std::string> > >
                getIndexedAttrs(void);
 
-       /** Retrieve hard and soft result set size limit */
-       std::pair<int,int> getLimits(void) const;
-
-       /** Set the soft result set size limit */
-       void setQueryJobsLimit(int);
-       void setQueryEventsLimit(int);
+       /* Retrieve hard and soft result set size limit.
+        * \ingroup property
+        *
+        * Returns both the hard and soft limit on the number of
+        * results returned by the bookkeeping server.
+        * \returns Pair (hard, soft) of limits.
+        * \throws 
+        */
+       // std::pair<int,int> getLimits(void) const;
+
+       /** Set the soft result set size limit.
+        * \ingroup property
+        *
+        * Sets the maximum number of results this instance is willing
+        * to obtain when querying for jobs.
+        * \param max Maximum number of results.
+        * \throws LoggingException Setting parameter failed.
+        */
+       void setQueryJobsLimit(int max);
+
+       /** Set the soft result set size limit.
+        * \ingroup property
+        *
+        * Sets the maximum number of results this instance is willing
+        * to obtain when querying for Events.
+        * \param max Maximum number of results.
+        * \throws LoggingException Setting parameter failed.
+        */
+       void setQueryEventsLimit(int max);
   
-       /** Retrieve all events satisfying the query records
-        * @param job_cond, event_cond - vectors of conditions to be satisfied 
-        *  by jobs as a whole or particular events, conditions are ANDed
-        * @param events vector of returned events
+       /** Retrieve all events satisfying the query records.
+        * \ingroup query
+        *
+        * Returns all events belonging to the jobs specified by \arg
+        * job_cond and in addition satisfying the \arg event_cond. 
+        * \param[in] job_cond Conjunctive query on jobs.
+        * \param[in] event_cond Conjunctive query on events.
+        * \param[out] events Vector of Event objects representing L&B
+        * events.
+        * \throws LoggingException Query failed.
         */
        void queryEvents(const std::vector<QueryRecord>& job_cond,
                         const std::vector<QueryRecord>& event_cond,
-                        std::vector<Event>&) const;
+                        std::vector<Event>& events) const;
   
+       /** Convenience form of queryEvents.
+        *
+        */
        const std::vector<Event> queryEvents(const std::vector<QueryRecord>& job_cond,
                                             const std::vector<QueryRecord>& event_cond) const;
 
+        /** Another modification of queryEvents.
+        *
+        * The same method, but the results are returned as a list
+        * instead of vector.
+        */
        const std::list<Event> queryEventsList(const std::vector<QueryRecord>& job_cond,
                                               const std::vector<QueryRecord>& event_cond) const;
 
 
-       /** The same as queryEvents but return only an aggregate.
-        * @param job_cond, event_cond - vectors of conditions to be satisfied 
-        *  by jobs as a whole or particular events, conditions are ANDed
-        * @param op aggregate operator to apply
-        * @param attr attribute to apply the operation to
+       /** NOT IMPLEMENTED.
+        * \param[in] job_cond 
+        * \param[in]  event_cond       Vectors of conditions to be satisfied 
+        *  by jobs as a whole or particular events.
+        * \param[in] op                        Aggregate operator to apply.
+        * \param[in] attr                      Attribute to apply the operation to.
         */
        std::string queryEventsAggregate(const std::vector<QueryRecord>& job_cond,
                                         const std::vector<QueryRecord>& event_cond,
@@ -199,99 +523,204 @@ public:
                                         std::string const attr) const;
   
 
-       /** Retrieve all events satisfying the query records
-        * @param job_cond, event_cond - vectors of vectors of job or event conditions, 
-        * respectively. The inner vectors are logically ANDed, the outer are ORed
-        * (cond1 AND cond2 AND ...) OR (condN AND ...)
-        * @param events vector of returned events
+       /** Retrieve all events satisfying the conjunctive-disjunctive
+        * query.
+        *
+        * Returns all events belonging to the jobs specified by
+        * <tt>job_cond</tt> and satisfying <tt>query_cond</tt>. The
+        * conditions are given in conjunctive-disjunctive form
+        * <tt>((cond1 OR cond2 OR ...) AND ...)</tt> 
+        * \param[in] job_cond Vector of conditions on jobs.
+        * \param[in] event_cond Vector of coditions on events.
+        * \param[out] eventList Returned Event's.
+        * \throws LoggingException Query failed.
         */
        void queryEvents(const std::vector<std::vector<QueryRecord> >& job_cond,
                         const std::vector<std::vector<QueryRecord> >& event_cond,
-                        std::vector<Event>&) const;
+                        std::vector<Event>& eventList) const;
   
+       /** Convenience form of queryEvents.
+        *
+        * The same as previous, but the resulting vector is passed as
+        * a return value.
+        */
        const std::vector<Event> 
        queryEvents(const std::vector<std::vector<QueryRecord> >& job_cond,
                    const std::vector<std::vector<QueryRecord> >& event_cond) const;
 
        
-       /** Retrieve jobs satisfying the query records, including their states
-        * @param query vector of Query records that are anded to form the
-        *      query
-        * @param ids vector of returned job id's
-        * @param states vector of returned job states
+       /** Retrieve jobs satisfying the query.
+        *
+        * Finds all jobs (represented as JobId's) satisfying given
+        * query.
+        * \param[in] query Query in conjunctive form.
+        * \param[out] jobList  List of job id's.
+        * \throws LoggingException Query failed.
         */
-  
        void queryJobs(const std::vector<QueryRecord>& query,
-                      std::vector<glite::wmsutils::jobid::JobId>& ids) const;
-  
+                      std::vector<glite::wmsutils::jobid::JobId>& jobList) const;
+
+        /** Convenience form of queryJobs.
+        *
+        * The same as above, but job id's are passed as a return
+        * value.
+        */
        const std::vector<glite::wmsutils::jobid::JobId>
        queryJobs(const std::vector<QueryRecord>& query) const;
   
        
-       /** Retrieve jobs satisfying the query records, including their states
-        * @param query vector of Query record vectors that are ORed and ANDed to form the
-        *      query
-        * @param ids vector of returned job id's
-        * @param states vector of returned job states
+       /** Retrieve jobs satisfying the query.
+        *
+        * Finds all jobs satisfying query given in
+        * conjunctive-disjunctive form.
+        * \param[in] query Conjunction of disjunctive queries.
+        * \param[out] jobList  Job id's of found jobs.
+        * \throws LoggingException Query failed.
         */
-   
        void queryJobs(const std::vector<std::vector<QueryRecord> >& query,
-                      std::vector<glite::wmsutils::jobid::JobId>& ids) const;
+                      std::vector<glite::wmsutils::jobid::JobId>& jobList) const;
   
+        /** Convenience form of queryJobs.
+        *
+        * Same as above, but result is passed as a retutrn value.
+        */
        const std::vector<glite::wmsutils::jobid::JobId>
        queryJobs(const std::vector<std::vector<QueryRecord> >& query) const;
 
-       /** Retrieve jobs satisfying the query records, including status
-        * information
-        * @param query vector of Query records that are anded to form the
-        *      query
-        * @param ids vector of returned job id's
-        * @param states vector of returned job states
+       /** Retrieve status of jobs satisfying the given simple query.
+        *
+        * Returns states (represented by JobStatus) of all jobs
+        * satisfying the query in conjunctive form.
+        * \param[in] query  Condition on jobs.
+        * \param[in] flags  The same as Job::status() flags.
+        * \param[out] states States of jobs satysfying the condition.
+        * \throws LoggingException Query failed.
         */
        void queryJobStates(const std::vector<QueryRecord>& query, 
                            int flags,
                            std::vector<JobStatus> & states) const;
+
+       /** Convenience form of queryJobStates.
+        *
+        * Same as above, but the result is passed as a return value.
+        */
        const std::vector<JobStatus>  queryJobStates(const std::vector<QueryRecord>& query, 
                                                     int flags) const;
 
+       /** Convenience form of queryJobStates.
+        *
+        * Same as above, but results are returned as list instead of
+        * vector.
+        */
        const std::list<JobStatus>  queryJobStatesList(const std::vector<QueryRecord>& query,
                                                     int flags) const;
   
-       /** Retrieve jobs satisfying the query records, including status
-        * information
-        * @param query vector of Query records that are anded to form the
-        *      query
-        * @param ids vector of returned job id's
-        * @param states vector of returned job states
+       /** Retrieve status of jobs satisfying the given
+        * conjunctive-disjunctive query.
+        *
+        * Returns states (represented by JobStatus) of all jobs
+        * satisfying the query in conjunctive form.
+        * \param[in] query  Condition on jobs.
+        * \param[in] flags  The same as Job::status() flags.
+        * \param[out] states States of jobs satysfying the condition.
+        * \throws LoggingException Query failed.
         */
        void queryJobStates(const std::vector<std::vector<QueryRecord> >& query, 
                            int flags,
                            std::vector<JobStatus> & states) const;
+
+       /** Convenience form of queryJobStates.
+        *
+        * Same as above, but the result is passed as a return value.
+        */
        const std::vector<JobStatus>  
        queryJobStates(const std::vector<std::vector<QueryRecord> >& query, 
                       int flags) const;
   
-       /** States of all user's jobs.
-        * Convenience wrapper around queryJobs.
+       /** Return states of all user's jobs.
+        *
+        * Convenience wrapper around queryJobStates, returns status of all
+        * jobs whose owner is the current user (as named in the X509
+        * certificate subject).
+        * \param[out] stateList States of jobs owned by this user.
+        * \throws LoggingException Query failed.
         */
        void userJobStates(std::vector<JobStatus>& stateList) const;
        const std::vector<JobStatus> userJobStates() const;
   
   
-       /** JobId's of all user's jobs.
-        * Convenience wrapper around queryJobs.
+       /** Find all user's jobs.
+        *
+        * Convenience wrapper around queryJobs, returns id's of all
+        * jobs whose owner is the current user (as named in the X509
+        * certificate subject).
+        * \param[out] jobs Id's of jobs owned by this user.
+        * \throws LoggingException Query failed.
         */
-       void userJobs(std::vector<glite::wmsutils::jobid::JobId> &) const;
-       const std::vector<glite::wmsutils::jobid::JobId> userJobs() const;
+       void userJobs(std::vector<glite::wmsutils::jobid::JobId> &jobs) const;
 
-       /** Manipulate LB parameters, the same as for edg_wll_Context in C */
-       void setParam(edg_wll_ContextParam, int); 
-       void setParam(edg_wll_ContextParam, const std::string); 
-       void setParam(edg_wll_ContextParam, const struct timeval &); 
+       /** Convenience form of userJobs.
+        *
+        * Same as above, but results are passed as a return value.
+        */
+       const std::vector<glite::wmsutils::jobid::JobId> userJobs() const;
 
-       int getParamInt(edg_wll_ContextParam) const;
-       std::string getParamString(edg_wll_ContextParam) const;
-       struct timeval getParamTime(edg_wll_ContextParam) const;
+       /** Set communication parameters of integer type.
+        *
+        * Sets the named parameter to the given integer value.
+        * \param[in] name Symbolic name of the parameter.
+        * \param[in] value Value.
+        * \throws LoggingException Setting parameter failed.
+        * \see edg_wll_SetParam()
+        */
+       void setParam(edg_wll_ContextParam name, int value); 
+
+       /** Set communication parameters of string type.
+        *
+        * Sets the named parameter to the given string value.
+        * \param[in] name Symbolic name of the parameter.
+        * \param[in] value Value.
+        * \throws LoggingException Setting parameter failed.
+        * \see edg_wll_SetParam()
+        */
+       void setParam(edg_wll_ContextParam name, const std::string &value); 
+
+       /** Set communication parameters of timeval type.
+        *
+        * Sets the named parameter to the given timeval value.
+        * \param[in] name Symbolic name of the parameter.
+        * \param[in] value Value.
+        * \throws LoggingException Setting parameter failed.
+        * \see edg_wll_SetParam()
+        */
+       void setParam(edg_wll_ContextParam name, const struct timeval &value); 
+
+       /** Get communication parameters of integer type.
+        *
+        * Gets the named parameter of integer type.
+        * \param[in] name Symbolic name of the parameter.
+        * \throws LoggingException Getting parameter failed.
+        * \see edg_wll_GetParam()
+        */
+       int getParamInt(edg_wll_ContextParam name) const;
+
+       /** Get communication parameters of string type.
+        *
+        * Gets the named parameter of string type.
+        * \param[in] name Symbolic name of the parameter.
+        * \throws LoggingException Getting parameter failed.
+        * \see edg_wll_GetParam()
+        */
+       std::string getParamString(edg_wll_ContextParam name) const;
+
+       /** Get communication parameters of timeval type.
+        *
+        * Gets the named parameter of timeval type.
+        * \param[in] name Symbolic name of the parameter.
+        * \throws LoggingException Getting parameter failed.
+        * \see edg_wll_GetParam()
+        */
+       struct timeval getParamTime(edg_wll_ContextParam name) const;
   
 protected:
 
@@ -301,6 +730,6 @@ private:
        edg_wll_Context context;
 };
 
-EWL_END_NAMESPACE;
+EWL_END_NAMESPACE
 
 #endif
index 5a8cf96..93086d5 100644 (file)
@@ -2,17 +2,8 @@
 #define __EDG_WORKLOAD_LOGGING_CLIENT_CONSUMER_H__
 
 /*!
- * \file client/consumer.h  (lbapi.h originaly)
+ * \file consumer.h
  * \brief L&B consumer API
- *
- * General rules:
- * - functions return 0 on success, nonzero on error, errror details can 
- *   be found via edg_wll_ErrorCode()
- * - OUT are ** types, functions malloc()-ate objects and fill in the pointer 
- *   pointed to by the OUT argument
- * - returned lists of pointers are NULL-terminated malloc()-ed arrays
- * - edg_wll_Query + wrapper terminate arrays with EDG_WLL_EVENT_UNDEF event
- * - OUT is NULL if the list is empty
  */
 
 #ident "$Header$"
 extern "C" {
 #endif
 
-/*!
+/**
+ * \defgroup querying Server querying
+ * \brief The core part of the LB querying API.
+ * 
+ * The functions in this part of the API are responsible for
+ * transforming the user query to the LB protocol, contacting the server,
+ * receiving back the response and transforming back the results to the
+ * API data structures. 
+ *
+ * General rules:
+ * - functions return 0 on success, nonzero on error, errror details can 
+ *   be found via edg_wll_ErrorCode()
+ * - OUT are ** types, functions malloc()-ate objects and fill in the pointer 
+ *   pointed to by the OUT argument
+ * - returned lists of pointers are NULL-terminated malloc()-ed arrays
+ * - edg_wll_Query + wrapper terminate arrays with EDG_WLL_EVENT_UNDEF event
+ * - OUT is NULL if the list is empty
+ *@{
+ */
+
+/**
  * Predefined types for query attributes
  */
 typedef enum _edg_wll_QueryAttr{
@@ -53,7 +64,7 @@ typedef enum _edg_wll_QueryAttr{
 } edg_wll_QueryAttr;
 
 
-/*!
+/**
  * Predefined types for query operands
  */
 typedef enum _edg_wll_QueryOp{
@@ -65,7 +76,7 @@ typedef enum _edg_wll_QueryOp{
 } edg_wll_QueryOp;
 
 
-/*!
+/**
  * Single query condition for edg_wll_Query().
  * Those records are composed to form an SQL \a where clause
  * when processed at the L&B server
@@ -93,48 +104,27 @@ typedef struct _edg_wll_QueryRec {
        } value, value2;
 } edg_wll_QueryRec;
 
-/************************************************
- * API FUNCTION DECLARATIONS                   *
+/**
+ * default query timeout (in seconds)
  */
-
-
-#ifdef CLIENT_SBIN_PROG
-extern int edg_wll_http_send_recv(
-       edg_wll_Context,
-       char *, const char * const *, char *,
-       char **,char ***,char **
-);
-
-extern int http_check_status(
-       edg_wll_Context,
-       char *,
-       char **
-);
-
-extern int set_server_name_and_port(
-       edg_wll_Context,
-       const edg_wll_QueryRec **
-);
-
-#endif
+#define EDG_WLL_QUERY_TIMEOUT_DEFAULT   120
 
 /**
- * \name Server querying
- *
- *@{
+ * maximal query timeout (in seconds)
  */
+#define EDG_WLL_QUERY_TIMEOUT_MAX       1800
 
 /**
  * General query on events.
- * Return events satysfying all conditions 
+ * Return events satisfying all conditions 
  * query records represent conditions in the form 
  * \a attr \a op \a value eg. time > 87654321.
  * \see edg_wll_QueryRec
  *
- * \param context IN: context to work with
- * \param job_conditions IN: query conditions (ANDed) on current job status, null (i.e. ATTR_UNDEF) terminated list. NULL means empty list, i.e. always TRUE
- * \param event_conditions: conditions on events, null terminated list, NULL means empty list, i.e. always TRUE
- * \param events OUT: list of matching events
+ * \param[in] context          context to work with
+ * \param[in] job_conditions   query conditions (ANDed) on current job status, null (i.e. ATTR_UNDEF) terminated list. NULL means empty list, i.e. always TRUE
+ * \param[in] event_conditions         conditions on events, null terminated list, NULL means empty list, i.e. always TRUE
+ * \param[out] events          list of matching events
  */
 int edg_wll_QueryEvents(
        edg_wll_Context                 context,
@@ -143,6 +133,14 @@ int edg_wll_QueryEvents(
        edg_wll_Event **                events
 );
 
+/**
+ * Extended event query interface.
+ * Similar to \ref edg_wll_QueryEvents but the conditions are nested lists.
+ * Elements of the inner lists have to refer to the same attribute and they
+ * are logically ORed. 
+ * The inner lists themselves are logically ANDed then.
+ */
+
 int edg_wll_QueryEventsExt(
        edg_wll_Context                 context,
        const edg_wll_QueryRec **       job_conditions,
@@ -153,6 +151,7 @@ int edg_wll_QueryEventsExt(
 
 /**
  * Query LBProxy and use plain communication
+ * \warning edg_wll_*Proxy() functions are not implemented in release 1.
  */
 int edg_wll_QueryEventsProxy(
        edg_wll_Context                 context,
@@ -161,6 +160,10 @@ int edg_wll_QueryEventsProxy(
        edg_wll_Event **                events
 );
 
+/**
+ * \warning edg_wll_*Proxy() functions are not implemented in release 1.
+ */
+
 int edg_wll_QueryEventsExtProxy(
        edg_wll_Context                 context,
        const edg_wll_QueryRec **       job_conditions,
@@ -173,11 +176,11 @@ int edg_wll_QueryEventsExtProxy(
  * Return jobs (and possibly their states) for which an event satisfying the conditions
  * exists.
  * \see edg_wll_QueryEvents
- * \param context IN: context to work with
- * \param conditions IN: query records (ANDed), null (i.e. EDG_WLL_ATTR_UNDEF) terminated list
- * \param flags IN: additional status fields to retrieve (\see edg_wll_JobStatus)
- * \param jobs OUT: list of job ids. May be NULL.
- * \param states OUT: list of corresponding states (returned only if not NULL)
+ * \param[in] context          context to work with
+ * \param[in] conditions       query records (ANDed), null (i.e. EDG_WLL_ATTR_UNDEF) terminated list
+ * \param[in] flags            additional status fields to retrieve (\see edg_wll_JobStatus)
+ * \param[out] jobs            list of job ids. May be NULL.
+ * \param[out] states          list of corresponding states (returned only if not NULL)
  */
 int edg_wll_QueryJobs(
        edg_wll_Context                 context,
@@ -187,6 +190,15 @@ int edg_wll_QueryJobs(
        edg_wll_JobStat **              states
 );
 
+/**
+ * Extended job query interface.
+ * Similar to \ref edg_wll_QueryJobs but the conditions are nested lists.
+ * Elements of the inner lists have to refer to the same attribute and they
+ * are logically ORed. 
+ * The inner lists themselves are logically ANDed then.
+ */
+
+
 int edg_wll_QueryJobsExt(
        edg_wll_Context                 context,
        const edg_wll_QueryRec **       conditions,
@@ -198,6 +210,7 @@ int edg_wll_QueryJobsExt(
 
 /**
  * Query LBProxy and use plain communication
+ * \warning edg_wll_*Proxy() functions are not implemented in release 1.
  */
 int edg_wll_QueryJobsProxy(
        edg_wll_Context                 context,
@@ -207,6 +220,10 @@ int edg_wll_QueryJobsProxy(
        edg_wll_JobStat **              states
 );
 
+/**
+ * \warning edg_wll_*Proxy() functions are not implemented in release 1.
+ */
+
 int edg_wll_QueryJobsExtProxy(
        edg_wll_Context                 context,
        const edg_wll_QueryRec **       conditions,
@@ -227,10 +244,11 @@ int edg_wll_QueryJobsExtProxy(
 /* starting from bit 10 private flags begins - do not add 1024 and more! */
 
 /** Return status of a single job.
- * \param context IN: context to operate on
- * \param jobid IN: query this job
- * \param flags IN: specifies optional status fields to retrieve,
+ * \param[in] context          context to operate on
+ * \param[in] jobid            query this job
+ * \param[in] flags            specifies optional status fields to retrieve,
  *     \see EDG_WLL_STAT_CLASSADS, EDG_WLL_STAT_CHILDREN, EDG_WLL_STAT_CHILDSTAT
+ * \param[out] status          status
  */
 
 int edg_wll_JobStatus(
@@ -242,10 +260,17 @@ int edg_wll_JobStatus(
 
 /**
  * Query LBProxy and use plain communication
+ * \param[in] context          context to operate on
+ * \param[in] jobid            query this job
+ * \param[in] flags            specifies optional status fields to retrieve,
+ *     \see EDG_WLL_STAT_CLASSADS, EDG_WLL_STAT_CHILDREN, EDG_WLL_STAT_CHILDSTAT
+ * \param[out] status          the status of the job
+
+ * \warning edg_wll_*Proxy() functions are not implemented in release 1.
  */
 int edg_wll_JobStatusProxy(
        edg_wll_Context         context,
-       const edg_wlc_JobId             jobid,
+       const edg_wlc_JobId     jobid,
        int                     flags,
        edg_wll_JobStat         *status
 );
@@ -253,9 +278,9 @@ int edg_wll_JobStatusProxy(
 /**
  * Return all events related to a single job.
  * Convenience wrapper around edg_wll_Query()
- * \param context IN: context to work with
- * \param jobId IN: job to query
- * \param events OUT: list of events 
+ * \param[in] context          context to work with
+ * \param[in] jobId            job to query
+ * \param[out] events          list of events 
  */
 
 int edg_wll_JobLog(
@@ -267,6 +292,8 @@ int edg_wll_JobLog(
 
 /**
  * Query LBProxy and use plain communication
+ * \warning edg_wll_*Proxy() functions are not implemented in release 1.
+
  */
 int edg_wll_JobLogProxy(
        edg_wll_Context         context,
@@ -276,9 +303,9 @@ int edg_wll_JobLogProxy(
 
 /**
  * All current user's jobs.
- * \param context IN: context to work with
- * \param jobs OUT: list of the user's jobs
- * \param states OUT: list of the jobs' states
+ * \param[in] context          context to work with
+ * \param[out] jobs            list of the user's jobs
+ * \param[out] states          list of the jobs' states
  */
 int edg_wll_UserJobs(
        edg_wll_Context         context,
@@ -289,6 +316,8 @@ int edg_wll_UserJobs(
 
 /**
  * Query LBProxy and use plain communication
+ * \warning edg_wll_*Proxy() functions are not implemented in release 1.
+
  */
 int edg_wll_UserJobsProxy(
        edg_wll_Context         context,
@@ -299,8 +328,8 @@ int edg_wll_UserJobsProxy(
 /**
  * Server supported indexed attributes
  * \see DataGrid-01-TEN-0125
- * \param context IN: context to work with
- * \param attrs OUT: configured indices (each index is an UNDEF-terminated
+ * \param[in] context          context to work with
+ * \param[out] attrs           configured indices (each index is an UNDEF-terminated
  *             array of QueryRec's from which only attr (and attr_id 
  *             eventually) are meaningful
  */
@@ -311,10 +340,10 @@ int edg_wll_GetIndexedAttrs(
 
 /**
  * Retrieve limit on query result size (no. of events or jobs).
- * FIXME: not implemented.
+ * \warning not implemented.
  * \see DataGrid-01-TEN-0125
- * \param context IN: context to work with
- * \param limit OUT: server imposed limit
+ * \param[in] context          context to work with
+ * \param[out] limit           server imposed limit
  */
 int edg_wll_GetServerLimit(
        edg_wll_Context context,
@@ -322,12 +351,12 @@ int edg_wll_GetServerLimit(
 );
 
 /**
- * UI port for the job
- * \param context IN: context to work with
- * \param jobId IN: job to query
- * \param name IN: name of the UI-port
- * \param host OUT: hostname of port
- * \param port OUT: port number
+ * UI port for intactive jobs. Used internally by WMS.
+ * \param[in] context          context to work with
+ * \param[in] jobId            job to query
+ * \param[in] name             name of the UI-port
+ * \param[out] host            hostname of port
+ * \param[out] port            port number
  */
 int edg_wll_QueryListener(
        edg_wll_Context context,
@@ -340,8 +369,10 @@ int edg_wll_QueryListener(
 
 /**
  * Query LBProxy and use plain communication
+ * \warning edg_wll_*Proxy() functions are not implemented in release 1.
+
  */
-int edg_wll_QueryListener(
+int edg_wll_QueryListenerProxy(
        edg_wll_Context context,
        edg_wlc_JobId           jobId,
        const char *    name,
@@ -351,9 +382,11 @@ int edg_wll_QueryListener(
 
 /**
  * Ask LB Proxy server for sequence number
- * \param context IN: context to work with
- * \param jobId IN: job to query
- * \param code OUT: sequence code
+ * \param[in] context          context to work with
+ * \param[in] jobId            job to query
+ * \param[out] code            sequence code
+ * \warning edg_wll_*Proxy() functions are not implemented in release 1.
+
  */
 
 
@@ -363,8 +396,6 @@ int edg_wll_QuerySequenceCodeProxy(
        char **         code
 );
                
-/*@}*/
-
 /*
  * edg_wll_QueryRec manipulation
  */
@@ -372,13 +403,29 @@ int edg_wll_QuerySequenceCodeProxy(
 /** Free edg_wll_QueryRec internals, not the structure itself */
 void edg_wll_QueryRecFree(edg_wll_QueryRec *);
 
+/*
+ *@} end of group
+ */
 
+#ifdef CLIENT_SBIN_PROG
+extern int edg_wll_http_send_recv(
+       edg_wll_Context,
+       char *, const char * const *, char *,
+       char **,char ***,char **
+);
 
-/**
- * default and maximal query timeout (in seconds)
- */
-#define EDG_WLL_QUERY_TIMEOUT_DEFAULT   120
-#define EDG_WLL_QUERY_TIMEOUT_MAX       1800
+extern int http_check_status(
+       edg_wll_Context,
+       char *,
+       char **
+);
+
+extern int set_server_name_and_port(
+       edg_wll_Context,
+       const edg_wll_QueryRec **
+);
+
+#endif
 
 #ifdef __cplusplus
 }
index 5f176d5..13048b2 100644 (file)
@@ -2,7 +2,6 @@
 #define _EDG_WORKLOAD_LOGGING_CLIENT_CONTEXT_H
 
 /**
- * \file edg/workload/logging/client/context.h
  * \brief L&B API common context (publicly visible) and related definitions
  */
 
 extern "C" {
 #endif
 
+/**
+ * \defgroup context Context
+ *
+ *@{
+ */
+
 /** Opaque context type */
 typedef struct _edg_wll_Context *edg_wll_Context;
 
@@ -73,21 +78,21 @@ typedef enum _edg_wll_Source {
 
 
 /** Allocate an initialize a new context object.
- * \param context OUT returned context
+ * \param[out] context                 returned context
  * \return 0 on success, ENOMEM if malloc() fails
  */
 int edg_wll_InitContext(edg_wll_Context *context);
 
 /** Destroy and free context object.
  * Also performs necessary cleanup (closing connections etc.)
- * \param context IN context to free
+ * \param[in] context          context to free
  */
 void edg_wll_FreeContext(edg_wll_Context context);
 
 /** Set a context parameter.
- * \param context INOUT context to work with
- * \param param IN parameter to set
- * \param ... IN value to set (if NULL or 0, default is used)
+ * \param[in,out] context      context to work with
+ * \param[in] param            parameter to set
+ * \param[in] ...              value to set (if NULL or 0, default is used)
  * \retval 0 success
  * \retval EINVAL param is not a valid parameter, or invalid value
  */
@@ -97,16 +102,39 @@ int edg_wll_SetParam(
        ...
 );
 
-struct timeval;        /* gcc, shut up! */
+struct timeval; /* XXX: gcc, shut up! */
+
+/** Set a context parameter of type int.
+ * \param[in,out] ctx           context to work with
+ * \param[in] param            parameter to set
+ * \param[in] val              value to set
+ * \retval 0 success
+ * \retval EINVAL param is not a valid parameter, or invalid value
+ */
+int edg_wll_SetParamInt(edg_wll_Context ctx,edg_wll_ContextParam param,int val);
+
+/** Set a context parameter of type string.
+ * \param[in,out] ctx          context to work with
+ * \param[in] param            parameter to set
+ * \param[in] val              value to set (if NULL, default is used)
+ * \retval 0 success
+ * \retval EINVAL param is not a valid parameter, or invalid value
+ */
+int edg_wll_SetParamString(edg_wll_Context ctx,edg_wll_ContextParam param,const char *val);
 
-int edg_wll_SetParamInt(edg_wll_Context,edg_wll_ContextParam,int);
-int edg_wll_SetParamString(edg_wll_Context,edg_wll_ContextParam,const char *);
-int edg_wll_SetParamTime(edg_wll_Context,edg_wll_ContextParam,const struct timeval *);
+/** Set a context parameter of type timeval.
+ * \param[in,out] ctx          context to work with
+ * \param[in] param            parameter to set
+ * \param[in] val              value to set (if NULL, default is used)
+ * \retval 0 success
+ * \retval EINVAL param is not a valid parameter, or invalid value
+ */
+int edg_wll_SetParamTime(edg_wll_Context ctx,edg_wll_ContextParam param,const struct timeval *val);
 
 /** Get current parameter value.
- * \param context INOUT context to work with
- * \param param IN parameter to retrieve
- * \param ... OUT pointer to output variable
+ * \param[in,out] context      context to work with
+ * \param[in] param            parameter to retrieve
+ * \param[out] ...             pointer to output variable
  * \retval 0 success
  * \retval EINVAL param is not a valid parameter
  */
@@ -154,10 +182,10 @@ typedef enum _edg_wll_ErrorCode {
 
 /**
  * Retrieve error details on recent API call
- * \param context IN: context to work with
- * \param errText OUT: standard error text
+ * \param[in] context          context to work with
+ * \param[out] errText         standard error text
  *      (may be NULL - no text returned)
- * \param errDesc OUT: additional error description
+ * \param[out] errDesc         additional error description
  *      (may be NULL - no text returned)
  * \return Error code of the recent error
  */
@@ -165,7 +193,7 @@ typedef enum _edg_wll_ErrorCode {
 int edg_wll_Error(
        edg_wll_Context context,
        char            **errText,
-       char            **eddDesc
+       char            **errDesc
 );
 
 /** Convert source code to printable string 
@@ -211,6 +239,10 @@ int edg_wll_GetLoggingJob(
        edg_wlc_JobId   *jobid_out
 );
 
+/*
+ *@} end of group
+ */
+
 #ifdef __cplusplus
 }
 #endif
index e37be1f..9818bb7 100644 (file)
@@ -1,11 +1,6 @@
 #ifndef __EDG_WORKLOAD_LOGGING_CLIENT_EVENTS_H__
 #define __EDG_WORKLOAD_LOGGING_CLIENT_EVENTS_H__
 
-/**
- * \file edg/workload/logging/client/events.h
- * \brief contains definition of event type codes for use both by lbapi.h and dglog.h
- */
-
 #ident "$Header$"
 /*
 @@@AUTO
 extern "C" {
 #endif
 
+/**
+ * \defgroup events Events
+ * \brief All L&B event types.
+ *
+ *@{
+ */
 
 /**
  * Predefined type for ULM string 
@@ -49,22 +50,22 @@ for my $e (sort { $event->{order}->{$a} <=> $event->{order}->{$b} }
 } edg_wll_EventCode;
 
 /**
- * \fn edg_wll_EventCode edg_wll_StringToEvent(char *name)
- * \param name         a string event name (e.g. "JobTransfer")
+ * \fn edg_wll_EventCode edg_wll_StringToEvent(const char *name)
+ * \param[in] name             a string event name (e.g. "JobTransfer")
  * \return corresponding numeric code (edg_wll_EventCode)
  * \brief convert a string event name to the corresponding numeric code
  */
 
-extern edg_wll_EventCode edg_wll_StringToEvent(char *);
+extern edg_wll_EventCode edg_wll_StringToEvent(const char *name);
 
 /**
  * \fn char *edg_wll_EventToString(edg_wll_EventCode event)
- * \param event                an event numeric code (edg_wll_EventCode)
+ * \param[in] event            an event numeric code (edg_wll_EventCode)
  * \return corresponding string (e.g. "JobTransfer")
  * \brief convert an event numeric code to the corresponding string
  */
 
-extern char *edg_wll_EventToString(edg_wll_EventCode);
+extern char *edg_wll_EventToString(edg_wll_EventCode event);
 
 
 /**
@@ -103,22 +104,22 @@ for my $t (sort { $event->{order}->{$a} <=> $event->{order}->{$b} }
 } edg_wll_KeyNameCode;
 
 /**
- * \fn edg_wll_KeyNameCode edg_wll_StringToKeyName(char *name)
- * \param name         a string ULM key name (e.g. "DG.JOB.TRANSFER.DEST")
+ * \fn edg_wll_KeyNameCode edg_wll_StringToKeyName(const char *name)
+ * \param[in] name             a string ULM key name (e.g. "DG.JOB.TRANSFER.DEST")
  * \return corresponding numeric code (edg_wll_KeyNameCode)
  * \brief convert a string ULM key name to the corresponding numeric code
  */
 
-extern edg_wll_KeyNameCode edg_wll_StringToKeyName(char *);
+extern edg_wll_KeyNameCode edg_wll_StringToKeyName(const char *name);
 
 /**
  * \fn char *edg_wll_KeyNameToString(edg_wll_KeyNameCode key)
- * \param key          a ULM key name numeric code (edg_wll_KeyNameCode)
+ * \param[in] key              a ULM key name numeric code (edg_wll_KeyNameCode)
  * \return corresponding string (e.g. "DG.JOB.TRANSFER.DEST")
  * \brief convert a ULM key name numeric code to the corresponding string
  */
 
-extern char *edg_wll_KeyNameToString(edg_wll_KeyNameCode);
+extern char *edg_wll_KeyNameToString(edg_wll_KeyNameCode key);
 
 
 /**
@@ -139,7 +140,7 @@ for ($event->getFieldsOrdered) {
 # enum
                gen qq{
 /**
- * \\enum $enum
+ * \\$enum
  * $fn codes 
  */
 $enum \{
@@ -153,19 +154,19 @@ $enum \{
 # function StringTo:
                gen qq{
 /**
- * \\fn $enum edg_wll_StringTo${c}(char *name);
- * \\param name                a string representing $fn code (e.g. \"${$f->{codes}}[1]->{name}\")
+ * \\fn $enum edg_wll_StringTo${c}(const char *name);
+ * \\param[in] name            a string representing $fn code (e.g. \"${$f->{codes}}[1]->{name}\")
  * \\return corresponding numeric code ($enum)
  * \\brief converts a string $fn code to corresponding numeric code
  */
-extern $enum edg_wll_StringTo${c}(char *name);
+extern $enum edg_wll_StringTo${c}(const char *name);
 };
 
 # function ToString:
                gen qq{
 /**
  * \\fn char *edg_wll\_${c}ToString($enum code);
- * \\param code                a $fn numeric code ($enum)
+ * \\param[in] code            a $fn numeric code ($enum)
  * \\return corresponding string (e.g. \"${$f->{codes}}[1]->{name}\")
  * \\brief converts a $fn numeric code to corresponding string
  */
@@ -187,7 +188,7 @@ for my $t (sort { $event->{order}->{$a} <=> $event->{order}->{$b} }
 # enum
                        gen qq{
 /**
- * \\enum $enum
+ * \\$enum
  * $fn codes of the $t event
  */
 $enum \{
@@ -201,19 +202,19 @@ $enum \{
 # function StringTo:
                        gen qq{
 /**
- * \\fn $enum edg_wll_StringTo${c}(char *name);
- * \\param name                a string representing $t $fn code (e.g. \"${$f->{codes}}[1]->{name}\")
+ * \\fn $enum edg_wll_StringTo${c}(const char *name);
+ * \\param[in] name            a string representing $t $fn code (e.g. \"${$f->{codes}}[1]->{name}\")
  * \\return corresponding numeric code ($enum)
  * \\brief converts a string $t $fn code to corresponding numeric code
  */
-extern $enum edg_wll_StringTo${c}(char *name);
+extern $enum edg_wll_StringTo${c}(const char *name);
 };
 
 # function ToString:
                        gen qq{
 /**
  * \\fn char *edg_wll\_${c}ToString($enum code);
- * \\param code                a $t $fn numeric code ($enum)
+ * \\param[in] code            a $t $fn numeric code ($enum)
  * \\return corresponding string (e.g. \"${$f->{codes}}[1]->{name}\")
  * \\brief converts a $t $fn numeric code to corresponding string
  */
@@ -243,6 +244,10 @@ for ($event->getFieldsOrdered) {
 gen "\n";
 @@@}
 
+/**
+ * \typedef edg_wll_AnyEvent
+ * common structure definition contained in all types of the events
+ */
 typedef struct _edg_wll_AnyEvent {
 _EDG_WLL_EVENT_COMMON
 } edg_wll_AnyEvent;
@@ -314,7 +319,7 @@ extern edg_wll_Event *edg_wll_InitEvent(edg_wll_EventCode eventcode);
 
 /**
  * Free the contents of event structure
- * \param IN event structure to be freed
+ * \param[in] event            structure to be freed
  * \warning As event structures are likely to be allocated in arrays,
  *      the structure itself is not freed.
  *      Its the responsibility of the caller to call free(event)
@@ -324,6 +329,9 @@ void edg_wll_FreeEvent(
        edg_wll_Event * event
 );
 
+/*
+ *@} end of group
+ */
 
 #ifdef __cplusplus
 }
index 129b61d..4647f1a 100644 (file)
@@ -6,7 +6,7 @@
 */
 
 /*!
- * \file client/jobstat.h  
+ * \file jobstat.h  
  * \brief edg_wll_JobStat definition and related stuff
  */
 
@@ -17,6 +17,12 @@ extern "C" {
 #endif
 
 /**
+ * \defgroup jobstatus Job Status
+ * \brief Job status structure definition and related definitions.
+ *@{
+ */
+
+/**
  * Miscelaneous job status numeric codes
  */
 
@@ -101,8 +107,6 @@ typedef struct _edg_wll_JobStat {
  * \name edg_wll_JobStat manipulation
  */
 
-/*@{*/
-
 /**
  * Initialize empty status structure.
  * Fills in the stucture with NULL's or values with no meaning
@@ -134,6 +138,10 @@ extern char *edg_wll_StatToString(edg_wll_JobStatCode);
 
 /*@}*/
 
+/*
+ *@} end of group
+ */
+
 #ifdef __cplusplus
 }
 #endif
index a16215d..0a92c60 100644 (file)
@@ -13,6 +13,12 @@ extern "C" {
 #endif
 
 /**
+ * \defgroup notifications Notifications handling
+ * \brief Notifications handling.
+ *@{
+ */
+
+/**
  * default and maximal notif timeout (in seconds)
  */
 #define EDG_WLL_NOTIF_TIMEOUT_DEFAULT   120
@@ -22,17 +28,19 @@ extern "C" {
 /** Register for receiving notifications.
  * Connects to the server specified by EDG_WLL_NOTIF_SERVER context parameter
  * (temporary workaround, should be resolved by registry in future).
- * \param conditions: the same conditions as for \see edg_wll_QueryJobsExt.
+ * \param[in,out] context      context to work with
+ * \param[in] conditions       the same conditions as for \ref edg_wll_QueryJobsExt.
  *             currently one or more JOBID's are required.
  *             Only a single occurence of a specific attribute is allowed
  *             among ANDed conditions (due to the ability to modify them
  *             further).
- * \param fd = -1 create or reuse the default listening socket (one per context)
+ * \param[in] fd               = -1 create or reuse the default listening socket (one per context)
  *          >= 0 non-default listening socket 
- * \param address_override if not NULL, use this address instead of extracting it
+ * \param[in] address_override         if not NULL, use this address instead of extracting it
  *             from the connection (useful when multiple interfaces are present,
  *             circumventing NAT problems etc.)
- * \param valid until when the registration is valid (NULL means no interest in
+ * \param[in] valid            until when the registration is valid (NULL means no interest in
+ * \param[out] id_out          returened NotifId
  *             the value
  * \retval 0 OK
  * \retval EINVAL restrictions on conditions are not met
@@ -51,9 +59,11 @@ int edg_wll_NotifNew(
 /** Change the receiving local address.
  * Report the new address to the server.
  *
- * \param fd 
- * \param address_override 
- * \param valid all same as for \see edg_wll_NotifNew
+ * \param[in,out] context      context to work with
+ * \param[in] id               notification ID you are binding to
+ * \param[in] fd               same as for \ref edg_wll_NotifNew 
+ * \param[in] address_override         same as for \ref edg_wll_NotifNew
+ * \param[in] valid            same as for \ref edg_wll_NotifNew
  */
 
 int edg_wll_NotifBind(
@@ -65,9 +75,13 @@ int edg_wll_NotifBind(
 );
 
 typedef enum _edg_wll_NotifChangeOp {
+       /** No operation, equal to not defined */
        EDG_WLL_NOTIF_NOOP = 0,
+       /** Replace notification registration with new one */
        EDG_WLL_NOTIF_REPLACE,
+       /** Add new condition when to be notifed */
        EDG_WLL_NOTIF_ADD,
+       /** Remove condition on notification */
        EDG_WLL_NOTIF_REMOVE
 /*      if adding new attribute, add conversion string to common/xml_conversions.c too !! */
 } edg_wll_NotifChangeOp;
@@ -78,8 +92,11 @@ typedef enum _edg_wll_NotifChangeOp {
  * of uniqueness the original conditions must have contained only a single
  * OR-ed row of conditions on the attributes infolved in the change.
  * 
- * \param op action to be taken on existing conditions,
- *     \see edg_wll_NotifChangeOp
+ * \param[in,out] context      context to work with
+ * \param[in] id               notification ID you are working with
+ * \param[in] conditions       same as for \ref edg_wll_NotifNew
+ * \param[in] op               action to be taken on existing conditions,
+ *     \ref edg_wll_NotifChangeOp
  */
 int edg_wll_NotifChange(
        edg_wll_Context         context,
@@ -89,7 +106,9 @@ int edg_wll_NotifChange(
 );
 
 /** Refresh the registration, i.e. extend its validity period.
- * \param valid until when the registration is valid (NULL means no interest in
+ * \param[in,out] context      context to work with
+ * \param[in] id               notification ID you are working with
+ * \param[in] valid            until when the registration is valid (NULL means no interest in
  *             the value
  */
 
@@ -102,6 +121,8 @@ int edg_wll_NotifRefresh(
 /** Drop the registration.
  * Server is instructed not to send notifications anymore, pending ones
  * are discarded, listening socket is closed, and allocated memory freed.
+ * \param[in,out] context      context to work with
+ * \param[in] id               notification ID you are working with
  */
 
 int edg_wll_NotifDrop(
@@ -111,10 +132,12 @@ int edg_wll_NotifDrop(
 
 /** Receive notification.
  * The first incoming notification is returned.
- * \param fd receive on this socket (-1 means the default for the context)
- * \param timeout wait atmost this time long. (0,0) means polling, NULL waiting
+ * \param[in,out] context      context to work with
+ * \param[in] fd               receive on this socket (-1 means the default for the context)
+ * \param[in] timeout          wait atmost this time long. (0,0) means polling, NULL waiting
  *     indefinitely
- *     
+ * \param[out] state_out       returned JobStatus
+ * \param[out] id_out          returned NotifId
  * \retval 0 notification received, state_out contains the current job state
  * \retval EAGAIN no notification available, timeout occured
  */
@@ -129,10 +152,11 @@ int edg_wll_NotifReceive(
 
 
 /** Default socket descriptor where to select(2) for notifications.
- * Even if nothing is available for reading freom the socket, 
- * there may be some data cached so calling \see edg_wll_NotifReceive
+ * Even if nothing is available for reading from the socket, 
+ * there may be some data cached so calling \ref edg_wll_NotifReceive
  * may return notifications immediately.
  *
+ * \param[in,out] context      context to work with
  * \retval >=0 socket descriptor
  * \retval -1 error, details set in context
  */
@@ -142,14 +166,19 @@ int edg_wll_NotifGetFd(
 );
 
 /** Close the default local listening socket.
- * Useful to force following \see edg_wll_NotifBind to open
+ * Useful to force following \ref edg_wll_NotifBind to open
  * a new one.
+ * \param[in,out] context      context to work with
  */
 
 int edg_wll_NotifCloseFd(
        edg_wll_Context         context
 );
 
+/*
+ *@} end of group
+ */
+
 #ifdef __cplusplus
 }
 #endif
index fc52d01..3ef1054 100644 (file)
@@ -7,21 +7,79 @@
 extern "C" {
 #endif
 
+/**
+ * \defgroup notifid Notification Id (NotifId)
+ * \brief NotifId description and handling.
+ *@{
+ */
+
 /** Notification handle.
  * Refers to a particular registration for receiving notifications.
  */
 typedef void *edg_wll_NotifId;
 
-/** Parse and unparse the Id. */
-int edg_wll_NotifIdParse(const char *,edg_wll_NotifId *);
-char* edg_wll_NotifIdUnparse(const edg_wll_NotifId);
+/**
+ * Create a Job ID.
+ * \param[in] server           notification server hostname
+ * \param[in] port             port of the notification server
+ * \param[out] notifid         newly created NotifId
+ * \retval 0 for success
+ * \retval EINVAL invalid notification server
+ * \retval ENOMEM if memory allocation fails
+ */
+int edg_wll_NotifIdCreate(const char *server, int port ,edg_wll_NotifId *notifid);
+
+/**
+ * Free the NotifId structure
+ * \param[in] notifid          for dealocation
+ */
+void edg_wll_NotifIdFree(edg_wll_NotifId notifid);
+
+/** Parse the NotifId string and creates NotifId structure
+ * \param[in] notifidstr       string representation of NotifId
+ * \param[out] notifid         parsed NotifId
+ * \retval 0 for success
+ * \retval EINVAL notifidstr can't be parsed
+ * \retval ENOMEM if memory allocation fails
+ */
+int edg_wll_NotifIdParse(const char *notifidstr, edg_wll_NotifId *notifid);
+
+/** Unparse the NotifId (produce the string form of NotifId).
+ * \param[in] notifid          NotifId to be converted to string
+ * \return allocated string which represents the NotifId
+ */
+char* edg_wll_NotifIdUnparse(const edg_wll_NotifId notifid);
+
+/**
+ * Extract notification server address (address:port)
+ * \param[in] notifid          NotifId from which the address should be extracted
+ * \param[in,out] srvName      pointer where to return server name
+ * \param[in,out] srvPort      pointer where to return server port
+ */
+void edg_wll_NotifIdGetServerParts(const edg_wll_NotifId notifid, char **srvName, unsigned int *srvPort);
 
-int edg_wll_NotifIdCreate(const char *,int,edg_wll_NotifId *);
-void edg_wll_NotifIdFree(edg_wll_NotifId);
+/**
+ * Extract unique string 
+ * \param[in] notifid  NotifId 
+ * \retval pointer to allocated unique string representing jobid
+ * \retval NULL if jobid is 0 or memory allocation fails
+ */ 
+char *edg_wll_NotifIdGetUnique(const edg_wll_NotifId notifid);
 
-void edg_wll_NotifIdGetServerParts(const edg_wll_NotifId, char **, unsigned int *);
-char *edg_wll_NotifIdGetUnique(const edg_wll_NotifId);
-int edg_wll_NotifIdSetUnique(edg_wll_NotifId *, const char *);
+/**
+ * Recreate a NotifId by a new unique string
+ * \param[in] unique   string which represent created notifid (if NULL then new
+ * one is created)
+ * \param[in,out] notifid       newly created NotifId 
+ * \retval 0 success
+ * \retval EINVAL invalid NotifId
+ * \retval ENOMEM if memory allocation fails
+ */
+int edg_wll_NotifIdSetUnique(edg_wll_NotifId *notifid, const char *unique);
+
+/*
+ *@} end of group
+ */
 
 #ifdef __cplusplus
 }
index 188f25c..9217dda 100644 (file)
@@ -2,7 +2,7 @@
 #define __EDG_WORKLOAD_LOGGING_CLIENT_PRODUCER_H__
 
 /**
- * \file edg/workload/logging/client/producer.h
+ * \file producer.h
  * \brief client API for storing data into L&B service
  */
 
@@ -93,7 +93,7 @@ for my $t (sort { $event->{order}->{$a} <=> $event->{order}->{$b} }
        my $a = "(edg_wll_Context context";
        my $b = "(context,EDG_WLL_EVENT_$tu,EDG_WLL_FORMAT_$tu";
        my $doc = qq{
- * \\param context\tcontext to work with,
+ * \\param[in,out] context\tcontext to work with,
 };
        selectType $event $t;
        for ($event->getFieldsOrdered) {
@@ -110,7 +110,7 @@ for my $t (sort { $event->{order}->{$a} <=> $event->{order}->{$b} }
                my $fc = $f->getComment;
                $a = $a . ", $ft $fn";
                $b = $b . ", $fn";
-               $doc = $doc . " * \\param $fn\t$fc\n";
+               $doc = $doc . " * \\param[in] $fn\t$fc\n";
        }
        $a = $a . ")";
        $b = $b . ")";
@@ -121,7 +121,7 @@ for my $t (sort { $event->{order}->{$a} <=> $event->{order}->{$b} }
  */
 };
        gen "\nextern int edg_wll_Log${t}$a;\n";
-       gen "\nextern int edg_wll_Log${t}Proxy$a;\n";
+#      gen "\nextern int edg_wll_Log${t}Proxy$a;\n";
 #      gen qq{
 #int edg_wll_Log$t$a
 #\{
@@ -150,7 +150,8 @@ for my $t (sort { $event->{order}->{$a} <=> $event->{order}->{$b} }
                                my $e = $doc;
                                $c =~ s/, $ftreg $fn//g;
                                $d =~ s/$fn/"$code"/g;
-                               $e =~ s/ \* \\param $fn\t$fc\n//g;
+# FIXME: this documentation line in $e doesn't delete!!
+                               $e =~ s/ \* \\param\[in\] $fn\t$fc\n//g;
                                gen qq{
 /**
  * \\fn int edg_wll_Log$t$code$c; 
@@ -158,7 +159,7 @@ for my $t (sort { $event->{order}->{$a} <=> $event->{order}->{$b} }
  */
 };
                                gen "\nextern int edg_wll_Log$t${code}$c;\n";
-                               gen "\nextern int edg_wll_Log$t${code}Proxy$c;\n";
+#                              gen "\nextern int edg_wll_Log$t${code}Proxy$c;\n";
 #                              gen qq{
 #int edg_wll_Log$t$code$c
 #\{
@@ -175,10 +176,10 @@ for my $t (sort { $event->{order}->{$a} <=> $event->{order}->{$b} }
 /**
  * Formats a logging message and sends it asynchronously to local-logger
  * \brief generic asynchronous logging function
- * \param context      INOUT context to work with,
- * \param event                IN type of the event,
- * \param fmt          IN printf()-like format string,
- * \param ...          IN event specific values/data according to fmt,
+ * \param[in,out] context      context to work with,
+ * \param[in] event            type of the event,
+ * \param[in] fmt              printf()-like format string,
+ * \param[in] ...              event specific values/data according to fmt,
  * \retval 0           successful completition,
  * \retval EINVAL      bad jobId, unknown event code, or the format string together with the remaining arguments does not form a valid event,
  * \retval ENOSPC      L&B infrastructure failed to accept the event due to lack of disk space etc.,
@@ -195,10 +196,10 @@ extern int edg_wll_LogEvent(
 /**
  * Formats a logging message and sends it synchronously to local-logger
  * \brief generic synchronous logging function
- * \param context      INOUT context to work with,
- * \param event                IN type of the event,
- * \param fmt          IN printf()-like format string,
- * \param ...          IN event specific values/data according to fmt,
+ * \param[in,out] context      context to work with,
+ * \param[in] event            type of the event,
+ * \param[in] fmt              printf()-like format string,
+ * \param[in] ...              event specific values/data according to fmt,
  * \retval 0           successful completition,
  * \retval EINVAL      bad jobId, unknown event code, or the format string together with the remaining arguments does not form a valid event,
  * \retval ENOSPC      L&B infrastructure failed to accept the event due to lack of disk space etc.,
@@ -215,32 +216,12 @@ extern int edg_wll_LogEventSync(
        char *fmt, ...);
 
 /**
- * Formats a logging message and sends it synchronously to L&B Proxy
- * \brief generic synchronous logging function
- * \param context       INOUT context to work with,
- * \param event         IN type of the event,
- * \param fmt           IN printf()-like format string,
- * \param ...           IN event specific values/data according to fmt,
- * \retval 0            successful completition,
- * \retval EINVAL       bad jobId, unknown event code, or the format string together with the remaining arguments does not form a valid event,             
- * \retval ENOSPC       L&B infrastructure failed to accept the event due to lack of disk space etc.,
- * \retval ENOMEM       failed to allocate memory,
- * \retval ECONNREFUSED cannot connect to the specified L&B Proxy
- * \retval EAGAIN       non blocking return from the call, the event may or may not get logged,
- * \retval EDG_WLL_ERROR_NOJOBID logging call attempted without assigning jobId to the context.
- */             
-extern int edg_wll_LogEventProxy(
-        edg_wll_Context context, 
-        edg_wll_EventCode event,
-        char *fmt, ...);        
-
-/**
  * Instructs interlogger to to deliver all pending events related to current job
  * \brief flush events from interlogger
  * \note sort of status query more than a command
- * \param context      INOUT context to work with,
- * \param timeout      INOUT wait at most this much time for completition, remaining time on return,
- * \retval 0           successful completition,
+ * \param[in,out] context      context to work with,
+ * \param[in,out] timeout      wait at most this much time for completition, remaining time on return,
+ * \retval 0 successful completition,
  * \retval EDG_WLL_ERROR_INTERLOG_TIMEOUT the inter-logger did not respond within the timeout,
  * \retval EDG_WLL_ERROR_INTERLOG_CONLOST inter-logger lost connection to one or more servers,
  * \retval EDG_WLL_ERROR_INTERLOG_AGAIN   not all pending events were delivered within the timeout.
@@ -263,10 +244,10 @@ extern int edg_wll_LogFlushAll(
 /**
  * Set a current job for given context.
  * \note Should be called before any logging call.
- * \param context INOUT context to work with
- * \param job IN further logging calls are related to this job
- * \param code IN sequence code as obtained from previous component
- * \param flags IN flags on code handling (\see API documentation)
+ * \param[in,out] context      context to work with
+ * \param[in] job              further logging calls are related to this job
+ * \param[in] code             sequence code as obtained from previous component
+ * \param[in] flags            flags on code handling (\see API documentation)
  */
 extern int edg_wll_SetLoggingJob(
        edg_wll_Context context,
@@ -276,24 +257,6 @@ extern int edg_wll_SetLoggingJob(
 );
 
 /**
- * Set a current job for given context.
- * \note Should be called before any logging call.
- * \param context INOUT context to work with
- * \param job IN further logging calls are related to this job
- * \param code IN sequence code as obtained from previous component
- * \param user IN user credentials
- * \param flags IN flags on code handling (\see API documentation)
- */
-extern int edg_wll_SetLoggingJobProxy(
-       edg_wll_Context context,
-       const edg_wlc_JobId     job,
-       const char *            code,
-       const char *            user,
-       int                     flags
-);
-
-
-/**
  * Register job with L&B service.
  * Done via logging REGJOB event, may generate subjob id's and create
  * the parent-children associations.
@@ -302,13 +265,15 @@ extern int edg_wll_SetLoggingJobProxy(
  * Partitionable jobs should set num_subjobs=0 initially,
  * and re-register when number of subjobs becomes known.
  *
- * \param type IN EDG_WLL_JOB_SIMPLE,  EDG_WLL_JOB_DAG, or EDG_WLL_JOB_PARTITIONABLE
- * \param jdl IN user-specified JDL
- * \param ns IN network server contact
- * \param num_subjobs IN number of subjobs to create
- * \param seed IN seed used for subjob id's generator.
+ * \param[in,out] context      context to work with
+ * \param[in] job              jobId
+ * \param[in] type             EDG_WLL_JOB_SIMPLE,  EDG_WLL_JOB_DAG, or EDG_WLL_JOB_PARTITIONABLE
+ * \param[in] jdl              user-specified JDL
+ * \param[in] ns               network server contact
+ * \param[in] num_subjobs      number of subjobs to create
+ * \param[in] seed             seed used for subjob id's generator.
  *     Use non-NULL value to be able to regenerate the set of jobid's
- * \param subjobs OUT returned subjob id's
+ * \param[out] subjobs                 returned subjob id's
  */
 
 /* backward compatibility */
@@ -341,43 +306,14 @@ extern int edg_wll_RegisterJobSync(
 );
 
 /**
- * Register job with L&B Proxy service.
- * Done via logging REGJOB event, may generate subjob id's and create
- * the parent-children associations.
- * Set the job as current for the context and initialize sequence code.
- *
- * Partitionable jobs should set num_subjobs=0 initially,
- * and re-register when number of subjobs becomes known.
- *
- * \param type IN EDG_WLL_JOB_SIMPLE,  EDG_WLL_JOB_DAG, or EDG_WLL_JOB_PARTITIONABLE
- * \param user IN user credentials
- * \param jdl IN user-specified JDL
- * \param ns IN network server contact
- * \param num_subjobs IN number of subjobs to create
- * \param seed IN seed used for subjob id's generator.
- *      Use non-NULL value to be able to regenerate the set of jobid's
- * \param subjobs OUT returned subjob id's
- */
-
-extern int edg_wll_RegisterJobProxy(
-       edg_wll_Context         context,
-       const edg_wlc_JobId     job,
-       enum edg_wll_RegJobJobtype      type,
-       const char *            user,
-       const char *            jdl,
-       const char *            ns,
-       int                     num_subjobs,
-       const char *            seed,
-       edg_wlc_JobId **        subjobs
-);
-
-
-/**
  * Register subjobs in a batch.
  * Mainly used to provide JDL's of individual subjobs in a more efficient
  * way than logging them one by one.
- * \param jdls array of JDL's
- * \param subjobs      array of jobid's in the same order
+ * \param[in,out] context      context to work with
+ * \param[in] parent           parent's jobId
+ * \param[in] jdls             array of JDL's
+ * \param[in] ns               network server contact
+ * \param[out] subjobs                 array of jobid's in the same order
  */
 
 extern int edg_wll_RegisterSubjobs(
@@ -427,13 +363,15 @@ enum edg_wll_UserIdType {
 
 /**
  * Change ACL for given job.
- * \param specification of user's credential
- * \param user_id_type type of user_id,
+ * \param[in,out] context      context to work with
+ * \param[in] job              jobId
+ * \param[in] user_id          specification of user's credential
+ * \param[in] user_id_type     type of user_id,
  *    for EDG_WLL_USER_SUBJECT the user_id parameter is expected to be user's subject name
  *    for EDG_WLL_USER_VOMS_GROUP the user_id is expected to be of the form VO:group specifying required group membersip as managed by VOMS
- * \param permission ACL permission to change
- * \param permission_type type of given permission (allow or deny operation) 
- * \param operation operation to perform with ACL (add or remove record)
+ * \param[in] permission       ACL permission to change
+ * \param[in] permission_type  type of given permission (allow or deny operation) 
+ * \param[in] operation        operation to perform with ACL (add or remove record)
  */
  
 extern int edg_wll_ChangeACL(
index aceab86..f2444de 100644 (file)
@@ -8,14 +8,14 @@ extern "C" {
 #endif
 
 /** Count the number of jobs which entered the specified state.
- * \param group IN: group of jobs of interest, eg. DESTINATION = something
+ * \param[in] group            group of jobs of interest, eg. DESTINATION = something
  *             (XXX: this is the only query supported right now)
- * \param major IN: major code of the state of interest
- * \param minor IN: minor state code, eg. DONE_FAILED
- * \param from,to INOUT: on input - requested interval of interest
+ * \param[in] major            major code of the state of interest
+ * \param[in] minor            minor state code, eg. DONE_FAILED
+ * \param[in,out] from,to      on input - requested interval of interest
  *     on output - when the data were available
- * \param rate OUT: average rate per second in which the jobs enter this state
- * \param res_from, res_to: time resolution of the data (seconds)
+ * \param[out] rate            average rate per second in which the jobs enter this state
+ * \param[out] res_from,res_to time resolution of the data (seconds)
  */
 
 int edg_wll_StateRate(
diff --git a/org.glite.lb.client-interface/project/build.number b/org.glite.lb.client-interface/project/build.number
new file mode 100644 (file)
index 0000000..92b4442
--- /dev/null
@@ -0,0 +1,2 @@
+#Sun Apr 03 06:43:39 CEST 2005
+module.build=223
index f894934..ed47b08 100644 (file)
 
        Revision history:
        $Log$
+       Revision 1.2.2.5  2005/02/25 13:39:29  mmulac
+       remove duplicate notifid in configure.properties.xml
+       
+       Revision 1.2.2.4  2005/02/25 13:37:11  mmulac
+       add notifid to doxygen
+       see -> ref
+       
+       Revision 1.2.2.3  2005/02/25 12:03:11  jpospi
+       Added PDF options to doxygen conf.
+       
+       Revision 1.2.2.2  2005/02/25 09:37:52  mmulac
+       generate doxygen doc for notification.h
+       
+       Revision 1.2.2.1  2005/02/18 14:00:16  jpospi
+       - Removed all L&B Proxy related things
+       - Documentation update
+       
+       Revision 1.2  2004/12/08 13:04:29  jpospi
+       first attemtp to generate documentation using doxygen
+       
        Revision 1.1  2004/07/06 17:47:31  flammer
        Update of classpath definitions, targets & configure file.
        
@@ -55,17 +75,26 @@ PREFIX=${install.dir}
 version=${module.version}
                        </echo>
                        <echo file="${module.build.dir}/C.dox">
-PROJECT_NAME           = "Glite LB Client: C - Interface"
-PROJECT_NUMBER         = ${module.version}
-OUTPUT_DIRECTORY       = ${component.dir}/doc/C
-OPTIMIZE_OUTPUT_FOR_C  = YES
-INPUT                  = ./events.h \
-                         ./jobstat.h \
-                         ./producer.h \
-                         ../interface/context.h \
-                         ../interface/consumer.h 
-#HAVE_DOT               = YES
-#CALL_GRAPH             = YES
+PROJECT_NAME          = "Glite LB Client: C - Interface"
+PROJECT_NUMBER        = ${module.version}
+OUTPUT_DIRECTORY      = ${component.dir}/doc/C
+OPTIMIZE_OUTPUT_FOR_C = YES
+INPUT                 = ./events.h \
+                        ./jobstat.h \
+                        ./producer.h \
+                        ../interface/context.h \
+                        ../interface/notifid.h \
+                        ../interface/notification.h \
+                        ../interface/consumer.h 
+SHOW_DIRECTORIES       = NO
+FULL_PATH_NAMES        = NO
+EXTRACT_ALL            = YES
+PDF_HYPERLINKS         = YES
+USE_PDFLATEX           = YES
+MACRO_EXPANSION        = YES
+EXPAND_ONLY_PREDEF     = YES
+PREDEFINED             = _EDG_WLL_EVENT_COMMON 
+HAVE_DOT               = NO
                        </echo>
                        <echo file="${module.build.dir}/CPP.dox">
 PROJECT_NAME           = "Glite LB Client: CPP - Interface"
@@ -78,6 +107,11 @@ INPUT                  = ../build/Event.h \
                          ../interface/LoggingExceptions.h \
                          ../interface/ServerConnection.h \
                          ../interface/Notification.h
+SHOW_DIRECTORIES       = NO
+FULL_PATH_NAMES        = NO
+EXTRACT_ALL            = YES
+PDF_HYPERLINKS         = YES
+USE_PDFLATEX           = YES
 #HAVE_DOT               = YES
 #CALL_GRAPH             = YES
                        </echo>
index ae31ae1..54d6b19 100644 (file)
@@ -1,4 +1,4 @@
-#Fri Dec 10 13:18:21 CET 2004
-module.version=0.3.1
-module.build=113
-module.age=2
+
+module.version = 1.0.2
+module.age = 1
+                               
index 3fde357..66c21ac 100644 (file)
@@ -135,7 +135,7 @@ PLUSLIB:=libglite_lb_clientpp_${nothrflavour}.la
 THRPLUSLIB:=libglite_lb_clientpp_${thrflavour}.la
 
 TOOLS:=dump load purge
-EXAMPLES:=log_usertag_proxy job_log job_reg feed_shark notify query_ext query_seq_code stats
+EXAMPLES:=job_log job_reg feed_shark notify query_ext query_seq_code stats abort_job change_acl job_status
 FAKE_EXAMPLES:=job_log_fake
 
 version_info=-version-info `echo ${version} | cut -d. -f1,2 | tr . :`
@@ -245,15 +245,20 @@ distbin:
        
 install:
        mkdir -p ${PREFIX}/bin
+       mkdir -p ${PREFIX}/sbin
        mkdir -p ${PREFIX}/lib
        mkdir -p ${PREFIX}/share/doc/${package}-${version}
        ${INSTALL} -m 644 ${LIB} ${THRLIB} ${PLUSLIB} ${THRPLUSLIB} ${PREFIX}/lib
        ${INSTALL} -m 644 ${top_srcdir}/LICENSE ${PREFIX}/share/doc/${package}-${version}
+       ${INSTALL} -m 644 ${top_srcdir}/doc/README-fake ${top_srcdir}/doc/README-notify ${PREFIX}/share/doc/${package}-${version}
        mkdir -p ${PREFIX}/examples
-       for p in ${TOOLS} logevent; do \
+       for p in ${TOOLS}; do \
+               ${INSTALL} -m 755 "$$p" "${PREFIX}/sbin/glite-lb-$$p"; \
+       done
+       for p in logevent; do \
                ${INSTALL} -m 755 "$$p" "${PREFIX}/bin/glite-lb-$$p"; \
        done
-       for p in ${TOOLS} logevent ${EXAMPLES} ${sh_PROGS}; do \
+       for p in ${EXAMPLES} ${sh_PROGS}; do \
                ${INSTALL} -m 755 "$$p" "${PREFIX}/examples/glite-lb-$$p"; \
        done
 
index df3de71..f73d998 100755 (executable)
@@ -20,6 +20,9 @@
 
        Revision history:
        $Log$
+       Revision 1.5  2004/10/18 19:16:09  zsalvet
+       RPM descriptions
+       
        Revision 1.4  2004/07/28 12:18:12  dimeglio
        Changed default target from compile to dist
        
@@ -87,6 +90,7 @@
                 Load version file 
             ========================================= -->
        <property file="${module.version.file}"/>
+               <property file="${module.build.file}"/>
                
        <!-- ==============================================
                 Local private targets
diff --git a/org.glite.lb.client/doc/README-acl b/org.glite.lb.client/doc/README-acl
new file mode 100644 (file)
index 0000000..44ea9dc
--- /dev/null
@@ -0,0 +1,66 @@
+By default, information about a job stored in the LB server is only available
+to the user who submitted the job, i.e. the job owner. When requesting any
+information about a job from the LB server, the users must authenticate
+properly using their PKI certificates so the LB server can verify that they are
+allowed to access this information (i.e. they submitted the job in question).
+
+Besides this default functionality, the LB server also allows the job owner to
+share job information with another users. Each job can be assigned an access
+control list (ACL) that specifies another users who are also allowed to access
+the job information. The management of ACL's is entirely under control of the
+job owner so she can modify the ACL arbitrarily, specifying the set of users
+who have access to the job information. The users in the ACL's can be specified
+using either the subject names from their X.509 certificates or names of VOMS
+groups.
+
+Current ACL for a job is returned as part of the job status information
+returned by the job_status command. The commands output ACL's in the original
+XML format as specified by GACL/GridSite. 
+
+Example of an ACL:
+<?xml version="1.0"?><gacl version="0.0.1">
+  <entry>
+    <voms-cred><vo>VOCE</vo><group>/VOCE</group></voms-cred>
+    <allow><read/></allow>
+  </entry>
+  <entry>
+    <person><dn>/O=CESNET/O=Masaryk University/CN=Daniel Kouril</dn></person>
+    <deny><read/></deny>
+  </entry>
+</gacl>
+
+this ACL allows all people in the VOMS /VOCE in the VO VOCE, but deny access to
+user Daniel Kouril (even if he was a member of the /VOCE group).
+
+The job owner herself is not specified in the ACL as she is always allowed to
+access the information regardles the content of the job ACL.
+
+An ACL for a job can be changed using the change_acl command-line program
+provided in the example subdirectory. In order to use change_acl, the LB
+daemons locallogger and interlogger must be running. The usage of the command
+is as follows:
+
+change_acl [-r] [-g] [-d] jobid user_id
+
+  jobid                specifies the job to change 
+  user_id      specifies the user to use, it can be either an X.500 name
+               (subject name) or a VOMS group (if the -g option is specified).
+
+  -r   Remove user/group from the ACL.
+  -g   If this option is given, the user_id is handled as a VOMS group. It
+       must of the form VO:group, where VO is name of the VO (as printed out
+       by voms-proxy-info in the VO: field) and group is name of the group.
+  -d   The user specified by the user_id parameter will be denied to access
+       information about job.
+
+Examples (resulting in the ACL above):
+  change_acl -g https://scientific.civ.zcu.cz:9000/PC8Y6jBitHt_fKMTEKFnVw VOCE:/VOCE
+  change_acl -d https://scientific.civ.zcu.cz:9000/PC8Y6jBitHt_fKMTEKFnVw '/O=CESNET/O=Masaryk University/CN=Daniel Kouril'
+
+LB server configuration
+In order to support the VOMS groups in the ACL's, glite_lb_bkserverd must be
+able to verify client's VOMS proxy certificate using a trusted VOMS service
+certificate stored on a local disk. Default directory with trusted VOMS
+certificates is /etc/grid-security/vomsdir, another location can be
+specified using by either the -V option to glite_lb_bkserverd or setting the
+VOMS_CERT_DIR environment variable.
index 5a751ba..8d275b9 100644 (file)
@@ -23,11 +23,9 @@ List of implemented functions:
      edg_wll_Log*     (functions for logging all event types)
      edg_wll_LogEvent
      edg_wll_LogEventSync
-     edg_wll_LogEventProxy
      edg_wll_LogFlush
      edg_wll_LogFlushAll
      edg_wll_SetLoggingJob
-     edg_wll_SetLoggingJobProxy
      edg_wll_RegisterJobSync
      edg_wll_RegisterJob
      edg_wll_RegisterSubjob
@@ -94,7 +92,6 @@ List of the callbacks and registering functions:
        typedef int (edg_wll_Logging_cb_f)(edg_wll_Context context);
 
        int edg_wll_RegisterTestLogging(edg_wll_Logging_cb_f *cb);
-       int edg_wll_RegisterTestLoggingProxy(edg_wll_Logging_cb_f *cb);
 
 
 It possible to unregister registered callbacks using following functions:
@@ -102,7 +99,6 @@ It possible to unregister registered callbacks using following functions:
        void edg_wll_UnregisterTestQueryEvents();
        void edg_wll_UnregisterTestQueryListener();
        void edg_wll_UnregisterTestLogging();
-       void edg_wll_UnregisterTestLoggingProxy();
 
 
 Library name is libglite_lb_client_fake_gcc32dbg[pthr].so. It is built
diff --git a/org.glite.lb.client/doc/README-notify b/org.glite.lb.client/doc/README-notify
new file mode 100644 (file)
index 0000000..c7feb9e
--- /dev/null
@@ -0,0 +1,72 @@
+LB notifications
+----------------
+
+LB infrastructure enables its users to be notified when something interesting happens on a bookkeeping server.
+
+User registers to infrastructure via client API (notification.h) or he/she can use example program glite-lb-notify (see bellow). He/she  must specify a condition under which the notification is sent. The condition(s) is(are) stored in edg_wll_QueryRec data structure. Currently one or more JOBID's are required in it and only a single occurence of a specific attribute is allowed among ANDed conditions.
+
+The request for notification is then delivered to a bookkeeping server. Whenever a new event arrives to the bookkeeping server, the notification condition is tested. Always when it is true, the notification is sent to the user. Notifications are incomming until the user cancels notification registration on the server. 
+
+For a notification deliveriy, a special deamon, notification interlogger is used. It stores registrations in files until they are delivered. 
+
+
+
+Notification example
+--------------------
+
+In next steps, you will be instucted how to register for a notification and how to triger this registration on the bookkeeping server in order to receive registration. Our example program 'glite-lb-notify' is used for this purpose. It uses mentioned client API calls to manipulate with registrations. 
+
+
+1) Set up LB environment
+
+       a) Download, compile and install LB module from SCM CVS
+       b) Install it from RPMs
+
+       See instructions at section 'Installation & Configuration'
+       from EGEE JRA1 web site. It was located at (Jan 2005) :
+
+       http://egee-jra1-wm.mi.infn.it/egee-jra1-wm/lb_install.shtml 
+
+
+2) Get globus proxy certificate
+       ./grid-proxy-init -key PATH_TO_YOUR_KEY -cert PATH_TO_YOUR_CERT
+
+
+3) Start LB deamons
+
+       Substitute KEY with location server private key, CERT with location 
+       of server certificate, and CERTS_DIR directory containing CA 
+       certificates. 
+
+       ./glite-lb-logd -k KEY -c CERT  -C CERTS_DIR -d -v
+
+       ./glite-lb-interlogd -k KEY -c CERT -C CERTS_DIR -b -d -v
+
+       ./glite-lb-bkserverd -d -k KEY -c CERT -C CERTS_DIR
+
+       ./glite-lb-notif-interlogd -k KEY -c CERT -C CERTS_DIR -d -v 
+
+
+4) Register a job
+       export EDG_WL_LOG_DESTINATION=HOSTNAME:9002 
+       ./glite-lb-job_reg -m HOSTNAME:9000 -s UserInterface
+
+       -> returns JOBID - used in the next steps
+
+
+5) Register notification
+       export EDG_WL_NOTIF_SERVER=HOSTNAME:9000
+       ./glite-lb-notify test JOBID
+
+
+6) Change status of your job
+       export EDG_WL_LOG_DESTINATION=HOSTNAME:9002
+       ./glite-lb-running.sh -j JOBID
+
+
+7) Watch incomming notifications
+
+
+Warning: Try to destroy all your registrations when you finish, otherwise the system will still try to deliver you your notifications to nonexistent destinations (ports which nobody listens at).
+
+TIP: If you are stucked, try to clean up notif-interlogger's cache files. They are by default stored at /tmp/notif_events*, or wherever you set by -f option. 
diff --git a/org.glite.lb.client/examples/abort_job.c b/org.glite.lb.client/examples/abort_job.c
new file mode 100644 (file)
index 0000000..784e6d5
--- /dev/null
@@ -0,0 +1,128 @@
+#ident "$Header$"
+
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include "glite/lb/events_parse.h"
+#include "glite/lb/consumer.h"
+#include "glite/wmsutils/jobid/cjobid.h"
+
+static void free_events(edg_wll_Event *);
+
+static void help(const char* n)
+{
+    fprintf(stderr,"usage: %s <jobid> <source>\n", n);
+    exit(1);
+}
+
+int main(int argc,char **argv)
+{
+       edg_wll_Context ctx;
+       char            *errt,*errd,*e,a;
+       edg_wll_Event   *events;
+       int             i;
+       edg_wll_QueryRec        jq[2],eq[2];
+       edg_wlc_JobId   job;
+       edg_wll_Source  src;
+
+       if (argc != 3) help(argv[0]);
+
+       puts(
+"*\n"
+"* USE WITH CARE, AT YOUR OWN RISK, UNDER ABNORMAL CONDITIONS ONLY,\n"
+"* AND BE ALWAYS SURE WHAT YOU ARE DOING.\n"
+"* \n"
+"* THIS PROGRAM IS A PERFECT EXAMPLE HOW L&B SEQENCE CODES SHOULD NOT BE USED\n"
+"* IN NORMAL OPERATION.\n"
+"\n"
+"Do you want to proceed?"
+       );
+
+       scanf("%c",&a);
+       if (a != 'y' && a != 'Y') return 1;
+
+       edg_wll_InitContext(&ctx);
+
+       if (edg_wlc_JobIdParse(argv[1],&job)) {
+               fprintf(stderr,"%s: can't parse job ID\n",argv[1]);
+               return 1;
+       }
+
+       if (( src = edg_wll_StringToSource(argv[2])) == EDG_WLL_SOURCE_NONE) {
+               fprintf(stderr,"%s: unknown event source\n",argv[2]);
+               return 1;
+       }
+
+       jq[0].attr = EDG_WLL_QUERY_ATTR_JOBID;
+       jq[0].op = EDG_WLL_QUERY_OP_EQUAL;
+       jq[0].value.j = job;
+       jq[1].attr = EDG_WLL_QUERY_ATTR_UNDEF;
+
+       eq[0].attr = EDG_WLL_QUERY_ATTR_SOURCE;
+       eq[0].op = EDG_WLL_QUERY_OP_EQUAL;
+       eq[0].value.i = src;
+       eq[1].attr = EDG_WLL_QUERY_ATTR_UNDEF;
+
+       if ( edg_wll_QueryEvents(ctx,jq,eq,&events) )
+       {
+               if ( edg_wll_Error(ctx, &errt, &errd) != E2BIG )
+                       goto err;
+
+               fprintf(stderr,"%s: %s (%s)\n",argv[0],errt,errd);
+       }
+
+       for ( i = 0; events[i].type != EDG_WLL_EVENT_UNDEF; i++ );
+
+       e = edg_wll_UnparseEvent(ctx,events+i-1);
+
+       fputs(e,stdout);
+       fputs("\n",stdout);
+
+       if (edg_wll_SetParam(ctx,EDG_WLL_PARAM_SOURCE,src) || 
+               edg_wll_SetLoggingJob(ctx,job,events[i-1].any.seqcode,EDG_WLL_SEQ_NORMAL) ||
+               edg_wll_IncSequenceCode(ctx) || /* necessary to simulate this
+                                               * call in last event logging 
+                                               * _after_ current seq. was used */
+               edg_wll_LogAbort(ctx,"manual abort")) goto err;
+
+
+       free(e);
+       free_events(events);
+
+       edg_wll_FreeContext(ctx); 
+
+       return 0;
+
+err:
+       switch (edg_wll_Error(ctx,&errt,&errd)) {
+               case 0: break;
+               case ENOENT:
+                       puts("No events found");
+                       break;
+               default:
+                       fprintf(stderr,"%s: %s (%s)\n",argv[0],errt,errd);
+                       return 1;
+       }
+
+       edg_wll_FreeContext(ctx); 
+
+       return 0;
+}
+
+static void free_events(edg_wll_Event *events)
+{
+       int     i;
+
+       if (events) {
+               for (i=0; events[i].type != EDG_WLL_EVENT_UNDEF; i++) edg_wll_FreeEvent(&(events[i]));
+               edg_wll_FreeEvent(&(events[i])); /* free last line */
+               free(events);   
+               events = NULL;
+       }
+}
diff --git a/org.glite.lb.client/examples/change_acl.c b/org.glite.lb.client/examples/change_acl.c
new file mode 100644 (file)
index 0000000..eb731cf
--- /dev/null
@@ -0,0 +1,78 @@
+#ident "$Header$"
+
+#include <stdio.h>
+#include <unistd.h>
+
+#include "glite/wmsutils/jobid/cjobid.h"
+#include "glite/lb/producer.h"
+#include "glite/lb/authz.h"
+
+void
+usage(const char *me)
+{
+   fprintf(stderr,"usage: %s [-r] [-d] [-g] jobid user_id\n"
+                 "\t-r \tRemove\n"
+                 "\t-d \tOperation is considered as `allow' by default, if -d is given 'deny' will be used\n"
+                 "\t-g \tuser_id is treated as DN by default, if -g is given user_id is expectedto be of form VO:group\n",
+
+          me);
+}
+
+int
+main(int argc, char *argv[])
+{
+   edg_wll_Context ctx;
+   int operation = EDG_WLL_ACL_ADD;
+   int permission = EDG_WLL_PERM_READ;
+   int permission_type = EDG_WLL_PERM_ALLOW;
+   int user_id_type = EDG_WLL_USER_SUBJECT;
+   edg_wlc_JobId jobid;
+   int opt;
+   int ret;
+
+   if (argc < 3) {
+      usage(argv[0]);
+      return 1;
+   }
+
+   while ((opt=getopt(argc, argv, "rdg")) != -1)
+      switch(opt) {
+        case 'r': operation = EDG_WLL_ACL_REMOVE; break;
+        case 'd': permission_type = EDG_WLL_PERM_DENY; break;
+        case 'g': user_id_type = EDG_WLL_USER_VOMS_GROUP; break;
+        default:
+                  usage(argv[0]);
+                  return 1;
+                  break;
+      }
+
+   edg_wll_InitContext(&ctx);
+
+   if (edg_wlc_JobIdParse(argv[optind], &jobid)) {
+      fprintf(stderr,"can't parse job ID\n");
+         goto err;
+   }
+
+   edg_wll_SetParam(ctx, EDG_WLL_PARAM_SOURCE, EDG_WLL_SOURCE_USER_INTERFACE);
+
+   ret = edg_wll_ChangeACL(ctx,
+                       jobid,
+                       argv[optind+1], user_id_type,
+                       permission, permission_type,
+                       operation);
+
+   if (ret) {
+      char    *et, *ed;
+      edg_wll_Error(ctx, &et, &ed);
+      fprintf(stderr, "%s: edg_wll_LogChangeACL() failed: %s (%s)\n",
+             argv[0], et, ed);
+         goto err;
+   }
+
+   edg_wll_FreeContext(ctx);
+   return 0;
+
+err:
+   edg_wll_FreeContext(ctx);
+   return 1;
+}
diff --git a/org.glite.lb.client/examples/job_status.c b/org.glite.lb.client/examples/job_status.c
new file mode 100644 (file)
index 0000000..3d64ba3
--- /dev/null
@@ -0,0 +1,231 @@
+#ident "$Header$"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <time.h>
+
+#include <expat.h>
+
+#include "glite/lb/consumer.h"
+#include "glite/lb/xml_conversions.h"
+
+static void dgerr(edg_wll_Context,char *);
+static void printstat(edg_wll_JobStat,int);
+
+#define MAX_SERVERS    20
+
+static char    *myname;
+
+
+int main(int argc,char *argv[])
+{
+       edg_wll_Context ctx, sctx[MAX_SERVERS];
+       int             i, result=0, nsrv=0;
+       char            *servers[MAX_SERVERS];
+       char            *errstr = NULL;
+
+       
+       myname = argv[0];
+       printf("\n");
+
+       if (argc < 2 || strcmp(argv[1],"--help") == 0) {
+               fprintf(stderr,"Usage: %s job_id [job_id [...]]\n",argv[0]);
+               fprintf(stderr,"       %s -all\n",argv[0]);
+                return 1;
+        }
+        else if (argc >= 2 && strcmp(argv[1],"-all") == 0) {
+               edg_wll_JobStat         *statesOut;
+               edg_wlc_JobId           *jobsOut;
+               edg_wll_QueryRec        jc[2];
+
+               jobsOut = NULL;
+               statesOut = NULL;
+/* init context */
+               if (edg_wll_InitContext(&ctx)) {
+                       fprintf(stderr,"%s: cannot initialize edg_wll_Context\n",myname);
+                       exit(1);
+               }
+/* retrieve job ID's */
+               memset(jc,0,sizeof jc);
+
+               jc[0].attr = EDG_WLL_QUERY_ATTR_OWNER;
+               jc[0].op = EDG_WLL_QUERY_OP_EQUAL;
+               jc[0].value.c = NULL;   /* is NULL, peerName filled in on server side */
+               jc[1].attr = EDG_WLL_QUERY_ATTR_UNDEF;
+
+               //if (edg_wll_QueryJobs(ctx,jc,EDG_WLL_STAT_CLASSADS | EDG_WLL_STAT_CHILDREN |  EDG_WLL_STAT_CHILDSTAT,
+               result = edg_wll_QueryJobs(ctx,jc,0,&jobsOut, &statesOut);
+               if (result == E2BIG) {
+                       int r;
+                       edg_wll_Error(ctx, NULL, &errstr);
+                       if (edg_wll_GetParam(ctx, EDG_WLL_PARAM_QUERY_RESULTS, &r)) {
+                               dgerr(ctx,"edg_wll_GetParam(EDG_WLL_PARAM_QUERY_RESULTS)");
+                               free(errstr);
+                               result=1; goto cleanup;
+                       }
+                       if (r != EDG_WLL_QUERYRES_LIMITED) goto late_error;
+               } else if (result) {
+                       dgerr(ctx,"edg_wll_QueryJobs");
+                       result=1; goto cleanup;
+               }
+
+/* retrieve and print status of each job */
+               for (i=0; statesOut[i].state; i++) 
+                       printstat(statesOut[i],0);
+
+late_error:    if (result) {
+                       edg_wll_SetError(ctx, result, errstr);
+                       free(errstr);
+                       dgerr(ctx,"edg_wll_QueryJobs");
+                       result=1; 
+               }
+
+cleanup:
+               if (jobsOut)
+               {
+                       for (i=0; jobsOut[i]; i++) edg_wlc_JobIdFree(jobsOut[i]);
+                       free(jobsOut);
+               }
+               if (statesOut)
+               {
+                       for (i=0; statesOut[i].state; i++) edg_wll_FreeStatus(&statesOut[i]);           
+                       free(statesOut);
+               }
+               edg_wll_FreeContext(ctx);
+       } 
+       else {
+           for (i=1; i<argc; i++) {
+               int             j;
+               char            *bserver;
+               edg_wlc_JobId   job;            
+               edg_wll_JobStat status;
+
+               memset(&status,0,sizeof status);
+
+/* parse job ID */
+               if (edg_wlc_JobIdParse(argv[i],&job)) {
+                       fprintf(stderr,"%s: %s: cannot parse jobId\n",
+                               myname,argv[i]);
+                       continue;
+               }
+/* determine bookkeeping server address */
+                bserver = edg_wlc_JobIdGetServer(job);
+                if (!bserver) {
+                        fprintf(stderr,"%s: %s: cannot extract bookkeeping server address\n",
+                                myname,argv[i]);
+                         edg_wlc_JobIdFree(job);
+                        continue;
+                }
+/* use context database */
+                for (j=0; j<nsrv && strcmp(bserver,servers[j]); j++);
+                if (j==nsrv) {
+                        edg_wll_InitContext(&sctx[j]);
+                        nsrv++;
+                        servers[j] = bserver;
+                }
+
+               if (edg_wll_JobStatus(sctx[j], job, EDG_WLL_STAT_CLASSADS | EDG_WLL_STAT_CHILDREN |  EDG_WLL_STAT_CHILDSTAT, &status)) {
+                       dgerr(sctx[j],"edg_wll_JobStatus");
+                       result=1; goto cleanup2;
+               }
+
+/* print job status */
+               printstat(status,0);
+
+cleanup2:      
+               if (job) edg_wlc_JobIdFree(job);
+               if (status.state) edg_wll_FreeStatus(&status);
+           }
+               for (i=0; i<nsrv; i++) edg_wll_FreeContext(sctx[i]);
+       }
+
+       return result;
+}
+
+static void
+dgerr(edg_wll_Context ctx,char *where)
+{
+       char    *etxt,*edsc;
+
+       edg_wll_Error(ctx,&etxt,&edsc);
+       fprintf(stderr,"%s: %s: %s",myname,where,etxt);
+       if (edsc) fprintf(stderr," (%s)",edsc);
+       putc('\n',stderr);
+       free(etxt); free(edsc);
+}
+
+static void printstat(edg_wll_JobStat stat, int level)
+{
+       char            *s, *j, ind[10];
+       int             i;
+
+
+       for (i=0; i < level; i++)
+               ind[i]='\t';
+       ind[i]='\0';
+       
+       s = edg_wll_StatToString(stat.state); 
+/* print whole flat structure */
+       printf("%sstate : %s\n", ind, s);
+       printf("%sjobId : %s\n", ind, j = edg_wlc_JobIdUnparse(stat.jobId));
+       printf("%sowner : %s\n", ind, stat.owner);
+       printf("%sjobtype : %s\n", ind, (stat.jobtype ? "DAG" : "SIMPLE") );
+       printf("%sparent_job : %s\n", ind,
+                       j = edg_wlc_JobIdUnparse(stat.parent_job));
+       if (stat.jobtype) {;
+               printf("%sseed : %s\n", ind, stat.seed);
+               printf("%schildren_num : %d\n", ind, stat.children_num);
+               printf("%schildren :\n", ind);
+               if (stat.children) 
+                       for  (i=0; stat.children[i]; i++) 
+                               printf("%s\tchildren : %s\n", ind, stat.children[i]);
+               printf("%schildren_states :\n", ind);
+               if (stat.children_states)
+                       for  (i=0; stat.children_states[i].state; i++)
+                               printstat(stat.children_states[i], level+1);
+               printf("%schildren_hist :\n",ind);
+               if (stat.children_hist) 
+                       for (i=1; i<=stat.children_hist[0]; i++) 
+                               printf("%s%14s  %d\n", ind, edg_wll_StatToString(i-1),stat.children_hist[i]);
+       }
+       printf("%scondorId : %s\n", ind, stat.condorId);
+       printf("%sglobusId : %s\n", ind, stat.globusId);
+       printf("%slocalId : %s\n", ind, stat.localId);
+       printf("%sjdl : %s\n", ind, stat.jdl);
+       printf("%smatched_jdl : %s\n", ind, stat.matched_jdl);
+       printf("%sdestination : %s\n", ind, stat.destination);
+       printf("%snetwork server : %s\n", ind, stat.network_server);
+       printf("%scondor_jdl : %s\n", ind, stat.condor_jdl);
+       printf("%srsl : %s\n", ind, stat.rsl);
+       printf("%sreason : %s\n", ind, stat.reason);
+       printf("%slocation : %s\n", ind, stat.location);
+       printf("%sce_node : %s\n", ind, stat.ce_node);
+       printf("%ssubjob_failed : %d\n", ind, stat.subjob_failed);
+       printf("%sdone_code : %s\n", ind, edg_wll_done_codeToString(stat.done_code));
+       printf("%sexit_code : %d\n", ind, stat.exit_code);
+       printf("%sresubmitted : %d\n", ind, stat.resubmitted);
+       printf("%scancelling : %d\n", ind, stat.cancelling);
+       printf("%scancelReason : %s\n", ind, stat.cancelReason);
+       printf("%scpuTime : %d\n", ind, stat.cpuTime);
+       printf("%suser_tags :\n",ind);
+       if (stat.user_tags) 
+               for (i=0; stat.user_tags[i].tag; i++) printf("%s%14s = \"%s\"\n", ind, 
+                                                     stat.user_tags[i].tag,stat.user_tags[i].value);
+       printf("%sstateEnterTime : %ld.%06ld\n", ind, stat.stateEnterTime.tv_sec,stat.stateEnterTime.tv_usec);
+       printf("%sstateEnterTimes : \n",ind);
+       if (stat.stateEnterTimes)  
+                for (i=1; i<=stat.stateEnterTimes[0]; i++) 
+                       printf("%s%14s  %s", ind, edg_wll_StatToString(i-1), (stat.stateEnterTimes[i] == 0) ? 
+                       "    - not available -\n" : ctime((time_t *) &stat.stateEnterTimes[i]));
+       printf("%slastUpdateTime : %ld.%06ld\n", ind, stat.lastUpdateTime.tv_sec,stat.lastUpdateTime.tv_usec);
+       printf("%sexpectUpdate : %d\n", ind, stat.expectUpdate);
+       printf("%sexpectFrom : %s\n", ind, stat.expectFrom);
+       printf("%sacl : %s\n", ind, stat.acl);
+       printf("\n");   
+       
+       free(j);
+       free(s);
+}
+
diff --git a/org.glite.lb.client/examples/log_usertag_proxy.c b/org.glite.lb.client/examples/log_usertag_proxy.c
deleted file mode 100644 (file)
index 7891893..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-#include <getopt.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-
-#include <globus_common.h>
-
-#include "glite/wmsutils/jobid/cjobid.h"
-#include "glite/lb/notifid.h"
-#include "glite/lb/producer.h"
-#include "glite/lb/events.h"
-
-
-static struct option opts[] = {
-       {"help",                0,      NULL,   'h'},
-       {"sock",                1,      NULL,   's'},
-       {"jobid",               1,      NULL,   'j'},
-       {"seq",                 1,      NULL,   'c'},
-       {"name",                1,      NULL,   'n'},
-       {"value",               1,      NULL,   'v'}
-};
-
-static void usage(char *me)
-{
-       fprintf(stderr, "usage: %s [option]\n"
-                       "\t-h, --help      Shows this screen.\n"
-                       "\t-s, --server    LB Proxy socket.\n"
-                       "\t-j, --jobid     ID of requested job.\n"
-                       "\t-c, --seq       Sequence code.\n"
-                       "\t-n, --name      Name of the tag.\n"
-                       "\t-v, --value     Value of the tag.\n"
-                       , me);
-}
-
-
-int main(int argc, char *argv[])
-{
-       edg_wll_Context         ctx;
-       edg_wlc_JobId           jobid = NULL;
-       char                       *server, *code, *jobid_s, *name, *value;
-       int                                     opt, err = 0;
-
-
-       server = code = jobid_s = name = value = NULL;
-       while ( (opt = getopt_long(argc, argv, "hs:j:c:n:v:", opts, NULL)) != EOF)
-               switch (opt) {
-               case 'h': usage(name); return 0;
-               case 's': server = strdup(optarg); break;
-               case 'j': jobid_s = strdup(optarg); break;
-               case 'c': code = strdup(optarg); break;
-               case 'n': name = strdup(optarg); break;
-               case 'v': value = strdup(optarg); break;
-               case '?': usage(name); return 1;
-               }
-
-       if ( !jobid_s ) { fprintf(stderr, "JobId not given\n"); return 1; }
-       if ( !code ) { fprintf(stderr, "Sequence code not given\n"); return 1; }
-       if ( !server ) { fprintf(stderr, "LB proxy socket not given\n"); return 1; }
-       if ( !name ) { fprintf(stderr, "Tag name not given\n"); return 1; }
-       if ( !value ) { fprintf(stderr, "Tag value not given\n"); return 1; }
-
-       if ( (errno = edg_wlc_JobIdParse(jobid_s, &jobid)) ) { perror(jobid_s); return 1; }
-
-       if (globus_module_activate(GLOBUS_COMMON_MODULE) != GLOBUS_SUCCESS) {
-               fprintf(stderr, "Cannot initialize Globus common module\n");
-               exit(1);
-       }
-
-       edg_wll_InitContext(&ctx);
-
-       edg_wll_SetParam(ctx, EDG_WLL_PARAM_SOURCE, EDG_WLL_SOURCE_USER_INTERFACE);
-       edg_wll_SetParam(ctx, EDG_WLL_PARAM_LBPROXY_STORE_SOCK, server);
-
-       if (edg_wll_SetLoggingJob(ctx, jobid, code, EDG_WLL_SEQ_NORMAL)) {
-               char    *et,*ed;
-               edg_wll_Error(ctx,&et,&ed);
-               fprintf(stderr,"SetLoggingJob(%s,%s): %s (%s)\n",jobid_s,code,et,ed);
-               exit(1);
-       }
-
-       err = edg_wll_LogEventProxy(ctx,
-                               EDG_WLL_EVENT_USERTAG, EDG_WLL_FORMAT_USERTAG,
-                               name, value);
-
-       if (err) {
-           char        *et,*ed;
-
-           edg_wll_Error(ctx,&et,&ed);
-           fprintf(stderr,"%s: edg_wll_LogEvent*(): %s (%s)\n",
-                   argv[0],et,ed);
-           free(et); free(ed);
-       }
-
-       code = edg_wll_GetSequenceCode(ctx);
-       puts(code);
-       free(code);
-
-       edg_wll_FreeContext(ctx);
-
-       return err;
-}
index 4d2ea58..c02bad4 100644 (file)
@@ -12,7 +12,6 @@
 
 
 static edg_wll_Logging_cb_f *Logging_cb = NULL;
-static edg_wll_Logging_cb_f *LoggingProxy_cb = NULL;
 
 
 /* register the logging callback */
@@ -24,27 +23,12 @@ int edg_wll_RegisterTestLogging(edg_wll_Logging_cb_f *cb) {
 }
 
 
-/* register the proxy logging callback */
-int edg_wll_RegisterTestLoggingProxy(edg_wll_Logging_cb_f *cb) {
-  if (LoggingProxy_cb) return 0;
-
-  LoggingProxy_cb = cb;
-  return 1;
-}
-
-
 /* unregister the logging callback */
 void edg_wll_UnregisterTestLogging() {
   Logging_cb = NULL;
 }
 
 
-/* unregister the proxy logging callback */
-void edg_wll_UnregisterTestLoggingProxy() {
-  LoggingProxy_cb = NULL;
-}
-
-
 /* "fake" implementation of function sending formated UML string */
 int edg_wll_DoLogEvent(edg_wll_Context context, edg_wll_LogLine logLine) {
   if (Logging_cb)
@@ -53,11 +37,3 @@ int edg_wll_DoLogEvent(edg_wll_Context context, edg_wll_LogLine logLine) {
     return edg_wll_Error(context, NULL, NULL);
 }
 
-
-/* "fake" implementation of function sending formated ULM string */
-int edg_wll_DoLogEventProxy(edg_wll_Context context, edg_wll_LogLine logline) {
-  if (Logging_cb)
-    return Logging_cb(context);
-  else
-    return edg_wll_Error(context, NULL, NULL);
-}
diff --git a/org.glite.lb.client/project/build.number b/org.glite.lb.client/project/build.number
new file mode 100644 (file)
index 0000000..b4fe0f0
--- /dev/null
@@ -0,0 +1,2 @@
+#Sun Apr 03 06:49:43 CEST 2005
+module.build=222
index 38685c6..31cc342 100644 (file)
@@ -1,4 +1,4 @@
-#Fri Dec 10 13:24:00 CET 2004
-module.version=0.5.0
-module.build=112
-module.age=2
+
+module.version = 1.0.1
+module.age = 1
+                               
index 319bd0f..ad5eaa1 100644 (file)
@@ -547,36 +547,69 @@ ServerConnection::setQueryJobsLimit(int max) {
 std::pair<std::string, int>
 ServerConnection::getQueryServer() const
 {
-       /* FIXME: not implemented in C API */
-       STACK_ADD;
-       throw Exception(EXCEPTION_MANDATORY, 0, "method not implemented");
+       char *hostname;
+       int  port;
+
+       check_result(edg_wll_GetParam(context, 
+                                     EDG_WLL_PARAM_QUERY_SERVER,
+                                     &hostname),
+                    context,
+                    "getting query server address");
+       check_result(edg_wll_GetParam(context,
+                                     EDG_WLL_PARAM_QUERY_SERVER_PORT,
+                                     &port),
+                    context,
+                    "getting query server port");
+       return std::pair<std::string,int>(std::string(strdup(hostname)), port);
 }
 
 
 int
 ServerConnection::getQueryTimeout() const
 {
-       /* FIXME: not implemented in C API */
-       STACK_ADD;
-       throw Exception(EXCEPTION_MANDATORY, 0, "method not implemented");
+       int timeout;
+
+       check_result(edg_wll_GetParam(context,
+                                     EDG_WLL_PARAM_QUERY_TIMEOUT,
+                                     &timeout),
+                    context,
+                    "getting query timeout");
+       return timeout;
 }
 
 
 std::string
 ServerConnection::getX509Proxy() const
 {
-       /* FIXME: not implemented in C API */
-       STACK_ADD;
-       throw Exception(EXCEPTION_MANDATORY, 0, "method not implemented");
+       char *proxy;
+
+       check_result(edg_wll_GetParam(context,
+                                     EDG_WLL_PARAM_X509_PROXY,
+                                     &proxy),
+                    context,
+                    "getting X509 proxy");
+       return std::string(strdup(proxy));
 }
 
 
 std::pair<std::string, std::string>
 ServerConnection::getX509Cert() const
 {
-       /* FIXME: not implemented in C API */
-       STACK_ADD;
-       throw Exception(EXCEPTION_MANDATORY, 0, "method not implemented");
+       char *cert, *key;
+
+       check_result(edg_wll_GetParam(context,
+                                     EDG_WLL_PARAM_X509_CERT,
+                                     &cert),
+                    context,
+                    "getting X509 cert");
+       check_result(edg_wll_GetParam(context,
+                                     EDG_WLL_PARAM_X509_KEY,
+                                     &key),
+                    context,
+                    "getting X509 key");
+
+       return std::pair<std::string, std::string>(std::string(strdup(cert)),
+                                                  std::string(strdup(key)));
 }
 
 // static
@@ -650,7 +683,7 @@ edg_wll_QueryRec **
 convertQueryVectorExt(const std::vector<std::vector<QueryRecord> > &in)
 {
        unsigned i;
-       edg_wll_QueryRec **out = new (edg_wll_QueryRec*)[in.size() + 1];
+       edg_wll_QueryRec **out = new edg_wll_QueryRec*[in.size() + 1];
 
        if(out == NULL) {
                STACK_ADD;
@@ -1253,7 +1286,7 @@ void ServerConnection::setParam(edg_wll_ContextParam par, int val)
                "edg_wll_SetParamInt()");
 }
 
-void ServerConnection::setParam(edg_wll_ContextParam par, const std::string val)
+void ServerConnection::setParam(edg_wll_ContextParam par, const std::string &val)
 {
        check_result(edg_wll_SetParamString(context,par,val.c_str()),
                context,
index 65133fa..e2badc9 100644 (file)
@@ -76,7 +76,6 @@ int main(int argc, char *argv[])
        edg_wll_Args parray[] = {
            { EDG_WLL_ARGS_EVENT, "e", "event", "select event type (see -e help)", &event },
            { EDG_WLL_ARGS_BOOL, "p", "priority", "send as priority event", &pri },
-           { EDG_WLL_ARGS_STRING, "x", "lbproxy", "send directly to L&B Proxy (not locallogger) with given credentials", &lbproxy },
            { EDG_WLL_ARGS_STRING, "m", "machine", 0, &server },
            { EDG_WLL_ARGS_SOURCE, "s", "source", "event source (see -s help)", &src },
            { EDG_WLL_ARGS_STRING, "i", "source-instance", "event source instance", &src_instance },
@@ -133,7 +132,6 @@ int main(int argc, char *argv[])
 
        /* log the event - priority/normal/proxy */
        logev = (pri) ? edg_wll_LogEventSync : edg_wll_LogEvent;
-       logev = (lbproxy) ? edg_wll_LogEventProxy : logev;
 
         /* if no job given - generate some */
        if (jobid_s == 0) {
@@ -161,22 +159,11 @@ int main(int argc, char *argv[])
        edg_wll_SetParam(ctx, EDG_WLL_PARAM_LEVEL,
                         (deb) ? EDG_WLL_LEVEL_DEBUG : EDG_WLL_LEVEL_SYSTEM);
 
-       if (lbproxy) {
-               edg_wll_SetParam(ctx, EDG_WLL_PARAM_LBPROXY_STORE_SOCK, "/tmp/lb_proxy_store.sock");
-               edg_wll_SetParam(ctx, EDG_WLL_PARAM_LBPROXY_SERVE_SOCK, "/tmp/lb_proxy_serve.sock");
-               if (edg_wll_SetLoggingJobProxy(ctx,jobid,code,lbproxy,EDG_WLL_SEQ_NORMAL)) {
-                       char    *et,*ed;
-                       edg_wll_Error(ctx,&et,&ed);
-                       fprintf(stderr,"SetLoggingJobProxy(%s,%s,%s): %s (%s)\n",jobid_s,code,lbproxy,et,ed);
-                       exit(1);
-               }
-       } else {
-               if (edg_wll_SetLoggingJob(ctx,jobid,code,EDG_WLL_SEQ_NORMAL)) {
-                       char    *et,*ed;
-                       edg_wll_Error(ctx,&et,&ed);
-                       fprintf(stderr,"SetLoggingJob(%s,%s): %s (%s)\n",jobid_s,code,et,ed);
-                       exit(1);
-               }
+       if (edg_wll_SetLoggingJob(ctx,jobid,code,EDG_WLL_SEQ_NORMAL)) {
+               char    *et,*ed;
+               edg_wll_Error(ctx,&et,&ed);
+               fprintf(stderr,"SetLoggingJob(%s,%s): %s (%s)\n",jobid_s,code,et,ed);
+               exit(1);
        }
 
 #ifdef ENABLE_REASON_LENGTH
index b459910..63bcbb4 100644 (file)
@@ -30,7 +30,6 @@ static const char* socket_path="/tmp/lb_proxy_store.sock";
 
 #ifdef FAKE_VERSION
 int edg_wll_DoLogEvent(edg_wll_Context context, edg_wll_LogLine logline);
-int edg_wll_DoLogEventProxy(edg_wll_Context context, edg_wll_LogLine logline);
 #else
 /**
  *----------------------------------------------------------------------
@@ -155,91 +154,6 @@ edg_wll_DoLogEvent_end:
        return edg_wll_Error(context, NULL, NULL);
 }
 
-/**
- *----------------------------------------------------------------------
- * Connects to L&B Proxy and sends already formatted ULM string
- * \brief helper logging function
- * \param context      INOUT context to work with,
- * \param logline      IN formated ULM string
- *----------------------------------------------------------------------
- */
-static int edg_wll_DoLogEventProxy(
-       edg_wll_Context context,
-       edg_wll_LogLine logline)
-{
-       int     answer;
-       struct sockaddr_un saddr;
-       int     flags;
-       edg_wll_PlainConnection conn;
-
-       edg_wll_ResetError(context);
-       answer = 0;
-
-   /* open a connection to the L&B Proxy: */
-
-#ifdef EDG_WLL_LOG_STUB
-       fprintf(stderr,"Logging to L&B Proxy at socket %s\n",
-               context->p_lbproxy_store_sock? context->p_lbproxy_store_sock: socket_path);
-#endif
-       memset(&conn, 0, sizeof(conn));
-       conn.sock = socket(PF_UNIX, SOCK_STREAM, 0);
-       if (conn.sock < 0) {
-               edg_wll_SetError(context,answer = errno,"socket() error");
-               goto edg_wll_DoLogEventProxy_end;
-       }
-       memset(&saddr, 0, sizeof(saddr));
-       saddr.sun_family = AF_UNIX;
-       strcpy(saddr.sun_path, context->p_lbproxy_store_sock?
-                               context->p_lbproxy_store_sock: socket_path);
-       if ((flags = fcntl(conn.sock, F_GETFL, 0)) < 0 || fcntl(conn.sock, F_SETFL, flags | O_NONBLOCK) < 0) {
-               edg_wll_SetError(context,answer = errno,"fcntl()");
-               close(conn.sock);
-               goto edg_wll_DoLogEventProxy_end;
-       }
-       if (connect(conn.sock, (struct sockaddr *)&saddr, sizeof(saddr)) < 0) {
-               if(errno != EISCONN) {
-                       edg_wll_SetError(context,answer = errno,"connect()");
-                       close(conn.sock);
-                       goto edg_wll_DoLogEventProxy_end;
-               }
-       }
-
-
-   /* and send the message to the L&B Proxy: */
-
-       answer = edg_wll_log_proto_client_proxy(context,&conn,logline);
-       
-       edg_wll_plain_close(&conn);
-
-edg_wll_DoLogEventProxy_end:
-
-       switch(answer) {
-               case 0:
-               case EINVAL:
-               case ENOSPC:
-               case ENOMEM:
-               case EDG_WLL_ERROR_GSS:
-               case EDG_WLL_ERROR_DNS:
-               case ENOTCONN:
-               case ECONNREFUSED:
-               case ETIMEDOUT:
-               case EAGAIN:
-                       break;
-               case EDG_WLL_ERROR_PARSE_EVENT_UNDEF:
-               case EDG_WLL_ERROR_PARSE_MSG_INCOMPLETE:
-               case EDG_WLL_ERROR_PARSE_KEY_DUPLICITY:
-               case EDG_WLL_ERROR_PARSE_KEY_MISUSE:
-//             case EDG_WLL_ERROR_PARSE_OK_WITH_EXTRA_FIELDS:
-                       edg_wll_UpdateError(context,EINVAL,"edg_wll_DoLogEventProxy(): Error code mapped to EINVAL");
-                       break;
-
-               default:
-                       edg_wll_UpdateError(context,EAGAIN,"edg_wll_DoLogEventProxy(): Error code mapped to EAGAIN");
-               break;
-       }
-
-       return edg_wll_Error(context, NULL, NULL);
-}
 #endif /* FAKE_VERSION */
 
 
@@ -358,119 +272,6 @@ edg_wll_logeventmaster_end:
 
 /**
  *----------------------------------------------------------------------
- * Formats a logging message and sends it to L&B Proxy
- * \brief master proxy logging event function
- * \param context      INOUT context to work with,
- * \param event                IN type of the event,
- * \param fmt          IN printf()-like format string,
- * \param ...          IN event specific values/data according to fmt.
- *----------------------------------------------------------------------
- */
-static int edg_wll_LogEventMasterProxy(
-       edg_wll_Context context,
-       edg_wll_EventCode event,
-       char *fmt, ...)
-{
-       va_list fmt_args;
-       int     ret,answer;
-       char    *fix,*var,*dguser;
-       char    *source,*eventName,*lvl, *fullid,*seq,*name_esc;
-        struct timeval start_time;
-       char    date[ULM_DATE_STRING_LENGTH+1];
-       edg_wll_LogLine out;
-       size_t  size;
-       int     i;
-
-       i = errno  =  size = 0;
-       seq = fix = var = dguser = out = source = eventName = lvl = fullid = NULL;
-
-       edg_wll_ResetError(context);
-
-   /* default return value is "Try Again" */
-       answer = ret = EAGAIN; 
-
-   /* format the message: */
-       va_start(fmt_args,fmt);
-
-       gettimeofday(&start_time,0);
-       if (edg_wll_ULMTimevalToDate(start_time.tv_sec,start_time.tv_usec,date) != 0) {
-               edg_wll_SetError(context,ret = EINVAL,"edg_wll_LogEventMasterProxy(): edg_wll_ULMTimevalToDate() error"); 
-               goto edg_wll_logeventmasterproxy_end; 
-       }
-       source = edg_wll_SourceToString(context->p_source);
-       lvl = edg_wll_LevelToString(context->p_level);
-       eventName = edg_wll_EventToString(event);
-       if (!eventName) { 
-               edg_wll_SetError(context,ret = EINVAL,"edg_wll_LogEventMasterProxy(): event name not specified"); 
-               goto edg_wll_logeventmasterproxy_end; 
-       }
-       if (!(fullid = edg_wlc_JobIdUnparse(context->p_jobid))) { 
-               edg_wll_SetError(context,ret = EINVAL,"edg_wll_LogEventMasterProxy(): edg_wlc_JobIdUnparse() error"); 
-               goto edg_wll_logeventmasterproxy_end;
-       }
-       seq = edg_wll_GetSequenceCode(context);
-       if (edg_wll_IncSequenceCode(context)) {
-               ret = EINVAL;
-               goto edg_wll_logeventmasterproxy_end;
-       }
-       if (trio_asprintf(&fix,EDG_WLL_FORMAT_COMMON,
-                       date,context->p_host,lvl,1,
-                       source,context->p_instance ? context->p_instance : "",
-                       eventName,fullid,seq) == -1) {
-               edg_wll_SetError(context,ret = ENOMEM,"edg_wll_LogEventMasterProxy(): trio_asprintf() error"); 
-               goto edg_wll_logeventmasterproxy_end; 
-       }
-       if (trio_vasprintf(&var,fmt,fmt_args) == -1) { 
-               edg_wll_SetError(context,ret = ENOMEM,"edg_wll_LogEventMasterProxy(): trio_vasprintf() error"); 
-               goto edg_wll_logeventmasterproxy_end; 
-       }
-        /* format the DG.USER string */
-/* XXX: put user credentials here probably from context */
-        name_esc = edg_wll_LogEscape(context->p_user_lbproxy);
-        if (asprintf(&dguser,"DG.USER=\"%s\" ",name_esc) == -1) {
-               edg_wll_SetError(context,ret = ENOMEM,"edg_wll_LogEventMasterProxy(): asprintf() error"); 
-               goto edg_wll_logeventmasterproxy_end; 
-        }
-       if (asprintf(&out,"%s%s%s\n",dguser,fix,var) == -1) { 
-               edg_wll_SetError(context,ret = ENOMEM,"edg_wll_LogEventMasterProxy(): asprintf() error"); 
-               goto edg_wll_logeventmasterproxy_end; 
-       }
-       size = strlen(out);
-
-       if (size > EDG_WLL_LOG_SYNC_MAXMSGSIZE) {
-               edg_wll_SetError(context,ret = ENOSPC,"edg_wll_LogEventMasterProxy(): Message size too large for synchronous transfer");
-               goto edg_wll_logeventmasterproxy_end;
-       }
-
-#ifdef EDG_WLL_LOG_STUB
-//     fprintf(stderr,"edg_wll_LogEvent (%d chars): %s",size,out);
-#endif
-       
-       context->p_tmp_timeout = context->p_sync_timeout;
-
-   /* and send the message to the L&B Proxy: */
-       ret = edg_wll_DoLogEventProxy(context, out);
-
-edg_wll_logeventmasterproxy_end:
-       va_end(fmt_args);
-       if (seq) free(seq); 
-       if (fix) free(fix); 
-       if (var) free(var); 
-       if (dguser) free(dguser); 
-       if (out) free(out);
-       if (source) free(source);
-       if (lvl) free(lvl);
-       if (eventName) free(eventName);
-       if (fullid) free(fullid);
-       if (name_esc) free(name_esc); 
-
-       if (ret) edg_wll_UpdateError(context,0,"Logging library ERROR: ");
-
-       return edg_wll_Error(context,NULL,NULL);
-}
-
-/**
- *----------------------------------------------------------------------
  * Formats a logging message and sends it asynchronously to local-logger
  * \brief generic asynchronous logging function
  *----------------------------------------------------------------------
@@ -539,41 +340,6 @@ edg_wll_logeventsync_end:
 }
 
 /**
- *----------------------------------------------------------------------
- * Formats a logging message and sends it synchronously to L&B Proxy
- * \brief generic synchronous logging function
- *----------------------------------------------------------------------
- */
-int edg_wll_LogEventProxy(
-        edg_wll_Context context,
-        edg_wll_EventCode event,
-        char *fmt, ...)
-{
-        int     ret=0;
-        char    *list=NULL;
-        va_list fmt_args;
-
-        edg_wll_ResetError(context);
-
-        va_start(fmt_args,fmt);
-        if (trio_vasprintf(&list,fmt,fmt_args) == -1) {
-                edg_wll_SetError(context,ret = ENOMEM,"edg_wll_LogEventProxy(): trio_vasprintf() error");
-                goto edg_wll_logevent_end;
-        }
-
-        ret=edg_wll_LogEventMasterProxy(context,event,"%s",list);
-
-edg_wll_logevent_end:
-        va_end(fmt_args);
-        if (list) free(list);
-
-        if (ret) edg_wll_UpdateError(context,0,"edg_wll_LogEventProxy(): ");
-
-        return edg_wll_Error(context,NULL,NULL);
-}
-
-
-/**
  *-----------------------------------------------------------------------
  * Instructs interlogger to to deliver all pending events related to current job
  * \brief flush events from interlogger
@@ -702,53 +468,6 @@ int edg_wll_SetLoggingJob(
 
 /**
  *-----------------------------------------------------------------------
- * Set a current job for given context.
- * \note Should be called before any logging call.
- *-----------------------------------------------------------------------
- */
-int edg_wll_SetLoggingJobProxy(
-        edg_wll_Context context,
-        const edg_wlc_JobId job,
-        const char *code,
-       const char *user,
-        int flags)
-{
-        int     err;
-       char    *code_loc = NULL;
-
-        edg_wll_ResetError(context);
-
-        if (!job) return edg_wll_SetError(context,EINVAL,"jobid is null");
-
-        edg_wlc_JobIdFree(context->p_jobid);
-        if ((err = edg_wlc_JobIdDup(job,&context->p_jobid))) {
-                edg_wll_SetError(context,err,"edg_wll_SetLoggingJob(): edg_wlc_JobIdDup() error");
-               goto edg_wll_setloggingjobproxy_end;
-       }
-
-       /* add user credentials to context */
-       edg_wll_SetParamString(context, EDG_WLL_PARAM_LBPROXY_USER, user);
-
-       /* query LBProxyServer for sequence code if not user-suplied */
-/* FIXME: doesn't work yet
-       if (!code) {
-               edg_wll_QuerySequenceCodeProxy(context, job, &code_loc);
-               goto edg_wll_setloggingjobproxy_end;    
-       } else {
-               code_loc = strdup(code);
-       }
-       
-       if (!edg_wll_SetSequenceCode(context,code_loc,flags)) */ {
-               edg_wll_IncSequenceCode(context);
-       }
-       
-edg_wll_setloggingjobproxy_end:
-       if (code_loc) free(code_loc);
-        return edg_wll_Error(context,NULL,NULL);
-}
-
-/**
- *-----------------------------------------------------------------------
  * Register job with L&B service.
  *-----------------------------------------------------------------------
  */
@@ -795,54 +514,6 @@ static int edg_wll_RegisterJobMaster(
        return edg_wll_Error(context,NULL,NULL);
 }
 
-/**
- *-----------------------------------------------------------------------
- * Register job with L&B Proxy service.
- *-----------------------------------------------------------------------
- */
-static int edg_wll_RegisterJobMasterProxy(
-        edg_wll_Context         context,
-        const edg_wlc_JobId     job,
-        enum edg_wll_RegJobJobtype     type,
-       const char *            user,
-        const char *            jdl,
-        const char *            ns,
-       edg_wlc_JobId           parent,
-        int                     num_subjobs,
-        const char *            seed,
-        edg_wlc_JobId **        subjobs)
-{
-       char    *type_s = NULL,*intseed = NULL, *seq = NULL;
-       char    *parent_s = NULL;
-       int     err = 0;
-
-       edg_wll_ResetError(context);
-
-       intseed = seed ? strdup(seed) : 
-               str2md5base64(seq = edg_wll_GetSequenceCode(context));
-
-       free(seq);
-
-       type_s = edg_wll_RegJobJobtypeToString(type);
-       if (!type_s) return edg_wll_SetError(context,EINVAL,"edg_wll_RegisterJobMaster(): no jobtype specified");
-
-       if ((type == EDG_WLL_REGJOB_DAG || type == EDG_WLL_REGJOB_PARTITIONED)
-               && num_subjobs > 0) 
-                       err = edg_wll_GenerateSubjobIds(context,job,
-                                       num_subjobs,intseed,subjobs);
-
-       parent_s = parent ? edg_wlc_JobIdUnparse(parent) : strdup("");
-
-       if (err == 0 &&
-               edg_wll_SetLoggingJobProxy(context,job,NULL,user,EDG_WLL_SEQ_NORMAL) == 0)
-                       edg_wll_LogEventMasterProxy(context,
-                               EDG_WLL_EVENT_REGJOB,EDG_WLL_FORMAT_REGJOB,
-                               (char *)jdl,ns,parent_s,type_s,num_subjobs,intseed);
-
-       free(type_s); free(intseed); free(parent_s);
-       return edg_wll_Error(context,NULL,NULL);
-}
-
 int edg_wll_RegisterJobSync(
         edg_wll_Context         context,
         const edg_wlc_JobId     job,
@@ -908,20 +579,6 @@ int edg_wll_RegisterSubjobs(edg_wll_Context ctx,const edg_wlc_JobId parent,
        return edg_wll_Error(ctx, NULL, NULL);
 }
 
-int edg_wll_RegisterJobProxy(
-        edg_wll_Context         context,
-        const edg_wlc_JobId     job,
-        enum edg_wll_RegJobJobtype     type,
-       const char *            user,
-        const char *            jdl,
-        const char *            ns,
-        int                     num_subjobs,
-        const char *            seed,
-        edg_wlc_JobId **        subjobs)
-{
-       return edg_wll_RegisterJobMasterProxy(context,job,type,user,jdl,ns, NULL, num_subjobs,seed,subjobs);
-}
-
 int edg_wll_ChangeACL(
                edg_wll_Context                         ctx,
                const edg_wlc_JobId                     jobid,
index 8ad66e0..0b64e9d 100644 (file)
@@ -58,13 +58,13 @@ $decl
        return edg_wll_LogEvent$b;
 \}\n
 };
-       gen qq{
-int edg_wll_Log${t}Proxy$a
-\{
-$decl
-       return edg_wll_LogEventProxy$b;
-\}\n
-};
+#      gen qq{
+#int edg_wll_Log${t}Proxy$a
+#\{
+#$decl
+#      return edg_wll_LogEventProxy$b;
+#\}\n
+#};
        for ($event->getFieldsOrdered) {
                my $f = selectField $event $_;
                my $fn = $f->getName;
@@ -102,13 +102,13 @@ $decl
        return edg_wll_LogEvent$d;
 \}\n
 };
-                               gen qq{
-int edg_wll_Log$t${code}Proxy$c
-\{
-$decl
-       return edg_wll_LogEventProxy$d;
-\}\n
-};
+#                              gen qq{
+#int edg_wll_Log$t${code}Proxy$c
+#\{
+#$decl
+#      return edg_wll_LogEventProxy$d;
+#\}\n
+#};
                        }
                }
        }
index d4424be..5c65e64 100644 (file)
@@ -46,7 +46,7 @@ CFLAGS:=${DEBUG} -I${top_srcdir}/src -I${top_srcdir}/interface \
 # major version more frequently. This variable specifies how many steps ahead
 # we are.
 
-VERSION_AHEAD=1
+VERSION_AHEAD=0
 
 GLOBUS_LIBS:=-L${globus_prefix}/lib \
         -lglobus_common_${nothrflavour} \
index d2997c8..36fdfca 100755 (executable)
@@ -20,6 +20,9 @@
 
        Revision history:
        $Log$
+       Revision 1.6  2004/10/18 19:16:09  zsalvet
+       RPM descriptions
+       
        Revision 1.5  2004/07/28 12:27:00  dimeglio
        Changed default target from compile to dist
        
@@ -90,6 +93,7 @@
                 Load version file 
             ========================================= -->
        <property file="${module.version.file}"/>
+               <property file="${module.build.file}"/>
                
        <!-- ==============================================
                 Local private targets
index 047b718..3dd4903 100644 (file)
@@ -21,7 +21,7 @@ enum {
 typedef struct _edg_wll_GssConnection {
   gss_ctx_id_t context;
   int sock;
-  char buffer[BUFSIZ];
+  char *buffer;
   size_t bufsize;
 } edg_wll_GssConnection;
 
diff --git a/org.glite.lb.common/project/build.number b/org.glite.lb.common/project/build.number
new file mode 100644 (file)
index 0000000..0b943d3
--- /dev/null
@@ -0,0 +1,2 @@
+#Sun Apr 03 06:47:19 CEST 2005
+module.build=221
index aa6fcbe..a4b9962 100644 (file)
@@ -1,4 +1,4 @@
-#Fri Dec 10 13:22:02 CET 2004
-module.version=1.0.0
-module.build=111
-module.age=2
+
+module.version = 1.1.4
+module.age = 1
+
index 3d0861a..4ceee87 100644 (file)
@@ -31,14 +31,14 @@ for my $e (sort { $event->{order}->{$a} <=> $event->{order}->{$b} }
 };
 
 /**
- * \fn edg_wll_EventCode edg_wll_StringToEvent(char *name)
+ * \fn edg_wll_EventCode edg_wll_StringToEvent(const char *name)
  * \param name          a string event name (e.g. "JobTransfer")
  * \return corresponding numeric code (edg_wll_EventCode)
  * \brief convert a string event name to the corresponding numeric code  
  * Calls: strcasecmp
  * Algorithm: array lookup
  */
-edg_wll_EventCode edg_wll_StringToEvent(char *name)
+edg_wll_EventCode edg_wll_StringToEvent(const char *name)
 {
        unsigned int    i;
 
@@ -95,14 +95,14 @@ for my $t (sort { $event->{order}->{$a} <=> $event->{order}->{$b} }
 };
 
 /*
- * \fn edg_wll_KeyNameCode edg_wll_StringToKeyName(char *name)
+ * \fn edg_wll_KeyNameCode edg_wll_StringToKeyName(const char *name)
  * \param name         a string ULM key name (e.g. "DG.JOB.TRANSFER.DEST")
  * \return corresponding numeric code (edg_wll_KeyNameCode)
  * \brief convert a string ULM key name to the corresponding numeric code
  * Calls: strcasecmp
  * Algorithm: array lookup
  */
-edg_wll_KeyNameCode edg_wll_StringToKeyName(char *name)
+edg_wll_KeyNameCode edg_wll_StringToKeyName(const char *name)
 {
        unsigned int    i;
 
@@ -156,11 +156,11 @@ static const char \*${char}\[\] = \{
 # function StringTo:
                gen qq{
 /**
- * \\fn $enum edg_wll_StringTo${c}(char *name)
+ * \\fn $enum edg_wll_StringTo${c}(const char *name)
  * Calls: strcasecmp
  * Algorithm: array lookup
  */
-$enum edg_wll_StringTo${c}(char *name) 
+$enum edg_wll_StringTo${c}(const char *name) 
 \{
        unsigned int    i;
 
@@ -212,11 +212,11 @@ static const char \*${char}\[\] = \{
 # function StringTo:
                        gen qq{
 /**
- * \\fn $enum edg_wll_StringTo${c}(char *name)
+ * \\fn $enum edg_wll_StringTo${c}(const char *name)
  * Calls: strcasecmp
  * Algorithm: array lookup
  */
-$enum edg_wll_StringTo${c}(char *name) 
+$enum edg_wll_StringTo${c}(const char *name) 
 \{
        unsigned int    i;
 
@@ -338,6 +338,12 @@ for my $t (sort { $event->{order}->{$a} <=> $event->{order}->{$b} }
                if ($ft eq 'string') {
                        gen $indent."\tif (event->$tl.$fn) free(event->$tl.$fn);\n"
                }
+               if ($ft eq 'jobid') {
+                       gen $indent."\tif (event->$tl.$fn) edg_wlc_JobIdFree(event->$tl.$fn);\n"
+               }
+               if ($ft eq 'notifid') {
+                       gen $indent."\tif (event->$tl.$fn) edg_wll_NotifIdFree(event->$tl.$fn);\n"
+               }
        }
        gen $indent.$indent."break;\n"
 }
index 11170c5..e3682a3 100644 (file)
@@ -4,6 +4,7 @@
 #include <stdlib.h>
 #include <stdarg.h>
 #include <syslog.h>
+#include <pthread.h>
 
 int log_level;
 
@@ -17,9 +18,11 @@ il_log(int level, char *fmt, ...)
        vasprintf(&err_text, fmt, fmt_args);
        va_end(fmt_args);
        
-       if(level <= log_level) 
+       if(level <= log_level) {
+               fprintf(stderr, "[%6d] ", pthread_self());
                fprintf(stderr, err_text);
-       
+       }
+
        if(level <= LOG_ERR) {
                openlog("edg-wl-interlogd", LOG_PID | LOG_CONS, LOG_DAEMON);
                syslog(level, "%s", err_text);
index a9de75f..0142a83 100644 (file)
@@ -760,7 +760,7 @@ edg_wll_gss_write(edg_wll_GssConnection *connection, const void *buf, size_t buf
    input_token.value = (void*)buf;
    input_token.length = bufsize;
 
-   maj_stat = gss_wrap (&min_stat, connection->context, 0, GSS_C_QOP_DEFAULT,
+   maj_stat = gss_wrap (&min_stat, connection->context, 1, GSS_C_QOP_DEFAULT,
                        &input_token, NULL, &output_token);
    if (GSS_ERROR(maj_stat)) {
       if (gss_code) {
@@ -793,11 +793,14 @@ edg_wll_gss_read(edg_wll_GssConnection *connection, void *buf, size_t bufsize,
       
       len = (connection->bufsize < bufsize) ? connection->bufsize : bufsize;
       memcpy(buf, connection->buffer, len);
-      connection->bufsize -= len;
-      if (connection->bufsize > 0) {
-        for (i = 0; i < sizeof(connection->buffer) - len; i++)
+      if (connection->bufsize - len == 0) {
+        free(connection->buffer);
+        connection->buffer = NULL;
+      } else {
+        for (i = 0; i < connection->bufsize - len; i++)
            connection->buffer[i] = connection->buffer[i+len];
       }
+      connection->bufsize -= len;
 
       return len;
    }
@@ -811,6 +814,7 @@ edg_wll_gss_read(edg_wll_GssConnection *connection, void *buf, size_t bufsize,
 
       maj_stat = gss_unwrap(&min_stat, connection->context, &input_token,
                            &output_token, NULL, NULL);
+      gss_release_buffer(&min_stat, &input_token);
       if (GSS_ERROR(maj_stat)) {
         /* XXX cleanup */
         return EDG_WLL_GSS_ERROR_GSS;
@@ -818,15 +822,24 @@ edg_wll_gss_read(edg_wll_GssConnection *connection, void *buf, size_t bufsize,
    } while (maj_stat == 0 && output_token.length == 0 && output_token.value == NULL);
 
    if (output_token.length > bufsize) {
-      if (output_token.length - bufsize > sizeof(connection->buffer))
-        return EINVAL;
       connection->bufsize = output_token.length - bufsize;
+      connection->buffer = malloc(connection->bufsize);
+      if (connection->buffer == NULL) {
+        connection->bufsize = 0;
+        ret = EDG_WLL_GSS_ERROR_ERRNO;
+        goto end;
+      }
       memcpy(connection->buffer, output_token.value + bufsize, connection->bufsize);
       output_token.length = bufsize;
    }
+
    memcpy(buf, output_token.value, output_token.length);
+   ret = output_token.length;
 
-   return output_token.length;
+end:
+   gss_release_buffer(&min_stat, &output_token);
+
+   return ret;
 }
 
 int
@@ -840,14 +853,16 @@ edg_wll_gss_read_full(edg_wll_GssConnection *connection, void *buf,
    if (connection->bufsize > 0) {
       size_t len;
 
-
       len = (connection->bufsize < bufsize) ? connection->bufsize : bufsize;
       memcpy(buf, connection->buffer, len);
-      connection->bufsize -= len;
-      if (connection->bufsize > 0) {
-         for (i = 0; i < sizeof(connection->buffer) - len; i++)
+      if (connection->bufsize - len == 0) {
+        free(connection->buffer);
+        connection->buffer = NULL;
+      } else {
+         for (i = 0; i < connection->bufsize - len; i++)
             connection->buffer[i] = connection->buffer[i+len];
       }
+      connection->bufsize -= len;
       *total = len;
    }
 
@@ -906,6 +921,8 @@ edg_wll_gss_close(edg_wll_GssConnection *con, struct timeval *timeout)
       if (con->sock >= 0)
         close(con->sock);
    }
+   if (con->buffer)
+      free(con->buffer);
    memset(con, 0, sizeof(*con));
    con->context = GSS_C_NO_CONTEXT;
    con->sock = -1;
index 293f6d5..81d1465 100755 (executable)
@@ -20,6 +20,9 @@
 
        Revision history:
        $Log$
+       Revision 1.4  2004/10/18 19:16:09  zsalvet
+       RPM descriptions
+       
        Revision 1.3  2004/07/29 23:21:51  dimeglio
        Changed default target from compile to dist
        
@@ -90,6 +93,7 @@
                 Load version file 
             ========================================= -->
        <property file="${module.version.file}"/>
+               <property file="${module.build.file}"/>
                
        <!-- ==============================================
                 Local private targets
diff --git a/org.glite.lb.logger/project/build.number b/org.glite.lb.logger/project/build.number
new file mode 100644 (file)
index 0000000..9656cff
--- /dev/null
@@ -0,0 +1,2 @@
+#Sun Apr 03 06:55:04 CEST 2005
+module.build=222
index 6c55b19..34be4df 100644 (file)
@@ -1,4 +1,4 @@
-#Fri Dec 10 13:27:13 CET 2004
-module.version=0.5.0
-module.build=112
-module.age=3
+
+module.version = 1.0.1
+module.age = 1
+                               
\ No newline at end of file
index d311a1a..7161505 100644 (file)
@@ -110,7 +110,7 @@ event_queue_empty(struct event_queue *eq)
   assert(eq != NULL);
 
   event_queue_lock_ro(eq);
-  ret = eq->head == NULL;
+  ret = (eq->head == NULL);
   event_queue_unlock(eq);
 
   return(ret);
@@ -171,6 +171,7 @@ event_queue_insert(struct event_queue *eq, struct server_msg *msg)
   if(eq->mark_this && (el->prev == eq->mark_this)) 
     eq->mark_prev = el;
 #endif
+
   event_queue_unlock(eq);
   /* end of critical section */
 
@@ -186,7 +187,7 @@ event_queue_get(struct event_queue *eq, struct server_msg **msg)
   assert(eq != NULL);
   assert(msg != NULL);
   
-  event_queue_lock_ro(eq);
+  event_queue_lock(eq);
   el = eq->head;
 #if defined(INTERLOGD_EMS)
   /* this message is marked for removal, it is first on the queue */
@@ -234,11 +235,11 @@ event_queue_remove(struct event_queue *eq)
   }
   if(el == eq->tail) {
     /* we are removing the last message */
-    eq->tail = NULL;
+    eq->tail = prev;
   }
   if(el == eq->tail_ems) {
     /* we are removing last priority message */
-    eq->tail_ems = NULL;
+    eq->tail_ems = prev;
   }
 
   eq->mark_this = NULL;
@@ -284,8 +285,9 @@ event_queue_move_events(struct event_queue *eq_s, struct event_queue *eq_d, char
        eq_s->tail = NULL;
        while(p) {
                if(strcmp(p->msg->job_id_s, notif_id) == 0) {
-                       il_log(LOG_DEBUG, "  moving event with notif id %s from %s:%d to %s:%d\n",
-                              notif_id, eq_s->dest_name,eq_s->dest_port, eq_d ? eq_d->dest_name : "trash",eq_d ? eq_d->dest_port : -1);
+                       il_log(LOG_DEBUG, "  moving event at offset %d from %s:%d to %s:%d\n",
+                              p->msg->offset, eq_s->dest_name,eq_s->dest_port, eq_d ? eq_d->dest_name : "trash",eq_d ? eq_d->dest_port : -1);
+                       il_log(LOG_DEBUG, "  current: %x, next: %x\n", p, p->prev);
                        /* remove the message from the source list */
                        *source_prev = p->prev;
                        if(eq_d) {
index 295b2f0..3ee97f3 100644 (file)
@@ -473,14 +473,25 @@ event_store_sync(struct event_store *es, long offset)
      * 2) es->offset is set only by recover() and next().
      * 3) Additional recover can not do much harm.
      * 4) And next() is only called by the same thread as sync().
-     * => no one is messing with us right now */
+     * 5) use_lock is in place, so no cleanup possible
+      * => no one is messing with us right now */
     event_store_lock_ro(es);
     if(ret < 0)
       ret = -1;
     else 
-      /* somehow we suppose that now es->offset >= offset */
-      /* in fact it must be es->offset > offset, anything else would be weird */
-      ret = (es->offset > offset) ? 0 : 1;
+           if(es->offset <= offset) {
+                   /* Apparently there is something wrong - we are receiving an event
+                    * which is beyond the end of file. Someone must have removed the file
+                    * when we were not looking. The question is - what should we do with the event?
+                    * We have to send it, as this is the only one occasion when we see it.
+                    * However, we must not allow the es->offset to be set using this event,
+                    * as it would point after the end of file. Sort this out in event_store_next().
+                    */
+                   ret = 1;
+           } else if(es->offset > offset) {
+                   /* we have seen at least this event */
+                   ret = 0;
+           }
   }
   event_store_unlock(es);
   return(ret);
@@ -488,12 +499,20 @@ event_store_sync(struct event_store *es, long offset)
 
 
 int
-event_store_next(struct event_store *es, int len)
+event_store_next(struct event_store *es, long offset, int len)
 {
   assert(es != NULL);
   
   event_store_lock(es);
-  es->offset += len;
+  /* Whoa, be careful now. The es->offset points right after the last enqueued event,
+   * but it may not be the offset of the event WE have just enqueued, because:!    
+   *  1) someone could have removed the event file behind our back
+   *  2) the file could have been recover()ed and more events read
+   * In either case the offset should not be moved.
+   */
+  if(es->offset == offset) {
+         es->offset += len;
+  }
   event_store_unlock(es);
 
   return(0);
index f6414c9..b045112 100644 (file)
@@ -40,14 +40,15 @@ enqueue_msg(struct event_queue *eq, struct server_msg *msg)
           (messsage was just to change the delivery address) */
        if(msg->len == 0) 
                return(0);
-
 #endif
        /* avoid losing signal to thread */
        event_queue_cond_lock(eq);
 
        /* insert new event */
-       if(event_queue_insert(eq, msg) < 0)
+       if(event_queue_insert(eq, msg) < 0) {
+               event_queue_cond_unlock(eq);
                return(-1);
+       }
       
        /* signal thread that we have a new message */
        event_queue_signal(eq);
@@ -359,7 +360,8 @@ handle_msg(char *event, long offset)
 #endif
 
        /* if there was no error, set the next expected event offset */
-       event_store_next(es, msg->ev_len);
+       event_store_next(es, offset, msg->ev_len);
+
        /* allow cleanup thread to check on this event_store */
        event_store_release(es);
 
index 3c96828..74fc469 100644 (file)
@@ -190,7 +190,7 @@ int event_store_cleanup();
 int event_store_recover_all(void);
 struct event_store *event_store_find(char *);
 int event_store_sync(struct event_store *, long);
-int event_store_next(struct event_store *, int);
+int event_store_next(struct event_store *, long, int);
 int event_store_commit(struct event_store *, int, int);
 int event_store_recover(struct event_store *);
 int event_store_release(struct event_store *);
index 5eeff30..9ee4f27 100644 (file)
@@ -32,13 +32,15 @@ void *
 queue_thread(void *q)
 {
        struct event_queue *eq = (struct event_queue *)q;
-       int ret, exit, flushing;
+       int ret, exit;
 
        if(init_errors(0) < 0) {
                il_log(LOG_ERR, "Error initializing thread specific data, exiting!");
                pthread_exit(NULL);
        }
   
+       il_log(LOG_DEBUG, "  started new thread for delivery to %s:%d\n", eq->dest_name, eq->dest_port);
+
        pthread_cleanup_push(queue_thread_cleanup, q); 
 
        event_queue_cond_lock(eq);
@@ -52,7 +54,7 @@ queue_thread(void *q)
                ret = 0;
                while (event_queue_empty(eq) 
 #if defined(INTERLOGD_HANDLE_CMD) && defined(INTERLOGD_FLUSH)
-                      && ((flushing=eq->flushing) != 1)
+                      && (eq->flushing != 1)
 #endif
                        ) {
                        ret = event_queue_wait(eq, 0);
@@ -115,7 +117,7 @@ queue_thread(void *q)
                event_queue_cond_lock(eq);
 
                /* Check if we are flushing and if we are, report status to master */
-               if(flushing == 1) {
+               if(eq->flushing == 1) {
                        il_log(LOG_DEBUG, "    flushing mode detected, reporting status\n");
                        /* 0 - events waiting, 1 - events sent, < 0 - some error */
                        eq->flush_result = ret;
@@ -152,19 +154,26 @@ event_queue_create_thread(struct event_queue *eq)
 {
        assert(eq != NULL);
 
+       event_queue_lock(eq);
+
        /* if there is a thread already, just return */
-       if(eq->thread_id > 0)
+       if(eq->thread_id > 0) {
+               event_queue_unlock(eq);
                return(0);
+       }
 
        /* create the thread itself */
        if(pthread_create(&eq->thread_id, NULL, queue_thread, eq) < 0) {
                eq->thread_id = 0;
                set_error(IL_SYS, errno, "event_queue_create_thread: error creating new thread");
+               event_queue_unlock(eq);
                return(-1);
        }
 
        /* the thread is never going to be joined */
        pthread_detach(eq->thread_id);
+       
+       event_queue_unlock(eq);
 
        return(1);
 }
index 9f9f459..9038a3d 100755 (executable)
@@ -20,6 +20,9 @@
 
        Revision history:
        $Log$
+       Revision 1.2  2004/10/18 19:16:09  zsalvet
+       RPM descriptions
+       
        Revision 1.1  2004/09/22 15:41:24  jskrabal
        - sorry! Forgot to add
        
@@ -84,6 +87,7 @@
                 Load version file 
             ========================================= -->
        <property file="${module.version.file}"/>
+               <property file="${module.build.file}"/>
                
        <!-- ==============================================
                 Local private targets
diff --git a/org.glite.lb.server-bones/project/build.number b/org.glite.lb.server-bones/project/build.number
new file mode 100644 (file)
index 0000000..53ccd6f
--- /dev/null
@@ -0,0 +1,2 @@
+#Sun Apr 03 06:53:19 CEST 2005
+module.build=180
index 6246fa7..bc58475 100644 (file)
@@ -1,4 +1,4 @@
-#Fri Dec 10 13:25:32 CET 2004
-module.version=0.1.0
-module.build=70
-module.age=1
+
+module.version = 1.0.0
+module.age = 1
+                               
\ No newline at end of file
index 4489c06..a08c174 100644 (file)
@@ -48,14 +48,11 @@ TEST_INC:=-I${cppunit}/include
 SUFFIXES = .T 
 
 DEBUG:=-g -O0 -Wall
-# not yet
-#      -I${voms}/include \
-#      -I${gacl}/include \
-#      -I/usr/include/libxml2 \
-
-# -DNO_VOMS -DNO_GACL to be removed when voms/gridsite are available
-CFLAGS:= -DNO_VOMS -DNO_GACL \
-       ${WS_CFLAGS} ${DEBUG} \
+
+GRIDSITE_CFLAGS = `xml2-config --cflags`
+GRIDSITE_LIBS = -lgridsite_globus `xml2-config --libs`
+
+CFLAGS:= ${WS_CFLAGS} ${DEBUG} \
        -DVERSION=\"${version}\" \
        -I${stagedir}/include -I${top_srcdir}/src -I. \
        -I${expat_prefix}/include \
@@ -64,10 +61,9 @@ CFLAGS:= -DNO_VOMS -DNO_GACL \
        ${COVERAGE_FLAGS} \
        -I${mysql_prefix}/include -I${mysql_prefix}/include/mysql \
        -I${globus_prefix}/include/${nothrflavour} \
-       -I${gridsite_prefix}/include -I${globus_prefix}/include/${nothrflavour}/openssl \
+       $(GRIDSITE_CFLAGS) \
        -D_GNU_SOURCE
 
-
 TEST_LIBS:=-L${cppunit}/lib -lcppunit
 TEST_INC:=-I${cppunit}/include
 
@@ -91,6 +87,8 @@ endif
 EXT_LIBS:= -L${ares_prefix}/lib -lares \
        ${myslqlib} -lmysqlclient -lz\
        ${expatlib} -lexpat \
+       ${GRIDSITE_LIBS} \
+       -lvomsc \
        ${GLOBUS_LIBS}
 
 GSOAP_LIBS:= -L${gsoap_prefix}/lib -lgsoap
index 011bf74..6ece207 100755 (executable)
@@ -20,6 +20,9 @@
 
        Revision history:
        $Log$
+       Revision 1.4  2004/10/18 19:16:09  zsalvet
+       RPM descriptions
+       
        Revision 1.3  2004/08/05 15:24:32  dimeglio
        Changed default target from compile to dist
        
@@ -91,6 +94,7 @@
                 Load version file 
             ========================================= -->
        <property file="${module.version.file}"/>
+               <property file="${module.build.file}"/>
                
        <!-- ==============================================
                 Local private targets
diff --git a/org.glite.lb.server/project/build.number b/org.glite.lb.server/project/build.number
new file mode 100644 (file)
index 0000000..b67a61a
--- /dev/null
@@ -0,0 +1,2 @@
+#Sun Apr 03 06:56:54 CEST 2005
+module.build=223
index 7c1cea6..34be4df 100644 (file)
@@ -1,4 +1,4 @@
-#Fri Dec 10 13:29:01 CET 2004
-module.version=0.7.0
-module.build=113
-module.age=4
+
+module.version = 1.0.1
+module.age = 1
+                               
\ No newline at end of file
index 051fdeb..2b06e8c 100644 (file)
@@ -12,7 +12,12 @@ PREFIX=/opt/glite
 
 -include Makefile.inc
 
-VPATH=${top_srcdir}/interface
+SUFFIXES = .T
+
+VPATH=${top_srcdir}/src
+AT3=perl -I${top_srcdir}/project ${top_srcdir}/project/at3
+XSLTPROC=xsltproc
+
 STAGETO=interface
 
 WSDL=LB.wsdl
@@ -43,7 +48,20 @@ install:
        -mkdir -p ${PREFIX}/share/doc/${package}-${version}
        install -m 644 ${top_srcdir}/LICENSE ${PREFIX}/share/doc/${package}-${version}
        cd ${top_srcdir}/interface && install -m 644 ${WSDL} ${PREFIX}/${STAGETO}
+#      install -m 644 ${WSDL} ${PREFIX}/${STAGETO}
 
 clean:
        rm -f *.h
        
+
+%.xml: %.xml.T
+       rm -f $@
+       ${AT3} $< >$@ || rm -f $@
+       chmod -w $@ >/dev/null
+
+${WSDL}: LB.xml puke-wsdl.xsl
+       ${XSLTPROC} ../src/puke-wsdl.xsl LB.xml >$@
+
+
+LB-ug.xml: LB.xml puke-ug.xsl
+       ${XSLTPROC} ../src/puke-ug.xsl LB.xml >$@
index b412fb1..c8440c4 100644 (file)
 
        Revision history:
        $Log$
-       Revision 1.5  2004/07/20 16:08:30  flammer
-       Changed incorrect my_... instead of .._template entries for subsystem and component.
-       
-       Revision 1.4  2004/07/16 16:32:53  flammer
-       Added comment where to add language target.
-       
-       Revision 1.3  2004/07/16 14:56:55  flammer
-       Corrected input path of build.properties.
-       
-       Revision 1.2  2004/07/06 20:43:19  flammer
-       Update of configure & targets.
-       
-       Revision 1.1.1.1  2004/06/18 12:40:17  flammer
-       Added general component template.
+       Revision 1.1.1.1.2.1  2005/02/12 01:39:43  glbuild
+       Changed start time
        
+       Revision 1.1.1.1  2004/11/25 15:20:10  akrenek
+       initial import
        
 -->
 
@@ -95,6 +85,7 @@
                 Load version file 
             ========================================= -->
        <property file="${module.version.file}"/>
+               <property file="${module.build.file}"/>
        
        <!-- ==============================================
                 Local private targets
        
        <target name="localinit"
                description="Module specific initialization tasks">
+               <copy toDir="${module.project.dir}">
+                       <fileset dir="${subsystem.project.dir}">
+                               <include name="at3" />
+                               <include name="*.T" />
+                               <include name="*.pm" />
+                       </fileset>
+               </copy>
                <antcall target="lbmakefiles" />
        </target>
        
diff --git a/org.glite.lb.ws-interface/project/build.number b/org.glite.lb.ws-interface/project/build.number
new file mode 100644 (file)
index 0000000..8c4ad25
--- /dev/null
@@ -0,0 +1,2 @@
+#Sun Apr 03 06:45:36 CEST 2005
+module.build=123
index a39143f..34be4df 100755 (executable)
@@ -1,4 +1,4 @@
-#Fri Dec 10 13:20:01 CET 2004
-module.version=0.1.0
-module.build=13
-module.age=0
+
+module.version = 1.0.1
+module.age = 1
+                               
\ No newline at end of file
diff --git a/org.glite.lb.ws-interface/src/LB.xml.T b/org.glite.lb.ws-interface/src/LB.xml.T
new file mode 100644 (file)
index 0000000..4471e92
--- /dev/null
@@ -0,0 +1,209 @@
+<?xml version="1.0"?>
+
+@@@LANG: wsdl
+<!--
+@@@AUTO
+-->
+
+<service name="LoggingAndBookkeeping"
+       ns="http://glite.org/wsdl/services/lb"
+       prefix="lb">
+
+LB web service interface currently reflects the functionality of legacy
+LB query API. 
+
+
+       <types ns="http://glite.org/wsdl/types/lb" prefix="lbt">
+               <flags name="jobFlags">
+                       Flags determining which fields of job status should be retrieved.
+                       <val name="CLASSADS">Include also long job descriptions (JDL).</val>
+                       <val name="CHILDREN">Return list of subjobs of a DAG.</val>
+                       <val name="CHILDSTAT">Return state of the subjobs, i.e. apply other flags recursively </val>
+               </flags>
+
+               <enum name="statName">
+                       Classification of job states.
+@@@{
+       for my $stat ($status->getTypesOrdered) {
+               my $u = uc $stat;
+               my $c = getTypeComment $status $stat;
+               gen qq{
+!                      <val name="$u">$c</val>
+};
+       }
+@@@}
+               </enum>
+
+@@@{
+       for my $n ($status->getAllFieldsOrdered) {
+               my $f = selectField $status $n;
+               if ($f->{codes}) {
+                       my $n = getName $f;
+                       $n = $1.ucfirst $2 while $n =~ /([[:alpha:]]*)_([[:alpha:]]*)/;
+                               gen qq{
+!              <enum name="$n">
+!                      Auxiliary type; values of the jobStatus.$n field.
+};
+                               for (@{$f->{codes}}) {
+                                       my $uc = uc $_->{name};
+                                       gen qq{
+!                      <val name="$uc">$_->{comment}</val>
+};
+                               }
+                               gen qq{
+!              </enum>
+};
+               }
+       }
+@@@}
+
+<!-- FIXME: list which are arrays in fact are not portable and 
+       will not work most likely in this way -->
+
+               <struct name="jobStatus">
+                       Status of a job, possibly including subjobs.
+                       <elem name="state" type="statName">Status name.</elem>
+@@@{
+       for my $n (getAllFieldsOrdered $status) {
+               selectField $status $n;
+               my $f = getField $status;
+               my $name = getName $f;
+               $name = $1.ucfirst $2 while $name =~ /([[:alpha:]]*)_([[:alpha:]]*)/;
+               my $type = $f->{type};
+               my $list = 'no';
+
+               if ($main::baseTypes{$type}) {
+                       $type = eval $main::types{wsdl}->{$main::baseTypes{$type}};
+                       $list = 'yes'
+               }
+               elsif ($f->{codes}) {
+                       $type = $name;
+               }
+               else {
+                       $type = getType $f;
+               }
+
+               my $comment = getComment $f;
+# XXX: currently nothing is "optional" as we don't know from status.T 
+               gen qq{
+!                      <elem name="$name" type="$type" list="$list" optional="no">$comment</elem>
+};
+       }
+@@@}
+               </struct>
+
+               <struct name="tagValue">
+                       Value of a single user tag.
+                       <elem name="tag" type="xsd:string">Tag name</elem>
+                       <elem name="value" type="xsd:string" optional="yes">Tag value</elem>
+               </struct>
+
+               <struct name="timeval">
+                       UNIX time representation.
+                       <elem name="tvSec" type="xsd:long">Seconds since Jan 1 1970</elem>
+                       <elem name="tvUsec" type="xsd:long">Microseconds</elem>
+               </struct>
+
+
+               <struct name="genericFault" fault="yes">
+                       Generic SOAP fault, used to deliver any LB errors.
+                       May be returned by any of the operations.
+                       <elem name="source" type="xsd:string">Source component (module) of the error.</elem>
+                       <elem name="code" type="xsd:int">Numeric error code.</elem>
+                       <elem name="text" type="xsd:string">Error text corresponding to the code.</elem>
+                       <elem name="description" type="xsd:string" optional="yes">Additional description of the error (e.g. filename)</elem>
+                       <elem name="reason" type="genericFault" optional="yes">Reason of the error, coming from lower levels.</elem>
+               </struct>
+
+               <simple name="string"/>
+               <simple name="int"/>
+
+               <struct name="queryConditions">
+                       An element of outer list of query conditions in job queries.
+                       It expresses possibly several conditions (records) on a single job attribute.
+                       These conditions are logically OR-ed.
+                       <elem name="attr" type="queryAttr"> The job attribute to which the query conditions apply. </elem>
+                       <elem name="tagName" type="string" optional="yes"> Name of the queried user tag if attr is USERTAG.</elem>
+                       <elem name="statName" type="statName" optional="yes"> Name of the job state to which "attr = TIME" condition refers.</elem>
+                       <elem name="record" type="queryRecord" list="yes"> The conditions. </elem>
+               </struct>
+
+               <enum name="queryAttr">
+                       Specification of a job attribute in query.
+                       <val name="JOBID">A concrete JobId</val>
+                       <val name="OWNER">Owner of the job (X509 certificate subject).</val>
+                       <val name="STATUS">Status of the job (see statName type).</val>
+                       <val name="LOCATION">Where the job is currently handled (hostname).</val>
+                       <val name="DESTINATION">Where the job is or was scheduled to be executed.</val>
+                       <val name="DONECODE">How the job terminated (see doneCode type)</val>
+                       <val name="USERTAG">Value of particular user tag. The tag name has to be specified in queryConditions.tagName.</val>
+                       <val name="TIME">When the job entered a particular state. The state has to be specified in queryCondition.statName.</val>
+                       <val name="RESUBMITTED">The job was resubmitted.</val>
+                       <val name="PARENT">JobId of the job parend (DAG).</val>
+                       <val name="EXITCODE">UNIX exit code of the job.</val>
+               </enum>
+
+               <struct name="queryRecord">
+                       A single query condition.
+                       <elem name="op" type="queryOp"> Relational operator of the condition.</elem>
+                       <elem name="value1" type="queryRecValue"> Value to compare the attribute with.</elem>
+                       <elem name="value2" type="queryRecValue" optional="yes"> Another value to compare the attribute with (op = WITHIN only).</elem>
+               </struct>
+
+               <enum name="queryOp">
+                       Relational operator of query conditions.
+                       <val name="EQUAL"> Attribute is equal to the specified value </val>
+                       <val name="LESS"> Attribute is less than the specified value or equal </val>
+                       <val name="GREATER"> Attribute is greater than the specified value or equal </val>
+                       <val name="WITHIN"> Attribute is withing a range (queryRecord.value2 must be specified) </val>
+                       <val name="UNEQUAL"> Attribute is not equal to the specified value.</val>
+               </enum>
+
+               <struct name="queryRecValue">
+                       A value to compare an attribute with in queries.
+                       Exactly one of the elements must be specified.
+                       <elem name="i" type="int">Integer.</elem>
+                       <elem name="c" type="string">String.</elem>
+                       <elem name="t" type="timeval">Timestamp.</elem>
+               </struct>
+
+       </types>
+
+
+
+       <op name="JobStatus">
+               Query state of a single job.
+               <input name="jobid" type="string"> Id of the queried job. </input>
+               <input name="flags" type="jobFlags"> Which data fields to retrieve. </input>
+               <output name="stat" type="jobStatus"> Current state of the job. </output>
+               <fault name="genericFault" type="genericFault"> Any error. </fault>
+       </op>
+
+       <op name="QueryJobs">
+               Retrieve a list of jobs, including their states, based on
+               query conditions.
+               The conditions take the form of a list of lists.
+               Elements of the inner lists refer to a single job attribute, the conditions are or-ed.
+               Elements of the outer list may refer to different job attributes, they are and-ed.
+
+               <input name="conditions" type="queryConditions" list="yes">The query conditions.</input>
+               <input name="flags" type="jobFlags"> Which data fields to retrieve.</input>
+               <output name="jobs" type="string" list="yes"> JobId's of jobs matching the query.</output>
+               <output name="states" type="jobStatus" list="yes"> States of jobs matching the query.</output>
+               <fault name="genericFault" type="genericFault"> Any error. </fault>
+       </op>
+
+       <op name="GetVersion">
+               Return version of the service.
+               <output name="version" type="string">Returned version.</output>
+               <fault name="genericFault" type="genericFault"> Any error. </fault>
+       </op>
+
+       <op name="UserJobs">
+               Simplified query, return all jobs of the authenticated user.
+               <output name="jobs" type="string" list="yes"> JobId's of jobs matching the query.</output>
+               <output name="states" type="jobStatus" list="yes"> States of jobs matching the query.</output>
+               <fault name="genericFault" type="genericFault"> Any error. </fault>
+       </op>
+
+</service>
diff --git a/org.glite.lb.ws-interface/src/puke-ug.xsl b/org.glite.lb.ws-interface/src/puke-ug.xsl
new file mode 100644 (file)
index 0000000..2536d40
--- /dev/null
@@ -0,0 +1,139 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+       xmlns="">
+
+<xsl:output indent="yes"/>
+
+
+<xsl:template match="/service">
+
+       <chapter>
+               <title><xsl:value-of select="@name"/></title>
+               <sect1>
+                       <title>Operations</title>
+                               <xsl:apply-templates select="op">
+                                       <xsl:sort select="@name"/>
+                               </xsl:apply-templates>
+               </sect1>
+       
+               <sect1>
+                       <title>Types</title>
+                       <xsl:apply-templates select="types"/>
+               </sect1>
+       
+       </chapter>
+       
+</xsl:template>
+
+<xsl:template match="input|output|fault">
+       <varlistentry>
+               <term>
+                       <type>
+                               <xsl:choose>
+                                       <xsl:when test="@type!='string' and @type!='int'">
+                                               <link linkend="type:{@type}">
+                                                       <xsl:value-of select="@type "/>
+                                               </link>
+                                       </xsl:when>
+                                       <xsl:otherwise>xsd:<xsl:value-of select="@type "/></xsl:otherwise>
+                               </xsl:choose>
+                       </type>
+                       <parameter><xsl:value-of select="@name"/></parameter>
+               </term>
+               <listitem>
+                       <simpara><xsl:value-of select="text()"/></simpara>
+               </listitem>
+       </varlistentry>
+</xsl:template>
+
+<xsl:template match="op" >
+       <sect2 id="op:{@name}">
+               <title><xsl:value-of select="@name"/></title>
+               <para><xsl:value-of select="text()"/></para>
+               <para>
+                       Inputs:
+                       <xsl:choose>
+                               <xsl:when test="count(./input)>0">
+                                       <variablelist>
+                                               <xsl:apply-templates select="./input"/>
+                                       </variablelist>
+                               </xsl:when>
+                               <xsl:otherwise>N/A</xsl:otherwise>
+                       </xsl:choose>
+               </para>
+               <para>
+                       Outputs:
+                       <variablelist>
+                               <xsl:apply-templates select="./output"/>
+                       </variablelist>
+               </para>
+       </sect2>
+</xsl:template>
+
+<xsl:template match="types">
+       <xsl:for-each select="flags|enum|struct">
+               <xsl:sort select="@name"/>
+               <sect2 id="type:{@name}">
+                       <title> <xsl:value-of select="@name"/> </title>
+                       <para> <xsl:value-of select="text()"/> </para>
+                       <xsl:choose>
+                               <xsl:when test="name(.)='struct'">
+                                       <para> <emphasis>Structure</emphasis> (sequence complex type in WSDL)</para>
+                                       <para> Fields: ( <type>type </type> <structfield>name</structfield> description )</para>
+                               </xsl:when>
+                               <xsl:when test="name(.)='enum'">
+                                       <para> <emphasis>Enumeration</emphasis> (restriction of xsd:string in WSDL),
+                                               exactly one of the values must be specified.
+                                       </para>
+                                       <para> Values: </para>
+                               </xsl:when>
+                               <xsl:when test="name(.)='flags'">
+                                       <para> <emphasis>Flags</emphasis> (sequence of restricted xsd:string in WSDL),
+                                               any number of values can be specified together.
+                                       </para>
+                                       <para> Values: </para>
+                               </xsl:when>
+                       </xsl:choose>
+                       <variablelist>
+                               <xsl:for-each select="elem|val">
+                                       <varlistentry>
+                                               <term>
+                                                       <xsl:choose>
+                                                               <xsl:when test="name(.)='elem'">
+                                                                       <type>
+                                                                               <xsl:choose>
+                                                                                       <xsl:when test="@type!='string' and @type!='int' and @type!='xsd:string' and @type!='xsd:int' and @type!='xsd:boolean' and @type!='xsd:long'">
+                                                                                               <link linkend="type:{@type}">
+                                                                                                       <xsl:value-of select="@type "/> 
+                                                                                               </link>
+                                                                                       </xsl:when>
+                                                                                       <xsl:otherwise><xsl:value-of select="@type "/></xsl:otherwise>
+                                                                               </xsl:choose>
+                                                                       </type>
+                                                                       <!-- <type><xsl:value-of select="@type"/></type> -->
+                                                                       <xsl:value-of select="' '"/>
+                                                                       <structfield><xsl:value-of select="@name"/></structfield>
+                                                               </xsl:when>
+                                                               <xsl:otherwise>
+                                                                       <constant><xsl:value-of select="@name"/></constant>
+                                                               </xsl:otherwise>
+                                                       </xsl:choose>
+                                               </term>
+                                               <listitem>
+                                                       <simpara>
+                                                               <xsl:if test="@optional = 'yes'"> (optional) </xsl:if>
+                                                               <xsl:if test="@list = 'yes'"> (multiple occurence) </xsl:if>
+                                                               <xsl:value-of select=" text()"/>
+                                                       </simpara>
+                                               </listitem>
+                                       </varlistentry>
+                               </xsl:for-each>
+                       </variablelist>
+               </sect2>
+       </xsl:for-each>
+</xsl:template>
+
+
+</xsl:stylesheet>
index 2ded065..3647e56 100755 (executable)
@@ -20,6 +20,9 @@
 
        Revision history:
        $Log$
+       Revision 1.28  2004/11/29 15:16:26  zsalvet
+       Add ws-interface to checkout/build machinery.
+       
        Revision 1.27  2004/11/29 13:55:02  akrenek
        added dependence on ws-interface
        
                 Load version file 
             ========================================= -->
        <property file="${module.version.file}"/>
+               <property file="${module.build.file}"/>
                        
        <!-- ===============================================
                  Public common targets
diff --git a/org.glite.lb/project/build.number b/org.glite.lb/project/build.number
new file mode 100644 (file)
index 0000000..ca4c000
--- /dev/null
@@ -0,0 +1,2 @@
+#Sun Apr 03 06:58:44 CEST 2005
+module.build=223
index 8757f10..2adcea6 100644 (file)
@@ -1,15 +1,19 @@
+
 ###################################################################
 # System dependencies
 ###################################################################
 
-org.glite.version                              = HEAD
-org.glite.lb.version                           = HEAD
-
-# Component dependencies tag = do not remove this line =
-org.glite.lb.client-interface.version          = HEAD
-org.glite.lb.ws-interface.version              = HEAD
-org.glite.lb.common.version                    = HEAD
-org.glite.lb.client.version                    = HEAD
-org.glite.lb.server.version                    = HEAD
-org.glite.lb.server-bones.version              = HEAD
-org.glite.lb.logger.version                    = HEAD
+       
+
+       org.glite.version                                               = glite_R_1_0_12
+       org.glite.lb.version                                    = glite-lb_R_1_0_1
+               
+       org.glite.lb.client-interface.version   = glite-lb-client-interface_R_1_0_2
+       org.glite.lb.ws-interface.version               = glite-lb-ws-interface_R_1_0_1
+       org.glite.lb.common.version                             = glite-lb-common_R_1_1_4
+       org.glite.lb.client.version                             = glite-lb-client_R_1_0_1
+       org.glite.lb.server-bones.version               = glite-lb-server-bones_R_1_0_0
+       org.glite.lb.logger.version                             = glite-lb-logger_branch_1_0_0
+       org.glite.lb.server.version                             = glite-lb-server_R_1_0_1
+                               
+
index b8e5399..cbfd891 100644 (file)
@@ -1,12 +1,12 @@
 @type _common_
-       timeval timestamp       timestamp of event generation
+       timeval timestamp       Time the event was generated.
        _alias_ date            ULM
-       timeval arrived         timestamp of event store
+       timeval arrived         Time the event was stored into the bookkeeping server database.
        _alias_ arr_date        ULM
        _optional_
-       string  host            hostname of the machine where the event was generated
+       string  host            Hostname of the machine where the event was generated.
        _alias_ host            ULM
-       int     level           logging level (system, debug, ...)
+       int     level           Logging level (in the range from DEBUG to EMERGENCY).
        _alias_ lvl             ULM
        _code_  EMERGENCY       emergency
        _code_  ALERT           alert
        _code_  SYSTEM          system
        _code_  IMPORTANT       important
        _code_  DEBUG           debug
-       int     priority        message priority (yet 0 for asynchronous and 1 for synchronous transfers)
+       int     priority        Message priority (yet 0 for asynchronous and 1 for synchronous transfers).
        _null_  -1
-       jobid   jobId           DataGrid job id of the source job
-       string  seqcode         sequence code assigned to the event
-       string  user            identity (cert. subj.) of the generator
-       logsrc  source          source (WMS component) which generated this event
-#      string  prog            name of program ("EDG WMS" of name of the application)
-       string  src_instance    instance of WMS component (e.g. service communication endpoint)
+       jobid   jobId           Grid job id of the job the event belongs to.
+       string  seqcode         Sequence code assigned to the event.
+       string  user            Identity (certificate subject) of the event sender.
+       logsrc  source          Source (software component) which generated this event.
+#      string  prog            name of program ("EDG WMS" of name of the application).
+       string  src_instance    Instance of source component (e.g. service communication endpoint).
        _optional_
 
-@type Transfer         Start, success, or failure of job transfer to another component
-       logsrc  destination     destination where the job is being transfered to
-       string  dest_host       destination hostname
-       string  dest_instance   destination instance
+@type Transfer         Start, success, or failure of job transfer to another component.
+       logsrc  destination     Destination where the job is being transfered to.
+       string  dest_host       Hostname of server that takes over control of the job.
+       string  dest_instance   Service (instance) that takes over control of the job.
        _optional_
-       string  job             job description in receiver language
-       int     result          result of the attempt
-       _code_  START           the sending component has started or is about to start the transfer
-       _code_  OK              job was sent successfully
-       _code_  REFUSED         job was refused by the other component
-       _code_  FAIL            transfer failed for other reason than explicit refusal (eg. network timeout)
-       string  reason          detailed description of transfer, especially reason of failure
+       string  job             Job description in receiver's language.
+       int     result          Result code of the transfer attempt (START, OK, REFUSED or FAIL).
+       _code_  START           The sending component has started or is about to start the transfer.
+       _code_  OK              The job was sent successfully.
+       _code_  REFUSED         The job was refused by the other component.
+       _code_  FAIL            The transfer failed for other reason than explicit refusal (eg. network timeout).
+       string  reason          Detailed description of the transfer, especially reason of failure.
        _optional_
-       string  dest_jobid      destination internal jobid
+       string  dest_jobid      Job id as assigned by the receiving software component.
        _optional_
 
-@type Accepted         Accepting job (successful couterpart to Transfer)
-       logsrc  from            where was the job received from
-       string  from_host       sending component hostname
-       string  from_instance   sending component instance
+@type Accepted         Accepting job (successful counterpart to Transfer).
+       logsrc  from            The software component  the job was received from.
+       string  from_host       Hostname of the component the job was received from.
+       string  from_instance   Instance of the component the job was received from.
        _optional_
-       string  local_jobid     new jobId (Condor, Globus ...) assigned by the receiving component
+       string  local_jobid     New job id as assigned by the receiving component.
 
-@type Refused          Refusing job (unsuccessful couterpart to Transfer)
-       logsrc  from            where was the job received from
-       string  from_host       sending component hostname
-       string  from_instance   sending component instance
+@type Refused          Refusing job (unsuccessful counterpart to Transfer).
+       logsrc  from            The software component that tried to send the job.
+       string  from_host       Hostname of the component that tried to send the job.
+       string  from_instance   Instance of the component that tried to send the job.
        _optional_
-       string  reason          reason of refusal
-
-@type EnQueued         The job has been enqueued in an inter-component queue
-       string  queue           destination queue
-       string  job             job description in receiver language
-       int     result          result of the attempt
-       _code_  START           the sending component has started or is about to start the transfer
-       _code_  OK              job was sent successfully
-       _code_  REFUSED         job was refused by the other component
-       _code_  FAIL            transfer failed for other reason than explicit refusal (eg. network timeout)
-       string  reason          detailed description of transfer, especially reason of failure
-
-@type DeQueued         The job has been dequeued from an inter-component queue
-       string  queue           queue name
-       string  local_jobid     new jobId assigned by the receiving component
-
-@type HelperCall       Helper component is called
-       string  helper_name     name of the called component
-       string  helper_params   parameters of the call
-       int     src_role        whether the logging component is called or calling one
-       _code_  CALLING         the logging component is caller
-       _code_  CALLED          the logging component is callee
-
-@type HelperReturn     Helper component is returning the control
-       string  helper_name     name of the called component
-       string  retval          returned data
-       int     src_role        whether the logging component is called or calling one
-       _code_  CALLING         the logging component is caller
-       _code_  CALLED          the logging component is callee
-
-@type Running          Executable started
-       string  node            worker node where the executable is run
-
-@type Resubmission     Result of resubmission decision
-       int     result          result code
-       _code_  WILLRESUB       will be resubmitted
-       _code_  WONTRESUB       will not be resubmitted
-       string  reason          reason for the decision
-       string  tag             value of the attribute on which the decision is based
-
-@type Done             Execution terminated (normally or abnormally)
-       int     status_code     way of termination
-       _code_  OK              terminated by itself
-       _code_  FAILED          disappeared from LRMS
-       _code_  CANCELLED       cancelled by user request
-       string  reason          reason for the change
-       int     exit_code       process exit code
+       string  reason          Description of the reason why the job was refused.
+
+@type EnQueued         The job has been enqueued in an inter-component queue.
+       string  queue           Queue into which the job has been stored for retrieval by another component.
+       string  job             Job description in the receiver's language.
+       int     result          Result code of the attempt to put job into the queue (START, OK, REFUSED or FAIL).
+       _code_  START           The sending component has started or is about to start enqueuing the job.
+       _code_  OK              The job was enqueued successfully.
+       _code_  REFUSED         The job was refused by the other component.
+       _code_  FAIL            The transfer failed for other reason than explicit refusal.
+       string  reason          Detailed description of the attempt to enqueue the job, especially the reason of failure.
+
+@type DeQueued         The job has been dequeued from an inter-component queue.
+       string  queue           Name of the queue the job was obtained from.
+       string  local_jobid     New job id as assigned by the retreiving component.
+
+@type HelperCall       Helper component is called.
+       string  helper_name     Name of the called helper component.
+       string  helper_params   Parameters of the call to the helper component.
+       int     src_role        The role the event sender is playing in the helper call (CALLING or CALLEE).
+       _code_  CALLING         The logging component is caller.
+       _code_  CALLED          The logging component is callee.
+
+@type HelperReturn     Helper component is returning the control.
+       string  helper_name     Name of the called helper component.
+       string  retval          Data returned by the call to the helper component.
+       int     src_role        The role the event sender is playing in the helper call (CALLING or CALLEE).
+       _code_  CALLING         The logging component is caller.
+       _code_  CALLED          The logging component is callee.
+
+@type Running          Executable started.
+       string  node            Worker node on which the job executable is being run.
+
+@type Resubmission     Result of resubmission decision.
+       int     result          Result code of the resubmission decision (WILLRESUB or WONTRESUB).
+       _code_  WILLRESUB       The job will be resubmitted.
+       _code_  WONTRESUB       The job will not be resubmitted.
+       string  reason          Reason why the job will or will not be resubmitted.
+       string  tag             Value of the attribute on which the decision to resubmit the job was based.
+
+@type Done             Execution terminated (normally or abnormally).
+       int     status_code     Reason code for the termination of the job (OK, FAILED or CANCELLED).
+       _code_  OK              The job terminated by itself.
+       _code_  FAILED          The job disappeared from LRMS.
+       _code_  CANCELLED       The job was cancelled by user request.
+       string  reason          Detailed description why the job was terminated.
+       int     exit_code       Exit code of the job's process.
        _null_  -1
 
-@type Cancel           Cancel operation has been attempted on the job
-       int     status_code     classification of the cancel
-       _code_  REQ             request acknowledged
-       _code_  REFUSE          request declined by this component
-       _code_  DONE            request completed by whole WMS
-       _code_  ABORT           request refused by whole WMS
-       string  reason  detailed description
+@type Cancel           Cancel operation has been attempted on the job.
+       int     status_code     Classification of the attempt to cancel the job (REQ, REFUSE, DONE or ABORT).
+       _code_  REQ             The request was acknowledged.
+       _code_  REFUSE          The request was declined by this component.
+       _code_  DONE            The request was completed by whole WMS.
+       _code_  ABORT           The request was refused by whole WMS.
+       string  reason          Detailed description of the attempt to cancel the job, especially the reason of failure.
 
-@type Abort            Job aborted by system
-       string  reason          reason of abort
+@type Abort            Job aborted by system.
+       string  reason          Reason why the job was aborted by the system.
 
 @type Clear            Job cleared, output sandbox removed
-       int     reason          why the job was cleared
-       _code_  USER            user retrieved output sandbox
-       _code_  TIMEOUT         timed out, resource purge forced
-       _code_  NOOUTPUT        no output was generated
+       int     reason          Description of the reason why the job was cleared and the output sandbox removed (USER, TIMEOUT or NOOUTPUT).
+       _code_  USER            User retrieved output sandbox.
+       _code_  TIMEOUT         Timed out, resource forced purge of the sandbox.
+       _code_  NOOUTPUT        No output was generated.
 
-@type Purge            Job is purged from bookkepping server
+@type Purge            Job is purged from bookkepping server.
 
-@type Match            Matching CE found
-       string  dest_id         Id of the destination CE/queue
+@type Match            Matching CE found.
+       string  dest_id         Identification of the queue on the CE that the job could be send to.
        
-@type Pending          No match found yet
-       string  reason          why matching CE cannot be found
+@type Pending          No matching CE found yet.
+       string  reason          Description why the matching CE for the job was not found (yet).
 
-@type RegJob           New job registration
-       string  jdl             job description
-       string  ns              NetworkServer handling the job
-       jobid   parent          jobid of parent job
+@type RegJob           New job registration.
+       string  jdl             Job description of the job being registered.
+       string  ns              NetworkServer handling the newly registered job.
+       jobid   parent          Grid job id of the parent job registering this new one.
        _optional_
 
-       int     jobtype         job type
-       _code_  SIMPLE          simple job
-       _code_  DAG             dag (containing static set of subjobs)
-       _code_  PARTITIONABLE   partitionable (may become partitioned)
-       _code_  PARTITIONED     partitioned (dynamically created dag)
+       int     jobtype         Type of the job being registered (SIMPLE, DAG, PARTITIONABLE or PARTITIONED).
+       _code_  SIMPLE          The job is simple job.
+       _code_  DAG             The job is dag (containing static set of subjobs).
+       _code_  PARTITIONABLE   The job is partitionable (may become partitioned).
+       _code_  PARTITIONED     The job is partitioned (dynamically created dag).
        
-       int     nsubjobs        number of subjobs
+       int     nsubjobs        Number of subjobs this job plans to spawn.
        _optional_
-       string  seed            seed for subjob id generation
+       string  seed            Seed for subjob id generation.
        _optional_
 
-@type Chkpt            Application-specific checkpoint record
-       string  tag             checkpoint tag
-       string  classad         checkpoint value
+@type Chkpt            Application-specific checkpoint record.
+       string  tag             Application specific checkpoint tag.
+       string  classad         Application specific checkpoint value.
 
-@type Listener                 Listening network port for interactive control
-       string  svc_name        port instance name
-       string  svc_host        hostname
-       port    svc_port        port number
+@type Listener                 Listening network port for interactive control.
+       string  svc_name        Name of the port instance for interactive job control.
+       string  svc_host        Hostname of the interactive job controller.
+       port    svc_port        Port number of the interactive job controller.
 
-@type CurDescr         current state of job processing (optional event)
-       string  descr           description of current job transformation (output of helper)
+@type CurDescr         Current state of job processing (optional event).
+       string  descr           Description of the current job transformation (output of the helper).
 
-@type UserTag          user tag -- arbitrary name=value pair
-       string  name    tag name
-       string  value   tag value
+@type UserTag          User tag -- arbitrary name=value pair.
+       string  name    Arbitrary user tag name.
+       string  value   Arbitrary user tag value.
 
-@type ChangeACL                Management of ACL stored on bookkepping server
-       string  user_id         DN or VOMS parameter (in format VO:group)
-       int     user_id_type    type of information given in user_id (DN or VOMS)
+@type ChangeACL                Management of ACL stored on bookkepping server.
+       string  user_id         DN or VOMS parameter (in format VO:group).
+       int     user_id_type    Type of information given in user_id (DN or VOMS).
        _null_  -1
-       int     permission      ACL permission to change (currently only READ)
+       int     permission      ACL permission to change (currently only READ).
        _null_  -1
-       int     permission_type type of permission requested ('allow', 'deny')
+       int     permission_type Type of permission requested ('allow', 'deny').
        _null_  -1
-       int     operation       operation requested to perform with ACL (add, remove)
+       int     operation       Operation requested to perform with ACL (add, remove).
        _null_  -1
 
-@type Notification     Management of notification service
-       notifid notifId         notification id
-       string  owner           owner
-       string  dest_host       destination host
-       port    dest_port       destination port
-       string  jobstat         job status
+@type Notification     Management of notification service.
+       notifid notifId         Notification id.
+       string  owner           Identification of the job owner (certificate subject).
+       string  dest_host       Hostname the notification is sent to.
+       port    dest_port       Port number the notification is sent to.
+       string  jobstat         Status of the job (the notification content).
 
index ccabc74..14d83c0 100644 (file)
                logsrc=>'"int"',
                port=>'"int"',
                int=>'"int"'
+       },
+       'wsdl'=>{
+               bool=>'"xsd:boolean"',
+               string=>'"xsd:string"',
+               int=>'"xsd:int"',
+               jobid=>'"xsd:string"',
+               jobstat=>'"jobStatus"',
+               usertag=>'"tagValue"',
+               timeval=>'"timeval"',
        }
 );
 
+%baseTypes = (
+       intlist=>'int',
+       strlist=>'string',
+       stslist=>'jobstat',
+       taglist=>'usertag'
+);
+
 %toString = (
        C=>{
                int=>'qq{asprintf(&$dst,"%d",$src);}',
index a999d55..34be4df 100644 (file)
@@ -1,4 +1,4 @@
-#Fri Dec 10 13:30:32 CET 2004
-module.version=0.3.0
-module.build=113
-module.age=2
+
+module.version = 1.0.1
+module.age = 1
+                               
\ No newline at end of file
index 539736d..3730746 100644 (file)
@@ -35,7 +35,6 @@ PREFIX=/opt/glite
 
 glite_location=$PREFIX
 globus_prefix=/opt/globus
-voms_prefix=/opt/glite
 nothrflavour=gcc32
 thrflavour=gcc32pthr
 myproxy_prefix=$globus_prefix
@@ -55,10 +54,7 @@ MYPROXYTHRINC:= -I${myproxy_prefix}/include/${thrflavour}
 
 DEBUG:=-g -O0
 
-# XXX: until VOMS is ready in SCM
-CFLAGS:= -DNOVOMS \
-       ${DEBUG} \
-       -DVOMS_INSTALL_PATH=\"${voms_prefix}\"\
+CFLAGS:= ${DEBUG} \
        ${MYPROXYINC} \
        -I${top_srcdir}/src -I${top_srcdir}/interface \
        -I${glite_location}/include
@@ -75,7 +71,7 @@ COMPILE:=libtool --mode=compile ${CC} ${CFLAGS}
 LINK:=libtool --mode=link ${CC} ${LDFLAGS}
 INSTALL:=libtool --mode=install install
 
-DAEMONOBJ:=renewd.o renew.o common.o commands.o api.o
+DAEMONOBJ:=renewd.o renew.o common.o commands.o api.o voms.o
 LIBOBJ:=api.o common.o
 CLIENTOBJ:=client.o
 
@@ -100,7 +96,7 @@ ${THRLIB}: ${THRLIBOBJ}
        ${LINK} -o $@ ${THRLIBLOBJ} -rpath ${glite_location}/lib
 
 ${DAEMON}: ${DAEMONOBJ}
-       ${LINK} -o $@ ${DAEMONOBJ} ${JOBIDLIB} ${MYPROXY_LIB} -lglobus_gss_assist_${nothrflavour} ${GLOBUS_LIBS} 
+       ${LINK} -o $@ ${DAEMONOBJ} ${JOBIDLIB} ${MYPROXY_LIB} -lvomsc -lglobus_gss_assist_${nothrflavour} ${GLOBUS_LIBS} 
 
 ${CLIENT}: ${CLIENTOBJ} ${LIB}
        ${LINK} -o $@ ${CLIENTOBJ} ${LIB} ${GLOBUS_LIBS}
@@ -138,7 +134,7 @@ install:
        ${INSTALL} -m 644 ${top_srcdir}/LICENSE ${PREFIX}/share/doc/${package}-${version}
        cd ${top_srcdir}/interface && ${INSTALL} -m 644 renewal.h ${PREFIX}/include/glite/security/proxyrenewal
 
-       ${INSTALL} -m 755 ${top_srcdir}/config/startup ${PREFIX}/etc/init.d/${DAEMON}
+       ${INSTALL} -m 755 ${top_srcdir}/config/startup ${PREFIX}/etc/init.d/glite-proxy-renewald
 
 
 clean:
index fcced8d..0bf0729 100755 (executable)
@@ -20,6 +20,9 @@
 
        Revision history:
        $Log$
+       Revision 1.4  2004/11/02 15:10:43  dkouril
+       RPM description
+       
        Revision 1.3  2004/07/30 08:31:07  dimeglio
        Changed default Ant target from compile to dist
        
@@ -92,6 +95,8 @@
                 Load version file 
             ========================================= -->
        <property file="${module.version.file}"/>
+               <property file="${module.build.file}"/>
+       <property file="${module.build.file}" />
                
        <!-- ==============================================
                 Local private targets
index db273c2..26ba757 100755 (executable)
@@ -9,6 +9,8 @@ GLITE_LOCATION_VAR=${GLITE_LOCATION_VAR:-/opt/glite/var}
 
 PROXY_REPOSITORY="$GLITE_LOCATION_VAR/spool/glite-renewd"
 
+unset creds
+
 start()
 {
        if test -z "$GLITE_USER" ;then
@@ -17,13 +19,25 @@ start()
                return 1
        fi
 
-       if [ -n "$GLITE_HOST_CERT" ]; then 
-               X509_USER_CERT="$GLITE_HOST_CERT"
-               export X509_USER_CERT
+       [ -n "$GLITE_HOST_CERT" -a -n "$GLITE_HOST_KEY" ] &&
+               creds="-t $GLITE_HOST_CERT -k $GLITE_HOST_KEY"
+
+       if test -z "$creds"; then
+               if su - $GLITE_USER -c "test -r /etc/grid-security/hostkey.pem -a -r /etc/grid-security/hostcert.pem"; then
+                       echo "$0: WARNING: /etc/grid-security/hostkey.pem readable by $GLITE_USER"
+                       creds="-t /etc/grid-security/hostcert.pem -k /etc/grid-security/hostkey.pem"
+               fi
        fi
-       if [ -n "$GLITE_HOST_KEY" ]; then
-               X509_USER_KEY="$GLITE_HOST_KEY"
-               export X509_USER_KEY
+
+       [ -z "$creds" ] &&
+               echo $0: WARNING: No credentials specified. Using default lookup which is dangerous. >&2
+
+       # workaround for VOMS_FindByVO that seems to always require user's own VOMS config file (bug #7511)
+       user_voms_config=$HOME/.glite/vomses
+       if [ ! -f "$user_voms_config" ]; then
+               rm -f /tmp/renewal_vomses
+               su - $GLITE_USER -c "touch /tmp/renewal_vomses && chmod 644 /tmp/renewal_vomses"
+               user_voms_config=/tmp/renewal_vomses
        fi
 
        echo -n Starting ProxyRenewal Daemon: glite-proxy-renewd ...
@@ -34,32 +48,26 @@ start()
                chmod 0700 $PROXY_REPOSITORY
        fi
        
-       su - $GLITE_USER -c "$GLITE_LOCATION/bin/glite-proxy-renewd \
-               -r $PROXY_REPOSITORY" && echo " done"
+       su - $GLITE_USER -c "VOMS_USERCONF=$user_voms_config \
+               $GLITE_LOCATION/bin/glite-proxy-renewd \
+               -r $PROXY_REPOSITORY $creds -A" && echo " done"
 }
 
 stop()
 {
        echo -n "Stopping ProxyRenewal Daemon: glite-proxy-renewd ..."
-       PIDS=`ps -C glite-proxy-renewd -o pid --no-heading`
-       if [ -z "$PIDS" ]; then
-               echo " no process glite-proxy-renewd running"
-               exit 1
-       else
-               kill $PIDS && echo " done"
-       fi
+       killall glite-proxy-renewd
+       echo " done"
 }
 
 status()
 {
-       PIDS=`ps -C glite-proxy-renewd -o pid --no-heading`
-       if ps p $PIDS >/dev/null 2>&1; then
-               echo glite-proxy-renewd running \($PIDS\)
-               return 0
+       if netstat -an --unix | grep "^unix .* LISTEN.* /tmp/dgpr_renew_" >/dev/null 2>&1 ;then
+               echo glite-proxy-renewd running
+       else
+               echo glite-proxy-renewd not running
+               return 1
        fi
-       
-       echo glite-proxy-renewd not running
-       return 1
 }
 
 case x$1 in
diff --git a/org.glite.security.proxyrenewal/project/build.number b/org.glite.security.proxyrenewal/project/build.number
new file mode 100644 (file)
index 0000000..946954e
--- /dev/null
@@ -0,0 +1,2 @@
+#Thu Mar 24 12:13:53 CET 2005
+module.build=210
index 0745aa0..c744014 100644 (file)
@@ -1,4 +1,4 @@
-#Fri Dec 10 13:12:42 CET 2004
-module.version=0.1.1
-module.build=104
-module.age=1
+
+module.version = 1.0.11
+module.age = 1
+                               
diff --git a/org.glite.security.proxyrenewal/src/acstack.h b/org.glite.security.proxyrenewal/src/acstack.h
new file mode 100755 (executable)
index 0000000..a833a31
--- /dev/null
@@ -0,0 +1,79 @@
+/*********************************************************************
+ *
+ * Authors: Vincenzo Ciaschini - Vincenzo.Ciaschini@cnaf.infn.it 
+ *
+ * Copyright (c) 2002, 2003 INFN-CNAF on behalf of the EU DataGrid.
+ * For license conditions see LICENSE file or
+ * http://www.edg.org/license.html
+ *
+ * Parts of this code may be based upon or even include verbatim pieces,
+ * originally written by other people, in which case the original header
+ * follows.
+ *
+ *********************************************************************/
+#ifndef _ACSTACK_H
+#define _ACSTACK_H
+
+#include <openssl/asn1.h>
+#include <openssl/stack.h>
+#include <openssl/safestack.h>
+
+#define IMPL_STACK(type) \
+   DECLARE_STACK_OF(type) \
+   STACK_OF(type) *sk_##type##_new (int (*cmp)(const type * const *, const type * const *)) \
+       { return sk_new ( (int (*)(const char * const *, const char * const *))cmp);} \
+   STACK_OF(type) *sk_##type##_new_null () { return sk_new_null(); } \
+   void   sk_##type##_free (STACK_OF(type) *st) { sk_free(st); } \
+   int    sk_##type##_num (const STACK_OF(type) *st) { return sk_num(st); } \
+   type  *sk_##type##_value (const STACK_OF(type) *st, int i) { return (type *)sk_value(st, i); } \
+   type  *sk_##type##_set (STACK_OF(type) *st, int i, type *val) { return ((type *)sk_set(st, i, (char *)val)); } \
+   void   sk_##type##_zero (STACK_OF(type) *st) { sk_zero(st);} \
+   int    sk_##type##_push (STACK_OF(type) *st, type *val) { return sk_push(st, (char *)val); } \
+   int    sk_##type##_unshift (STACK_OF(type) *st, type *val) { return sk_unshift(st, (char *)val); } \
+   int    sk_##type##_find (STACK_OF(type) *st, type *val) { return sk_find(st, (char *)val); } \
+   type  *sk_##type##_delete (STACK_OF(type) *st, int i) { return (type *)sk_delete(st, i); } \
+   type  *sk_##type##_delete_ptr (STACK_OF(type) *st, type *ptr) { return (type *)sk_delete_ptr(st, (char *)ptr); } \
+   int    sk_##type##_insert (STACK_OF(type) *st, type *val, int i) { return sk_insert(st, (char *)val, i); } \
+   int (*sk_##type##_set_cmp_func (STACK_OF(type) *st, int (*cmp)(const type * const *, const type * const *)))(const type * const *, const type * const *) \
+       { return (int ((*)(const type * const *, const type * const *)))sk_set_cmp_func (st, (int (*)(const char * const *, const char * const *))cmp); } \
+   STACK_OF(type) *sk_##type##_dup (STACK_OF(type) *st) { return sk_dup(st); } \
+   void   sk_##type##_pop_free (STACK_OF(type) *st, void (*func)(type *)) { sk_pop_free(st, (void (*)(void *))func); } \
+   type  *sk_##type##_shift (STACK_OF(type) *st) { return (type *)sk_shift(st); } \
+   type  *sk_##type##_pop (STACK_OF(type) *st) { return (type *)sk_pop(st); } \
+   void   sk_##type##_sort (STACK_OF(type) *st) { sk_sort(st); } \
+   STACK_OF(type) *d2i_ASN1_SET_OF_##type (STACK_OF(type) **st, unsigned char **pp, long length, type *(*d2ifunc)(), void (*freefunc)(type *), int ex_tag, int ex_class) \
+       { return d2i_ASN1_SET(st, pp, length, (char *(*)())d2ifunc, (void (*)(void *))freefunc, ex_tag, ex_class); } \
+   int i2d_ASN1_SET_OF_##type (STACK_OF(type) *st, unsigned char **pp, int (*i2dfunc)(), int ex_tag, int ex_class, int is_set) \
+       { return i2d_ASN1_SET(st, pp, i2dfunc, ex_tag, ex_class, is_set); }  \
+   unsigned char *ASN1_seq_pack_##type (STACK_OF(type) *st, int (*i2d)(), unsigned char **buf, int *len) { return ASN1_seq_pack(st, i2d, buf, len); } \
+   STACK_OF(type) *ASN1_seq_unpack_##type (unsigned char *buf, int len, type *(*d2i)(), void (*freefunc)(type *)) \
+       { return ASN1_seq_unpack(buf, len, (char *(*)())d2i, (void (*)(void *))freefunc); }
+
+
+#define DECL_STACK(type) \
+   DECLARE_STACK_OF(type) \
+   extern STACK_OF(type) *sk_##type##_new (int (*)(const type * const *, const type * const *)); \
+   extern STACK_OF(type) *sk_##type##_new_null (); \
+   extern void   sk_##type##_free (STACK_OF(type) *); \
+   extern int    sk_##type##_num (const STACK_OF(type) *); \
+   extern type  *sk_##type##_value (const STACK_OF(type) *, int); \
+   extern type  *sk_##type##_set (STACK_OF(type) *, int, type *); \
+   extern void   sk_##type##_zero (STACK_OF(type) *); \
+   extern int    sk_##type##_push (STACK_OF(type) *, type *); \
+   extern int    sk_##type##_unshift (STACK_OF(type) *, type *); \
+   extern int    sk_##type##_find (STACK_OF(type) *, type *); \
+   extern type  *sk_##type##_delete (STACK_OF(type) *, int); \
+   extern type  *sk_##type##_delete_ptr (STACK_OF(type) *, type *); \
+   extern int    sk_##type##_insert (STACK_OF(type) *, type *, int); \
+   extern int (*sk_##type##_set_cmp_func (STACK_OF(type) *, int (*)(const type * const *, const type * const *)))(const type * const *, const type * const *); \
+   extern STACK_OF(type) *sk_##type##_dup (STACK_OF(type) *); \
+   extern void   sk_##type##_pop_free (STACK_OF(type) *, void (*)(type *)); \
+   extern type  *sk_##type##_shift (STACK_OF(type) *); \
+   extern type  *sk_##type##_pop (STACK_OF(type) *); \
+   extern void   sk_##type##_sort (STACK_OF(type) *); \
+   extern STACK_OF(type) *d2i_ASN1_SET_OF_##type (STACK_OF(type) **, unsigned char **, long, type *(*)(), void (*)(type *), int, int); \
+   extern int i2d_ASN1_SET_OF_##type (STACK_OF(type) *, unsigned char **, int (*)(), int, int, int); \
+   extern unsigned char *ASN1_seq_pack_##type (STACK_OF(type) *, int (*)(), unsigned char **, int *); \
+   extern STACK_OF(type) *ASN1_seq_unpack_##type (unsigned char *, int, type *(*)(), void (*)(type *)) ;
+
+#endif
index fc6235e..79b96d3 100644 (file)
@@ -1,15 +1,12 @@
 #include "renewal_locl.h"
 #include "renewd_locl.h"
 
-#ifndef NOVOMS
-#include <voms_apic.h>
-#endif
+#include "glite/security/voms/voms_apic.h"
 
 #ident "$Header$"
 
 #define SEPARATORS ",\n"
 #define RENEWAL_START_FRACTION 0.75 /* XXX */
-#define RENEWAL_CLOCK_SKEW (5 * 60)
 #define RENEWAL_MIN_LIFETIME (15 * 60)
 
 extern char *repository;
@@ -144,42 +141,58 @@ copy_file_content(FILE *in, FILE *out)
 static time_t
 get_delta(time_t current_time, time_t start_time, time_t end_time)
 {
-   time_t length, lifetime;
+   time_t remaining_life;
+   time_t life_to_lose;
+   time_t limit;
    time_t delta;
-   int condor_tested = 0;
 
-   lifetime = end_time - start_time;
-   delta = 0;
-   while (1) {
-      if (end_time - current_time <= RENEWAL_MIN_LIFETIME)
-        /* if the proxy is too short, renew it as soon as possible */
-        return RENEWAL_CLOCK_SKEW;
-
-      /* renewal starts at 3/4 of lifetime */
-      length = end_time - (start_time + delta);
-      delta += length * RENEWAL_START_FRACTION;
-
-      if (!condor_tested && delta > lifetime - condor_limit) {
-        /* Condor requires the proxies to be renewed a specified time interval
-            before the proxies have expired (see the 
-           GRIDMANAGER_MINIMUM_PROXY_TIME variable). We must ensure that
-           renewal takes place before Condor does this check */
-        if (current_time > end_time - condor_limit) {
-           edg_wlpr_Log(LOG_ERR, "Proxy lifetime exceeded value of the Condor limit!"); 
-        }
-        else
-           delta = lifetime - condor_limit - RENEWAL_CLOCK_SKEW;
-        condor_tested = 1;
-      }
+   if (RENEWAL_MIN_LIFETIME > condor_limit) {
+     limit = RENEWAL_MIN_LIFETIME;
+   } else {
+     limit = condor_limit;
+   }
 
-      if (abs(current_time - (start_time + delta)) < RENEWAL_CLOCK_SKEW)
-        continue;
-      
-      return (start_time + delta) - current_time;
-   };
+   limit += RENEWAL_CLOCK_SKEW;
 
-   /* not reachable */
-   return 0;
+   if (current_time + limit >= end_time) {
+     /* if the proxy is too short, renew it as soon as possible */
+
+     if (current_time + condor_limit > end_time ) {
+       edg_wlpr_Log(LOG_ERR, "Remaining proxy lifetime fell below the value of the Condor limit!");
+     }
+
+     return 0;
+   }
+
+   remaining_life = end_time - current_time;
+
+   /* renewal should gain the jobs an extra lifetime of
+      RENEWAL_START_FRACTION (default 3/4) of the new proxy's
+      lifetime. If the time remaining on the current proxy is already
+      small then the jobs may gain an extra lifetime of more than that.
+
+      In any case, a renewal will be scheduled to happen before the
+      lifetime limit.
+
+      'life_to_lose' is the lifetime that will be lost, ie the time that
+      will still remain on the current proxy when it is renewed
+   */
+
+   life_to_lose = (1.0-RENEWAL_START_FRACTION)*60*60*DGPR_RETRIEVE_DEFAULT_HOURS;
+
+   if (life_to_lose < limit) {
+     life_to_lose = limit;
+   }
+
+   delta = life_to_lose - limit;
+
+   while( remaining_life < (limit + delta) ) {
+     delta *= (1.0-RENEWAL_START_FRACTION);
+   }
+
+   life_to_lose = limit + delta;
+
+   return (remaining_life - life_to_lose);
 }
 
 int
@@ -506,19 +519,23 @@ get_record_ext(FILE *fd, proxy_record *record, int *last_used_suffix)
    char *p;
    proxy_record tmp_record;
    time_t current_time;
+   int line_num = 0;
 
    assert(record != NULL);
    memset(&tmp_record, 0, sizeof(tmp_record));
 
    current_time = time(NULL);
    while (fgets(line, sizeof(line), fd) != NULL) {
+      line_num++;
       free_record(&tmp_record);
       p = strchr(line, '\n');
       if (p)
         *p = '\0';
       ret = decode_record(line, &tmp_record);
-      if (ret)
-        return ret; /* XXX continue */
+      if (ret) {
+        edg_wlpr_Log(LOG_ERR, "Skipping invalid entry at line %d", line_num);
+        continue;
+      }
       if (record->suffix >= 0) {
         if (record->suffix == tmp_record.suffix) {
            record->suffix = tmp_record.suffix;
@@ -547,26 +564,29 @@ get_record_ext(FILE *fd, proxy_record *record, int *last_used_suffix)
       if (tmp_record.jobids.len == 0) {
         /* no jobs registered for this record, so use it initialized with the
          * parameters (currently myproxy location) provided by user */
-        char *server = record->myproxy_server;
-
-        memset(record, sizeof(*record), 0);
         record->suffix = tmp_record.suffix;
-        if (record->myproxy_server)
-           free(record->myproxy_server);
-        record->myproxy_server = server;
+        record->next_renewal = record->end_time = 0;
         free_record(&tmp_record);
         return 0;
       }
 
+      /* Proxies with VOMS attributes require a separate record, which is not
+       * shared with another proxies. The same applies it the unique flag was
+       * set by the caller */
+      if (record->voms_exts || record->unique)
+        continue;
+
       if (tmp_record.jobids.len > 0 && record->myproxy_server &&
          strcmp(record->myproxy_server, tmp_record.myproxy_server) != 0)
         continue;
 
       if (tmp_record.jobids.len > 0 &&
-         tmp_record.end_time - current_time < condor_limit) {
-        /* skip expired proxy (and that ones that are going to expire soon),
+          current_time + condor_limit + RENEWAL_CLOCK_SKEW > tmp_record.end_time) {
+
+        /* skip expired proxy (or ones that are going to expire soon),
            leaving it untouched (it will be removed after next run of the 
-           renewal process */
+           renewal process) */
+
         continue;
       }
 
@@ -615,6 +635,7 @@ store_record(char *basename, proxy_record *record)
    proxy_record tmp_record;
    char tmp_file[FILENAME_MAX];
    char meta_file[FILENAME_MAX];
+   int line_num = 0;
 
    assert (record != NULL);
 
@@ -633,13 +654,16 @@ store_record(char *basename, proxy_record *record)
       goto end;
    }
    while (fgets(line, sizeof(line), fd) != NULL) {
+      line_num++;
       free_record(&tmp_record);
       p = strchr(line, '\n');
       if (p)
         *p = '\0';
       ret = decode_record(line, &tmp_record);
-      if (ret)
-        goto end;
+      if (ret) {
+        edg_wlpr_Log(LOG_ERR, "Removing invalid entry at line %d in %s", line_num, basename);
+        continue;
+      }
       if (record->suffix == tmp_record.suffix &&
          record->unique == tmp_record.unique) {
         tmp_record.next_renewal = record->next_renewal;
@@ -854,7 +878,7 @@ find_voms_cert(char *file, int *present)
       return EDG_WLPR_ERROR_VOMS;
    }
 
-   ret = load_proxy(file, &cert, &privkey, &chain);
+   ret = load_proxy(file, &cert, &privkey, &chain, NULL);
    if (ret) {
       VOMS_Destroy(voms_info);
       return ret;
@@ -1194,8 +1218,7 @@ update_db(edg_wlpr_Request *request, edg_wlpr_Response *response)
               free_record(&record);
               record.suffix = suffix;
               record.myproxy_server = server;
-              edg_wlpr_Log(LOG_WARNING, "Removed expired proxy (suffix %d)",
-                           suffix);
+              edg_wlpr_Log(LOG_WARNING, "Removed expired proxy %s", cur_proxy);
            } else
               get_times(cur_proxy, &record);
         } else {
diff --git a/org.glite.security.proxyrenewal/src/newformat.h b/org.glite.security.proxyrenewal/src/newformat.h
new file mode 100755 (executable)
index 0000000..0efeb7e
--- /dev/null
@@ -0,0 +1,195 @@
+/*********************************************************************
+ *
+ * Authors: Vincenzo Ciaschini - Vincenzo.Ciaschini@cnaf.infn.it 
+ *
+ * Copyright (c) 2002, 2003 INFN-CNAF on behalf of the EU DataGrid.
+ * For license conditions see LICENSE file or
+ * http://www.edg.org/license.html
+ *
+ * Parts of this code may be based upon or even include verbatim pieces,
+ * originally written by other people, in which case the original header
+ * follows.
+ *
+ *********************************************************************/
+#ifndef _NEW_FORMAT_H
+#define _NEW_FORMAT_H
+#include <openssl/evp.h>
+#include <openssl/asn1.h>
+#include <openssl/asn1_mac.h>
+#include <openssl/x509.h>
+#include <openssl/x509v3.h>
+#include <openssl/stack.h>
+#include <openssl/safestack.h>
+
+#include "acstack.h"
+#if 0
+static STACK_OF(CRYPT_EX_DATA_FUNS) *AC_meth = NULL;
+
+static AC_METHOD meth = {
+  (int (*)())  i2d_AC,
+  (char *(*)())d2i_AC,
+  (char *(*)())AC_new,
+  (void (*)()) AC_free};
+a
+ASN1_METHOD *AC_asn1_meth(void)
+{
+  return &meth;
+}
+#endif
+
+typedef struct ACDIGEST {
+  ASN1_ENUMERATED *type;
+  ASN1_OBJECT     *oid;
+  X509_ALGOR      *algor;
+  ASN1_BIT_STRING *digest;
+} AC_DIGEST;
+
+typedef struct ACIS {
+  STACK_OF(GENERAL_NAME) *issuer;
+  ASN1_INTEGER  *serial;
+  ASN1_BIT_STRING *uid;
+} AC_IS;
+
+typedef struct ACFORM {
+  STACK_OF(GENERAL_NAME) *names;
+  AC_IS         *is;
+  AC_DIGEST     *digest;
+} AC_FORM;
+
+typedef struct ACACI {
+  STACK_OF(GENERAL_NAME) *names;
+  AC_FORM       *form;
+} AC_ACI;
+
+typedef struct ACHOLDER {
+  AC_IS         *baseid;
+  STACK_OF(GENERAL_NAMES) *name;
+  AC_DIGEST     *digest;
+} AC_HOLDER;
+
+typedef struct ACVAL {
+  ASN1_GENERALIZEDTIME *notBefore;
+  ASN1_GENERALIZEDTIME *notAfter;
+} AC_VAL;
+
+typedef struct asn1_string_st AC_IETFATTRVAL;
+
+typedef struct ACIETFATTR {
+  STACK_OF(GENERAL_NAMES)   *names;
+  STACK_OF(AC_IETFATTRVAL) *values;
+} AC_IETFATTR;
+
+typedef struct ACTARGET {
+  GENERAL_NAME *name;
+  GENERAL_NAME *group;
+  AC_IS        *cert;
+} AC_TARGET;
+typedef struct ACTARGETS {
+  STACK_OF(AC_TARGET) *targets;
+} AC_TARGETS;
+
+typedef struct ACATTR {
+  ASN1_OBJECT           *type;
+  STACK_OF(AC_IETFATTR) *ietfattr;
+} AC_ATTR;
+
+typedef struct ACINFO {
+  ASN1_INTEGER             *version;
+  AC_HOLDER                *holder;
+  AC_FORM                  *form;
+  X509_ALGOR               *alg;
+  ASN1_INTEGER             *serial;
+  AC_VAL                   *validity;
+  STACK_OF(AC_ATTR)        *attrib;
+  ASN1_BIT_STRING          *id;
+  STACK_OF(X509_EXTENSION) *exts;
+} AC_INFO;
+
+typedef struct ACC {
+  AC_INFO         *acinfo;
+  X509_ALGOR      *sig_alg;
+  ASN1_BIT_STRING *signature;
+} AC;
+
+typedef struct ACSEQ {
+  STACK_OF(AC) *acs;
+} AC_SEQ;
+
+DECL_STACK(AC_TARGET)
+DECL_STACK(AC_TARGETS)
+DECL_STACK(AC_IETFATTR)
+DECL_STACK(AC_IETFATTRVAL)
+DECL_STACK(AC_ATTR)
+DECL_STACK(AC);
+DECL_STACK(AC_INFO);
+DECL_STACK(AC_VAL);
+DECL_STACK(AC_HOLDER);
+DECL_STACK(AC_ACI);
+DECL_STACK(AC_FORM);
+DECL_STACK(AC_IS);
+DECL_STACK(AC_DIGEST);
+
+extern int i2d_AC_ATTR(AC_ATTR *a, unsigned char **pp);
+extern AC_ATTR *d2i_AC_ATTR(AC_ATTR **a, unsigned char **p, long length);
+extern AC_ATTR *AC_ATTR_new();
+extern void AC_ATTR_free(AC_ATTR *a);
+extern int i2d_AC_IETFATTR(AC_IETFATTR *a, unsigned char **pp);
+extern AC_IETFATTR *d2i_AC_IETFATTR(AC_IETFATTR **a, unsigned char **p, long length);
+extern AC_IETFATTR *AC_IETFATTR_new();
+extern void AC_IETFATTR_free (AC_IETFATTR *a);
+extern int i2d_AC_IETFATTRVAL(AC_IETFATTRVAL *a, unsigned char **pp);
+extern AC_IETFATTRVAL *d2i_AC_IETFATTRVAL(AC_IETFATTRVAL **a, unsigned char **pp, long length);
+extern AC_IETFATTRVAL *AC_IETFATTRVAL_new();
+extern void AC_IETFATTRVAL_free(AC_IETFATTRVAL *a);
+extern int i2d_AC_DIGEST(AC_DIGEST *a, unsigned char **pp);
+extern AC_DIGEST *d2i_AC_DIGEST(AC_DIGEST **a, unsigned char **pp, long length);;
+extern AC_DIGEST *AC_DIGEST_new(void);
+extern void AC_DIGEST_free(AC_DIGEST *a);
+extern int i2d_AC_IS(AC_IS *a, unsigned char **pp);
+extern AC_IS *d2i_AC_IS(AC_IS **a, unsigned char **pp, long length);
+extern AC_IS *AC_IS_new(void);
+extern void AC_IS_free(AC_IS *a);
+extern int i2d_AC_FORM(AC_FORM *a, unsigned char **pp);
+extern AC_FORM *d2i_AC_FORM(AC_FORM **a, unsigned char **pp, long length);
+extern AC_FORM *AC_FORM_new(void);
+extern void AC_FORM_free(AC_FORM *a);
+extern int i2d_AC_ACI(AC_ACI *a, unsigned char **pp);
+extern AC_ACI *d2i_AC_ACI(AC_ACI **a, unsigned char **pp, long length);
+extern AC_ACI *AC_ACI_new(void);
+extern void AC_ACI_free(AC_ACI *a);
+
+extern int i2d_AC_HOLDER(AC_HOLDER *a, unsigned char **pp);
+extern AC_HOLDER *d2i_AC_HOLDER(AC_HOLDER **a, unsigned char **pp, long length);
+extern AC_HOLDER *AC_HOLDER_new(void);
+extern void AC_HOLDER_free(AC_HOLDER *a);
+
+/* new AC_VAL functions by Valerio */
+extern int i2d_AC_VAL(AC_VAL *a, unsigned char **pp);
+extern AC_VAL *d2i_AC_VAL(AC_VAL **a, unsigned char **pp, long length);
+extern AC_VAL *AC_VAL_new(void);
+extern void AC_VAL_free(AC_VAL *a);
+/* end*/
+
+extern int i2d_AC_INFO(AC_INFO *a, unsigned char **pp);
+extern AC_INFO *d2i_AC_INFO(AC_INFO **a, unsigned char **p, long length);
+extern AC_INFO *AC_INFO_new(void);
+extern void AC_INFO_free(AC_INFO *a);
+extern int i2d_AC(AC *a, unsigned char **pp) ;
+extern AC *d2i_AC(AC **a, unsigned char **pp, long length);
+extern AC *AC_new(void);
+extern void AC_free(AC *a);
+extern int i2d_AC_TARGETS(AC_TARGETS *a, unsigned char **pp) ;
+extern AC_TARGETS *d2i_AC_TARGETS(AC_TARGETS **a, unsigned char **pp, long length);
+extern AC_TARGETS *AC_TARGETS_new(void);
+extern void AC_TARGETS_free(AC_TARGETS *a);
+extern int i2d_AC_TARGET(AC_TARGET *a, unsigned char **pp) ;
+extern AC_TARGET *d2i_AC_TARGET(AC_TARGET **a, unsigned char **pp, long length);
+extern AC_TARGET *AC_TARGET_new(void);
+extern void AC_TARGET_free(AC_TARGET *a);
+extern int i2d_AC_SEQ(AC_SEQ *a, unsigned char **pp) ;
+extern AC_SEQ *d2i_AC_SEQ(AC_SEQ **a, unsigned char **pp, long length);
+extern AC_SEQ *AC_SEQ_new(void);
+extern void AC_SEQ_free(AC_SEQ *a);
+
+#endif
index 6c6e577..c14b6c0 100644 (file)
@@ -1,23 +1,22 @@
 #include "renewal_locl.h"
 #include "renewd_locl.h"
 
-#ifndef NOVOMS
-#include <voms_apic.h>
-#endif
+#include "glite/security/voms/voms_apic.h"
 
 #ident "$Header$"
 
+#define RENEWAL_COUNTS_MAX     1000    /* the slave daemon exits after that many attemtps */
+
 extern char *repository;
 extern char *cadir;
 extern char *vomsdir;
 extern int voms_enabled;
 extern char *vomsconf;
-extern struct vomses_records vomses;
 
-static int received_signal = -1;
+static int received_signal = -1, die = 0;
 
 static void
-check_renewal(char *datafile, int force_renew);
+check_renewal(char *datafile, int force_renew, int *num_renewed);
 
 static int
 renew_proxy(proxy_record *record, char *basename, char **new_proxy);
@@ -25,816 +24,72 @@ renew_proxy(proxy_record *record, char *basename, char **new_proxy);
 static void
 register_signal(int signal);
 
-
-#define DGPR_RETRIEVE_DEFAULT_HOURS 10
-#define RENEWAL_CLOCK_SKEW 5 * 60
-
-static const char *
-get_ssl_err()
-{
-   return "SSL failed";
-}
-
 int
-load_proxy(const char *filename, X509 **cert, EVP_PKEY **privkey,
-           STACK_OF(X509) **chain)
+load_proxy(const char *cur_file, X509 **cert, EVP_PKEY **priv_key,
+           STACK_OF(X509) **chain, globus_gsi_cred_handle_t *cur_proxy)
 {
-   X509 *my_cert = NULL;
-   EVP_PKEY *my_key = NULL;
-   STACK_OF(X509) *my_chain = NULL;
-   FILE *fd = NULL;
-   int ret;
-
-   fd = fopen(filename, "r");
-   if (fd == NULL) {
-      edg_wlpr_Log(LOG_ERR,
-           "Cannot read VOMS certificate (fopen() failed on %s: %s)",
-           filename, strerror(errno));
-      return errno;
-   }
-
-   my_cert = PEM_read_X509(fd, NULL, NULL, NULL);
-   if (my_cert == NULL) {
-      edg_wlpr_Log(LOG_ERR,
-           "Cannot read VOMS certificate (PEM_read_X509() failed: %s)",
-           get_ssl_err());
-      ret = EDG_WLPR_ERROR_SSL;
-      goto end;
-   }
+   globus_result_t result;
+   globus_gsi_cred_handle_t proxy = NULL;
 
-   my_key = PEM_read_PrivateKey(fd, NULL, NULL, NULL);
-   if (my_key == NULL) {
-      edg_wlpr_Log(LOG_ERR,
-           "Cannot read VOMS certificate (PEM_read_PrivateKey() failed: %s)",
-           get_ssl_err());
-      ret = EDG_WLPR_ERROR_SSL;
+   result = globus_gsi_cred_handle_init(&proxy, NULL);
+   if (result) {
+      fprintf(stderr, "globus_gsi_cred_handle_init() failed\n");
       goto end;
    }
 
-   my_chain = sk_X509_new_null();
-   if (my_chain == NULL) {
-      edg_wlpr_Log(LOG_ERR,
-                  "Cannot read VOMS certificate (sk_X509_new_null() failed: %s)",
-                  get_ssl_err());
-      ret = EDG_WLPR_ERROR_SSL;
+   result = globus_gsi_cred_read_proxy(proxy, cur_file);
+   if (result) {
+      fprintf(stderr, "globus_gsi_cred_read_proxy() failed\n");
       goto end;
    }
 
-   while (1) {
-      X509 *c;
-
-      c = PEM_read_X509(fd, NULL, NULL, NULL);
-      if (c == NULL) {
-        if (ERR_GET_REASON(ERR_peek_error()) == PEM_R_NO_START_LINE) {
-           /* End of file reached. no error */
-           ERR_clear_error();
-           break;
-        }
-        edg_wlpr_Log(LOG_ERR,
-                     "Cannot read VOMS certificate (PEM_read_X509() failed: %s)",
-                     get_ssl_err());
-        ret = EDG_WLPR_ERROR_SSL;
+   if (cert) {
+      result = globus_gsi_cred_get_cert(proxy, cert);
+      if (result) {
+        fprintf(stderr, "globus_gsi_cred_get_cert() failed\n");
         goto end;
       }
-      sk_X509_push(my_chain, c);
    }
 
-   *cert = my_cert;
-   *privkey = my_key;
-   *chain = my_chain;
-   my_cert = NULL; my_key = NULL; my_chain = NULL;
-   ret = 0;
-
-end:
-   fclose(fd);
-
-   if (my_cert)
-      X509_free(my_cert);
-   if (my_key)
-      EVP_PKEY_free(my_key);
-   if (my_chain)
-      sk_X509_pop_free(my_chain, X509_free);
-
-   return ret;
-}
-
-static int
-save_proxy(const char *filename, X509 *new_cert, EVP_PKEY *new_privkey, 
-           STACK_OF(X509) *chain)
-{
-   FILE *fd = NULL;
-   int ret, i;
-   int retval = EDG_WLPR_ERROR_SSL;
-
-   fd = fopen(filename, "w");
-   if (fd == NULL) {
-      edg_wlpr_Log(LOG_ERR,
-                  "Cannot store proxy (fopen() failed on %s: %s)",
-                  filename, strerror(errno));
-      return errno;
-   }
-
-   ret = PEM_write_X509(fd, new_cert);
-   if (ret == 0) {
-      edg_wlpr_Log(LOG_ERR,
-                  "Cannot store proxy (PEM_write_X509() failed: %s)",
-                  get_ssl_err());
-      goto end;
-   }
-
-   ret = PEM_write_PrivateKey(fd, new_privkey, NULL, NULL, 0, NULL, NULL);
-   if (ret == 0) {
-      edg_wlpr_Log(LOG_ERR,
-                  "Cannot store proxy (PEM_write_PrivateKey() failed: %s)",
-                  get_ssl_err());
-      goto end;
-   }
-
-   for (i = 0; i < sk_X509_num(chain); i++) {
-      X509 *cert = sk_X509_value(chain, i);
-      ret = PEM_write_X509(fd, cert);
-      if (ret == 0) {
-        edg_wlpr_Log(LOG_ERR,
-                     "Cannot store proxy (PEM_write_X509() failed: %s)",
-                     get_ssl_err());
+   if (priv_key) {
+      result = globus_gsi_cred_get_key(proxy, priv_key);
+      if (result) {
+        fprintf(stderr, "globus_gsi_cred_get_key() failed\n");
         goto end;
       }
    }
-      
-   retval = 0;
-
-end:
-   fclose(fd);
-
-   return retval;
-}
-
-static int
-gen_keypair(EVP_PKEY **keypair, int requested_bits)
-{
-   RSA *rsa = NULL;
-   EVP_PKEY *key;
-
-   *keypair = NULL;
-   rsa = RSA_generate_key(requested_bits,
-                         RSA_F4 /* public exponent */,
-                         NULL, NULL);
-   if (rsa == NULL) {
-      edg_wlpr_Log(LOG_ERR,
-                  "Cannot generate new proxy (RSA_generate_key() failed: %s)",
-                  get_ssl_err());
-      return EDG_WLPR_ERROR_SSL;
-   }
-
-   key = EVP_PKEY_new();
-   if (key == NULL) {
-      edg_wlpr_Log(LOG_ERR,
-                  "Cannot generate new proxy (EVP_PKEY_new() failed: %s)",
-                  get_ssl_err());
-      RSA_free(rsa);
-      return EDG_WLPR_ERROR_SSL;
-   }
-
-   if (EVP_PKEY_assign_RSA(key, rsa) == 0) {
-      edg_wlpr_Log(LOG_ERR,
-                  "Cannot generate new proxy (EVP_PKEY_assign_RSA() failed: %s)",
-                  get_ssl_err());
-      RSA_free(rsa);
-      EVP_PKEY_free(key);
-      return EDG_WLPR_ERROR_SSL;
-   }
-
-   *keypair = key;
-
-   return 0;
-}
-
-static int
-gen_subject_name(X509 *old_cert, X509 *new_cert)
-{
-   X509_NAME *name = NULL;
-   X509_NAME_ENTRY *name_entry = NULL;
-   int ret = EDG_WLPR_ERROR_SSL;
-
-   name = X509_NAME_dup(X509_get_subject_name(old_cert));
-   if (name == NULL) {
-      edg_wlpr_Log(LOG_ERR,
-                  "Cannot generate new proxy (X509_NAME_dup() failed: %s",
-                  get_ssl_err());
-      goto end;
-   }
-
-   name_entry = X509_NAME_ENTRY_create_by_NID(NULL /* make new entry */,
-                                             NID_commonName,
-                                             V_ASN1_APP_CHOOSE,
-                                             "proxy", -1);
-   if (name_entry == NULL) {
-      edg_wlpr_Log(LOG_ERR,
-                  "Cannot generate new proxy (X509_NAME_ENTRY_create_by_NID() failed: %s)",
-                  get_ssl_err());
-      goto end;
-   }
-
-   if (X509_NAME_add_entry(name, name_entry, X509_NAME_entry_count(name), 0) == 0) {
-      edg_wlpr_Log(LOG_ERR,
-                  "Cannot generate new proxy (X509_NAME_add_entry() failed: %s)",
-                  get_ssl_err());
-      goto end;
-   }
-
-
-   if (X509_set_subject_name(new_cert, name) == 0) {
-      edg_wlpr_Log(LOG_ERR,
-                  "Cannot generate new proxy (X509_set_subject_name() failed: %s)",
-                  get_ssl_err());
-      goto end;
-   }
-
-   ret = 0;
-
-end:
-   if (name)
-      X509_NAME_free(name);
-   if (name_entry != NULL)
-      X509_NAME_ENTRY_free(name_entry);
-
-   return ret;
-}
-
-static int
-create_proxy(X509 *old_cert, EVP_PKEY *old_privkey, X509_EXTENSION *extension, 
-            X509 **new_cert, EVP_PKEY **new_privkey)
-{
-   /* Inspired by code from Myproxy */
-   EVP_PKEY *key_pair = NULL;
-   X509 *cert = NULL;
-   int ret;
-   int retval = EDG_WLPR_ERROR_SSL;
-
-   ret = gen_keypair(&key_pair, 512);
-   if (ret)
-      return ret;
-
-   cert = X509_new();
-   if (cert == NULL) {
-      edg_wlpr_Log(LOG_ERR, "Cannot generate new proxy (X509_new() failed: Not enough memory)");
-      goto end;
-   }
-
-   ret = gen_subject_name(old_cert, cert);
-   if (ret) {
-      retval = ret;
-      goto end;
-   }
-
-   if (X509_set_issuer_name(cert, X509_get_subject_name(old_cert)) == 0) {
-      edg_wlpr_Log(LOG_ERR,
-                  "Cannot generate new proxy (X509_set_issuer_name() failed: %s)",
-                  get_ssl_err());
-      goto end;
-   }
-
-   if (X509_set_serialNumber(cert, X509_get_serialNumber(old_cert)) == 0) {
-      edg_wlpr_Log(LOG_ERR,
-                  "Cannot generate new proxy (X509_set_serialNumber() failed: %s)",
-                  get_ssl_err());
-      goto end;
-   }
-
-   X509_gmtime_adj(X509_get_notBefore(cert), -(60 * 5));
-   X509_set_notAfter(cert, X509_get_notAfter(old_cert));
-
-   if (X509_set_pubkey(cert, key_pair) == 0) {
-      edg_wlpr_Log(LOG_ERR, 
-                  "Cannot generate new proxy (X509_set_pubkey() failed: %s)",
-                  get_ssl_err());
-      goto end;
-   }
-
-   /* set v3 */
-   if (X509_set_version(cert, 2L) == 0) {
-      edg_wlpr_Log(LOG_ERR,
-                  "Cannot generate new proxy (X509_set_version() failed: %s)",
-                  get_ssl_err());
-      goto end;
-   }
-
-   if (cert->cert_info->extensions != NULL)
-      sk_X509_EXTENSION_pop_free(cert->cert_info->extensions,
-                                X509_EXTENSION_free);
-   cert->cert_info->extensions = sk_X509_EXTENSION_new_null();
-   sk_X509_EXTENSION_push(cert->cert_info->extensions, extension);
-
-   if (X509_sign(cert, old_privkey, EVP_md5()) == 0) {
-      edg_wlpr_Log(LOG_ERR,
-                  "Cannot generate new proxy (X509_sign() failed: %s)",
-                  get_ssl_err());
-      goto end;
-   }
-
-   *new_privkey = key_pair;
-   *new_cert = cert;
-   key_pair = NULL;
-   cert = NULL;
-
-   retval = 0;
-
-end:
-   if (key_pair)
-      EVP_PKEY_free(key_pair);
-   if (cert)
-      X509_free(cert);
-
-   return retval;
-}
-
-static int
-create_voms_extension(char *buf, size_t buf_len, X509_EXTENSION **extensions)
-{
-   ASN1_OBJECT *voms_obj = NULL;
-   ASN1_OCTET_STRING *voms_oct = NULL;
-
-   *extensions = NULL;
-
-   voms_oct = ASN1_OCTET_STRING_new();
-   if (voms_oct == NULL) {
-      edg_wlpr_Log(LOG_ERR,
-                  "Cannot generate new proxy (ASN1_OCTET_STRING_new() failed: %s)",
-                  get_ssl_err());
-      return EDG_WLPR_ERROR_SSL;
-   }
-
-   voms_oct->data = buf;
-   voms_oct->length = buf_len;
-
-   voms_obj = OBJ_nid2obj(OBJ_txt2nid("VOMS"));
-   if (voms_obj == NULL) {
-      edg_wlpr_Log(LOG_ERR, "Cannot generate new proxy (OBJ_nid2obj() failed");
-      goto end;
-   }
-
-   *extensions = X509_EXTENSION_create_by_OBJ(NULL, voms_obj, 0, voms_oct);
-   if (*extensions == NULL) {
-      edg_wlpr_Log(LOG_ERR, "Cannot generate new proxy (X509_EXTENSION_create_by_OBJ() failed");
-      goto end;
-   }
-
-   return 0;
-
-end:
-   if (voms_oct)
-      ASN1_OCTET_STRING_free(voms_oct);
-   if (voms_obj)
-      ASN1_OBJECT_free(voms_obj);
-   return EDG_WLPR_ERROR_SSL;
-}
-
-#ifndef NOVOMS
-static int
-export_std_data(struct data *voms_data, char **buf)
-{
-   asprintf(buf, "GROUP: %s\n"
-                "ROLE:%s\n" /* the space is missing intentionaly */
-                "CAP: %s\n",
-                (voms_data->group) ? voms_data->group : "NULL",
-                (voms_data->role) ? voms_data->role : "NULL",
-                (voms_data->cap) ? voms_data->cap : "NULL");
-   return 0;
-}
-
-static int
-export_user_data(struct voms *voms_cert, char **buf, size_t *len)
-{
-   struct data **voms_data;
-   char *str = NULL;
-   char *ptr;
-
-   *buf = NULL;
-
-   switch (voms_cert->type) {
-      case TYPE_NODATA:
-        *buf = strdup("NO DATA");
-        break;
-      case TYPE_CUSTOM:
-        *buf = strdup(voms_cert->custom);
-        break;
-      case TYPE_STD:
-        for (voms_data = voms_cert->std; voms_data && *voms_data; voms_data++) {
-           export_std_data(*voms_data, &str);
-           if (*buf == NULL)
-              ptr = calloc(strlen(str) + 1, 1);
-           else
-              ptr = realloc(*buf, strlen(*buf) + strlen(str) + 1);
-           if (ptr == NULL) {
-              return ENOMEM;
-           }
-           *buf = ptr;
-           strcat(*buf, str);
-           free(str);
-        }
-           
-        break;
-      default:
-        return -1;
-   }
-   
-   *len = strlen(*buf);
-   return 0;
-}
-
-#endif
-
-static int
-encode_voms_buf(const char *label, char *data, size_t data_len,
-                char **buf, size_t *buf_len)
-{
-   char *tmp;
-
-   tmp = realloc(*buf, *buf_len + strlen(label) + data_len + 1);
-   if (tmp == NULL)
-      return ENOMEM;
-
-   memcpy(tmp + *buf_len, label, strlen(label));
-
-   memcpy(tmp + *buf_len + strlen(label), data, data_len);
-   tmp[*buf_len + strlen(label) + data_len] = '\n';
-   *buf = tmp;
-   *buf_len = *buf_len + strlen(label) + data_len + 1;
-
-   return 0;
-}
-
-static int
-encode_voms_int(const char *label, int value, char **buf, size_t *buf_len)
-{
-   char tmp[16];
-
-   snprintf(tmp, sizeof(tmp), "%d", value);
-   return encode_voms_buf(label, tmp, strlen(tmp), buf, buf_len);
-}
-
-static int
-encode_voms_str(const char *label, char *value, char **buf, size_t *buf_len)
-{
-   return encode_voms_buf(label, value, strlen(value), buf, buf_len);
-}
-
-#if 0
-static int
-VOMS_Export(struct vomsdata *voms_info, char **buf, size_t *len)
-{
-   struct voms *vc;
-   char *enc_voms = NULL;
-   size_t enc_voms_len = 0;
-   char *data_buf;
-   size_t data_len;
-   int ret;
-
-   if (voms_info == NULL || voms_info->data == NULL || *voms_info->data == NULL)
-      return EINVAL;
-   vc = *voms_info->data;
-
-   ret = export_user_data(vc, &data_buf, &data_len);
-   if (ret)
-      return ret;
-
-   encode_voms_int("SIGLEN:",   vc->siglen, &enc_voms, &enc_voms_len);
-   encode_voms_buf("SIGNATURE:",vc->signature, vc->siglen,
-                  &enc_voms, &enc_voms_len);
-   enc_voms_len--; /* Signature is not followed by '\n' */
-   encode_voms_str("USER:",     vc->user, &enc_voms, &enc_voms_len);
-   encode_voms_str("UCA:",      vc->userca, &enc_voms, &enc_voms_len);
-   encode_voms_str("SERVER:",   vc->server, &enc_voms, &enc_voms_len);
-   encode_voms_str("SCA:",      vc->serverca, &enc_voms, &enc_voms_len);
-   encode_voms_str("VO:",       vc->voname, &enc_voms, &enc_voms_len);
-   encode_voms_str("URI:",      vc->uri, &enc_voms, &enc_voms_len);
-   encode_voms_str("TIME1:",    vc->date1, &enc_voms, &enc_voms_len);
-   encode_voms_str("TIME2:",    vc->date2, &enc_voms, &enc_voms_len);
-   encode_voms_int("DATALEN:",  data_len, &enc_voms, &enc_voms_len);
-   encode_voms_buf("",          data_buf, data_len, &enc_voms, &enc_voms_len);
-   enc_voms_len--; /* the data already contains endind '\n' */
-
-   free(data_buf);
-   if (enc_voms == NULL) {
-      edg_wlpr_Log(LOG_ERR, "Cannot renew VOMS certificate (Not enough memory)");
-      return ENOMEM;
-   }
-   *buf = enc_voms;
-   *len = enc_voms_len;
-   return 0;
-}
-
-static int
-voms_cert_renew(char *hostname, int port, char *voms_subject,
-               char *proxy,
-                struct voms **cur_voms_cert, struct vomsdata *voms_info)
-{
-   int ret = 0;
-   char *command = "A";
-   int err = 0;
-   char *old_env_proxy = getenv("X509_USER_PROXY");
-
-   setenv("X509_USER_PROXY", proxy, 1);
-
-   /* hack (suggested by Vincenzo Ciaschini) to work around problem with
-    * unitialized VOMS struct */
-   ret = VOMS_Ordering("zzz:zzz", voms_info, &err);
-   if (ret == 0) {
-      edg_wlpr_Log(LOG_ERR, "Cannot renew VOMS certificate (VOMS_Ordering() failed");
-      ret = EDG_WLPR_ERROR_VOMS;
-      goto end;
-   }
 
-   /* XXX only attributes which are in current certificate should be requested*/
-   ret = VOMS_Contact(hostname, port, (*cur_voms_cert)->server, command,
-                     voms_info, &err);
-   if (ret == 0) {
-#if 0
-      if (err == 1) { /* XXX cannot connect voms server */ 
-        ret = 0;
+   if (chain) {
+      result = globus_gsi_cred_get_cert_chain(proxy, chain);
+      if (result) {
+        fprintf(stderr, "globus_gsi_cred_get_cert_chain() failed\n");
         goto end;
       }
-#endif
-      edg_wlpr_Log(LOG_ERR, "Cannot renew VOMS certificate (VOMS_Contact() failed: %d)", err);
-      ret = EDG_WLPR_ERROR_VOMS;
-   } else
-      ret = 0;
-
-end:
-   (old_env_proxy) ? setenv("X509_USER_PROXY", old_env_proxy, 1) :
-                    unsetenv("X509_USER_PROXY");
-
-   return ret;
-}
-
-static int
-renew_voms_cert(struct voms **cur_voms_cert, char *proxy, char **buf, size_t *buf_len)
-{
-   struct vomsdata *voms_info = NULL;
-   char *hostname = NULL;
-   char *p;
-   int port, ret;
-
-   hostname = strdup((*cur_voms_cert)->uri);
-   p = strchr(hostname, ':');
-   if (p)
-      *p = '\0';
-   port = (p) ? atoi(p+1) : 15000;
-
-   voms_info = VOMS_Init(vomsdir, cadir);
-   if (voms_info == NULL) {
-      edg_wlpr_Log(LOG_ERR, "Cannot renew VOMS certificate (VOMS_Init() failed)");
-      ret = EDG_WLPR_ERROR_VOMS;
-      goto end;
    }
 
-   ret = voms_cert_renew(hostname, port, (*cur_voms_cert)->server, proxy, cur_voms_cert,
-                        voms_info);
-   if (ret)
-      goto end;
-  
-   ret = VOMS_Export(voms_info, buf, buf_len);
-   if (ret) {
-      edg_wlpr_Log(LOG_ERR, "Cannot renew VOMS certificate (VOMS_Export() failed)");
-      ret = EDG_WLPR_ERROR_VOMS;
-      goto end;
+   if (cur_proxy) {
+      *cur_proxy = proxy;
+      proxy = NULL;
    }
-
-   ret = 0;
-
+   
 end:
-   if (hostname)
-      free(hostname);
-#if 0
-   if (voms_info)
-      VOMS_Destroy(voms_info);
-#endif
-
-   return ret;
-}
-#endif
-
-#ifndef NOVOMS
-static vomses_record *
-find_vomses_record(char *hostname, int port)
-{
-   int i;
-
-   for (i = 0; i < vomses.len; i++) {
-      if (strcmp(vomses.val[i]->hostname, hostname) == 0 &&
-         vomses.val[i]->port == port)
-        return vomses.val[i];
-   }
-
-   return NULL;
-}
-
-static int
-set_vo_params(struct voms **voms_cert, char **arg)
-{
-   vomses_record *r;
-   char *tmp;
-   int port;
-   char *hostname;
-   char *p;
 
-   hostname = strdup((*voms_cert)->uri);
-   p = strchr(hostname, ':');
-   if (p)
-      *p = '\0';
-   port = (p) ? atoi(p+1) : 15000;
-
-   r = find_vomses_record(hostname, port);
-   if (r == NULL)
-      return EINVAL;
-
-   if (*arg == NULL) {
-      asprintf(arg, " -voms %s", r->nick);
-   } else {
-      tmp = realloc(*arg, 
-                   strlen(*arg) + strlen(" -voms ") + strlen(r->nick) + 1);
-      if (tmp == NULL)
-        return ENOMEM;
-      *arg = tmp;
-      *arg = strcat(*arg, " -voms ");
-      *arg = strcat(*arg, r->nick);
-   }
    return 0;
 }
-#endif
-
-static int
-exec_voms_proxy_init(char *arg, char *old_proxy, char *new_proxy)
-{
-   char command[256];
-   int ret;
-   char *old_env_proxy = getenv("X509_USER_PROXY");
-
-   setenv("X509_USER_PROXY", old_proxy, 1);
-
-   snprintf(command, sizeof(command), 
-        "edg-voms-proxy-init -out %s -key %s -cert %s -confile %s -q %s",
-        new_proxy, old_proxy, old_proxy, vomsconf, arg);
-   ret = system(command);
-
-   (old_env_proxy) ? setenv("X509_USER_PROXY", old_env_proxy, 1) :
-                     unsetenv("X509_USER_PROXY");
-
-   return ret;
-}
-
-#if 0
-static int
-renew_voms_certs(const char *old_proxy, const char *new_proxy)
-{
-   struct vomsdata *voms_info = NULL;
-   struct voms **voms_cert = NULL;
-   STACK_OF(X509) *chain = NULL;
-   EVP_PKEY *privkey = NULL;
-   X509 *cert = NULL;
-   int ret, err;
-   char *buf = NULL;
-   size_t buf_len = 0;
-   X509_EXTENSION *extension = NULL;
-   X509 *new_cert = NULL;
-   EVP_PKEY *new_privkey = NULL;
-
-   voms_info = VOMS_Init(vomsdir, cadir);
-   if (voms_info == NULL) {
-      edg_wlpr_Log(LOG_ERR, "Cannot initialize VOMS context (VOMS_Init() failed)");
-      return EDG_WLPR_ERROR_VOMS;
-   }
-
-   ret = load_proxy(old_proxy, &cert, &privkey, &chain);
-   if (ret)
-      goto end;
-
-   ret = VOMS_Retrieve(cert, chain, RECURSE_CHAIN, voms_info, &err);
-   if (ret == 0) {
-      if (err == VERR_NOEXT) {
-        /* no VOMS cred, no problem; continue */
-        ret = 0;
-      } else {
-         edg_wlpr_Log(LOG_ERR, "Cannot get VOMS certificate(s) from proxy");
-         ret = EDG_WLPR_ERROR_VOMS;
-      }
-      goto end;
-   }
-
-   for (voms_cert = voms_info->data; voms_cert && *voms_cert; voms_cert++) {
-      char *tmp, *ptr;
-      size_t tmp_len;
-
-      ret = renew_voms_cert(voms_cert, old_proxy, &tmp, &tmp_len);
-      if (ret)
-        continue;
-      ptr = realloc(buf, buf_len + tmp_len);
-      if (ptr == NULL) {
-        ret = ENOMEM;
-        goto end;
-      }
-      buf = ptr;
-      memcpy(buf + buf_len, tmp, tmp_len);
-      buf_len += tmp_len;
-   }
-
-   if (buf == NULL) {
-      /* no extension renewed, return */
-      ret = 0;
-      goto end;
-   }
-
-   ret = create_voms_extension(buf, buf_len, &extension);
-   if (ret)
-      goto end;
-
-   X509_free(cert);
-   EVP_PKEY_free(privkey);
-   sk_X509_pop_free(chain, X509_free);
-
-   ret = load_proxy(new_proxy, &cert, &privkey, &chain);
-   if (ret)
-      goto end;
-
-   ret = create_proxy(cert, privkey, extension, &new_cert, &new_privkey);
-   if (ret)
-      goto end;
-
-   sk_X509_insert(chain, cert, 0);
-        
-   ret = save_proxy(new_proxy, new_cert, new_privkey, chain);
-   if (ret)
-      goto end;
-
-   ret = 0;
-
-end:
-   VOMS_Destroy(voms_info);
-
-   return ret;
-}
-#else /* 0 */
-
-#ifdef NOVOMS
-static int
-renew_voms_certs(const char *old_proxy, char *myproxy_proxy, const char *new_proxy)
-{
-       return 0;
-}
-
-#else
-static int
-renew_voms_certs(const char *old_proxy, char *myproxy_proxy, const char *new_proxy)
-{
-   struct vomsdata *voms_info = NULL;
-   struct voms **voms_cert = NULL;
-   STACK_OF(X509) *chain = NULL;
-   EVP_PKEY *privkey = NULL;
-   X509 *cert = NULL;
-   int ret, err;
-   char *arg = NULL;
-
-   voms_info = VOMS_Init(vomsdir, cadir);
-   if (voms_info == NULL) {
-      edg_wlpr_Log(LOG_ERR, "Cannot initialize VOMS context (VOMS_Init() failed)");
-      return EDG_WLPR_ERROR_VOMS;
-   }
-
-   ret = load_proxy(old_proxy, &cert, &privkey, &chain);
-   if (ret)
-      goto end;
-
-   ret = VOMS_Retrieve(cert, chain, RECURSE_CHAIN, voms_info, &err);
-   if (ret == 0) {
-      if (err == VERR_NOEXT) {
-        /* no VOMS cred, no problem; continue */
-        ret = 0;
-      } else {
-         edg_wlpr_Log(LOG_ERR, "Cannot get VOMS certificate(s) from proxy");
-         ret = EDG_WLPR_ERROR_VOMS;
-      }
-      goto end;
-   }
-
-   for (voms_cert = voms_info->data; voms_cert && *voms_cert; voms_cert++) {
-      ret = set_vo_params(voms_cert, &arg);
-      if (ret)
-        goto end;
-   }
-   ret = exec_voms_proxy_init(arg, myproxy_proxy, new_proxy);
-
-end:
-   VOMS_Destroy(voms_info);
-   return ret;
-}
-#endif /* NOVOMS */
-
-#endif /* 0 */
 
 static void
 register_signal(int signal)
 {
       received_signal = signal;
+      switch ((received_signal = signal)) {
+        case SIGINT:
+        case SIGTERM:
+        case SIGQUIT:
+           die = signal;
+           break;
+        default:
+           break;
+      }
 }
 
 static int
@@ -865,7 +120,7 @@ renew_proxy(proxy_record *record, char *basename, char **new_proxy)
    edg_wlpr_Log(LOG_DEBUG, "Trying to renew proxy in %s.%d",
                basename, record->suffix);
 
-   snprintf(tmp_proxy, sizeof(tmp_proxy), "%s.%d.renew.XXXXXX", 
+   snprintf(tmp_proxy, sizeof(tmp_proxy), "%s.%d.myproxy.XXXXXX", 
            basename, record->suffix);
    tmp_fd = mkstemp(tmp_proxy);
    if (tmp_fd == -1) {
@@ -902,21 +157,24 @@ renew_proxy(proxy_record *record, char *basename, char **new_proxy)
    } else
       socket_attrs->psport = MYPROXY_SERVER_PORT;
 
+   verror_clear();
    ret = myproxy_get_delegation(socket_attrs, client_request,
                                server_response, tmp_proxy);
    if (ret == 1) {
       ret = EDG_WLPR_ERROR_MYPROXY;
-      edg_wlpr_Log(LOG_ERR, "Cannot get renewed proxy from Myproxy server");
+      edg_wlpr_Log(LOG_ERR, "Error contacting MyProxy server for proxy %s: %s",
+                  repository_file, verror_get_string());
+      verror_clear();
       goto end;
    }
 
    renewed_proxy = tmp_proxy;
 
-   if (voms_enabled) {
+   if (voms_enabled && record->voms_exts) {
       char tmp_voms_proxy[FILENAME_MAX];
       int tmp_voms_fd;
       
-      snprintf(tmp_voms_proxy, sizeof(tmp_voms_proxy), "%s.%d.renew.XXXXXX",
+      snprintf(tmp_voms_proxy, sizeof(tmp_voms_proxy), "%s.%d.voms.XXXXXX",
               basename, record->suffix);
       tmp_voms_fd = mkstemp(tmp_voms_proxy);
       if (tmp_voms_fd == -1) {
@@ -926,11 +184,15 @@ renew_proxy(proxy_record *record, char *basename, char **new_proxy)
         goto end;
       }
 
-      ret = renew_voms_certs(repository_file, tmp_proxy, tmp_voms_proxy);
-      if (ret)
+      ret = renew_voms_creds(repository_file, renewed_proxy, tmp_voms_proxy);
+      close(tmp_voms_fd);
+      if (ret) {
+        unlink(tmp_voms_proxy);
         goto end;
+      }
 
       renewed_proxy = tmp_voms_proxy;
+      unlink(tmp_proxy);
    }
 
    if (new_proxy)
@@ -950,7 +212,7 @@ end:
 }
 
 static void
-check_renewal(char *datafile, int force_renew)
+check_renewal(char *datafile, int force_renew, int *num_renewed)
 {
    char line[1024];
    proxy_record record;
@@ -968,6 +230,8 @@ check_renewal(char *datafile, int force_renew)
 
    assert(datafile != NULL);
 
+   *num_renewed = 0;
+
    memset(&record, 0, sizeof(record));
    memset(basename, 0, sizeof(basename));
    memset(&request, 0, sizeof(request));
@@ -1004,15 +268,14 @@ check_renewal(char *datafile, int force_renew)
         continue; /* XXX exit? */
       if (record.jobids.len == 0) /* no jobid registered for this proxy */
         continue;
-      if (record.end_time - current_time < RENEWAL_CLOCK_SKEW ||
-         abs(record.next_renewal - current_time) < RENEWAL_CLOCK_SKEW ||
-         record.next_renewal < current_time ||
-         record.end_time < current_time ||
+      if (current_time + RENEWAL_CLOCK_SKEW >= record.end_time ||
+         record.next_renewal <= current_time ||
          force_renew) {
         ret = EDG_WLPR_PROXY_EXPIRED;
-        if (record.end_time >= current_time)
+        if ( record.end_time + RENEWAL_CLOCK_SKEW >= current_time) {
            /* only try renewal if the proxy hasn't already expired */
            ret = renew_proxy(&record, basename, &new_proxy);
+         }
 
         /* if the proxy wasn't renewed have the daemon planned another renewal */
         asprintf(&entry, "%d:%s", record.suffix, (ret == 0) ? new_proxy : "");
@@ -1054,17 +317,22 @@ check_renewal(char *datafile, int force_renew)
    edg_wlpr_CleanResponse(&response);
    edg_wlpr_CleanRequest(&request);
 
+   *num_renewed = num;
+
    return;
 }
 
-int renewal(int force_renew)
+int renewal(int force_renew, int *num_renewed)
 {
    DIR *dir = NULL;
    struct dirent *file;
    FILE *fd;
+   int num = 0;
 
    edg_wlpr_Log(LOG_DEBUG, "Starting renewal process");
 
+   *num_renewed = 0;
+
    if (chdir(repository)) {
       edg_wlpr_Log(LOG_ERR, "Cannot access repository directory %s (%s)",
                   repository, strerror(errno));
@@ -1090,7 +358,8 @@ int renewal(int force_renew)
                      file->d_name, strerror(errno));
         continue;
       }
-      check_renewal(file->d_name, force_renew);
+      check_renewal(file->d_name, force_renew, &num);
+      *num_renewed += num;
       fclose(fd);
    }
    closedir(dir);
@@ -1103,18 +372,26 @@ watchdog_start(void)
 {
    struct sigaction sa;
    int force_renewal;
+   int count = 0, num;
    
    memset(&sa,0,sizeof(sa));
    sa.sa_handler = register_signal;
    sigaction(SIGUSR1, &sa, NULL);
+   sigaction(SIGINT,&sa,NULL);
+   sigaction(SIGQUIT,&sa,NULL);
+   sigaction(SIGTERM,&sa,NULL);
+   sigaction(SIGPIPE,&sa,NULL);
 
-   /* load_vomses(); */
-
-   while (1) {
+   while (count < RENEWAL_COUNTS_MAX && !die) {
        received_signal = -1;
        sleep(60 * 5);
        force_renewal = (received_signal == SIGUSR1) ? 1 : 0;
+       if (die)
+         break;
        /* XXX uninstall signal handler ? */
-       renewal(force_renewal);
+       renewal(force_renewal, &num);
+       count += num;
    }
+   edg_wlpr_Log(LOG_DEBUG, "Terminating after %d renewal attempts", count);
+   exit(0);
 }
index 45317e3..0eb94e4 100644 (file)
@@ -21,6 +21,7 @@
 #include <sys/socket.h>
 #include <sys/stat.h>
 #include <sys/file.h>
+#include <sys/wait.h>
 #include <openssl/md5.h>
 #include <openssl/x509.h>
 #include <openssl/pem.h>
@@ -64,6 +65,10 @@ typedef enum {
 
 #define MAX_PROXIES 4 /* max. number of jobids sharing one proxy */
 
+#define RENEWAL_CLOCK_SKEW (5 * 60)
+
+#define DGPR_RETRIEVE_DEFAULT_HOURS 10
+
 typedef struct {
   char *version;
   edg_wlpr_Command command;
index adebb09..cd2bef8 100644 (file)
@@ -13,11 +13,11 @@ time_t condor_limit = CONDOR_MINIMUM_PROXY_TIME;
 char *cadir = NULL;
 char *vomsdir = NULL;
 int voms_enabled = 0;
+char *cert = NULL;
+char *key = NULL;
+char *vomsconf = NULL;
 
-char *vomsconf = "/opt/edg/etc/vomses";
-#ifndef NOVOMS
-struct vomses_records vomses;
-#endif
+static volatile int die = 0, child_died = 0;
 
 static struct option opts[] = {
    { "help",       no_argument,       NULL,  'h' },
@@ -29,6 +29,8 @@ static struct option opts[] = {
    { "VOMSdir",    required_argument, NULL,  'V' },
    { "enable-voms", no_argument,     NULL,  'A' },
    { "voms-config", required_argument, NULL, 'G' },
+   { "cert",        required_argument, NULL, 't' },
+   { "key",         required_argument, NULL, 'k' },
    { NULL, 0, NULL, 0 }
 };
 
@@ -71,6 +73,26 @@ doit(int sock);
 static int
 decode_request(const char *msg, const size_t msg_len, edg_wlpr_Request *request);
 
+int
+start_watchdog(pid_t *pid);
+
+static void
+catchsig(int sig)
+{
+   switch (sig) {
+      case SIGINT:
+      case SIGTERM:
+      case SIGQUIT:
+        die = sig;
+        break;
+      case SIGCHLD:
+        child_died = 1;
+        break;
+      default:
+        break;
+   }
+}
+
 static command_table *
 find_command(edg_wlpr_Command code)
 {
@@ -117,9 +139,10 @@ proto(int sock)
       goto end;
    }
 
-   edg_wlpr_Log(LOG_INFO, "Received command code %d for proxy %s",
+   edg_wlpr_Log(LOG_INFO, "Received command code %d for proxy %s and jobid %s",
                 request.command,
-                request.proxy_filename ? request.proxy_filename : "(unspecified)");
+               request.proxy_filename ? request.proxy_filename : "(unspecified)",
+               request.jobid ? request.jobid : "(unspecified)");
 
    command->handler(&request, &response);
 
@@ -158,44 +181,36 @@ doit(int sock)
    proxies[0] = NULL;
 #endif
 
-#if 0
-   sigemptyset(&sset);
-   sigaddset(&sset,SIGTERM);
-   sigaddset(&sset,SIGINT);
-   sigaddset(&sset, SIGKILL);
-   sigaddset(&sset, SIGUSR1);
-   sigaddset(&sset, SIGALRM);
-   sigprocmask(SIG_BLOCK,&sset,NULL);
-#endif
+   while (!die) {
 
-   while (1) {
-#if 0
-      sigprocmask(SIG_UNBLOCK,&sset,NULL);
-      newsock = accept(sock, (struct sockaddr *) &client_addr, &client_addr_len);
-      sigprocmask(SIG_BLOCK,&sset,NULL);
+      if (child_died) {
+        int pid, newpid, ret;
 
-      if (newsock == -1) {
-         if (errno == EINTR) /* ERESTARTSYS */
-             proxy_renewal(received_signal);
-         else
-            log();
-         continue;
+        while ((pid=waitpid(-1,NULL,WNOHANG))>0)
+           ;
+        ret = start_watchdog(&newpid);
+        if (ret)
+           return ret;
+        edg_wlpr_Log(LOG_DEBUG, "Renewal slave process re-started");
+        child_died = 0;
+        continue;
       }
-#else
+
       newsock = accept(sock, (struct sockaddr *) &client_addr, &client_addr_len);
       if (newsock == -1) {
-         edg_wlpr_Log(LOG_ERR, "accept() failed");
+        if (errno != EINTR)
+           edg_wlpr_Log(LOG_ERR, "accept() failed");
          continue;
       }
       edg_wlpr_Log(LOG_DEBUG, "Got connection");
 
-#endif
-
       proto(newsock);
 
       edg_wlpr_Log(LOG_DEBUG, "Connection closed");
       close(newsock);
    }
+   edg_wlpr_Log(LOG_DEBUG, "Terminating on signal %d\n",die);
+   return 0;
 }
 
 static int
@@ -494,74 +509,6 @@ start_watchdog(pid_t *pid)
    exit(0);
 }
 
-#ifdef NOVOMS
-static int
-load_vomses()
-{
-       return ENOSYS;
-}
-
-#else
-static int
-load_vomses()
-{
-   FILE *fd = NULL;
-   char line[1024];
-   char *nick, *hostname;
-   int port;
-   vomses_record *rec;
-   vomses_record **tmp;
-   char *p;
-   
-   fd = fopen(vomsconf, "r");
-   if (fd == NULL) {
-      edg_wlpr_Log(LOG_ERR, "Cannot open vomses configuration file (%s)",
-                  strerror(errno));
-      return errno;
-   }
-   while (fgets(line, sizeof(line), fd) != NULL) {
-      p = line;
-      if (*p != '"') {
-        edg_wlpr_Log(LOG_ERR, "Parsing error when reading vomses configuration file");
-        return EINVAL;
-      }
-      nick = strdup(strtok(p+1, "\""));
-
-      p = strtok(NULL, "\"");
-      hostname = strdup(strtok(NULL, "\""));
-
-      p = strtok(NULL, "\"");
-      port = atoi(strdup(strtok(NULL, "\"")));
-
-      if (nick == NULL || hostname == NULL) {
-        edg_wlpr_Log(LOG_ERR, "Parsing error when reading vomses configuration file");
-        return EINVAL;
-      }
-
-      rec = calloc(1, sizeof(*rec));
-      if (rec == NULL) {
-        edg_wlpr_Log(LOG_ERR, "Not enough memory");
-        return ENOMEM;
-      }
-      rec->nick = nick;
-      rec->hostname = hostname;
-      rec->port = port;
-
-      tmp = realloc(vomses.val, vomses.len + 1);
-      if (tmp == NULL) {
-        edg_wlpr_Log(LOG_ERR, "Not enough memory");
-        return ENOMEM;
-      }
-      vomses.val = tmp;
-      vomses.len++;
-
-      vomses.val[vomses.len-1] = rec;
-   }
-   fclose(fd);
-   return 0;
-}
-#endif
-
 int main(int argc, char *argv[])
 {
    int   sock;
@@ -571,6 +518,7 @@ int main(int argc, char *argv[])
    char  sockname[PATH_MAX];
    int   ret;
    pid_t pid;
+   struct sigaction    sa;
 
    progname = strrchr(argv[0],'/');
    if (progname) progname++; 
@@ -579,7 +527,7 @@ int main(int argc, char *argv[])
    repository = EDG_WLPR_REPOSITORY_ROOT;
    debug = 0;
 
-   while ((opt = getopt_long(argc, argv, "hvdr:c:C:V:AG:", opts, NULL)) != EOF)
+   while ((opt = getopt_long(argc, argv, "hvdr:c:C:V:AG:t:k:", opts, NULL)) != EOF)
       switch (opt) {
         case 'h': usage(progname); exit(0);
         case 'v': fprintf(stdout, "%s:\t%s\n", progname, rcsid); exit(0);
@@ -590,6 +538,8 @@ int main(int argc, char *argv[])
         case 'V': vomsdir = optarg; break;
         case 'A': voms_enabled = 1; break;
         case 'G': vomsconf = optarg; break;
+        case 't': cert = optarg; break;
+        case 'k': key = optarg; break;
         case '?': usage(progname); return 1;
       }
 
@@ -605,6 +555,7 @@ int main(int argc, char *argv[])
    }
 
    globus_module_activate(GLOBUS_GSI_CERT_UTILS_MODULE);
+   globus_module_activate(GLOBUS_GSI_PROXY_MODULE);
 
    if (!debug)
       for (fd = 3; fd < OPEN_MAX; fd++) close(fd);
@@ -618,20 +569,23 @@ int main(int argc, char *argv[])
       openlog(progname, LOG_PID, LOG_DAEMON);
    }
 
-   if (voms_enabled) {
-      char *path;
-      char *new_path;
-      ret = load_vomses();
-      if (ret)
-        return 1;
-      setenv("GLOBUS_VERSION", "22", 0);
-      if (VOMS_INSTALL_PATH != NULL && *VOMS_INSTALL_PATH != '\0') {
-        path = getenv("PATH");
-        asprintf(&new_path, "%s:%s/bin", path, VOMS_INSTALL_PATH);
-         setenv("PATH", new_path, 1);
-      }
-   }
-   
+   if (cert)
+      setenv("X509_USER_CERT", cert, 1);
+
+   if (key)
+      setenv("X509_USER_KEY", key, 1);
+
+   if (cadir)
+      setenv("X509_CERT_DIR", cadir, 1);
+
+   memset(&sa,0,sizeof(sa));
+   sa.sa_handler = catchsig;
+   sigaction(SIGINT,&sa,NULL);
+   sigaction(SIGQUIT,&sa,NULL);
+   sigaction(SIGTERM,&sa,NULL);
+   sigaction(SIGCHLD,&sa,NULL);
+   sigaction(SIGPIPE,&sa,NULL);
+
    ret = start_watchdog(&pid);
    if (ret)
       return 1;
@@ -645,22 +599,6 @@ int main(int argc, char *argv[])
       return 1;
    edg_wlpr_Log(LOG_DEBUG, "Listening at %s", sockname);
 
-#if 0
-   /* XXX ??? */
-   install_handlers();
-#endif
-   
-
-#if 0
-   /* XXX this overrides setings done by install_handlers()? */
-   signal(SIGTERM, cleanup);
-   signal(SIGINT, cleanup);
-   signal(SIGKILL, cleanup);
-   signal(SIGPIPE, SIG_IGN);
-
-   atexit(cleanup);
-#endif
-
    ret = doit(sock);
 
    close(sock);
@@ -676,7 +614,7 @@ get_proxy_base_name(char *file, char **name)
    X509_NAME *subject = NULL;
    int ret;
 
-   ret = load_proxy(file, &cert, &key, &chain);
+   ret = load_proxy(file, &cert, &key, &chain, NULL);
    if (ret)
       return ret;
 
index 426c2ee..c4b8de4 100644 (file)
@@ -5,7 +5,9 @@
 
 #include <myproxy.h>
 #include <myproxy_delegation.h>
-#include <globus_gsi_cert_utils.h>
+#include <globus_gsi_credential.h>
+#include <globus_gsi_proxy.h>
+#include <globus_gsi_cert_utils_constants.h>
 
 #include "renewal.h"
 
@@ -34,17 +36,6 @@ typedef struct {
    time_t next_renewal;
 } proxy_record;
 
-typedef struct vomses_record {
-   char *nick;
-   char *hostname;
-   int port;
-} vomses_record;
-
-typedef struct vomses_records {
-   unsigned int len;
-   struct vomses_record **val;
-} vomses_records;
-
 /* commands */
 void
 register_proxy(edg_wlpr_Request *request, edg_wlpr_Response *response);
@@ -78,9 +69,12 @@ free_record(proxy_record *record);
 
 int
 load_proxy(const char *filename, X509 **cert, EVP_PKEY **privkey,
-           STACK_OF(X509) **chain);
+           STACK_OF(X509) **chain, globus_gsi_cred_handle_t *proxy);
 
 int
 get_proxy_base_name(char *file, char **subject);
 
+int
+renew_voms_creds(const char *cur_file, const char *renewed_file, const char *new_file);
+
 #endif /* RENEWALD_LOCL_H */
diff --git a/org.glite.security.proxyrenewal/src/voms.c b/org.glite.security.proxyrenewal/src/voms.c
new file mode 100644 (file)
index 0000000..f570fd4
--- /dev/null
@@ -0,0 +1,318 @@
+#include "renewal_locl.h"
+#include "renewd_locl.h"
+
+#include <string.h>
+#include <openssl/x509.h>
+
+#include "glite/security/voms/voms_apic.h"
+
+#include "newformat.h"
+
+char * Decode(const char *, int, int *);
+char **listadd(char **, char *, int);
+
+extern char *vomsconf;
+
+static int
+generate_proxy(globus_gsi_cred_handle_t cur_proxy,
+               X509_EXTENSION *voms_extension, const char *new_file)
+{
+   globus_result_t result;
+   globus_gsi_proxy_handle_t proxy_handle = NULL;
+   globus_gsi_cred_handle_t proxy = NULL;
+   EVP_PKEY *cur_proxy_priv_key = NULL;
+   X509 *new_cert = NULL;
+   X509 *voms_cert = NULL;
+   globus_gsi_cert_utils_cert_type_t proxy_type;
+
+   result = globus_gsi_proxy_handle_init(&proxy_handle, NULL);
+   if (result) {
+      edg_wlpr_Log(LOG_ERR, "globus_gsi_proxy_handle_init() failed\n");
+      goto end;
+   }
+
+   result = globus_gsi_cred_get_key(cur_proxy, &cur_proxy_priv_key);
+   if (result) {
+      edg_wlpr_Log(LOG_ERR, "globus_gsi_cred_get_key() failed\n");
+      goto end;
+   }
+
+   /* Create and sign a new proxy */
+   result = globus_gsi_cred_get_cert_type(cur_proxy, &proxy_type);
+   if (result) {
+      edg_wlpr_Log(LOG_ERR, "globus_gsi_cred_get_cert_type() failed\n");
+      goto end;
+   }
+
+   result = globus_gsi_proxy_handle_set_type(proxy_handle, proxy_type);
+   if (result) {
+      edg_wlpr_Log(LOG_ERR, "globus_gsi_proxy_handle_set_type() failed\n");
+      goto end;
+   }
+
+   result = globus_gsi_proxy_create_signed(proxy_handle, cur_proxy, &proxy);
+   if (result) {
+      edg_wlpr_Log(LOG_ERR, "globus_gsi_proxy_handle_init() failed\n");
+      goto end;
+   }
+
+   /* Get the new proxy */
+   result = globus_gsi_cred_get_cert(proxy, &new_cert);
+   if (result) {
+      edg_wlpr_Log(LOG_ERR, "globus_gsi_cred_get_cert() failed\n");
+      goto end;
+   }
+
+   /* The Globus API doesn't allow to store custom X.509 extensions */
+   voms_cert = X509_dup(new_cert);
+   if (voms_cert->cert_info->extensions == NULL)
+      voms_cert->cert_info->extensions = sk_X509_EXTENSION_new_null();
+   sk_X509_EXTENSION_push(voms_cert->cert_info->extensions, voms_extension);
+
+   /* Openssl ensures that memory containing old signature structures is unallocated */
+#if 0
+   X509_sign(voms_cert, cur_proxy_priv_key, proxy_handle->attrs->signing_algorithm);
+#else
+   X509_sign(voms_cert, cur_proxy_priv_key, EVP_md5());
+#endif
+
+   /* And put the cert back, older one is unallocated by the function */
+   result = globus_gsi_cred_set_cert(proxy, voms_cert);
+   if (result) {
+      edg_wlpr_Log(LOG_ERR, "globus_gsi_cred_set_cert() failed\n");
+      goto end;
+   }
+
+   result = globus_gsi_cred_write_proxy(proxy, (char *)new_file);
+
+end:
+
+   return 0;
+}
+
+static int
+my_VOMS_Export(void *buf, int buf_len, X509_EXTENSION **extension)
+{
+   AC *ac = NULL;
+   unsigned char *p, *pp;
+   AC **voms_attrs = NULL;
+
+   p = pp = buf;
+   ac = d2i_AC(NULL, &p, buf_len+1);
+   if (ac == NULL) {
+      edg_wlpr_Log(LOG_ERR, "d2i_AC() failed\n");
+      return 1;
+   }
+
+   voms_attrs = (AC **)listadd((char **)voms_attrs, (char *)ac, sizeof(AC *));
+
+   *extension = X509V3_EXT_conf_nid(NULL, NULL, OBJ_txt2nid("acseq"),
+                                  (char*)voms_attrs);
+   return 0;
+}
+
+static int
+create_voms_command(struct vomsdata *vd, struct voms **voms_cert, char **command)
+{
+   int voms_error, ret;
+   struct data **attribs;
+
+#if 0
+   VOMS_ResetOrder(vd, &voms_error);
+   for (i = 2; i < argc; i++) {
+      ret = VOMS_Ordering(argv[i], vd, &voms_error);
+      if (ret == 0) {
+        edg_wlpr_Log(LOG_ERR, "VOMS_Ordering() failed\n"); 
+        return 1;
+      }
+   }
+#endif
+
+   if (voms_cert == NULL || *voms_cert == NULL || (*voms_cert)->std == NULL) {
+      edg_wlpr_Log(LOG_ERR, "Invalid VOMS certificate\n");
+      return 1;
+   }
+
+   attribs = (*voms_cert)->std;
+
+   if (strcmp (attribs[0]->role, "NULL") == 0 )
+      ret = asprintf(command, "G%s", attribs[0]->group);
+   else
+      ret = asprintf(command, "B%s:%s", attribs[0]->group, attribs[0]->role);
+
+end:
+
+   return 0;
+}
+
+static int
+renew_voms_cert(struct vomsdata *vd, struct voms **voms_cert, 
+                char **buf, size_t *buf_len)
+{
+   int voms_error = 0, i, ret, voms_version;
+   struct contactdata **voms_contacts = NULL;
+   char *command = NULL;
+
+   voms_contacts = VOMS_FindByVO(vd, (*voms_cert)->voname, vomsconf, NULL, &voms_error);
+
+   if (voms_contacts == NULL) {
+      edg_wlpr_Log(LOG_ERR, "VOMS_FindByVO() failed\n");
+      return 1;
+   }
+
+   ret = create_voms_command(vd, voms_cert, &command);
+
+   /* XXX iterate over all servers on the list on errors */
+   ret = VOMS_ContactRaw(voms_contacts[0]->host, voms_contacts[0]->port,
+                        voms_contacts[0]->contact, command, 
+                        (void**) buf, buf_len, &voms_version,
+                        vd, &voms_error);
+   if (ret == 0) {
+      edg_wlpr_Log(LOG_ERR, "VOMS_Contact() failed\n");
+      return 1;
+   }
+
+   VOMS_DeleteContacts(voms_contacts);
+
+   if (command)
+      free(command);
+
+   return 0;
+}
+
+static int
+renew_voms_certs(const char *cur_file, const char *renewed_file, const char *new_file)
+{
+   globus_gsi_cred_handle_t cur_proxy = NULL;
+   globus_gsi_cred_handle_t new_proxy = NULL;
+   struct vomsdata *vd = NULL;
+   struct voms **voms_cert = NULL;
+   int voms_err, ret;
+   X509 *cert = NULL;
+   STACK_OF(X509) *chain = NULL;
+   char *buf = NULL;
+   size_t buf_len = 0;
+   X509_EXTENSION *extension = NULL;
+   char *old_env_proxy = getenv("X509_USER_PROXY");
+   char *old_env_cert = getenv("X509_USER_CERT");
+   char *old_env_key = getenv("X509_USER_KEY");
+
+   setenv("X509_USER_PROXY", cur_file, 1);
+   setenv("X509_USER_CERT", renewed_file, 1);
+   setenv("X509_USER_KEY", renewed_file, 1);
+
+   ret = load_proxy(cur_file, &cert, NULL, &chain, &cur_proxy);
+   if (ret)
+      goto end;
+
+   vd = VOMS_Init(NULL, NULL);
+   if (vd == NULL) {
+      edg_wlpr_Log(LOG_ERR, "VOMS_Init() failed\n");
+      return 1;
+   }
+
+   ret = VOMS_Retrieve(cert, chain, RECURSE_CHAIN, vd, &voms_err);
+   if (ret == 0) {
+      if (voms_err == VERR_NOEXT) {
+        /* no VOMS cred, no problem; continue */
+        /* XXX this part shouldn't be reachable, this call is only called
+         * if the proxy does contain VOMS attributes */
+        edg_wlpr_Log(LOG_ERR, "No VOMS attributes found in proxy %s\n", cur_file);
+        ret = 0;
+        goto end;
+      } else {
+        edg_wlpr_Log(LOG_ERR, "Cannot get VOMS certificate(s) from proxy");
+        ret = 1;
+        goto end;
+      }
+   }
+
+   /* XXX make sure this loop can really work for multiple voms certificates
+    * embedded in the proxy */
+   for (voms_cert = vd->data; voms_cert && *voms_cert; voms_cert++) {
+      char *tmp, *ptr;
+      size_t tmp_len;
+
+      ret = renew_voms_cert(vd, voms_cert, &tmp, &tmp_len);
+      if (ret)
+        goto end;
+      ptr = realloc(buf, buf_len + tmp_len);
+      if (ptr == NULL) {
+         ret = ENOMEM;
+         goto end;
+      }
+      buf = ptr;
+      memcpy(buf + buf_len, tmp, tmp_len);
+      buf_len += tmp_len;
+   }
+
+   if (buf == NULL) {
+      /* no extension renewed, return */
+      ret = 0;
+      goto end;
+   }
+
+   ret = my_VOMS_Export(buf, buf_len, &extension);
+   if (ret)
+      goto end;
+
+   ret = load_proxy(renewed_file, NULL, NULL, NULL, &new_proxy);
+   if (ret)
+      goto end;
+
+   ret = generate_proxy(new_proxy, extension, new_file);
+
+end:
+   (old_env_proxy) ? setenv("X509_USER_PROXY", old_env_proxy, 1) :
+                    unsetenv("X509_USER_PROXY");
+   (old_env_cert) ? setenv("X509_USER_CERT", old_env_cert, 1) :
+                    unsetenv("X509_USER_CERT");
+   (old_env_key) ? setenv("X509_USER_KEY", old_env_key, 1) :
+                   unsetenv("X509_USER_KEY");
+
+   if (cert)
+      X509_free(cert);
+   if (chain)
+      sk_X509_pop_free(chain, X509_free);
+   if (vd)
+      VOMS_Destroy(vd);
+   if (cur_proxy)
+      globus_gsi_cred_handle_destroy(cur_proxy);
+   if (new_proxy)
+      globus_gsi_cred_handle_destroy(new_proxy);
+   if (buf)
+      free(buf);
+
+   return ret;
+}
+
+int
+renew_voms_creds(const char *cur_file, const char *renewed_file, const char *new_file)
+{
+   return renew_voms_certs(cur_file, renewed_file, new_file);
+}
+
+#if 0
+int
+main(int argc, char *argv[])
+{
+   int ret;
+   const char *current_proxy = "/tmp/x509up_u11930";
+   const char *renewed_proxy = "/tmp/proxy";
+
+   if (argc > 1)
+      current_proxy = argv[1];
+   if (argc > 2)
+      renewed_proxy = argv[2];
+
+   if (globus_module_activate(GLOBUS_GSI_PROXY_MODULE) != GLOBUS_SUCCESS ||
+       globus_module_activate(GLOBUS_GSI_CERT_UTILS_MODULE) != GLOBUS_SUCCESS) {
+       edg_wlpr_Log(LOG_ERR, "[%d]: Unable to initialize Globus modules\n", getpid());
+       return 1;
+   }
+
+   ret = renew_voms_certs(current_proxy, renewed_proxy);
+
+   return 0;
+}
+#endif
index 4061536..1ccd89d 100755 (executable)
@@ -21,6 +21,9 @@
 
        Revision history:
        $Log$
+       Revision 1.1.1.1  2004/07/21 18:16:57  eronchie
+       Moved out exception from org.glite.wms.common/src/utilitiesY
+       
 
 -->
 
@@ -80,6 +83,8 @@
                 Load version file 
             ========================================= -->
        <property file="${module.version.file}"/>
+               <property file="${module.build.file}"/>
+       <property file="${module.build.file}" />
                
        <!-- ==============================================
                 Local private targets
index 30f379f..9463b3c 100755 (executable)
@@ -19,6 +19,9 @@
 #
 #       Revision history:
 #       $Log$
+#       Revision 1.10  2004/12/10 07:31:35  eronchie
+#       Increased version
+#
 #       Revision 1.9  2004/11/16 15:31:13  eronchie
 #       Increased version
 #
@@ -52,7 +55,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.57)
-AC_INIT([GLite WMS Utils Exception], [1.0.0])
+AC_INIT([GLite WMS Utils Exception], [1.0.1])
 AC_CONFIG_AUX_DIR([./project])
 AM_INIT_AUTOMAKE([1.6.3 subdir-objects])
 AC_CONFIG_SRCDIR([src/Exception.cpp])
index 7ba0fda..95cdcf6 100644 (file)
@@ -54,8 +54,7 @@ class Exception : public std::exception{
        * @param code the code representing the thrown exception
        * @param exception the name of the thrown exception
        * @param method the name of the method that raised the exception
-       * @param source The source that raised the exception (could be the file path, the class Name, etc etc)
-       * @param line_number the number of the line in the file that raised the exception(if the source has been given as a file)  */
+       * @param source The source that raised the exception (could be the file path, the class Name, etc etc) */
        Exception ( const std::string& source, const std::string& method,  int code,  const std::string& exception);
 
        /**
@@ -114,15 +113,25 @@ class Exception : public std::exception{
        */
        virtual void push_back (  const std::string& source, int line_number,  const std::string& method   ) ;
   protected:
+               /** Empty constructor*/
                Exception();
+               /**  integer error code representing the cause of the error */
                int                   error_code;
+               /**  string exception message representation*/
                std::string          error_message ;
+               /**  line number where the exception was raised */
                int                   line;
+               /** The name of the file where the exception was raised */
                std::string          source_file;
+               /** the name of the exception */
                std::string          exception_name;
+               /** the name of the method where the expceiton was raised */
                std::string          method_name ;
+               /** a string representation of the stacktrace */
                std::string          stack;
+               /** the actual internal stacktrace representation */
                std::vector< std::string> stack_strings ;
+               /** the name of the ancestor exception */
                std::string          ancestor ;
 }; //End  Exception Class
 }}}  // Closing namespace
diff --git a/org.glite.wms-utils.exception/project/build.number b/org.glite.wms-utils.exception/project/build.number
new file mode 100644 (file)
index 0000000..ff20c77
--- /dev/null
@@ -0,0 +1,2 @@
+#Sun Apr 03 03:07:40 CEST 2005
+module.build=214
index 7cd1d7c..34be4df 100755 (executable)
@@ -1,4 +1,4 @@
-#Fri Dec 10 12:18:50 CET 2004
-module.version=1.0.0
-module.build=105
-module.age=1
+
+module.version = 1.0.1
+module.age = 1
+                               
\ No newline at end of file
index 1ec3b4a..810758b 100644 (file)
@@ -20,25 +20,29 @@ pthread_mutex_t METHOD_MUTEX  ;  // This mutex is used in order to lock the file
 Exception::Exception () {
        line = 0;
 } ;
+
 Exception::~Exception() throw(){ }
+
 /**
 * Exception chainig
 */
-void Exception::push_back (  const string& source, int line_number,  const string& method ){
-       stack_strings.push_back ( dbgMessage() ) ;
-       ancestor = what() ;
-       source_file = source ;
-       line = line_number ;
-       method_name    =  method;
-       error_message = "" ;
-       exception_name="" ;
+void Exception::push_back (const string& source, int line_number,  const string& method){
+       stack_strings.push_back (dbgMessage());
+       ancestor = what();
+       source_file = source;
+       line = line_number;
+       method_name = method;
+       error_message = "";
+       exception_name = "";
 }
+
 Exception::Exception( const std::string& file, int line_number,  const std::string& method,  int code, const std::string& name)
        : error_code(code), exception_name(name){
        source_file    = file;
        line           = line_number;
        method_name    = method;
 };
+
 Exception::Exception (const string& source, const string& method, int code, const string& exception)
        : error_code(code), exception_name(exception){
        source_file    = source;
@@ -46,30 +50,27 @@ Exception::Exception (const string& source, const string& method, int code, cons
        // stack= "";
        line = 0;
 };
+
 int Exception::getCode(){
-    if  (error_code != 0)
-       return error_code ;
+    if  (error_code != 0) return error_code;
     else
        return WMS_COMMON_BASE;
 };
-const char* Exception::what() const throw(){
-  if (!ancestor.empty() )
-       return ancestor.c_str() ;
-  if  ( error_message != "")
-       return error_message.c_str() ;
-  else       return "" ;
 
+const char* Exception::what() const throw(){
+  if (!ancestor.empty()) return ancestor.c_str();
+  return error_message.c_str();
 };
+
 string Exception::getExceptionName(){
-   if  (exception_name!= "")
-     return exception_name;
-   else
-     return "" ;
+   return exception_name;
 };
+
 void Exception::log(const std::string& logfile)
 {
-    if (  logfile == "")
-       syslog (  LOG_PERROR,   (char *)  (dbgMessage()).c_str()  );
+    if (logfile == "")
+       syslog (LOG_PERROR, (char *)(dbgMessage()).c_str());
     else{
        pthread_mutex_lock( &METHOD_MUTEX);                   //   LOCK
        //TBD : test if file exist-->>Create HEADER   ??
@@ -79,6 +80,7 @@ void Exception::log(const std::string& logfile)
        pthread_mutex_unlock( &METHOD_MUTEX);               //   UNLOCK
     }
 };
+
 string Exception::printStackTrace(){
        string stack = "" ;
        for (unsigned int i = 0 ; i < stack_strings.size() ; i++ ){
@@ -86,25 +88,27 @@ string Exception::printStackTrace(){
        }
        return stack +dbgMessage();
 };
+
 vector<string> Exception::getStackTrace(){
        // make a copy of the stack
        vector<string> stack = stack_strings ;
-       stack.push_back(dbgMessage() ) ;
+       stack.push_back(dbgMessage()) ;
        return stack;
 };
 
 string Exception::dbgMessage(){
    string result ;
    //Adding exception Name
-   if ( exception_name!="")
-        result = exception_name ;
+   result = exception_name;
+   
    //Adding error msg
-   if (error_message!="")
-        result +=": " + string(what());
-   if (result != "")
-      result+="\n";
+   if (error_message!="") result +=": " + string(what());
+   
+   if (result != "") result+="\n";
+   
    //Adding  Source
    result +="\tat " + method_name  +"[" +source_file;
+   
    //Adding line number
    if (line!=0){
       char buffer [1024] ;
index 220b2a6..009513f 100755 (executable)
@@ -21,6 +21,9 @@
 
        Revision history:
        $Log$
+       Revision 1.4  2004/07/21 17:53:36  eronchie
+       Moved out org.glite.wms.jobid from org.glite.wms and put in org.glite.wms-utils
+       
 
 -->
 
@@ -80,6 +83,8 @@
                 Load version file 
             ========================================= -->
        <property file="${module.version.file}"/>
+               <property file="${module.build.file}"/>
+       <property file="${module.build.file}" />
                
        <!-- ==============================================
                 Local private targets
diff --git a/org.glite.wms-utils.jobid/project/build.number b/org.glite.wms-utils.jobid/project/build.number
new file mode 100644 (file)
index 0000000..29576d6
--- /dev/null
@@ -0,0 +1,2 @@
+#Sun Apr 03 03:12:33 CEST 2005
+module.build=213
index 3c2b57f..bc58475 100755 (executable)
@@ -1,4 +1,4 @@
-#Fri Dec 10 12:23:10 CET 2004
-module.version=1.0.0
-module.build=104
-module.age=1
+
+module.version = 1.0.0
+module.age = 1
+                               
\ No newline at end of file
diff --git a/org.gridsite.core/.cvsignore b/org.gridsite.core/.cvsignore
deleted file mode 100644 (file)
index e970233..0000000
+++ /dev/null
@@ -1 +0,0 @@
-.project
\ No newline at end of file
diff --git a/org.gridsite.core/CHANGES b/org.gridsite.core/CHANGES
deleted file mode 100644 (file)
index e46eee6..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-* Mon Nov 15 2004 Andrew McNab <Andrew.McNab@man.ac.uk>
-- Back out of (most of) redone VOMS support for committing
-  to JRA1 CVS.
-* Thu Oct 19 2004 Andrew McNab <Andrew.McNab@man.ac.uk>
-- ==== GridSite version 1.1.3 ====
-* Thu Oct 19 2004 Andrew McNab <Andrew.McNab@man.ac.uk>
-- Fix Bug #5203 from Martijn Steenbakkers <msteenba>
-  by fixing GACLparseEntry in gridsite-gacl.h
-- Change to C style comments (mostly) in gridsite.h and
-  gridsite-gacl.h (fixes part of Bug #4222 from 
-  <aleks@fys.uio.no>)
-- Fix Bug #4225 from <aleks@fys.uio.no> in
-  GRSTgaclCredsFree()
-- Add GRSTx509CachedProxyFind() and findproxyfile
-  command to allow proxies to be found in proxy cache
-- Change GRSTx509StoreProxy() to GRSTx509CacheProxy() for
-  consistency with this and GRSTx509CachedProxyKeyFind()
-* Wed Oct 18 2004 Andrew McNab <Andrew.McNab@man.ac.uk>
-- ==== GridSite version 1.1.2 ====
-* Tue Oct 19 2004 Andrew McNab <Andrew.McNab@man.ac.uk>
-- Copy code from delegation prototype into grst_x509.c
-  and include htproxyput.c and grst-delegation.c
-  optional targets (which depend on gSOAP.)
-* Wed Oct 13 2004 Andrew McNab <Andrew.McNab@man.ac.uk>
-- Include per-file patch to GRSTgaclFileFindAclname: 
-  .gacl:FILENAME controls FILENAME if it exists.
-* Tue Jul 27 2004 Andrew McNab <Andrew.McNab@man.ac.uk>
-- ==== GridSite version 1.1.1 ====
-* Tue Jul 27 2004 Andrew McNab <mcnab@hep.man.ac.uk>
-- Include HTTP Downgrade support in htcp
-* Sat Jul 24 2004 Andrew McNab <mcnab@hep.man.ac.uk>
-- Include HTTP Downgrade support in mod_gridsite.
-* Thu Jul 22 2004 Andrew McNab <mcnab@hep.man.ac.uk>
-- Begin development version 1.1.x
-* Thu Jul 22 2004 Andrew McNab <mcnab@hep.man.ac.uk>
-- ==== GridSite version 1.1.0 ====
-* Mon Jul 19 2004 Andrew McNab <mcnab@hep.man.ac.uk>
-- Changes in line with EGEE SCM - most importantly
-  the top level directory becomes org.gridsite.core
-* Mon Jul 19 2004 Andrew McNab <mcnab@hep.man.ac.uk>
-- ==== GridSite version 1.0.3 ====
-* Mon Jun 28 2004 Andrew McNab <mcnab@hep.man.ac.uk>
-- In GRSTx509CheckChain() and GRSTx509CompactCreds()
-  we now accept the first cert in a chain as a CA
-  even if it is X509v3 but without the CA bits set.
-  (On the basis that the first chain is from the 
-  administrator-installed CA files store.)
-* Sun Jun 27 2004 Andrew McNab <mcnab@hep.man.ac.uk>
-- ==== GridSite version 1.0.2 ====
-* Sun Jun 27 2004 Andrew McNab <mcnab@hep.man.ac.uk>
-- Fix for Bug #2860 (so can now read DN Lists over
-  HTTPS when have no user certificate if relevant
-  .gacl gives <read> permission but not <list>)
-- Include gridsite-gacl.h mods from Daniel Kouril
-  <kouril@ics.muni.cz> to fix faulty definitions
-  of GACLnewEntry() and GACLnewAcl() and to make
-  a legacy non-static GACLparseEntry() wrapper.
-* Thu Jun 17 2004 Andrew McNab <mcnab@hep.man.ac.uk>
-- Changes to mod_gridsite.h for Fedora Core 2 /
-  Apache 2.0.49+ mod_ssl changes (mod_ssl-private.h)
-* Wed Jun 9 2004 Andrew McNab <mcnab@hep.man.ac.uk>
-- Incorporate EGEE CVS layout changes in production
-  branch.
-* Wed Jun 9 2004 Andrew McNab <mcnab@hep.man.ac.uk>
-- ==== GridSite version 1.0.1 ====
-* Sun Dec 14 2003 Andrew McNab <mcnab@hep.man.ac.uk>
-- 1.0.0 is first full production release
-  (development now in 1.1.x branch)
-* Sun Dec 14 2003 Andrew McNab <mcnab@hep.man.ac.uk>
-- ==== GridSite version 1.0.0 ====
-* Sat Dec 13 2003 Andrew McNab <mcnab@hep.man.ac.uk>
-- Remove need for modified mod_ssl-gridsite: now
-  mod_gridsite intercepts callbacks with wrappers.
-- Add GRSTx509NameCmp() which compares string reps of
-  DNs across OpenSSL version changes (ie Email=)
-* Fri Dec 12 2003 Andrew McNab <mcnab@hep.man.ac.uk>
-- ==== GridSite version 0.9.11 ====
-* Thu Dec 11 2003 Andrew McNab <mcnab@hep.man.ac.uk>
-- Simplify checking of cert/proxy chain in 
-  mod_ssl-gridsite: rely on mod_ssl/OpenSSL more.
-* Wed Dec 2 2003 Andrew McNab <mcnab@hep.man.ac.uk>
-- ==== GridSite version 0.9.10 ====
-* Tue Dec 1 2003 Andrew McNab <mcnab@hep.man.ac.uk>
-- GACL ignores leading/trailing spaces in values.
-* Sat Nov 29 2003 Andrew McNab <mcnab@hep.man.ac.uk>
-- Better directory listing in htcp.
-- htcp now built as separate binary RPM.
-- gridsite-admin.cgi upload now redirects to same
-  directory after upload (Bug #1939); allows
-  optional new name for file (Request / Bug #1940);
-  and has better checking of ../dir/file attacks.
-* Sat Nov 29 2003 Andrew McNab <mcnab@hep.man.ac.uk>
-- ==== GridSite version 0.9.8 ====
-* Thu Nov 27 2003 Andrew McNab <mcnab@hep.man.ac.uk>
-- Shiv's updated GACL editor, with redirects.
-* Wed Nov 26 2003 Andrew McNab <mcnab@hep.man.ac.uk>
-- Include Daniel Stenberg's roffit script to make
-  HTML man pages for htcp and urlencode.
-- Various fixes found when installing GridPP WWW.
-* Wed Nov 26 2003 Andrew McNab <mcnab@hep.man.ac.uk>
-- ==== GridSite version 0.9.7 ====
-* Thu Nov 20 2003 Andrew McNab <mcnab@hep.man.ac.uk>
-- Major updates to htcp (htrm/htls/htll)
-- GACL now recurses subdirectories when examining
-  the DN List directories path.
-* Sat Nov 15 2003 Andrew McNab <mcnab@hep.man.ac.uk>
-- ==== GridSite version 0.9.6 ====
-* Fri Nov 14 2003 Andrew McNab <mcnab@hep.man.ac.uk>
-- Function call fixes in grst-admin.cgi
-* Thu Nov 13 2003 Andrew McNab <mcnab@hep.man.ac.uk>
-- Add htcp (curl-url-get reborn)
-* Thu Nov 13 2003 Andrew McNab <mcnab@hep.man.ac.uk>
-- ==== GridSite version 0.9.5 ====
-* Thu Nov 13 2003 Andrew McNab <mcnab@hep.man.ac.uk>
-- More grst-admin.cgi GACL updates from Shiv.
-- .gacl security improvements to grst-admin.cgi from
-  Shiv Kaushal and Peter Moore.
-* Tue Nov 11 2003 Andrew McNab <mcnab@hep.man.ac.uk>
-- One RPM instead of three, with version from VERSION
-- Textarea for HTML/Text editing now 80 columns
-* Mon Nov 10 2003 Andrew McNab <mcnab@hep.man.ac.uk>
-- Add delegation level and GridSiteGSIProxyLimit
-  support.
-- Add GridSiteAdminList handling to mod_gridsite
-  and real-gridsite-admin.cgi
-* Sun Nov 9 2003 Andrew McNab <mcnab@hep.man.ac.uk>
-- Add directory create/delete, and file/dir rename.
-- Add ZIP listing/unzipping via external unzip
-  utility from http://www.info-zip.org/pub/infozip/
-* Mon Nov 3 2003 Andrew McNab <mcnab@hep.man.ac.uk>
-- Include next version of Shiv's GACL editor.
-- Add rpm-usr target to Makefile, to make RPMs
-  out-of-the-box compatible with RH9 and its Apache2
-- Use REMOTE_DOUBLE_REV for GACL hostname creds in
-  mod_gridsite.c/mod_gridsite_perm_handler()
-* Sun Oct 26 2003 Andrew McNab <mcnab@hep.man.ac.uk>
-- Include GACL editor in real-gridsite-admin.cgi
-  from Shiv Kaushal <shiv@hep.man.ac.uk>
-* Sun Oct 26 2003 Andrew McNab <mcnab@hep.man.ac.uk>
-- Reorganise into a single build tree, including
-  Apache 2.0 .h files to remove circular dependency.
-* Sun Oct 26 2003 Andrew McNab <mcnab@hep.man.ac.uk>
-- ==== GridSite version 0.9.4 ====
-* Sun Oct 19 2003 Andrew McNab <mcnab@hep.man.ac.uk>
-- Include many pieces of GridSite code from 0.3.x (CGI)
-  fileGridSite and mod_gridsite 0.9.0
-* Sun Oct 19 2003 Andrew McNab <mcnab@hep.man.ac.uk>
-- ==== GridSite version 0.9.3 ====
diff --git a/org.gridsite.core/INSTALL b/org.gridsite.core/INSTALL
deleted file mode 100644 (file)
index 3da6cde..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-BUILDING/INSTALLING GRIDSITE
-============================
-
-For more detailed instructions, see the install.html file, either
-in the ./doc subdirectory in the sources, in the directory
-gridsite-VERSION/html of the docs directory when GridSite is
-installed, or http://www.gridsite.org/1.1.x/install.html
-
-GridSite is currently only supported on Linux, but should be
-trivially portable to other Unix platforms where the GNU build
-tools are available.
-
-When building from source, two routes are available: building
-with Make or with RPM.
-
-BUILDING WITH MAKE
-==================
-
-make 
-make install
-
-will build all components and install them all under the default
-locations of /usr/local/[lib|bin|include|sbin] The default prefix
-/usr/local is set by the prefix variable in the top level Makefile
-
-BUILDING WITH RPM
-=================
-
-For RedHat Linux and derivatives, building with RPM is recommended.
-The command
-
-make rpm
-
-will build the gridsite and htcp binary RPMs in the directory
-../RPMTMP/RPMS/i386 relative to the working directory. A SRPM is 
-put into ../RPMTMP/SRPMS
-
-Building with RPM uses the default prefix /usr, although the
-resulting RPMs are relocatable to other hierarchies.
diff --git a/org.gridsite.core/LICENSE b/org.gridsite.core/LICENSE
deleted file mode 100644 (file)
index ce67433..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-Copyright (c) 2002-4, Andrew McNab and Shiv Kaushal,
-University of Manchester. All rights reserved.
-
-Redistribution and use in source and binary forms, with or
-without modification, are permitted provided that the following
-conditions are met:
-
-  o Redistributions of source code must retain the above
-    copyright notice, this list of conditions and the following
-    disclaimer. 
-  o Redistributions in binary form must reproduce the above
-    copyright notice, this list of conditions and the following
-    disclaimer in the documentation and/or other materials
-    provided with the distribution. 
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
-
-                                                                                
-Clearly marked portions of the published GridSite source code 
-are derived from Apache httpd or its modules, and are covered
-by the Apache Software License:
-
-Copyright 2001-2004 The Apache Software Foundation
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
diff --git a/org.gridsite.core/README b/org.gridsite.core/README
deleted file mode 100644 (file)
index 62730a6..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-See INSTALL for build and installation instructions, and 
-the Documentation section of http://www.gridsite.org/
-for configuration and usage guides.
diff --git a/org.gridsite.core/VERSION b/org.gridsite.core/VERSION
deleted file mode 100644 (file)
index 372ce91..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-MAJOR_VERSION=1
-MINOR_VERSION=1.1
-PATCH_VERSION=1.1.3
-VERSION=$(PATCH_VERSION)
diff --git a/org.gridsite.core/build.xml b/org.gridsite.core/build.xml
deleted file mode 100644 (file)
index a214d0a..0000000
+++ /dev/null
@@ -1,223 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-       Copyright (c) 2004 on behalf of the EU EGEE Project: 
-       The European Organization for Nuclear Research (CERN), 
-       Istituto Nazionale di Fisica Nucleare (INFN), Italy
-       Datamat Spa, Italy
-       Centre National de la Recherche Scientifique (CNRS), France
-       CS Systeme d'Information (CSSI), France
-       Royal Institute of Technology, Center for Parallel Computers (KTH-PDC), Sweden
-       Universiteit van Amsterdam (UvA), Netherlands
-       University of Helsinki (UH.HIP), Finland
-       University of Bergen (UiB), Norway
-       Council for the Central Laboratory of the Research Councils (CCLRC), United Kingdom
-
-       Build file for the Gridsite Core Subsystem
-       
-       Authors: Alberto Di Meglio <alberto.di.meglio@cern.ch>          
-       Version info: $Id$
-       Release: $Name$
-
-       Revision history:
-       $Log$
-       Revision 1.6  2004/11/13 10:55:44  glbuild
-       Added artifacts RPMS directory
-       
-       Revision 1.5  2004/10/29 22:55:07  dimeglio
-       Use envset target
-       
-       Revision 1.4  2004/10/28 23:00:14  dimeglio
-       Removed post-subsystem entry
-       
-       Revision 1.3  2004/10/27 11:19:17  dimeglio
-       Fixed i386 instead of 1386
-       
-       Revision 1.2  2004/10/27 11:18:38  dimeglio
-       Use os.platform instead of hard-coded rhel30
-       
-       Revision 1.1  2004/10/26 17:54:24  dimeglio
-       First version of this file
-       
--->
-
-<project name="gridsite-core" default="dist">
-
-       <description>
-               Ant build file to build the Gridsite Core Component
-       </description>
-       
-       <!-- =========================================
-            Import properties (order is important) 
-            ========================================= -->
-       
-       <!-- Import baseline & user properties -->
-       <import file="../org.glite/project/baseline.properties.xml" />
-
-       <!-- Import subsystem build properties, 
-                             subsystem properties & 
-                             subsystem common properties -->
-       <import file="./project/properties.xml" />
-
-       <!-- Import global build properties and global properties -->
-       <import file="${global.properties.file}" />
-                               
-       <!-- =========================================
-                Load dependencies properties files (order is important) 
-            ========================================= -->
-       <property file="${user.dependencies.file}"/>
-       <property file="${subsystem.dependencies.file}"/>
-       <property file="${global.dependencies.file}"/>  
-       
-       <!-- =========================================
-                Load configure options
-               ========================================= -->
-        <import file="${global.configure.options.file}"/>
-               <import file="${component.configure.options.file}"/>
-               
-       <!-- =========================================
-                Import global task definitions
-            ========================================= -->
-       <import file="${global.taskdefs.file}" />
-       
-       <!-- =========================================
-            Import global compiler definitions
-            ========================================= -->
-       <import file="${global.compilerdefs.file}" />
-               
-       <!-- =========================================
-                Import targets 
-            ========================================= -->
-       <import file="${global.targets-common.file}" />
-       
-       <!-- =========================================
-                Load version file 
-            ========================================= -->
-       <property file="${module.version.file}"/>
-       
-       <!-- ===============================================
-                 Public common targets
-            =============================================== -->
-       
-        <var name="global.prefix" unset="true"/>
-        <property name="global.prefix" value="gridsite"/>
-
-       <target name="localinit" depends="envcheck">
-               <mkdir dir="${stage.dir}" />
-               <mkdir dir="${dist.dir}" />
-       </target>
-
-       <target name="init" depends="localinit">
-               <echo>${global.prefix}</echo>
-       </target>
-
-       <target name="checkstyle" depends="init">
-       </target>
-
-       <target name="compile" depends="checkstyle">
-               <if>
-                       <isset property="build.make.arguments"/>         
-                       <then>
-                               <!-- Call make default compile target -->       
-                               <make target="build" dir="${module.src.dir}" failonerror="${failonerror}" args="${build.make.arguments}"/>
-                       </then>          
-                       <else>   
-                               <!-- Call make default compile target -->       
-                               <make target="build" dir="${module.src.dir}" failonerror="${failonerror}"/>
-                       </else>          
-               </if>    
-       </target>
-
-       <target name="compiletest" depends="compile">
-       </target>
-
-       <target name="unittest" depends="compiletest">
-       </target>
-
-       <target name="unitcoverage" depends="unittest">
-       </target>
-
-       <target name="doc" depends="unitcoverage">
-       </target>
-
-    <target name="stage" depends="doc">
-               <if>
-                       <isset property="build.make.arguments"/>         
-                       <then>
-                               <!-- Call make default compile target -->       
-                               <make target="install" dir="${module.src.dir}" failonerror="${failonerror}" args="${build.make.arguments}"/>
-                       </then>          
-                       <else>   
-                               <!-- Call make default compile target -->       
-                               <make target="install" dir="${module.src.dir}" failonerror="${failonerror}"/>
-                       </else>          
-               </if>    
-    </target>
-
-       <target name="dist" depends="stage">
-               <make target="rpm" dir="${module.src.dir}" failonerror="${failonerror}"/>
-               <exec dir="${module.dir}/RPMTMP/BUILDROOT/usr" executable="tar">
-                       <arg line="-czf ${module.dir}/gridsite-${module.version}_bin.tar.gz ." />
-               </exec>
-               <copy file="gridsite-${module.version}_bin.tar.gz" todir="${dist.dir}"/>
-               <copy file="gridsite-${module.version}.src.tar.gz" tofile="${dist.dir}/gridsite-${module.version}_src.tar.gz"/>
-               <copy todir="${dist.dir}/${os.platform}/i386/RPMS">
-                       <fileset dir="${module.dir}/RPMTMP/RPMS/i386">
-                               <include name="*.rpm"/>
-                       </fileset>
-               </copy>
-               <delete dir="${module.dir}/RPMS"/>
-               <mkdir dir="${module.dir}/RPMS"/>
-                <copy todir="${module.dir}/RPMS">
-                        <fileset dir="${module.dir}/RPMTMP/RPMS/i386">
-                                <include name="*.rpm"/>
-                        </fileset>
-                </copy>
-               <delete>
-                       <fileset dir="${module.dir}">
-                               <include name="*.tar.gz"/>
-                       </fileset>
-               </delete>
-               <delete dir="RPMTMP"/>
-       </target>
-
-       <target name="install" depends="localinit">
-               <make target="install" dir="${module.src.dir}" failonerror="${failonerror}"/>
-       </target>
-
-       <target name="all" depends="dist">
-       </target>
-
-       <target name="clean" depends="envcheck">
-               <property name="offline.repository" value="true" />
-               <make target="clean" dir="${module.src.dir}" failonerror="false"/>
-               <delete dir="${module.dir}/src/doxygen"/>
-               <delete>
-                       <fileset dir="${module.dir}/src">
-                               <include name="*.o"/>
-                               <include name="*.so"/>
-                               <include name="*.so.*"/>
-                               <include name="*.a"/>
-                               <include name="rm -rf urlencode"/>
-                       </fileset>
-               </delete>
-               <delete dir="${module.dir}/RPMS"/>
-       </target>
-
-       <target name="cleanAll" depends="clean"/>
-
-       <!-- ===============================================
-                Private targets
-            =============================================== -->
-       
-       <!-- ===============================================
-                Modules proxy targets
-            =============================================== -->
-
-       <!-- component targets definitions tag = do not remove = -->
-
-
-       <!-- Main proxy -->
-       <target name="buildmodules" depends="envset"/>
-
-</project>
-
diff --git a/org.gridsite.core/doc/README.htcp-bin b/org.gridsite.core/doc/README.htcp-bin
deleted file mode 100644 (file)
index ac546fc..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Binaries (and links) are in ./bin; man pages are in ./man/man1
-
-Install by copying binaries/links onto your path, or by copying htcp
-and making symbolic links to htcp from htls, htll, htrm and htmkdir.
-
-All the .1 man pages should be copied to a suitable ./man/man1 
-directory on your man path.
-
-If you just want to install htcp in /usr/local, then unpacking this
-tgz file in /usr/local should do the trick. (Delete this README when
-you're finished!)
-
-For more about htcp see http://www.gridsite.org/
diff --git a/org.gridsite.core/doc/admin.html b/org.gridsite.core/doc/admin.html
deleted file mode 100644 (file)
index 1f7f422..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-<title>GridSite Admin Guide</title>
-<body>
-<h1 align=center>GridSite Admin Guide</h1>
-
-<p> 
-This Guide is intended for people administrating areas of GridSite
-websites or fileservers, or managing GridSite's DN List groups - that is,
-how to use GridSite to manage other people's access to parts of the site - 
-for example,  people's write access to areas devoted to specific subprojects.
-
-<p>
- There is a separate 
-<a href="user.html">User Guide</a>
- which explains how to authenticate to the server with X.509 certificates,
-and how to manage files via a standard web browser or with command-line
-HTTPS clients. You should be familiar with the User Guide to fully
-understand this Admin Guide. 
-
-<p>
- You may also find the 
-<a href="config.html">Config Guide</a> 
- useful to understand how the Apache webserver is configured with GridSite
-extensions. If you are also the Apache webmaster for your site, you will
-definitely need to read the Config Guide to create the httpd.conf file.
-However, if you only need to manage webpages and files, then this Admin
-Guide and the User Guide should be sufficient.
-
-<h2>Groups and DN Lists</h2>
-
-<p>
-GridSite defines groups of people using plain text DN Lists - that is, lists
-of people's certificate DNs. Each DN List has a URL which uniquely
-identifies the list (and may also allow other sites to obtain the list and
-use it themselves.) For example, the list of all GridPP members is
-https://www.gridpp.ac.uk/dn-lists/gridpp (note that it's https:// not
-http:// - this means that other sites that download the list can check the
-certificate of www.gridpp.ac.uk and know they're talking to the
-authoritative source of the lists.)
-
-<p>
-The system can also have a number of other DN Lists which are associated with
-specific groups of people and perhaps with specific areas of responsibility
-of the website. If the DN List directory URI is /dn-lists/ then
-there is a full list of the DN Lists exported by the server at that URI
-(for example, https://www.gridpp.ac.uk/dn-lists/&nbsp;)
-
-<p>
-If you have permission to modify a DN List, you can start changing it by
-going to /dn-lists/ (via HTTPS), using the &quot;Manage directory&quot;
-button and finding the URL of your DN List in the listings. You may
-need to go down into a subdirectory to find your list. For
-example, https://www.gridpp.ac.uk/dn-lists/atlas is in the atlas
-subdirectory of /dn-lists/ (You may wish to bookmark the listing of such
-a directory if you frequently work with one.)
-
-<p>
-DN List directories are managed by the ACLs described in the next section,
-and if you have write permission, you can edit the lists already there, and
-add new lists with the same prefix (this means you can readily create your
-own subgroups.)
-
-<h2>Access Control Lists</h2>
-
-<p>
-DN Lists appear in the Grid Access Control Lists (GACL) used by GridSite.
-These are stored as .gacl files in directories: if the .gacl file is
-present, it governs access to the directory; if it is absent, then the
-parent directories are searched upwards until a .gacl is found.
-
-<p>
-The GridSite <a href="gacl.html">GACL Reference</a> explains the XML format
-of these files, but they
-can be edited using the ACL editor built into the GridSite system by people
-who have the Admin permission within the ACL.
-
-<p>
-If you have this permission in a given directory, when you view directory
-listings or files in that directory you will see the option &quot;Manage
-Directory&quot; in the page footer. This allows you to get a listing of the
-directory and the .gacl file will appear at the top if it's present. If not,
-then there will be a button to create a new .gacl file with the same
-permissions as have been inherited by that directory from its parent.
-
-<p>
-GACL allows quite complex conditions to be imposed on access, but normally
-you can think of an ACL as being composed of a number of entries, each of
-which contains one condition (the required credential) and a set of allowed
-and denied permissions.
-
-<p>
-Credentials can be individual user's certificate names or whole groups of
-certificate names if a DN List is given. (You can also specifiy hostname
-patterns using Unix shell wildcards (eg *.ac.uk) or EDG VOMS attribute
-certificates - see the GACL Reference for details.)
-
-<p>
-Permissions can be Admin (edit the ACL), Write (create, modify or delete
-files), List (browse the directory) or Read (read files.) Permissions can be
-allowed or denied. If denied by any entry, the permission is not available
-to that user or DN List (depending on what credential type was associated
-with the Deny.)
-
-</body>
diff --git a/org.gridsite.core/doc/build-apache2.sh b/org.gridsite.core/doc/build-apache2.sh
deleted file mode 100644 (file)
index 507be31..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/bin/sh
-#
-#   Copyright (c) 2002-3, Andrew McNab, University of Manchester
-#   All rights reserved.
-#
-#   Redistribution and use in source and binary forms, with or
-#   without modification, are permitted provided that the following
-#   conditions are met:
-#
-#     o Redistributions of source code must retain the above
-#       copyright notice, this list of conditions and the following
-#       disclaimer.
-#     o Redistributions in binary form must reproduce the above
-#       copyright notice, this list of conditions and the following
-#       disclaimer in the documentation and/or other materials
-#       provided with the distribution.
-#
-#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-#   CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-#   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-#   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-#   DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-#   BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-#   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-#   TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-#   ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-#   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-#   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#   POSSIBILITY OF SUCH DAMAGE.
-#
-#---------------------------------------------------------------
-# For more information about GridSite: http://www.gridsite.org/
-#---------------------------------------------------------------
-#
-# This script takes an Apache .tar.gz as the single command line argument,
-# unpacks the file, modifies the httpd.spec it contains to work without
-# the "-C" option to configure (which RedHat 7.3 doesnt like) and
-# outputs source and binary RPMs in SRPMS and RPMS/i386
-
-if [ "$1" = "" ] ; then
- echo Must give a tar.gz file name
- exit
-fi
-
-export MYTOPDIR=`pwd`
-
-if [ -x /usr/bin/rpmbuild ] ; then
- export RPMCMD=rpmbuild
-else
- export RPMCMD=rpm
-fi
-
-echo "$1" | grep '\.tar\.gz$' >/dev/null 2>&1
-if [ $? = 0 ] ; then # a gzipped source tar ball
-
- rm -Rf $MYTOPDIR/BUILD $MYTOPDIR/BUILDROOT $MYTOPDIR/SOURCES
- mkdir -p $MYTOPDIR/SOURCES $MYTOPDIR/SPECS $MYTOPDIR/BUILD \
-          $MYTOPDIR/SRPMS $MYTOPDIR/RPMS/i386 $MYTOPDIR/BUILDROOT
- shortname=`echo $1 | sed 's:^.*/::' | sed 's:\.tar\.gz$::'`
-
- cp -f $1 SOURCES
-
- tar zxvf SOURCES/$shortname.tar.gz $shortname/httpd.spec
- cp -f $shortname/httpd.spec SPECS
-
- sed -e 's/configure -C /configure /' \
-              SPECS/httpd.spec >SPECS/httpd-2.spec
-
- $RPMCMD --define "_topdir $MYTOPDIR" \
-        -ba --buildroot $MYTOPDIR/BUILDROOT SPECS/httpd-2.spec
-
- exit
-fi
-
-echo I dont recognise the file type (must be .tar.gz)
-
-exit
diff --git a/org.gridsite.core/doc/config.html b/org.gridsite.core/doc/config.html
deleted file mode 100644 (file)
index 825bf49..0000000
+++ /dev/null
@@ -1,192 +0,0 @@
-<title>GridSite Config Guide</title>
-<body>
-<h1 align=center>GridSite Config Guide</h1>
-
-<p> 
-This Guide is intended for webmasters setting up 
-<a href="http://www.gridsite.org/">GridSite</a> with an Apache 2.0
-webserver. We assume you have root access to the server machine to do this.
-There is a separate <a href="admin.html">Admin Guide</a> for
-people administrating areas of GridSite
-websites or fileservers, or managing GridSite's DN List groups. That is, for
-people managing files on the server rather than the server itself.
-
-<h2>Installation</h2>
-
-<p>
-We assume you have installed Apache 2.0 and GridSite, using the
-<a href="install.html">Building and Installation Guide</a> where necessary.
-This Config Guide assumes installation has been done under /usr. For an
-alternative tree like /usr/local, the relative paths should be the same.
-
-<p>
-Installation should have given you an Apache 2.0 httpd binary at
-/usr/sbin/httpd and a set of standard Apache 2.0 modules in
-/usr/lib/httpd/modules/ including the standard mod_ssl
-and our mod_gridsite.so module.
-
-<p>
-GridSite also includes some commands and man pages in /usr/bin and
-/usr/share/man/man1: <a href="urlencode.1.html">urlencode</a> and
-<a href="htcp.1.html">htcp</a>.
-
-<h2>Certificates</h2>
-
-<p>
-You must also install the CA root certificates of the CA's 
-used by the users you wish to talk to. These should be installed in
-/etc/grid-security/certificates as files like 01621954.0, and RPMs and tar
-files for many common European and North American CAs are available from
-<a href="https://datagrid.in2p3.fr/distribution/datagrid/security/">
-https://datagrid.in2p3.fr/distribution/datagrid/security/</a>
-
-<p>
-This location also has VOMS server certificate RPMs which install into
-the /etc/grid-security/vomsdir directory. You may also manually install VOMS
-server certificates into that directory with any filename. (GridSite
-currently parses the certificate itself when looking for a match, rather
-than checking the filename.)
-
-<p>
-The server itself needs a certificate to supply to clients that use HTTPS
-connections. You should apply for this from your Certification Authority
-(for example, the <a href="http://ca.grid-support.ac.uk/">UK e-Science
-CA</a>) and your request must use the advertised hostname of your server
-(the one that appears in URLs and not, for instance, the canonical name of
-the host itself.) This advertised hostname should appear in the
-Distinguished Name of your request. (For example
-/C=UK/O=eScience/OU=Manchester/L=HEP/CN=www.gridpp.ac.uk) For compatability
-with standard browsers, the /CN= component should not include any
-Globus-style service name (so <b>not</b> /CN=host/www.gridpp.ac.uk) If
-possible, you should also include the advertised hostname as a DNS Subject
-Alternative Name. Consult your CA first if you're in any doubt about how to
-compose your certificate request.
-
-<p>
-Once you've got your certificate, 
-Apache uses the certificate and private key in PEM format. If you obtained
-your certificate and key in PKCS#12 or .p12 format (eg by exporting from a web
-browser), you can convert the .p12 file to .pem with the following commands:
-<pre>
-openssl pkcs12 -in ck.p12 -clcerts -nokeys -out hostcert.pem
-openssl pkcs12 -in ck.p12 -nodes  -nocerts -out hostkey.pem
-</pre>
-
-<p>
-Copy the PEM files to /etc/grid-security/ as hostcert.pem (which
-should be world readable) and hostkey.pem (which should only be readable by
-root):
-
-<pre>
-chown root.root hostkey.pem hostcert.pem
-chmod 400 hostkey.pem
-chmod 444 hostcert.pem
-</pre>
-
-<h2>httpd.conf</h2>
-
-<p>
-/etc/httpd/conf/httpd.conf is the key to configuring the Apache 2.0
-webserver. The directives in this file determine which files the server will
-publish, how they are handled, which areas are writeable and who can access
-them. Through mod_gridsite.so, the GridSite system itself is configured by
-directives in this file.
-
-<p>
-The easiest way to get started is to examine the example httpd.conf files we
-provide. 
-
-<!--
-virtual servers
-directory sections
-order of loadable modules
--->
-
-<h2>httpd-fileserver.conf</h2>
-
-<p>
-<a href="httpd-fileserver.conf">httpd-fileserver.conf</a> is an example
-configuration file to use Apache/GridSite as a read/write HTTP(S)
-fileserver, including comments on how to get the server up and running.
-
-<h2>httpd-webserver.conf</h2>
-
-<p>
-<a href="httpd-webserver.conf">httpd-webserver.conf</a> is an example
-configuration file to use Apache/GridSite as a Web Server
-(that is, primarily for interactive use with a browser)
-including comments on how to get the server up and running.
-
-<h2>GridSite Directives</h2>
-
-<p>
-The <a href="module.html">mod_gridsite reference</a> lists all the GridSite
-httpd.conf directives. 
-
-<p>
-To start serving files, make a directory /var/www/htdocs owned by
-nobody.nobody, including the .gacl access control file described below,
-and add the following directive to the HTTPS &lt;Directory&gt; section:
-
-<p>
-GridSiteMethods GET PUT DELETE
-
-<p>
-If you wish to accept Globus GSI Proxies as well as full X.509 user
-certificates, set GridSiteGSIProxyLimit to the depth of proxy you
-wish to accept. (As a _rough_ guide: 0=No Proxies; 1=Proxy on user's
-machine; 2=Proxy owned by running Globus job; 3=Proxy delegated by a
-Globus job.)
-
-<h2>GACL access control</h2>
-
-<p>
-The <a href="gacl.html">GACL reference</a> explains the XML access
-control files used by GridSite. These allow flexible policies to be written,
-in terms of X.509 user certificates, GSI proxies, VOMS attribute
-certificates, DN List groups and DNS hostnames.
-
-<p>
-For example, to give all clients read and list permission:
-<p>
-<pre>
-&lt;gacl&gt;
-&lt;entry&gt;
-  &lt;any-user/&gt;
-  &lt;allow&gt;&lt;read/&gt;&lt;list/&gt;&lt;/allow&gt;
-&lt;/entry&gt;
-&lt;/gacl&gt;
-</pre>
-
-<p>
-To enable writing, add DN List, Person or VOMS entries to the file.
-For example:
-
-<p>
-<pre>
-&lt;gacl&gt;
-&lt;entry&gt;
-  &lt;any-user/&gt;
-  &lt;allow&gt;&lt;read/&gt;&lt;list/&gt;&lt;/allow&gt;
-&lt;/entry&gt;
-&lt;entry&gt;
-  &lt;person&gt;
-  &lt;dn&gt;/C=UK/O=eScience/OU=Manchester/L=HEP/CN=Andrew McNab&lt;/dn&gt;
-  &lt;/person&gt;
-  &lt;allow&gt;&lt;write/&gt;&lt;/allow&gt;
-&lt;/entry&gt;
-&lt;/gacl&gt;
-</pre>
-
-<p>
-The GACL file that governs a directory is stored as .gacl in that directory.
-If no .gacl is present, then GridSite will search the parent directories in
-ascending order until one is found.
-
-<!--
-<h2>DN Lists</h2>
-<h2>gridsite-admin.cgi</h2>
-<h2>Other CGI</h2>
--->
-
-</body>
diff --git a/org.gridsite.core/doc/findproxyfile.1 b/org.gridsite.core/doc/findproxyfile.1
deleted file mode 100644 (file)
index ae2f944..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-.TH findproxyfile 1 "October 2004" findproxyfile "FINDPROXYFILE Manual"
-.SH NAME
-.B findproxyfile
-\- returns full path to GSI Proxy file
-.SH SYNOPSIS
-.B findproxyfile 
-[--proxycache=PATH] [--delegation-id=ID] [--user-dn=DN] [--outsidecache]
-.SH DESCRIPTION
-.B findproxyfile
-returns full path to a GSI Proxy file, either in the proxy cache maintained
-by the GridSite G-HTTPS and delegation portType functions, or in other
-standard places.
-
-If a User DN is given
-.B findproxyfile 
-uses the value of the 
-.B --proxycache
-argument, the GRST_PROXY_PATH or the
-compile time default to detemine the location of the proxy cache directory.
-The directory is searched for a proxy having the given User DN and 
-Delegation ID. (If no Delegation ID is specificed, then the default value is
-used.)
-
-If
-.B findproxyfile
-does not find a proxy or if a User DN is not given, but
-.B --outsidecache
-was given, then the environment variable X509_USER_PROXY and the standard
-location /tmp/x509up_uUID are searched as well.
-
-.SH OPTIONS
-
-.IP "--proxycache=PATH"
-Give the path of the proxy cache directory explicitly, overriding the
-default and the GRST_PROXY_PATH environment variable if present.
-
-.IP "--delegation-id=ID"
-The optional delegation ID is search for in the proxy cache in addition to
-the User DN. If absent, the default Delegation ID value is searched for.
-
-.IP "--user-dn=DN"
-The DN of the full user certificate associated with the proxy to be searched
-for in the proxy cache. (This is not the DN of any proxy earlier in the
-chain: it is a the DN of a certificate issued by a recognised CA.)
-
-.IP "--outsidecache"
-If a User DN is not given, or a proxy not found in the cache, then search
-for a proxy using X509_USER_PROXY environment variable and file name of
-form /tmp/x509up_uUID as well.
-
-.SH RETURN VALUE
-If a proxy is found, its full path is output on standard out.
-
-.SH EXIT CODES
-0 is returned on succcess. Non-zero otherwise.
-
-.SH BUGS
-In this version, no attempt is made to verify or validate the proxies.
-
-.SH AUTHOR
-Andrew McNab <Andrew.McNab@man.ac.uk>
-
-findproxyfile is part of GridSite: http://www.gridsite.org/
diff --git a/org.gridsite.core/doc/gacl.html b/org.gridsite.core/doc/gacl.html
deleted file mode 100644 (file)
index 40efdd2..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-<title>GridSite: Grid Access Control Language</title>
-<body>
-<h1 align=center>GridSite: Grid Access Control Language</h1>
-
-<p> 
-GACL is the authorization policy language used by 
-<a href="http://www.gridsite.org/">GridSite</a> GACL allows
-policies to be written in terms of common Grid credentials: X.509
-identities, GSI proxies, VOMS attribute certificates and lists of X.509
-identities.
-
-<p>
-GridSite both uses GACL policies and provides a GACL manipulation API for
-C/C++ in the GridSite library.
-
-<h2>Credentials</h2>
-
-<p>
-In GridSite 1.0.x, four credential types are supported:
-
-<p>
-&lt;person&gt;
-&lt;dn&gt;/O=Grid/CN=Name&lt;/dn&gt;
-&lt;/person&gt;
-
-<p>
-&lt;voms&gt;
-&lt;fqan&gt;/vo.dom.ain/group&lt;/fqan&gt;
-&lt;/voms&gt;
-
-<p>
-&lt;dn-list&gt;
-&lt;url&gt;https://www.vo.dom.ain/dn-lists/group&lt;/url&gt;
-&lt;/dn-list&gt;
-
-<p>
-&lt;dns&gt;
-&lt;hostname&gt;host*.dom.ain&lt;/hostname&gt;
-&lt;/dns&gt;
-
-<h2>Permissions</h2>
-
-<p>
-Five permissions are supported: Admin, Write, List, Exec and Read. Admin is
-permission to modify the authorization policy itself, but applications can
-map the other permissions to local methods as appropriate to their
-environment. For filesystems and fileservers, Write, List and Read have
-their usual meanings: creating or modifying files or directories; browsing
-directories; reading files. Exec is not used by GridSite itself, and
-applications are free to give it a meaning within their own contexts.
-
-<p>
-In 1.0.x, only per-directory GACL files are supported, and the file is stored
-in the directory in question, or in one of its parent directories. (GridSite
-searches upwards until it finds one.)
-
-<p>
-In GACL files, the permissions are represented by single tags:
-&lt;admin/&gt;, &lt;write/&gt;, &lt;list/&gt;, &lt;exec/&gt;, &lt;read/&gt;.
-Permission
-tags are contained within Allow or Deny blocks. For example: 
-&lt;allow&gt;&lt;read/&gt;&lt;list/&gt;&lt;/allow&gt; or 
-&lt;deny&gt;&lt;admin/&gt;&lt;/deny&gt;.
-
-<h2>Entries</h2>
-
-<p>
-Entries associate credentials with permission statements. Entries consist of
-one or more credential blocks, and either an Allow or a Deny block, or both. 
-If multiple credentials are present in one entry, they must all be held by a
-user to receive the association permissions. (So Entries provide logical AND
-of credentials.)
-
-<h2>Access Control Lists</h2>
-
-<p>
-ACLs consist of a list of one or more Entry blocks. When a user's credentials
-are compared to the ACL, the permissions given to the user by Allow blocks
-are recorded, along with those forbidden by Deny blocks. When all entries 
-have been evaluated, any forbidden permissions are removed from those
-granted. (So Deny always wins over Allow, even between different Entries,
-but otherwise ACLs provide logical OR of credentials.)
-
-</body>
diff --git a/org.gridsite.core/doc/htcp.1 b/org.gridsite.core/doc/htcp.1
deleted file mode 100644 (file)
index 984aaaf..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-.TH htcp 1 "July 2004" htcp "HTCP Manual"
-.SH NAME
-.B htcp, htrm, htls, htll, htmkdir
-\- get, put, delete or list HTTP/HTTPS files or directories
-.SH SYNOPSIS
-.B htcp [options]
-.I Source-URL[s] [Destination URL]
-.SH DESCRIPTION
-.B htcp
-is a client to fetch files or directory listings from remote servers using
-HTTP or HTTPS, or to put or delete files or directories onto remote servers
-using HTTPS. htcp is similar to scp(1), but uses HTTP/HTTPS rather than ssh
-as its transfer protocol.
-
-When talking to an HTTPS server, htcp can run "anonymously", with a
-standard X.509 user certificate and key, or with a GSI Proxy. This makes
-htcp very useful in Grid environments where many users have certificates
-and where jobs and users have access to GSI proxies.
-
-.SH URLs
-htcp supports the file:, http: and https: URL schemes as sources and
-destinations. If no scheme is given, the URL scheme is assumed to be file:
-and relative to the current directory if not an absolute path.
-
-If multiple sources are given, they will be used in turn and the destination
-must be a directory (directories are indicated by a trailing /) However,
-source and destination cannot both refer to remote servers.
-
-.SH OPTIONS
-.IP "-v/--verbose"
-Turn on debugging information. Used once, this option will enable htcp's
-messages to stderr. Used twice, will also enable the underlying libcurl
-messages.
-
-.IP "--delete"
-Instead of copying files, delete all the URLs given on the command line.
-Calling the program as htrm has the same effect.
-
-.IP "--list"
-.br
-Instead of copying files, output lists of files located in the URL-directories
-given on the command line. Calling the program as htls has the same effect.
-
-.IP "--long-list"
-Instead of copying files, output long listings of files located in the
-URL-directories given on the command line. If available, the size in bytes
-and modification time of each file is given. Calling the program as 
-htll has the same effect.
-
-.IP "--mkdir"
-Instead of copying files, attempt to create a directory on a remote server
-with HTTP PUT. The server must support the convention that PUT to a URL with
-a trailing slash means create a directory. No file body is sent. Calling the
-program as htmkdir has the same effect.
-
-.IP "--anon"
-.br
-Do not attempt to use X.509 user certificates or GSI proxies to authenticate
-to the remote HTTPS server. This means you are "anonymous", but the server's
-identity may still be verified and the connection is still encrypted.
-
-.IP "--cert <X.509 cert path>  and  --key <X.509 key path>"
-Path to the PEM-encoded
-X.509 or GSI Proxy user certificate and key to use for HTTPS
-connections, intead of "anonymous mode." If only one of --key or --cert
-is given, then that will be tried for both. If neither is given, then the
-following order of precedence is used: 
-the file name held by the variable X509_USER_PROXY; the file
-/tmp/x509up_uID (with Unix UID equal to ID); the file names held by
-X509_USER_CERT / X509_USER_KEY; the files ~/.globus/usercert.pem and
-~/.globus/userkey.pem (where ~/ is the home directory of the user.)
-
-.IP "--capath <X.509 CA root certs directory or file>"
-Path to the PEM-encoded CA root certificates to use when
-verifying remote servers' host certificates in HTTPS connections. Ideally
-this should be a directory of hash.0 files as described in the OpenSSL
-verify(1) man page, but a file may be used instead. If --capath is not
-given, the value of the environment variable X509_CERT_DIR will be tried.
-If this is not valid, then /etc/grid-security/certificates will be used.
-
-.IP "--no-verify"
-Do not use CA root certificates to verify remote servers' host certificates.
-This is useful for testing sites before their certificate is set up properly,
-but leaves you vulnerable to "man in the middle" attacks by hostile servers
-masquerading as your target.
-
-.IP "--downgrade-size <minimum file size for downgrade>"
-Try to use HTTP-Downgrade for HTTPS URLs. Compatible servers will perform
-authentication and authorization on the HTTPS connection and then redirect
-to HTTP for the GET or PUT file transfer. htcp makes the HTTP request using
-the GRID_AUTH_ONETIME single-use passcode obtained via HTTPS. The downgrade
-option will be ignored for directory operations, HTTP URLs, or if the file
-size is less than the value given. If a downgraded transfer isn't possible,
-a normal HTTPS data transfer will be done.
-
-.SH FILES
-.IP /tmp/x509up_uID
-Default GSI Proxy file for Unix UID equal to ID.
-
-.IP /etc/grid-security/certificates
-Default location for trusted Certification Authority root certificates to use
-when checking server certificates.
-
-.IP /tmp/.ca-roots-XXXXXX
-Prior to 7.9.8, the underlying curl library did not support the CA root
-certificates directory.
-If built with an old version of libcurl, htcp will concatenate the
-certificates in the CA roots directory into a unique temporary file and use
-that.
-
-.SH ENVIRONMENT
-
-.IP X509_CERT_DIR
-Holds directory to search for Certification Authority root certificates when
-verifying server certificates. (Tried if --capath is not given on the
-command line.)
-
-.IP X509_USER_PROXY
-Holds file name of a GSI Proxy to use as user certificate. (Tried if --cert or
---key are not given on the command line.)
-
-.IP "X509_USER_CERT and X509_USER_KEY"
-Holds file name of X.509 user certificate and key. (Tried if X509_USER_PROXY
-is not valid.)
-
-.SH EXIT CODES
-0 is returned on complete success. Curl error codes are returned when 
-reported by the underlying curl library, and CURLE_HTTP_RETURNED_ERROR (22) 
-is returned when the HTTP(S) server returns a code outside the range 200-299.
-The manpage libcurl-errors(3) lists all the curl error codes.
-
-.SH TO DO
-Recursive copying. Server-side wildcards. Parallel streams. Error recovery.
-
-.SH BUGS
-Not enough beta testing (hint hint...)
-
-.SH AUTHOR
-Andrew McNab <Andrew.McNab@man.ac.uk>
-
-htcp is part of GridSite: http://www.gridsite.org/
-.SH "SEE ALSO"
-.BR scp(1),
-.BR curl(1),
-.BR wget(1),
-.BR verify(1),
-.BR libcurl-errors(3)
diff --git a/org.gridsite.core/doc/htll.1 b/org.gridsite.core/doc/htll.1
deleted file mode 100644 (file)
index 11a60d1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-.so man1/htcp.1
diff --git a/org.gridsite.core/doc/htls.1 b/org.gridsite.core/doc/htls.1
deleted file mode 100644 (file)
index 11a60d1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-.so man1/htcp.1
diff --git a/org.gridsite.core/doc/htmkdir.1 b/org.gridsite.core/doc/htmkdir.1
deleted file mode 100644 (file)
index 11a60d1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-.so man1/htcp.1
diff --git a/org.gridsite.core/doc/htrm.1 b/org.gridsite.core/doc/htrm.1
deleted file mode 100644 (file)
index 11a60d1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-.so man1/htcp.1
diff --git a/org.gridsite.core/doc/httpd-fileserver.conf b/org.gridsite.core/doc/httpd-fileserver.conf
deleted file mode 100644 (file)
index 9bd51e2..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-##############################################################################
-## GridSite httpd-fileserver.conf - Andrew McNab <Andrew.McNab@man.ac.uk>
-##
-## Example configuration file for GridSite as an HTTP(S) fileserver.
-##
-## For GridSite documentation, see http://www.gridsite.org/
-##
-## This file should be renamed /etc/httpd/conf/httpd.conf and Apache
-## restarted to use Apache2/GridSite as a simple HTTP(S) fileserver. 
-##
-## You do not need to install the GridSite mod_ssl.so module if you
-## do not wish to use Globus Proxies or VOMS attributes, but you must
-## have the mod_gridsite.so in /usr/lib/httpd/modules 
-##
-## We're assuming you have (a) the host's hostcert.pem and hostkey.pem 
-## in /etc/grid-security/ and (b) the Certification Authorities' you
-## trust have their root certs in /etc/grid-security/certificates
-##
-## (You can get RPMs for many European and North American Grid CAs
-## from https://datagrid.in2p3.fr/distribution/datagrid/security/ ) 
-##
-## If you want to use DN Lists in ACLs, they should be placed/downloaded
-## in /etc/grid-security/dn-lists/
-##
-## To start serving files, make a directory /var/www/htdocs owned by
-## nobody.nobody, including the file .gacl containing:
-##
-## <gacl>
-## <entry>
-##   <any-user/>
-##   <allow><read/><list/></allow>
-## </entry>
-## </gacl>
-##
-## To enable writing, add DN List, Person or VOMS entries to the GACL
-## (see the GridSite GACL document for the syntax.) For example:
-##
-## <gacl>
-## <entry>
-##   <any-user/>
-##   <allow><read/><list/></allow>
-## </entry>
-## <entry>
-##   <person>
-##   <dn>/C=UK/O=eScience/OU=Manchester/L=HEP/CN=Andrew McNab</dn>
-##   </person>
-##   <allow><write/></allow>
-## </entry>
-## </gacl>
-##
-## and add the following directive to the HTTPS <Directory> section:
-##
-## GridSiteMethods GET PUT DELETE
-##
-## If you wish to accept Globus GSI Proxies as well as full X.509 user
-## certificates, set GridSiteGSIProxyLimit to the depth of proxy you
-## wish to accept. 
-##
-## (As a _rough_ guide: 0=No Proxies; 1=Proxy on user's machine; 2=Proxy 
-##  owned by running Globus job; 3=Proxy delegated by a Globus job.)
-##
-## With this done and Apache restarted, you can upload a file with:
-##
-## curl -v --cert ~/.globus/usercert.pem --key ~/.globus/userkey.pem    \
-##  --capath /etc/grid-security/certificates --upload-file /tmp/tmp.txt \
-##  https://INSERT.HOSTNAME.HERE/tmp.txt
-##
-## (or with  --cert /tmp/x509up_u`id -u` --key /tmp/x509up_u`id -u`  to use
-##  a Globus GSI Proxy created with grid-proxy-init.)
-##############################################################################
-
-ServerRoot "/etc/httpd"
-
-PidFile logs/httpd.pid
-
-Timeout                        300
-KeepAlive              On
-MaxKeepAliveRequests   100
-KeepAliveTimeout       15
-
-LoadModule log_config_module   /usr/lib/httpd/modules/mod_log_config.so
-LoadModule ssl_module          /usr/lib/httpd/modules/mod_ssl.so
-LoadModule gridsite_module     /usr/lib/httpd/modules/mod_gridsite.so
-LoadModule mime_module         /usr/lib/httpd/modules/mod_mime.so
-LoadModule dir_module          /usr/lib/httpd/modules/mod_dir.so
-
-TypesConfig /etc/mime.types
-
-# User and group who will own files created by Apache
-User  nobody
-Group nobody
-
-DocumentRoot "/var/www/htdocs"
-
-<Directory />
-    AllowOverride None
-</Directory>
-
-LogLevel debug
-LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
-
-CustomLog      logs/httpd-gridsite-access combined
-ErrorLog       logs/httpd-gridsite-errors
-
-HostnameLookups On
-
-######################################################################
-# Plain unauthenticated HTTP on port 80
-######################################################################
-
-Listen 80
-<VirtualHost *:80>
-
-<Directory "/var/www/htdocs">
- GridSiteIndexes       on
- GridSiteAuth          on
- GridSiteDNlists       /etc/grid-security/dn-lists/
-</Directory>
-
-</VirtualHost>
-
-######################################################################
-# Secured and possibly authenticated HTTPS on port 443
-######################################################################
-Listen 443
-<VirtualHost *:443>
-SSLEngine               on
-SSLCertificateFile      /etc/grid-security/hostcert.pem
-SSLCertificateKeyFile   /etc/grid-security/hostkey.pem
-SSLCACertificatePath    /etc/grid-security/certificates
-#SSLCARevocationPath    YOUR CRL DIRECTORY WOULD GO HERE
-SSLSessionCache         dbm:/var/cache/mod_ssl/scache
-SSLSessionCacheTimeout  300
-SSLVerifyClient         optional
-SSLVerifyDepth          10
-SSLOptions              +ExportCertData +StdEnvVars
-
-<Directory "/var/www/htdocs">
- GridSiteIndexes       on
- GridSiteAuth          on
- GridSiteDNlists       /etc/grid-security/dn-lists/
- GridSiteGSIProxyLimit 0
-# GridSiteMethods      GET PUT DELETE
-</Directory>
-</VirtualHost>
diff --git a/org.gridsite.core/doc/httpd-webserver.conf b/org.gridsite.core/doc/httpd-webserver.conf
deleted file mode 100644 (file)
index da332a0..0000000
+++ /dev/null
@@ -1,219 +0,0 @@
-##############################################################################
-## GridSite httpd-webserver.conf - Andrew McNab <Andrew.McNab@man.ac.uk>
-##
-## Example configuration file for GridSite as a Web Server 
-## (that is, primarily for interactive use with a browser.)
-##
-## For GridSite documentation, see http://www.gridsite.org/
-##
-## This file should be renamed /etc/httpd/conf/httpd.conf and Apache
-## restarted to use Apache2/GridSite as a webserver. 
-##
-## You do not need to install the GridSite mod_ssl.so module if you
-## do not wish to use Globus Proxies or VOMS attributes, but you must
-## have the mod_gridsite.so in /usr/lib/httpd/modules 
-##
-## We're assuming you have (a) the host's hostcert.pem and hostkey.pem 
-## in /etc/grid-security/ and (b) the Certification Authorities' you
-## trust have their root certs in /etc/grid-security/certificates
-##
-## (You can get RPMs for many European and North American Grid CAs
-## from https://datagrid.in2p3.fr/distribution/datagrid/security/ ) 
-##
-## If you want to use DN Lists in ACLs, they should be placed/downloaded
-## in /etc/grid-security/dn-lists/ or /var/www/htdocs/dn-lists/ 
-## (Lists in /etc/grid-security/dn-lists/ override lists elsewhere.)
-##
-## To start serving files, make a directory /var/www/htdocs owned by
-## nobody.nobody, including the file .gacl containing:
-##
-## <gacl>
-## <entry>
-##   <any-user/>
-##   <allow><read/><list/></allow>
-## </entry>
-## </gacl>
-##
-## To enable writing, add DN List, Person or VOMS entries to the GACL
-## (see the GridSite GACL document for the syntax.) For example:
-##
-## <gacl>
-## <entry>
-##   <any-user/>
-##   <allow><read/><list/></allow>
-## </entry>
-## <entry>
-##   <person>
-##   <dn>/C=UK/O=eScience/OU=Manchester/L=HEP/CN=Andrew McNab</dn>
-##   </person>
-##   <allow><write/></allow>
-## </entry>
-## </gacl>
-##
-## and add the following directive to the HTTPS <Directory> section:
-##
-## GridSiteMethods GET PUT DELETE
-##
-## If you wish to accept Globus GSI Proxies as well as full X.509 user
-## certificates, set GridSiteGSIProxyLimit to the depth of proxy you
-## wish to accept. 
-##
-## (As a _rough_ guide: 0=No Proxies; 1=Proxy on user's machine; 2=Proxy 
-##  owned by running Globus job; 3=Proxy delegated by a Globus job.)
-##
-## With this done and Apache restarted, you can upload a file with:
-##
-## curl -v --cert ~/.globus/usercert.pem --key ~/.globus/userkey.pem    \
-##  --capath /etc/grid-security/certificates --upload-file /tmp/tmp.txt \
-##  https://INSERT.HOSTNAME.HERE/tmp.txt
-##
-## (or with  --cert /tmp/x509up_u`id -u` --key /tmp/x509up_u`id -u`  to use
-##  a Globus GSI Proxy created with grid-proxy-init.)
-##############################################################################
-
-ServerRoot "/etc/httpd"
-
-## You MUST put your server's fully qualified domain name here
-## This, the DOMAIN part of the https://DOMAIN/... URLs you want
-ServerName FULL.SERVER.NAME
-
-PidFile logs/httpd.pid
-
-Timeout                        300
-KeepAlive              On
-MaxKeepAliveRequests   100
-KeepAliveTimeout       15
-
-LoadModule log_config_module   /usr/lib/httpd/modules/mod_log_config.so
-LoadModule ssl_module          /usr/lib/httpd/modules/mod_ssl.so
-LoadModule gridsite_module     /usr/lib/httpd/modules/mod_gridsite.so
-LoadModule mime_module         /usr/lib/httpd/modules/mod_mime.so
-LoadModule dir_module          /usr/lib/httpd/modules/mod_dir.so
-LoadModule alias_module                /usr/lib/httpd/modules/mod_alias.so
-LoadModule cgi_module          /usr/lib/httpd/modules/mod_cgi.so
-
-TypesConfig /etc/mime.types
-
-# User and group who will own files created by Apache
-User  nobody
-Group nobody
-
-DocumentRoot "/var/www/htdocs"
-
-<Directory />
-    AllowOverride None
-</Directory>
-
-LogLevel debug
-LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
-
-CustomLog      logs/httpd-gridsite-access combined
-ErrorLog       logs/httpd-gridsite-errors
-
-HostnameLookups On
-
-######################################################################
-# Plain unauthenticated HTTP on port 80
-######################################################################
-
-Listen 80
-<VirtualHost *:80>
-
-## This is used to serve the Manage Directory links in footers,
-## and to allow you to edit files and ACLs via your browser.
-ScriptAlias /real-gridsite-admin.cgi /usr/sbin/real-gridsite-admin.cgi
-
-<Directory "/var/www/htdocs">
- ## This sets up GACL authorization for this server.
- GridSiteAuth          on
-
- ## This exports various bits of info into the CGI environment 
- ## variables (and is needed for gridsite-admin.cgi to work.)
- GridSiteEnvs           on
-
- ## Nice GridSite directory listings (without truncating file names!)
- GridSiteIndexes       on
-
- ## If this is on, GridSite will look for gridsitehead.txt and
- ## gridsitefoot.txt in the current directory or its parents, and
- ## use them to replace the <body> and </body> tags in .html files.
- GridSiteHtmlFormat    on
-
- ## These directives (and the ScriptAlias above) allow authorized
- ## people to manage files, ACLs and DN Lists through their web
- ## browsers.  Via HTTP, this just means extended directory listings
- ## and History pages.
- GridSiteAdminURI      /real-gridsite-admin.cgi
- GridSiteAdminFile     gridsite-admin.cgi
-</Directory>
-</VirtualHost>
-
-######################################################################
-# Secured and possibly authenticated HTTPS on port 443
-######################################################################
-Listen 443
-<VirtualHost *:443>
-SSLEngine               on
-SSLCertificateFile      /etc/grid-security/hostcert.pem
-SSLCertificateKeyFile   /etc/grid-security/hostkey.pem
-SSLCACertificatePath    /etc/grid-security/certificates
-#SSLCARevocationPath    YOUR CRL DIRECTORY WOULD GO HERE
-SSLSessionCache         dbm:/var/cache/mod_ssl/scache
-SSLSessionCacheTimeout  300
-SSLVerifyClient         optional
-SSLVerifyDepth          10
-SSLOptions              +ExportCertData +StdEnvVars
-
-## This is used to serve the Manage Directory links in footers,
-## and to allow you to edit files and ACLs via your browser.
-ScriptAlias /real-gridsite-admin.cgi /usr/sbin/real-gridsite-admin.cgi
-
-<Directory "/var/www/htdocs">
- ## This sets up GACL authorization for this server.
- GridSiteAuth          on
-
- ## This exports various bits of info into the CGI environment 
- ## variables (and is needed for gridsite-admin.cgi to work.)
- GridSiteEnvs           on
-
- ## Nice GridSite directory listings (without truncating file names!)
- GridSiteIndexes       on
-
- ## If this is on, GridSite will look for gridsitehead.txt and
- ## gridsitefoot.txt in the current directory or its parents, and
- ## use them to replace the <body> and </body> tags in .html files.
- GridSiteHtmlFormat    on
-
- ## This is the path of directories (and all their subdirectories) for
- ## GACL to search when it encounters a dn-list credential. The DN List
- ## files are plain text, one DN per line, and must have the full url
- ## as the file name, but URL Encoded - eg with urlencode(1)
- GridSiteDNlists /etc/grid-security/dn-lists/:/var/www/htdocs/dn-lists/
-
- ## This is used to form the URL at which DN Lists "owned" by this 
- ## server are exported. https://FULL.SERVER.NAME/dn-lists/file
- ## ALL FILES WITH URLs ON THIS SERVER WILL BE EXPORTED IRRESPECTIVE
- ## OF WHERE THEY ARE FOUND ON THE DN-LISTS PATH!!
- GridSiteDNlistsURI    /dn-lists/
-
- ## If this is greater than zero, we will accept GSI Proxies for clients
- ## (full client certificates - eg inside web browsers - are always ok)
- GridSiteGSIProxyLimit 0
-
- ## This directive allows authorized people to write/delete files 
- ## from non-browser clients - eg with htcp(1)
- GridSiteMethods       GET PUT DELETE
-
- ## These directives (and the ScriptAlias above) allow authorized
- ## people to manage files, ACLs and DN Lists through their web
- ## browsers via HTTPS. The value of GridSiteAdminFile appears to
- ## exist in every directory, but is internally redirected by
- ## mod_gridsite to the value of GridSiteAdminURI (the ScriptAlias
- ## then maps that onto the real-gridsite-admin.cgi executable.)
- GridSiteAdminURI      /real-gridsite-admin.cgi
- GridSiteAdminFile     gridsite-admin.cgi
-</Directory>
-</VirtualHost>
diff --git a/org.gridsite.core/doc/index.html b/org.gridsite.core/doc/index.html
deleted file mode 100644 (file)
index a93f2cb..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-<title>GridSite 1.1.x Documentation</title>
-<body>
-<h1 align=center>GridSite 1.1.x Documentation</h1>
-
-<p>
-<a href="http://www.gridsite.org/">GridSite</a>
-is a set of extensions to the Apache 2.0 webserver, which support 
-Grid security based on X.509 certificates. Since GridSite applies access
-control within Apache itself, via mod_gridsite, Grid authorization and
-the associated verified credentials are available to all technologies
-supported by Apache, including static file serving, SSI, CGI, PHP, JSP and 
-mod_perl.
-
-<h2>Guides</h2>
-
-<p>
-<dl>
-<dt><b><a href="user.html">User Guide</a></b>
-<dd>End-user documentation for people managing webpages and files on
-    GridSite servers, either through the web interface or with command
-    line clients like htcp.
-<p>
-
-<dt><b><a href="admin.html">Admin Guide</a></b>
-<dd>For people administering areas of GridSite websites or fileservers, or
-    managing GridSite's support for DN List groups.
-<p>
-
-<dt><b><a href="install.html">Building and Installation</a></b>
-<dd>Instructions for building GridSite from source, and installing from
-    binaries or RPMs.
-<p>
-
-<dt><b><a href="config.html">Config Guide</a></b>
-<dd>For webmasters setting up Apache 2.0 and GridSite, and writing the
-    Apache httpd.conf file.
-<p>
-
-<dt><b><a href="httpd-fileserver.conf">httpd-fileserver.conf</a></b> and
-    <b><a href="httpd-webserver.conf">httpd-webserver.conf</a></b>
-<dd>Example configuration files for simple HTTP(S) fileservers and
-    webservers, with explanatory comments.
-<p>
-
-</dl>
-
-<h2>Reference</h2>
-
-<p>
-<dl>
-<dt><b><a href="gacl.html">Grid Access Control Lists</a></b>
-<dd>Syntax and usage of the XML Grid Access Control Lists used by GridSite.
-<p>
-
-<dt><b><a href="htcp.1.html">htcp</a></b> and
-    <b><a href="urlencode.1.html">urlencode</a></b> man pages
-<dd>Command line tools for copying files to or from HTTP(S) servers, and
-    for URL-encoding strings. 
-<p>
-
-<!--
-<dt><b><a href="gridsite-admin.html">gridsite-admin.cgi</a></b>
-<dd>A CGI program providing site administration functions for users with
-    standard web browsers, via HTTPS. gridsite-admin.cgi includes a file
-    manager, support for file uploading, and editors for HTML, text and
-    Grid Access Control List files.
-<p>
--->
-
-<dt><b><a href="module.html">mod_gridsite</a></b>
-<dd>An Apache 2.0 module which enforces access control via Grid Access
-    Control Lists, and X.509, GSI or VOMS credentials. mod_gridsite also
-    gives Apache built-in support for the HTTP PUT and DELETE methods, and
-    formatting of HTML pages with standard headers and footers. 
-<p>
-
-<!--
-<dt><b><a href="library.html">libgridsite</a></b>
-<dd>The GridSite library provides common functions for other components of
-    the GridSite system, and utilities for programs using CGI, X.509, GSI,
-    VOMS and HTTP. 
-<p>
--->
-
-<dt><b><a href="gridsite_8h.html">gridsite.h API reference</a></b>
-<dd>A detailed description of the C API provided by libgridsite, generated
-    from the sources by doxygen.
-<p>
-
-</dl>
-
-</body>
diff --git a/org.gridsite.core/doc/install.html b/org.gridsite.core/doc/install.html
deleted file mode 100644 (file)
index 91a60d2..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-<title>GridSite: Building and Installation Guide</title>
-<body>
-<h1 align=center>GridSite: Building and Installation Guide</h1>
-
-<p>
-This Guide explains how to build GridSite from source, and how to install 
-the server components alongside an Apache 2.0 webserver. There is a 
-separate <a href="config.html">Config Guide</a> which explains how to modify
-the httpd.conf file, and how to set up other files and directories used by
-the system. You should look through all of this Building and Installation
-Guide to decide which is the easiest route for your system.
-
-<h2>Installing with RPM</h2>
-
-<p>
-If you are installing on Linux with the binary RPM release, you can skip
-most of this Guide, install the binary rpm(s) and go straight
-to the Config Guide.
-
-<p>
-We currently distribute GridSite RPMs for RedHat Linux versions 9 and 7.3
-from our download area at 
-<a href="https://www.gridsite.org/download/">
-https://www.gridsite.org/download/</a>
-
-<p>
-<b>RedHat 9</b>:
-This is the simpler case, since the standard release includes a suitable
-version of Apache 2.0: just install the gridsite-...-1.i386.rpm to get the
-various GridSite components. 
-
-<p>
-<b>RedHat 7.3</b>:
-This is more complicated because you must also install a back-ported Apache
-2.0 RPM. We distribute RPMs built on 7.3 aimed at RedHat 7.3 
-machines with updates, from our download area. These are built from the 
-tar.gz and .spec files distributed by the
-Apache Foundation itself, using the 
-<a href="build-apache2.sh">build-apache2.sh</a> script in the GridSite
-/usr/share/doc/gridsite directory. The Apache RPMs install in /usr, and you
-should at least install the httpd and mod_ssl RPMs.
-You must also install the gridsite-...-1.i386.rpm as above.
-
-<p>
-GridSite also depends on shared libraries from libcurl and libxml2, and the
-RPMs distributed as part of the standard RedHat 7.3 and 9 releases are
-sufficient. 
-
-<p>
-With the RPMs installed, you can proceed to the
-<a href="config.html">Config Guide</a>.
-
-<h2>Requirements for building GridSite from source</h2>
-
-<p>
-GridSite is currently only supported on Linux, but should be
-straightforwardly
-portable to other Unix platforms where the GNU build tools are available.
-
-<p>
-GridSite consists of a core library (libgridsite[.so|.a]), an Apache module 
-(mod_gridsite.so), a CGI utility (gridsite-admin.cgi) and some command line
-tools (htcp, urlencode.)
-
-<p>
-All of the components use the GridSite library, and this in turn depends on
-libcurl and libxml2. You will need the development versions of these
-packages installed before you can proceed. (They are available as part of
-RedHat Linux releases 7.x onwards, for instance.) 
-
-<h2>Building GridSite with Make</h2>
-
-<p>
-Our download area at
-<a href="https://www.gridsite.org/download/">
-https://www.gridsite.org/download/</a> includes a tar-ball
-distribution of the sources, which can be unpacked and used to build
-GridSite from source. (Bleeding-edge developers can get the current snapshot
-of the same files from our CVS area.)
-
-<p>
-GridSite needs a copy of the Apache 2.0 include files to build, and the
-location of this is set by the MYCFLAGS variable in the top-level Makefile.
-For manual builds, the default
-<b>MYCFLAGS=-I/usr/local/include/httpd</b> is used.
-If you wish to use the GridSite module with Apache
-2.0 installed elsewhere, you should change the MYCFLAGS variable to point to
-the includes directory installed by the development part of that Apache 2.0 
-distribution.
-
-<p>
-<pre>
-make 
-make install
-</pre>
-
-<p>
-will build all components and install them all under the default
-locations of /usr/local/[lib|bin|include|sbin] The default prefix for manual
-builds is
-/usr/local, as set by the prefix variable in the top level Makefile
-(/usr is the default for RPMs.)
-
-<h2>Building GridSite with RPM</h2>
-
-<p>
-For RedHat Linux and derivatives, building with RPM is recommended.
-The command <b>make rpm</b> in the top level of the source tree
-will build the GridSite and htcp binary RPMs in the
-directory ../RPMTMP/RPMS/i386 relative to the working directory. An SRPM is
-put into ../RPMTMP/SRPMS
-This build assumes the Apache 2.0 includes are in /usr/include/httpd.
-
-<p>
-<b>If you make RPMs on a RedHat 9 system (or a 7.3 system with our httpd RPM
-installed), you can install the resulting GridSite 
-RPM alongside the standard Apache 2.0 RPM without having to
-modify shared library or Apache module paths.</b>
-
-<p>
-For other configurations,
-you can modify the assumed location of the Apache 2.0 includes
-by changing the MYCFLAGS variable in the rpm target near the
-foot of the top level Makefile.
-
-<h2>Building Apache 2.0</h2>
-
-<p>
-If it is not possible to use binary RPMs of Apache 2.0,
-then it can be built from source using the build-apache2.sh script
-found in the GridSite docs directory.
-The script includes instructions on how to build from the tarballs
-distributed by the Apache Foundation.
-(it removes the -C option from &quot;configure&nbsp;-C&quot; in the .spec file
-and builds the RPMs under the current directory.)
-
-<p>
-If these targets do not work on your build platform,
-the Makefile and the scriptlets in the included SPEC files are a good
-starting point for building Apache by hand yourself. The complexities of
-this are outside of the scope of this Guide, but you are welcome to ask for
-assistance on the 
-<a href="http://www.gridsite.org/discuss.html">GridSite
-Discussion List</a>, although 
-<a href="http://www.apache.org/">www.apache.org</a> is a better starting
-point for purely Apache problems.
-</body>
diff --git a/org.gridsite.core/doc/library.html b/org.gridsite.core/doc/library.html
deleted file mode 100644 (file)
index 28458ae..0000000
+++ /dev/null
@@ -1 +0,0 @@
-library docs
diff --git a/org.gridsite.core/doc/module.html b/org.gridsite.core/doc/module.html
deleted file mode 100644 (file)
index 7f2096e..0000000
+++ /dev/null
@@ -1,271 +0,0 @@
-<title>GridSite Apache module: mod_gridsite</title>
-<body>
-<h1 align=center>GridSite Apache module: mod_gridsite</h1>
-
-<p> 
-mod_gridsite is an Apache 2.0 module which enforces access control via Grid
-Access Control Lists, and X.509, GSI or VOMS credentials. mod_gridsite also
-gives Apache built-in support for the HTTP PUT and DELETE methods, and
-formatting of HTML pages with standard headers and footers.
-
-<p>
-Since mod_gridsite access
-control within Apache itself, Grid authorization and
-the associated verified credentials are available to all technologies
-supported by Apache, including static file serving, SSI, CGI, PHP, mod_perl
-and Java servlets via a connector to Tomcat.
-
-<p>
-Operation of mod_gridsite can be configured using runtime directives
-in Apache's standard httpd.conf configuration file. The module must first be
-loaded with a LoadModule directive:
-
-<p>
-<b>LoadModule gridsite_module /PATH/TO/MODULES/mod_gridsite.so</b>
-
-<p>
-The module's behaviour is then controlled by GridSite... directives within
-Apache &lt;Directory ...&gt; sections, allowing different directories to use
-GridSite features in different ways.
-
-<h2>GridSite directives</h2>
-
-<dl>
-<dt><b>GridSiteIndexes on|off</b>
-<dd>Determines whether GridSite generates HTML directory listings. These
-    have some advantages over standard Apache directory listings (eg the
-    displayed filenames are never truncated) and will include standard
-    headers and footers if GridSiteHtmlFormat is on. 
-    <br>
-    (Default: GridSiteIndexes off)
-<p>
-
-<dt><b>GridSiteIndexHeader file</b>
-<dd>If the named file is found in the directory being listed, the file
-    is included verbatim at the top of the listing and excluded from
-    the file-by-file listing. The file can either be HTML or plain text (in
-    which case browsers will be treat it as one HTML paragraph.) 
-    <br>
-    (Default: none)
-<p>
-
-<dt><b>GridSiteHtmlFormat on|off</b>
-<dd>Determines where HTML pages receive additional formatting before being
-    sent to the client. This includes the &quot;Last modified&quot;,
-    &quot;View page history&quot;, &quot;Switch to HTTP(S)&quot;,
-    &quot;Print View&quot; and &quot;Built with GridSite&quot; footer
-    elements. If header and footer files are found, they will be used too.
-    <br>
-    (Default: GridSiteHtmlFormat off)
-<p>
-
-<dt><b>GridSiteHeadFile file</b><br>
-    <b>GridSiteFootFile file</b>
-<dd>Set the filenames to be searched for as standard headers and footers
-    for HTML pages. For each HTML page, the directory of that page is tried
-    first, and then parent directories in ascending order until a header / 
-    footer file is found. Header files are inserted in place of HTML
-    &lt;body[ ...]&gt; tags; footer files in place of &lt;/body&gt;. (These
-    standard files should each include the appropriate body tag as a
-    replacement.)
-    <br>
-    (Defaults: GridSiteHeadFile gridsitehead.txt, 
-     GridSiteFootFile gridsitefoot.txt)
-<p>
-
-<dt><b>GridSiteAuth on|off</b>
-<dd>Enables GridSite access control features, using 
-    <a href="gacl.html">GACL</a> files. The files are named .gacl and are
-    per-directory. The current directory is tried and then parent
-    directories in ascending order until a .gacl file is found. 
-    <br>
-    (Default: GridSiteAuth off)
-<p>
-
-<dt><b>GridSiteAdminList uri</b>
-<dd>All members of the DN List with name &quot;uri&quot; receive the full set
-    of permissions, irrespective of per-directory .gacl files. People in
-    this group have full control over the whole site.
-    <br>
-    (Default: none)
-<p>
-
-<dt><b>GridSiteGSIProxyLimit limit</b>
-<dd>When using GSI Proxy credentials,
-    proxies with delegation depth greater than &quot;limit&quot; will
-    be ignored by mod_gridsite authorization decisions. A limit of zero 
-    implies only full X.509
-    certificates (and no proxies) will be accepted. A limit of 1 implies
-    that only the initial proxy, usually created on the user's own machine,
-    is acceptable. Higher levels lead to proxies on remote machines, eg
-    used by running jobs, being accepted.
-    <br>
-    (Default: GridSiteGSIProxyLimit 1)
-<p>
-
-<dt><b>GridSiteMethods [GET] [PUT] [DELETE]</b>
-<dd>Specifies which HTTP methods are supported by GridSite. GET (and HEAD)
-    are always supported. PUT and DELETE support is turned on by this
-    directive, subject to a positive statement that write permission is
-    allowed for the directory in question, by a GACL file.
-    <br>
-    (Default: GridSite GET)
-<p>
-
-<dt><b>GridSiteDNlists directory1[:directory2[:directory3]...]</b>
-<dd>Sets up the DN List path used by <a href="gacl.html">GACL</a> for
-    evaluating &lt;dn-list&gt; credentials. If this directive is not used,
-    then GACL will use the GRST_DN_LISTS variable from Apache's own
-    environment. If that is not set either, then /etc/grid-security/dn-lists
-    is searched.
-    <br>
-    (Default: none)
-<p>
-
-<dt><b>GridSiteDNlistsURI uri</b>
-<dd>If GridSiteDNlistsURI is used, then the URI given appears to be 
-    populated with all the DN lists on the current DN lists path which
-    match the current server. That is, for server https://example.org/ 
-    with DN lists URI /dn-lists/, all DN lists with URLs starting
-    https://example.org/dn-lists/ will appear to be present in /dn-lists/,
-    irrespective of where in the path they are stored.    
-    <br>
-    (Default: none)
-<p>
-
-<dt><b>GridSiteAdminURI uri</b>
-<dd>GridSiteAdminURI gives the absolute URI on the server of the GridSite
-    Admin CGI program, which is used for file management, HTML and GACL 
-    editing. This should be used in conjunction with the standard Apache
-    directive ScriptAlias to map that URI to the real-gridsite-admin.cgi
-    executable. For example:
-    <br>
-    <b>ScriptAlias /real-gridsite-admin.cgi
-    /PATH/TO/real-gridsite-admin.cgi</b>
-    <br>
-    This URI is always reached by an internal redirection from the value
-    set by GridSiteAdminFile, and is never visible to users.
-    <br>
-    (Default: none)
-<p>
-
-<dt><b>GridSiteAdminFile cgifilename</b>
-<dd>If GridSiteAdminURI is set, then the cgifilename of GridSiteAdminFile
-    appears to be present in all directories when explicitly
-    requested (it does not appear in directory listings.) Requests for these
-    ghost CGI URIs are internally redirected to the value set by 
-    GridSiteAdminURI. 
-    <br>
-    (Default: GridSiteAdminFile gridsite-admin.cgi)
-<p>
-
-<dt><b>GridSiteEnvs on|off</b>
-<dd>This makes mod_gridsite export several variables into the environment
-    of CGI programs and other dynamic content systems. The variable names
-    are listed below. For gridsite-admin.cgi mechanism to work, this switch
-    must be left in its default state of on.
-    <br>
-    (Default: GridSiteEnvs on)
-<p>
-
-<dt><b>GridSiteEditable [ext1 [ext2 [ext3] ...]]]</b>
-<dd>A space-separated list of file extensions which can safely be edited
-    by the GridSite Text/HTML editor. The extensions are given without the
-    initial dot.
-    <br>
-    (Default: GridSiteEditable txt shtml html htm css js php jsp)
-<p>
-
-<dt><b>GridSiteHelpURI uri</b>
-<dd>If set, gives the URI to use for &quot;Website Help&quot; links in HTML
-    page footers.
-    <br>
-    (Default: none)
-<p>
-
-<dt><b>GridSiteLink on|off</b>
-<dd>Turns off the link in the HTML page footers which gives credit to
-    GridSite.
-    <br>
-    (Default: GridSiteLink on)
-<p>
-
-<dt><b>GridSiteUnzip path</b>
-<dd>If &quot;path&quot; is set by this directive, then real-gridsite-admin.cgi
-    will offer to list the contents of .zip archives on the server. 
-    Users with write access are able to unpack the contents into the same
-    directory as the .zip file. The value of &quot;path&quot; must point
-    to the location of the 
-    <a href="http://www.info-zip.org/UnZip.html">unzip</a> binary.
-    <br>
-    (Default: none)
-<p>
-
-</dl>
-
-<h2>Environment variables</h2>
-
-<p>
-The following variables are present in the environment of CGI programs and
-other dynamic content systems if the <b>GridSiteEnvs on</b> directive is
-in effect.
-
-<p>
-<dl>
-<dt><b>GRST_PERM</b>
-<dd>Numerical value of the permission bit-map obtained by comparing the
-    user with the GACL in force. (These should be tested using the
-    GRSTgaclPermHasXXXX functions from GACL.)
-<p>
-
-<dt><b>GRST_ADMIN_LIST</b>
-<dd>URI of the DN List, listing people with full admin and write access
-    to the whole site.
-<p>
-
-<dt><b>GRST_GSIPROXY_LIMIT</b>
-<dd>Maximum valid delegation level for GSI Proxies.
-<p>
-
-<dt><b>GRST_DIR_PATH</b>
-<dd>Absolute path in the local filesystem to the directory holding the
-    file being requested.
-<p>
-
-<dt><b>GRST_HELP_URI</b>
-<dd>URI of website help pages set by GridSiteHelpURI directive.
-<p>
-
-<dt><b>GRST_ADMIN_FILE</b>
-<dd>Filename of per-directory ghost gridsite-admin.cgi program. (This is
-    used by real-gridsite-admin.cgi to construct links in its pages.)
-<p>
-
-<dt><b>GRST_EDITABLE</b>
-<dd>Space-separated list of extensions which can safely be edited with a
-    Text/HTML editor.
-<p>
-
-<dt><b>GRST_HEAD_FILE</b> and <b>GRST_FOOT_FILE</b>
-<dd>Filenames of standard header and footer files.
-<p>
-
-<dt><b>GRST_DN_LISTS</b>
-<dd>DN lists search path.
-<p>
-
-<dt><b>GRST_DN_LISTS_URI</b>
-<dd>Directory of virtual URIs used to publish this site's DN Lists.
-<p>
-
-<dt><b>GRST_UNZIP</b>
-<dd>Full path to the unzip binary, used to list and unpack .zip files.
-<p>
-
-<dt><b>GRST_NO_LINK</b>
-<dd>If set, do not include credit links to GridSite in page footers.
-<p>
-
-</dl>
-
-</body>
diff --git a/org.gridsite.core/doc/urlencode.1 b/org.gridsite.core/doc/urlencode.1
deleted file mode 100644 (file)
index fe84405..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-.TH urlencode 1 "November 2003" urlencode "URLENCODE Manual"
-.SH NAME
-.B urlencode
-\- convert strings to or from URL-encoded form
-.SH SYNOPSIS
-.B urlencode 
-[-m|-d] 
-.I string [string ...]
-.SH DESCRIPTION
-.B urlencode
-encodes strings according to RFC 1738. 
-
-That is, characters A-Z a-z 0-9 . _ 
-and - are passed through unmodified, but all other characters are
-represented as %HH, where HH is their two-digit upper-case hexadecimal ASCII
-representation.
-For example, the URL http://www.gridpp.ac.uk/ becomes
-http%3A%2F%2Fwww.gridpp.ac.uk%2F
-
-.B urlencode
-converts each character in all the strings given on the command line. If
-multiple strings are given, they are concatenated with separating spaces
-before conversion.
-
-.SH OPTIONS
-.IP "-m"
-Instead of full conversion, do GridSite "mild URL encoding" in which A-Z a-z
-0-9 . = - _ @ and / are passed through unmodified. This results in slightly
-more human-readable strings but the application must be prepared to create
-or simulate the directories implied by any slashes.
-
-.IP "-d"
-Do URL-decoding rather than encoding, according to RFC 1738. %HH and %hh
-strings are converted and other characters are passed through unmodified,
-with the exception that + is converted to space.
-
-.SH EXIT CODES
-0 is always returned.
-
-.SH BUGS
-Not enough beta testing (hint hint...)
-
-.SH AUTHOR
-Andrew McNab <Andrew.McNab@man.ac.uk>
-
-urlencode is part of GridSite: http://www.gridsite.org/
diff --git a/org.gridsite.core/doc/user.html b/org.gridsite.core/doc/user.html
deleted file mode 100644 (file)
index ae37cdd..0000000
+++ /dev/null
@@ -1,302 +0,0 @@
-<title>GridSite User Guide</title>
-<body>
-<h1 align=center>GridSite User Guide</h1>
-
-<p><i>If you are setting up a GridSite-based website you may wish to use this 
-file as the basis of your end-user documentation. If so, copy all of the
-files from the GridSite doc directory (probably
-<small>/usr/share/doc/gridsite-VERSION/</small>) 
-to somewhere on your website like
-<b>/gridsite-doc/</b> and add <b>GridSiteHelpURI /gridsite-doc/user.html</b>
-to the virtual server configuration in
-httpd.conf - you should also look through the rest of the HTML source since
-there are some comments you may find helpful.</i>
-
-<p> 
-This Guide is intended for people using GridSite websites with conventional
-web browsers, especially people with write access to areas of the site.
- There is a separate 
-<a href="admin.html">Administration Guide</a>
- with additional information for people managing access control and group
-membership. This Guide assumes you are familiar with basic Web and HTML
-concepts. Towards the end we discuss how to access servers with command
-line tools like curl and htcp. 
-
-<h2>Reading from HTTP and HTTPS servers</h2>
-
-<p>
-GridSite servers are usually accessible both via HTTP and via HTTPS. You can
-always tell which version you are using by looking at whether the URL in your
-browser's location window starts with &quot;http://&quot; or 
-&quot;https://&quot; HTTPS means that the connection to the server is
-encrypted, that you can verify you're talking to the real server and not an
-imposter, and gives you the option to authenticate to the site and perhaps
-gain write access.
-
-<p>
- Simple browsing of the website via HTTP or HTTPS is reasonably
- self-explanatory. If configured, additional links may appear in the footer
- of each webpage with links to this help, 
-<!-- if  GridSiteHelpURI uri  is set --> 
- and to switch between HTTP and HTTPS versions of the page. Pages may also
- have a link to the page History, 
-<!-- GridSiteAdminURI uri  must be set and gridsite-admin.cgi working for
- the history-viewing mechanism to work -->
- showing the dates of changes to that page and names of its authors.
-
-<p>
- When looking at HTTPS pages, you may find your browser reports it cannot
- verify the server's certificate since it does not recognise the
- Certification Authority (CA) it uses. You should attempt to load the CA's
- root certificate into your browser to stop these warnings. (This means your
- browser will be able to identify any servers using fake certificates which
- you shouldn't trust.) How you obtain the CA Root Certificate from a
- trust-worthy source depends on the CA. For example, the UK e-Science CA
- lets you download it <a href="http://ca.grid-support.ac.uk/">from their
- website</a>.
-<!-- if most of your users use one or two CAs, you could add a link to their
-CA root cert loading instructions here -->
-
-<h2>Authenticating</h2>
-
-<p>
- To go beyond reading pages you need to obtain a user certificate and load it
- into your web browser. How you do this again depends on the Certification
- Authority you have access to (for most Grid projects, CAs are organised
- on a national basis.) To use the UK e-Science CA example again, 
- <a href="http://ca.grid-support.ac.uk/">from their website</a> has links to
- the procedure for applying for a certificate from within a web browser.
-<!-- again, a link to your CA would be good here -->
-
-<p>
-A user certificate usually has a version of your name and affiliation as its
-Distinguished Name (DN) - for example,
-&quot;/C=UK/O=eScience/OU=Manchester/L=HEP/CN=Andrew McNab&quot;
-
-<p>
-Once you've obtained a user certificate in your name from your CA, you need
-to make sure it is loaded into the browser you normally use to browse the
-web. How you do this is different for different browsers and to some extent
-for different CAs (but if you applied
-for the CA through your browser, you may already have it there.)
-
-<p>
-Browsers want the certificate and private key in the PKCS#12 format, which
-is normally a single file with the extension &quot;.p12&quot;.
-Many programs which are based on OpenSSL, such as Globus and curl, prefer
-the PEM (&quot;.pem&quot;) format for certificates, with separate
-certificate and key files (&quot;usercert.pem&quot; and
-&quot;userkey.pem&quot;, for example.) If you only have the files in .pem
-format and have access to openssl, you
-can use its command line tools to convert PEM to PKCS#12:
-<pre>
-openssl pkcs12 -in usercert.pem -inkey userkey.pem -export -out certkey.p12
-</pre>
-
-<p>
-<b>Be very careful not to accidentally overwrite .pem or .p12 files when
-doing this kind of thing! In particular, if you lose your private key, you
-cannot retrieve it from your CA.</b>
-
-<p>
- Once your user certificate is loaded, you should be able to see your
- certificate name appear when you look at an HTTPS GridSite page which has
- the page footers enabled - for example, the &quot;Switch to HTTP&quot; link
- present. If GridSite understands your user certificate, it displays a
- &quot;You are ...&quot; line in the footer. (However, the Apache webserver
- must also be set up with your CAs root certificate for this to work. The
- <a href="https://www.gridpp.ac.uk/">GridPP HTTPS home page</a> is set up
- to recognise a good range of European and North American Grid CAs.)
-<!-- the CA root certificates normally go somewhere like
-/etc/grid-security/certificates and httpd.conf should reflect this with the
-directive   SSLCACertificatePath /etc/grid-security/certificates  -->
-
-<h2>Authorization</h2>
-
-<p>
- Once users can prove their identity to the web server, it then becomes
- possible to give them appropriate rights depending on that identity.
- GridSite allows site administrators to specify these rights for individuals
- and groups using 
-<a href="gacl.html">GACL</a>
- access control files. (The
-<a href="admin.html">Administration Guide</a>
- explains how to manage these files.) GACL defines who can
- read files, who can list directories,
- who can write or create files and who can modify the GACL policy files. To
- get increased access to an area of a site, you need to contact the
- administrator for that area and give the DN of your certificate (it's not
- necessary to send any certificate files.)
-
-<h2>Managing Directories and Files</h2>
-
-<p>
-If you have list permission for the directory containing a page, you should
-see an extra link &quot;Manage Directory&quot; in the page's set of footer
-links, which allows you to browse the directory even if the normal
-index.html is present. If page histories are available, this listing view
-also has links to them.
-
-<p>
-The real power of GridSite becomes available if you have write access to a
-directory. In that case, the &quot;Manage Directory&quot; page has
-additional links to Delete or Rename pages and other files, and to Edit HTML
-and plain text files. An Edit link also appears in the footer links of HTML
-pages.
-
-<p>
-If you use the Edit function, you are presented with an HTML form containing
-the current filename and the full HTML or plain text of the page for you to
-edit. This allows you to maintain the content of the site &quot;in
-place&quot; and to see the result of your changes immediately, in context.
-
-<p>
-If you modify the filename in the form before saving, GridSite will make a
-new file with that name, and the old file will still be present, unmodified.
-(However, you cannot use this feature for creating a file in a different
-directory.)
-As you make changes, the history of the changes and your certificate DN are
-recorded, and available in the history page for that file.
-
-<p>
- For people with write access, the &quot;Manage Directory&quot; page also has
- options to upload a file from the computer your browser is running on, and to
- create files and directories. If it's enabled, you can also view the
- contents of WinZIP / PKZIP / .zip files, and unpack their contents into the
- current directory. (This feature is very useful if you have several files
- to upload at one time.)
-<!-- This needs the  GridSiteUnzip path  directive in httpd.conf -->
-
-<h2>HTML Formatting in GridSite</h2>
-
-<p>
-As well as providing access control and file management, GridSite provides
-some simple formatting of HTML pages by adding standard headers and footers.
-(If this isn't sufficient, GridSite will happily coexist with HTML
-preprocessor languages like SSI, PHP and JSP.)
-
-<p>
- If HTML formatting is enabled
- for the current directory, GridSite looks for the files gridsitehead.txt and
- gridsitefoot.txt in that directory, or goes up through the parent
- directories until they are found. 
-<!-- GridSiteHtmlFormat on  turns this on and  GridSiteHeadFile file  and
-GridSiteFootFile file  can change the names of the header and footer. If 
-you change from the defaults, you need to change this paragraph. -->
-
-<p>
-The &lt;body&gt; and &lt;/body&gt; tags from the HTML file are replaced with
-the contents of the gridsitehead.txt and gridsitefoot.txt files, which
-should normally be chunks of HTML including a replacement &lt;body&gt;
-or &lt;/body&gt; tag. If either tag is absent from the original page, then
-the header or footer is just added rather than being inserted in place of
-the tag. (One consequence of this absence is that HTML header tags like
-&lt;title&gt; can end up after a &lt;body&gt; tag, and can get ignored by
-browsers - so always include &lt;body&gt; ... &lt;/body&gt; in your pages.)
-
-<p>
-This simple system is suprisingly flexible, and allows a variety of top and
-bottom, or sidebar navigation layouts of pages. Since the &lt;body ...&gt;
-tag is under full control of the author of the gridsitehead.txt file,
-backgrounds, colour schemes and style sheets can easily be specified. 
-
-<p>
-For example:
-
-<p>
-<table border=1 cellpadding=3>
-<tr><th>Source</th><th>HTML</th></tr>
-<tr><td>page.html</td><td>&lt;title&gt;PAGE TITLE&lt;/title&gt;</td></tr>
-<tr><td>page.html<br>(replaced)</td><td>&lt;body&gt;</td></tr>
-<tr><td>gridsitehead.txt</td>
-    <td>&lt;body text=blue&gt;<br>
-        Heading text<br>
-        &lt;table border=1&gt;<br>&lt;tr&gt;<br>&lt;td&gt;Standard&lt;br&gt;<br>
-        sidebar&lt;/td&gt;<br>&lt;td&gt;</td></tr>
-<tr><td>page.html</td><td>&lt;p&gt;<br>Page content...</td></tr>
-<tr><td>page.html<br>(replaced)</td><td>&lt;/body&gt;</td></tr>
-<tr><td>gridsitefoot.txt</td><td>&lt;/td&gt;<br>&lt;/tr&gt;<br>
-        &lt;/table&gt;<br>Footer text<br>&lt;/body&gt;</td></tr>
-</table>
-
-<p>
-produces pages with a layout like:
-
-<p>
-<table border=1 cellpadding=3>
-<tr><td colspan=2>Heading text</td></tr>
-<tr><td>Standard<br>sidebar</td><td>Page content...</td><tr>
-<tr><td colspan=2>Footer text</td></tr>
-</table>
-
-<h2>Command line use</h2>
-
-<p>
-GridSite adds support for the HTTP PUT and DELETE methods, and this makes it
-easy to create or delete files from within programs and commands without
-using a web browser and HTML forms. It is straightforward, although slightly
-awkward, to use a standard HTTPS-aware client like 
-<a href="http://curl.haxx.se/">curl</a> to upload files, but GridSite
-provides htcp as a more convenient client program, which is easier to use
-with GSI Proxies and X.509 user certificates, and has a syntax closer to the
-familiar scp command.
-
-<p>
-The following examples assume the GridSite server has GSI support and use a
-GSI proxy as the client certificate. For non-GSI use, just skip the
-grid-proxy-init stage, and replace the proxy
-filename with $HOME/.globus/usercert.pem and $HOME/.globus/userkey.pem (or
-wherever your PEM format certificate and key are stored.)
-
-<p>
-First generate a GSI proxy with grid-proxy-init. This will create a proxy file
-in /tmp/x509up_uXXXXX where XXXXX is your Unix UID (also given by <b>id
--u</b>.) The GSI proxy contains a
-temporary private key and certificate signed by your long-term user
-certificate.
-
-<p>
-You should make sure you have a copy of the CA root certificates of the CA's
-used by the servers you wish to talk to. These are usually installed in
-/etc/grid-security/certificates as files like 01621954.0, and RPMs and tar
-files for many common European and North American CAs are available from
-<a href="https://datagrid.in2p3.fr/distribution/datagrid/security/">
-https://datagrid.in2p3.fr/distribution/datagrid/security/</a>
-
-<p>
-To upload a file with curl:
-<pre>
-curl --cert /tmp/x509up_u`id -n` --key /tmp/x509up_u`id -n` \
-     --capath /etc/grid-security/certificates \
-     --upload-file /tmp/new.file.txt https://server/new.file.txt
-</pre>
-
-<p>
-The equivalent htcp command is:
-<pre>
-htcp /tmp/new.file.txt https://server/new.file.txt
-</pre>
-since htcp looks for the GSI proxy and CA certificates automatically. htcp
-can also be used to copy remote files to the local machine by reversing the
-arguments. For more details, see the 
-<a href="htcp.1.html">htcp(1)</a>  man page.
-
-<p>
-htcp also has options for deleting files, and doing short or long listings,
-and these can also be accessed using the htrm, htls and htll commands (which
-are normally symbolic links to htcp.)
-
-<p>
-Directory indexes are based on parsing the index returned by the web server
-and by using the HTTP HEAD method to obtain the file size and modification
-times.
-
-<p>
-All of the ht** commands can accept multiple source file arguments, and this
-allows you to copy multiple files to or from the server. Shell wildcard
-expansion on the local machine is especially useful:
-<pre>
-htcp /tmp/new.*.txt https://server/
-</pre>
-
-</body>
diff --git a/org.gridsite.core/interface/gridsite-gacl.h b/org.gridsite.core/interface/gridsite-gacl.h
deleted file mode 100644 (file)
index f739c00..0000000
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
-   Copyright (c) 2002-4, Andrew McNab, University of Manchester
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or
-   without modification, are permitted provided that the following
-   conditions are met:
-
-     o Redistributions of source code must retain the above
-       copyright notice, this list of conditions and the following
-       disclaimer. 
-     o Redistributions in binary form must reproduce the above
-       copyright notice, this list of conditions and the following
-       disclaimer in the documentation and/or other materials
-       provided with the distribution. 
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-   CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-   BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-   TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-   ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-   POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*---------------------------------------------------------------*
- * For more about GridSite: http://www.gridsite.org/             *
- *---------------------------------------------------------------*/
-
-#ifndef HEADER_GACL_H
-#define HEADER_GACL_H
-#endif
-
-#ifndef GACL_LIB_VERSION
-#define GACL_LIB_VERSION "x.x.x"
-#endif
-
-typedef GRSTgaclCred GACLcred;
-
-typedef int                GACLaction;
-typedef unsigned int       GACLperm;
-
-typedef GRSTgaclEntry  GACLentry;
-
-typedef GRSTgaclAcl    GACLacl;  
-
-typedef GRSTgaclUser   GACLuser;
-
-extern char      *gacl_perm_syms[];
-extern GACLperm   gacl_perm_vals[];
-
-#define GACL_PERM_NONE  GRST_PERM_NONE
-#define GACL_PERM_READ  GRST_PERM_READ
-#define GACL_PERM_LIST  GRST_PERM_LIST
-#define GACL_PERM_WRITE GRST_PERM_WRITE
-#define GACL_PERM_ADMIN GRST_PERM_ADMIN
-
-#define GACLhasNone(perm)  (perm == 0)
-#define GACLhasRead(perm)  ((perm & GRST_PERM_READ) != 0)
-#define GACLhasList(perm)  ((perm & GRST_PERM_LIST) != 0)
-#define GACLhasWrite(perm) ((perm & GRST_PERM_WRITE) != 0)
-#define GACLhasAdmin(perm) ((perm & GRST_PERM_ADMIN) != 0)
-
-#define GACL_ACTION_ALLOW GRST_ACTION_ALLOW
-#define GACL_ACTION_DENY  GRST_ACTION_DENY
-
-#define GACL_ACL_FILE GRST_ACL_FILE
-#define GACL_DN_LISTS GRST_DN_LISTS
-
-#define GACLinit() GRSTgaclInit()
-
-#define GACLnewCred(x)         GRSTgaclCredNew((x))
-/* GACLcred  *GACLnewCred(char *); */
-
-#define GACLaddToCred(x,y,z)   GRSTgaclCredAddValue((x),(y),(z))
-/* int        GACLaddToCred(GACLcred *, char *, char *); */
-
-#define GACLfreeCred(x)                GRSTgaclCredFree((x))
-/* int        GACLfreeCred(GACLcred *); */
-
-#define GACLaddCred(x,y)       GRSTgaclEntryAddCred((x),(y))
-/* int        GACLaddCred(GACLentry *, GACLcred *); */
-
-#define GACLdelCred(x,y)       GRSTgaclEntryDelCred((x),(y))
-/* int        GACLdelCred(GACLentry *, GACLcred *); */
-
-#define GACLprintCred(x,y)     GRSTgaclCredPrint((x),(y))
-/*  int        GACLprintCred(GACLcred *, FILE *); */
-
-
-#define GACLnewEntry()         GRSTgaclEntryNew()
-/*  GACLentry *GACLnewEntry(void); */
-
-#define GACLfreeEntry(x)       GRSTgaclEntryFree((x))
-/*  int        GACLfreeEntry(GACLentry *); */
-
-#define GACLaddEntry(x,y)      GRSTgaclAclAddEntry((x),(y))
-/*  int        GACLaddEntry(GACLacl *, GACLentry *); */
-
-#define GACLprintEntry(x,y)    GRSTgaclEntryPrint((x),(y))
-/*  int        GACLprintEntry(GACLentry *, FILE *); */
-
-
-#define GACLprintPerm(x,y)     GRSTgaclPermPrint((x),(y))
-/* int        GACLprintPerm(GACLperm, FILE *); */
-
-#define GACLallowPerm(x,y)     GRSTgaclEntryAllowPerm((x),(y))
-/*  int        GACLallowPerm(GACLentry *, GACLperm); */
-
-#define GACLunallowPerm(x,y)   GRSTgaclEntryUnallowPerm((x),(y))
-/* int        GACLunallowPerm(GACLentry *, GACLperm); */
-
-#define GACLdenyPerm(x,y)      GRSTgaclEntryDenyPerm((x),(y))
-/*  int        GACLdenyPerm(GACLentry *, GACLperm); */
-
-#define GACLundenyPerm(x,y)    GRSTgaclEntryUndenyPerm((x),(y))
-/*  int        GACLundenyPerm(GACLentry *, GACLperm); */
-
-#define GACLpermToChar(x)      GRSTgaclPermToChar((x))
-/*  char      *GACLpermToChar(GACLperm); */
-
-#define GACLcharToPerm(x)      GRSTgaclPermFromChar((x))
-/*  GACLperm   GACLcharToPerm(char *); */
-
-#define GACLnewAcl()           GRSTgaclAclNew()
-/*  GACLacl   *GACLnewAcl(void); */
-
-#define GACLfreeAcl(x)         GRSTgaclAclFree((x))
-/*  int        GACLfreeAcl(GACLacl *); */
-
-#define GACLprintAcl(x,y)      GRSTgaclAclPrint((x),(y))
-/*  int        GACLprintAcl(GACLacl *, FILE *); */
-
-#define GACLsaveAcl(x,y)       GRSTgaclAclSave((y),(x))
-/*  int        GACLsaveAcl(char *, GACLacl *); */
-
-#define GACLloadAcl(x)         GRSTgaclAclLoadFile((x))
-/*  GACLacl   *GACLloadAcl(char *); */
-
-#define GACLfindAclForFile(x)  GRSTgaclFileFindAclname((x))
-/*  char      *GACLfindAclForFile(char *); */
-
-#define GACLloadAclForFile(x)  GRSTgaclAclLoadforFile((x))
-/*  GACLacl   *GACLloadAclForFile(char *); */
-
-#define GACLisAclFile(x)       GRSTgaclFileIsAcl((x))
-/*  int        GACLisAclFile(char *); */
-
-
-#define GACLnewUser(x)         GRSTgaclUserNew((x))
-/*  GACLuser *GACLnewUser(GACLcred *); */
-
-#define GACLfreeUser(x)                GRSTgaclUserFree((x))
-/*  int       GACLfreeUser(GACLuser *); */
-
-#define GACLuserAddCred(x,y)   GRSTgaclUserAddCred((x),(y))
-/*  int       GACLuserAddCred(GACLuser *, GACLcred *); */
-
-#define GACLuserHasCred(x,y)   GRSTgaclUserHasCred((x),(y))
-/*  int       GACLuserHasCred(GACLuser *, GACLcred *); */
-
-#define GACLuserFindCredType(x,y) GRSTgaclUserFindCredtype((x),(y))
-/*  GACLcred *GACLuserFindCredType(GACLuser *, char *); */
-
-#define GACLtestDnList(x,y)    GRSTgaclDNlistHasUser((x),(y))
-/*  int        GACLtestDnList(char *, GACLuser *); */
-
-#define GACLtestUserAcl(x,y)   GRSTgaclAclTestUser((x),(y))
-/*  GACLperm   GACLtestUserAcl(GACLacl *, GACLuser *); */
-
-#define GACLtestExclAcl(x,y)   GRSTgaclAclTestexclUser((x),(y))
-/*  GACLperm   GACLtestExclAcl(GACLacl *, GACLuser *); */
-
-
-#define GACLurlEncode(x)       GRSThttpUrlEncode((x))
-/*  char      *GACLurlEncode(char *); */
-
-#define GACLmildUrlEncode(x)   GRSThttpUrlMildencode((x))
-/*  char      *GACLmildUrlEncode(char *); */
-
-GACLentry *GRSTgaclEntryParse(xmlNodePtr cur);
-/*  special function for legacy EDG LB service */
diff --git a/org.gridsite.core/interface/gridsite.h b/org.gridsite.core/interface/gridsite.h
deleted file mode 100644 (file)
index febda2c..0000000
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
-   Copyright (c) 2002-3, Andrew McNab, University of Manchester
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or
-   without modification, are permitted provided that the following
-   conditions are met:
-
-     o Redistributions of source code must retain the above
-       copyright notice, this list of conditions and the following
-       disclaimer. 
-     o Redistributions in binary form must reproduce the above
-       copyright notice, this list of conditions and the following
-       disclaimer in the documentation and/or other materials
-       provided with the distribution. 
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-   CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-   BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-   TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-   ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-   POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*---------------------------------------------------------------*
- * For more about GridSite: http://www.gridsite.org/             *
- *---------------------------------------------------------------*/
-
-#ifndef HEADER_SSL_H
-#include <openssl/ssl.h>
-#endif
-
-#ifndef HEADER_CRYPTO_H
-#include <openssl/crypto.h>
-#endif
-
-#ifndef FALSE
-#define FALSE (0)
-#endif
-#ifndef TRUE
-#define TRUE (!FALSE)
-#endif
-
-/// Everything ok (= OpenSSL X509_V_OK)
-#define GRST_RET_OK            0
-
-/// Failed for unspecified reason
-#define GRST_RET_FAILED                1000
-
-/// Failed to find certificate in some cert store / directory
-#define GRST_RET_CERT_NOT_FOUND        1001
-
-/// Bad signature
-#define GRST_RET_BAD_SIGNATURE 1002
-
-/// No such file or directory
-#define GRST_RET_NO_SUCH_FILE  1003
-
-#define GRST_PROXYCERTINFO_OID "1.3.6.1.4.1.3536.1.222"
-#define GRST_VOMS_OID          "1.3.6.1.4.1.8005.100.100.1"
-#define GRST_VOMS_DIR          "/etc/grid-security/vomsdir"
-
-
-
-typedef struct { char                      *name;
-                 char                      *value;
-                 void                      *next;  } GRSTgaclNamevalue;
-
-typedef struct { char                      *type;
-                 int                        delegation;
-                 GRSTgaclNamevalue         *firstname;
-                 void                      *next;      } GRSTgaclCred;
-typedef int                GRSTgaclAction;
-typedef unsigned int       GRSTgaclPerm;
-typedef struct { GRSTgaclCred   *firstcred;
-                 GRSTgaclPerm    allowed;
-                 GRSTgaclPerm    denied;
-                 void           *next;    } GRSTgaclEntry;
-typedef struct { GRSTgaclEntry *firstentry; } GRSTgaclAcl;
-typedef struct { GRSTgaclCred *firstcred; 
-                 char         *dnlists;   } GRSTgaclUser;
-
-#define GRST_PERM_NONE   0
-#define GRST_PERM_READ   1
-#define GRST_PERM_EXEC   2
-#define GRST_PERM_LIST   4
-#define GRST_PERM_WRITE  8
-#define GRST_PERM_ADMIN 16
-#define GRST_PERM_ALL   31
-
-/* DO NOT USE PermIsNone!! */
-#define GRSTgaclPermIsNone(perm)    (perm == 0)
-
-#define GRSTgaclPermHasNone(perm)    (perm == 0)
-#define GRSTgaclPermHasRead(perm)  ((perm & GRST_PERM_READ ) != 0)
-#define GRSTgaclPermHasExec(perm)  ((perm & GRST_PERM_EXEC ) != 0)
-#define GRSTgaclPermHasList(perm)  ((perm & GRST_PERM_LIST ) != 0)
-#define GRSTgaclPermHasWrite(perm) ((perm & GRST_PERM_WRITE) != 0)
-#define GRSTgaclPermHasAdmin(perm) ((perm & GRST_PERM_ADMIN) != 0)
-
-#define GRST_ACTION_ALLOW 0
-#define GRST_ACTION_DENY  1
-
-#define GRST_HIST_PREFIX  ".grsthist"
-#define GRST_ACL_FILE     ".gacl"
-#define GRST_DN_LISTS     "/etc/grid-security/dn-lists"
-#define GRST_RECURS_LIMIT 9
-
-int GRSTgaclInit(void);
-
-/* #define GACLnewCred(x)              GRSTgaclCredNew((x)) */
-GRSTgaclCred  *GRSTgaclCredNew(char *);
-
-/* #define GACLaddToCred(x,y,z)        GRSTgaclCredAddValue((x),(y),(z)) */
-int        GRSTgaclCredAddValue(GRSTgaclCred *, char *, char *);
-
-#define GRSTgaclCredSetDelegation(cred, level) ((cred)->delegation = (level))
-#define GRSTgaclCredGetDelegation(cred) ((cred)->delegation)
-
-/* #define GACLfreeCred(x)             GRSTgaclCredFree((x)) */
-int        GRSTgaclCredFree(GRSTgaclCred *);
-
-/*  #define GACLaddCred(x,y)   GRSTgaclEntryAddCred((x),(y)) */
-int        GRSTgaclEntryAddCred(GRSTgaclEntry *, GRSTgaclCred *);
-
-/*  #define GACLdelCred(x,y)   GRSTgaclEntryDelCred((x),(y)) */
-int        GRSTgaclEntryDelCred(GRSTgaclEntry *, GRSTgaclCred *);
-
-/*  #define GACLprintCred(x,y) GRSTgaclCredPrint((x),(y)) */
-int        GRSTgaclCredCredPrint(GRSTgaclCred *, FILE *);
-
-
-/*  #define GACLnewEntry(x)            GRSTgaclEntryNew((x)) */
-GRSTgaclEntry *GRSTgaclEntryNew(void);
-
-/*  #define GACLfreeEntry(x)   GRSTgaclEntryFree((x)) */
-int        GRSTgaclEntryFree(GRSTgaclEntry *);
-
-/*  #define GACLaddEntry(x,y)  GRSTgaclAclAddEntry((x),(y)) */
-int        GRSTgaclAclAddEntry(GRSTgaclAcl *, GRSTgaclEntry *);
-
-/*  #define GACLprintEntry(x,y)        GRSTgaclEntryPrint((x),(y)) */
-int        GRSTgaclEntryPrint(GRSTgaclEntry *, FILE *);
-
-
-/*  #define GACLprintPerm(x,y) GRSTgaclPermPrint((x),(y)) */
-int        GRSTgaclPermPrint(GRSTgaclPerm, FILE *);
-
-/*  #define GACLallowPerm(x,y) GRSTgaclEntryAllowPerm((x),(y)) */
-int        GRSTgaclEntryAllowPerm(GRSTgaclEntry *, GRSTgaclPerm);
-
-/*  #define GACLunallowPerm(x,y)       GRSTgaclEntryUnallowPerm((x),(y)) */
-int        GRSTgaclEntryUnallowPerm(GRSTgaclEntry *, GRSTgaclPerm);
-
-/*  #define GACLdenyPerm(x,y)  GRSTgaclEntryDenyPerm((x),(y)) */
-int        GRSTgaclEntryDenyPerm(GRSTgaclEntry *, GRSTgaclPerm);
-
-/*  #define GACLundenyPerm(x,y)        GRSTgaclEntryUndenyPerm((x),(y)) */
-int        GRSTgaclUndenyPerm(GRSTgaclEntry *, GRSTgaclPerm);
-
-/*  #define GACLpermToChar(x)  GRSTgaclPermToChar((x)) */
-char      *GRSTgaclPermToChar(GRSTgaclPerm);
-
-/*  #define GACLcharToPerm(x)  GRSTgaclPermFromChar((x)) */
-GRSTgaclPerm   GRSTgaclPermFromChar(char *);
-
-/*  #define GACLnewAcl(x)              GRSTgaclAclNew((x)) */
-GRSTgaclAcl   *GRSTgaclAclNew(void);
-
-/*  #define GACLfreeAcl(x)             GRSTgaclAclFree((x)) */
-int        GRSTgaclAclFree(GRSTgaclAcl *);
-
-/*  #define GACLprintAcl(x,y)  GRSTgaclAclPrint((x),(y)) */
-int        GRSTgaclAclPrint(GRSTgaclAcl *, FILE *);
-
-/*  #define GACLsaveAcl(x,y)   GRSTgaclAclSave((y),(x)) */
-int        GRSTgaclAclSave(GRSTgaclAcl *, char *);
-
-/*  #define GACLloadAcl(x)             GRSTgaclFileLoadAcl((x)) */
-GRSTgaclAcl   *GRSTgaclAclLoadFile(char *);
-
-/*  #define GACLfindAclForFile(x)      GRSTgaclFileFindAclname((x)) */
-char      *GRSTgaclFileFindAclname(char *);
-
-/*  #define GACLloadAclForFile(x)      GRSTgaclFileLoadAcl((x)) */
-GRSTgaclAcl   *GRSTgaclAclLoadforFile(char *);
-
-/*  #define GACLisAclFile(x)   GRSTgaclFileIsAcl((x)) */
-int        GRSTgaclFileIsAcl(char *);
-
-
-/*  #define GACLnewUser(x)             GRSTgaclUserNew((x)) */
-GRSTgaclUser *GRSTgaclUserNew(GRSTgaclCred *);
-
-/*  #define GACLfreeUser(x)            GRSTgaclUserFree((x)) */
-int       GRSTgaclUserFree(GRSTgaclUser *);
-
-/*  #define GACLuserAddCred(x,y)       GRSTgaclUserAddCred((x),(y)) */
-int       GRSTgaclUserAddCred(GRSTgaclUser *, GRSTgaclCred *);
-
-/*  #define GACLuserHasCred(x,y)       GRSTgaclUserHasCred((x),(y)) */
-int       GRSTgaclUserHasCred(GRSTgaclUser *, GRSTgaclCred *);
-
-int       GRSTgaclUserSetDNlists(GRSTgaclUser *, char *);
-
-/*  #define GACLuserFindCredType(x,y) GRSTgaclUserFindCredtype((x),(y)) */
-GRSTgaclCred *GRSTgaclUserFindCredtype(GRSTgaclUser *, char *);
-
-/*  #define GACLtestDnList(x,y)        GRSTgaclDNlistHasUser((x),(y)) */
-int GRSTgaclDNlistHasUser(char *, GRSTgaclUser *);
-
-/*  #define GACLtestUserAcl(x,y)       GRSTgaclAclTestUser((x),(y)) */
-GRSTgaclPerm   GRSTgaclAclTestUser(GRSTgaclAcl *, GRSTgaclUser *);
-
-/*  #define GACLtestExclAcl(x,y)       GRSTgaclAclTestexclUser((x),(y)) */
-GRSTgaclPerm   GRSTgaclAclTestexclUser(GRSTgaclAcl *, GRSTgaclUser *);
-
-
-char      *GRSThttpUrlDecode(char *);
-
-/*  #define GACLurlEncode(x)   GRSThttpUrlEncode((x)) */
-char      *GRSThttpUrlEncode(char *);
-
-/*  #define GACLmildUrlEncode(x)       GRSThttpMildUrlEncode((x)) */
-char      *GRSThttpUrlMildencode(char *);
-
-int GRSTx509NameCmp(char *, char *);
-
-int GRSTx509KnownCriticalExts(X509 *);
-
-time_t GRSTasn1TimeToTimeT(char *);
-int GRSTx509IsCA(X509 *);
-int GRSTx509CheckChain(int *, X509_STORE_CTX *);
-int GRSTx509VerifyCallback(int, X509_STORE_CTX *);
-
-int GRSTx509GetVomsCreds(int *, int, size_t, char *, X509 *, STACK_OF(X509) *, char *);
-GRSTgaclCred *GRSTx509CompactToCred(char *);
-int GRSTx509CompactCreds(int *, int, size_t, char *, STACK_OF(X509) *, char *);
-char *GRSTx509CachedProxyFind(char *, char *, char *);
-char *GRSTx509FindProxyFileName(void);
-int GRSTx509MakeProxyCert(char **, FILE *, char *, char *, char *, int);
-char *GRSTx509CachedProxyKeyFind(char *, char *, char *);
-int GRSTx509MakeProxyRequest(char **, char *, char *, char *);
-int GRSTx509CacheProxy(char *, char *, char *, char *);
-
-#define GRST_HEADFILE   "gridsitehead.txt"
-#define GRST_FOOTFILE   "gridsitefoot.txt"
-#define GRST_ADMIN_FILE "gridsite-admin.cgi"
-
-typedef struct { char *text;
-                 void *next; } GRSThttpCharsList;
-
-typedef struct { size_t             size;
-                 GRSThttpCharsList *first;
-                 GRSThttpCharsList *last;  } GRSThttpBody;
-
-void  GRSThttpBodyInit(GRSThttpBody *); 
-void  GRSThttpPrintf(GRSThttpBody *, char *, ...);
-int   GRSThttpCopy(GRSThttpBody *, char *);
-void  GRSThttpWriteOut(GRSThttpBody *);
-int   GRSThttpPrintHeaderFooter(GRSThttpBody *, char *, char *);
-char *GRSThttpGetCGI(char *);
diff --git a/org.gridsite.core/project/build.properties b/org.gridsite.core/project/build.properties
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/org.gridsite.core/project/configure.properties.xml b/org.gridsite.core/project/configure.properties.xml
deleted file mode 100644 (file)
index 6ee8706..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-       <!-- ======================================================
-                Define extra properties here ...
-                ====================================================== -->
-
-       <project name="configure options">
-        <property name="build.make.arguments"
-               value="prefix=${stage.abs.dir} GSOAPDIR=${with.gsoap.prefix} OPENSSL_FLAGS=-I${with.globus.prefix}/include/gcc32/openssl OPENSSL_LIBS=-L${with.globus.prefix}/lib/"/>
-       </project>
-
diff --git a/org.gridsite.core/project/dependencies.properties b/org.gridsite.core/project/dependencies.properties
deleted file mode 100644 (file)
index 2a7383b..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-###################################################################
-# System dependencies
-###################################################################
-
-org.glite.version = HEAD
-org.glite.core.version = HEAD
-
-# Component dependencies tag = do not remove this line =
-
diff --git a/org.gridsite.core/project/gridsite.core.csf.xml b/org.gridsite.core/project/gridsite.core.csf.xml
deleted file mode 100644 (file)
index 7ca38dc..0000000
+++ /dev/null
@@ -1,221 +0,0 @@
-<?xml version="1.0"?>
-<!--
-       Copyright (c) 2004 on behalf of the EU EGEE Project: 
-       The European Organization for Nuclear Research (CERN), 
-       Istituto Nazionale di Fisica Nucleare (INFN), Italy
-       Datamat Spa, Italy
-       Centre National de la Recherche Scientifique (CNRS), France
-       CS Systeme d'Information (CSSI), France
-       Royal Institute of Technology, Center for Parallel Computers (KTH-PDC), Sweden
-       Universiteit van Amsterdam (UvA), Netherlands
-       University of Helsinki (UH.HIP), Finland
-       University of Bergen (UiB), Norway
-       Council for the Central Laboratory of the Research Councils (CCLRC), United Kingdom
-
-       GLite Middleware WMS Configuration Specification File
-       
-       Authors: Alberto Di Meglio <alberto.di.meglio@cern.ch>          
-                Joachim Flammer <Joachim.Flammer@cern.ch>
-       Version info: $Id$
-       Release: $Name$
-
-       Revision history:
-       $Log$
-       Revision 1.3  2004/10/27 10:35:37  dimeglio
-       Added missing closing target
-       
-       Revision 1.2  2004/10/27 10:28:29  dimeglio
-       Modified to use gridsite-core
-       
-       Revision 1.1  2004/10/26 17:54:24  dimeglio
-       First version of this file
-       
-       Revision 1.7  2004/10/18 23:01:18  dimeglio
-       Added oscheck to various targets
-       
-       Revision 1.6  2004/10/12 14:21:21  eronchie
-       Removed ssl_utils dependency
-       
-       Revision 1.5  2004/08/20 09:51:39  eronchie
-       Updated buildmodules orders
-       
-       Revision 1.4  2004/08/04 07:30:29  eronchie
-       Added cppunit
-       
-       Revision 1.3  2004/07/23 14:50:08  eronchie
-       Added exception
-       
-       Revision 1.2  2004/07/23 08:27:03  eronchie
-       Updated
-       
-       
--->
-
-<project name="Gridsite Core CSF" default="all">
-
-       <!-- overwrite default workspace directory -->
-       <property name="workspace.dir" value="../.." />
-
-       <!-- ===============================================
-                Load properties
-                =============================================== -->
-
-       <!-- load baseline and user properties -->
-       <import file="${workspace.dir}/org.glite/project/baseline.properties.xml" />
-
-       <!-- define build properties file location since we are already in project dir -->
-       <property name="subsystem.build.properties.file" value="./build.properties" />
-
-       <!-- Load subsytem-specific property files -->
-       <import file="./properties.xml"/>
-
-       <!-- load global properties -->
-       <import file="${global.properties.file}" />
-
-       <!-- ===============================================
-                Load dependencies 
-                =============================================== -->
-
-       <!-- Load user dependencies file -->
-       <property file="${user.dependencies.file}" />
-               
-       <!-- Load subsystem dependencies file -->
-       <property file="./dependencies.properties" />
-
-       <!-- Load global dependencies file -->
-       <property file="${global.dependencies.file}" />
-
-       <!-- ===============================================
-                Load targets 
-                =============================================== -->
-       <import file="${global.targets-envchecks.file}" />
-       <import file="${global.targets-external-dependencies.file}" />
-
-       <!-- ===============================================
-                Evaluate CVS tags
-                =============================================== -->
-
-       <target name="evaluate.cvs.tags" description="Figure out if we need tagged CVS checkout">
-                       <condition property="glite.head">
-                               <and>
-                                       <equals arg1="${org.glite.version}" arg2="HEAD" />
-                                       <or>
-                                               <istrue value="${update}" />
-                                               <not>
-                                                       <available file="${global.dependencies.file}" type="file" />
-                                               </not>
-                                       </or>
-                               </and>
-                       </condition>
-                       <condition property="glite.tag">
-                               <and>
-                                       <not>
-                                               <equals arg1="${org.glite.version}" arg2="HEAD" />
-                                       </not>
-                                       <or>
-                                               <istrue value="${update}" />
-                                               <not>
-                                                       <available file="${global.dependencies.file}" type="file" />
-                                               </not>
-                                       </or>
-                               </and>
-                       </condition>
-                       <condition property="gridsite-core.head">
-                               <and>
-                                       <equals arg1="${org.gridsite-core.version}" arg2="HEAD" />
-                                       <istrue value="${update}" />
-                               </and>
-                       </condition>
-                       <condition property="gridsite-core.tag">
-                               <and>
-                                       <not>
-                                               <equals arg1="${org.gridsite-core.version}" arg2="HEAD" />
-                                       </not>
-                                       <istrue value="${update}" />
-                               </and>
-                       </condition>
-
-               </target>
-       
-               <!-- condition property tag = do not remove = -->
-
-       <presetdef name="cvs-co">
-               <cvs command="checkout" dest="${workspace.dir}" />
-       </presetdef>
-
-       <!-- =====================================================
-                Self-update if required
-                ===================================================== -->
-               
-       <!-- Update main GLite module -->
-       <target name="org.glite" depends="get.glite.head, get.glite.tag"/>
-       <target name="get.glite.head" if="glite.head">
-               <cvs-co package="org.glite" />
-       </target>
-       <target name="get.glite.tag" if="glite.tag">
-               <cvs-co package="org.glite"
-                       tag="${org.glite.version}" />
-       </target>
-
-       <!-- Update the current module -->
-       <target name="org.gridsite.core" depends="get.gridsite-core.head, get.gridsite-core.tag"/>
-       <target name="get.gridsite-core.head" if="gridsite-core.head">
-               <cvs-co package="org.gridsite.core" />
-               <fail>The org.glite and org.gridsite.core modules have been updated, please rerun the configuration file</fail>
-       </target>
-       <target name="get.gridsite-core.tag" if="gridsite-core.tag">
-               <cvs-co package="org.gridsite.core"
-                       tag="${org.gridsite.core.version}" />
-               <fail>The org.glite and org.gridsite.core modules have been updated, please rerun the configuration file</fail>
-       </target>
-
-       <!-- *****************************************************-->
-       <!-- Development tools                                    -->
-       <!-- *****************************************************-->
-       
-       <!-- All development tools -->
-       <target name="devtools" depends="oscheck,
-                                        junitcheck,
-                                        junit,
-                                    chkstyle,
-                                        jalopy,
-                                        ant-contrib,
-                                        cpptasks,
-                                        egee-ant-ext"/>                
-       
-       <!-- =====================================================
-                External libraries
-                ===================================================== -->
-       
-       <!--  All external libraries -->
-       <target name="external" depends="oscheck,
-                                        log4j"/>
-       
-       <!-- =====================================================
-                GLite WMS modules
-                ===================================================== -->
-
-       <!-- component targets tag = do not remove = -->
-
-       <!-- All project modules -->
-       <target name="project" depends=""/>
-
-
-       <!-- ====================================================
-                Checkout all
-                ==================================================== -->
-       
-       <!-- All libraries -->
-       <target name="all" depends="oscheck,evaluate.cvs.tags,defaultenvchecks,org.glite,org.gridsite.core,devtools,external,project" />                
-
-       <!-- ====================================================
-                Print dependecies to console
-                ==================================================== -->
-       
-       <target name="dependencies">
-               <concat>
-                       <fileset dir="." includes="dependencies.properties" />
-               </concat>
-       </target>               
-
-</project>
diff --git a/org.gridsite.core/project/properties.xml b/org.gridsite.core/project/properties.xml
deleted file mode 100644 (file)
index 74f88dc..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-       Copyright (c) 2004 on behalf of the EU EGEE Project: 
-       The European Organization for Nuclear Research (CERN), 
-       Istituto Nazionale di Fisica Nucleare (INFN), Italy
-       Datamat Spa, Italy
-       Centre National de la Recherche Scientifique (CNRS), France
-       CS Systeme d'Information (CSSI), France
-       Royal Institute of Technology, Center for Parallel Computers (KTH-PDC), Sweden
-       Universiteit van Amsterdam (UvA), Netherlands
-       University of Helsinki (UH.HIP), Finland
-       University of Bergen (UiB), Norway
-       Council for the Central Laboratory of the Research Councils (CCLRC), United Kingdom
-
-       Common build properties file for the Gridsite Core modules
-       
-       Authors: Alberto Di Meglio <alberto.di.meglio@cern.ch>          
-       Version info: $Id$
-       Release: $Name$
-
-       Revision history:
-       $Log$
--->
-
-<project name="Gridsite Core common properties">
-
-       <!-- Include build properties to allow overwriting 
-            of properties for subsystem                    -->
-       <property name="subsystem.build.properties.file" value="./project/build.properties" />
-       <property file="${subsystem.build.properties.file}" />  
-
-       <!-- ======================================================
-          Define subsystem properties
-                ====================================================== -->
-       
-       <!-- Subsystem name -->
-       <property name="subsystem.name" value="${gridsite-core.subsystem.name}"/>
-       
-       <!-- Subsystem prefix -->
-       <property name="subsystem.prefix" value="${gridsite-core.subsystem.prefix}"/>
-       
-       <!-- ======================================================
-          Define general subsystem properties
-                ====================================================== -->
-               
-       <!-- Include common subsystem properties -->
-       <import file="${subsystem.general.properties.file}" />
-       
-       <!-- ======================================================
-                Define extra properties here ...
-                ====================================================== -->
-                                       
-</project>
diff --git a/org.gridsite.core/project/taskdefs.xml b/org.gridsite.core/project/taskdefs.xml
deleted file mode 100644 (file)
index 9c35cef..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-       Copyright (c) 2004 on behalf of the EU EGEE Project: 
-       The European Organization for Nuclear Research (CERN), 
-       Istituto Nazionale di Fisica Nucleare (INFN), Italy
-       Datamat Spa, Italy
-       Centre National de la Recherche Scientifique (CNRS), France
-       CS Systeme d'Information (CSSI), France
-       Royal Institute of Technology, Center for Parallel Computers (KTH-PDC), Sweden
-       Universiteit van Amsterdam (UvA), Netherlands
-       University of Helsinki (UH.HIP), Finland
-       University of Bergen (UiB), Norway
-       Council for the Central Laboratory of the Research Councils (CCLRC), United Kingdom
-
-       Common Ant task definition file for the Gridsite Core modules
-       
-       Authors: Alberto Di Meglio <alberto.di.meglio@cern.ch>          
-       Version info: $Id$
-       Release: $Name$
-
-       Revision history:
-       $Log$
--->
-
-<project name="Gridsite Core common tasks and types definitions">
-
-<!-- ======================================================
-        Subsystem task definitions
-        ====================================================== -->
-
-</project>
\ No newline at end of file
diff --git a/org.gridsite.core/project/version.properties b/org.gridsite.core/project/version.properties
deleted file mode 100644 (file)
index 271daff..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#Fri Dec 10 12:31:28 CET 2004
-module.version=1.1.3
-module.build=71
-module.age=2
diff --git a/org.gridsite.core/src/Doxyfile b/org.gridsite.core/src/Doxyfile
deleted file mode 100644 (file)
index e47d005..0000000
+++ /dev/null
@@ -1,993 +0,0 @@
-# Doxyfile 1.2.18
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-#       TAG = value [value, ...]
-# For lists items can also be appended using:
-#       TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# General configuration options
-#---------------------------------------------------------------------------
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
-# by quotes) that should identify the project.
-
-PROJECT_NAME           = 
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
-# This could be handy for archiving the generated documentation or 
-# if some version control system is used.
-
-PROJECT_NUMBER         = 
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
-# base path where the generated documentation will be put. 
-# If a relative path is entered, it will be relative to the location 
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY       = 
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
-# documentation generated by doxygen is written. Doxygen will use this 
-# information to generate all constant output in the proper language. 
-# The default language is English, other supported languages are: 
-# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, 
-# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en 
-# (Japanese with english messages), Korean, Norwegian, Polish, Portuguese, 
-# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish and Ukrainian.
-
-OUTPUT_LANGUAGE        = English
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
-# documentation are documented, even if no documentation was available. 
-# Private class members and static file members will be hidden unless 
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL            = YES
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
-# will be included in the documentation.
-
-EXTRACT_PRIVATE        = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file 
-# will be included in the documentation.
-
-EXTRACT_STATIC         = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
-# defined locally in source files will be included in the documentation. 
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES  = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
-# undocumented members of documented classes, files or namespaces. 
-# If set to NO (the default) these members will be included in the 
-# various overviews, but no documentation section is generated. 
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS     = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
-# undocumented classes that are normally visible in the class hierarchy. 
-# If set to NO (the default) these class will be included in the various 
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES     = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
-# friend (class|struct|union) declarations. 
-# If set to NO (the default) these declarations will be included in the 
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS  = NO
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
-# include brief member descriptions after the members that are listed in 
-# the file and class documentation (similar to JavaDoc). 
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC      = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
-# the brief description of a member or function before the detailed description. 
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF           = YES
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
-# Doxygen will generate a detailed section even if there is only a brief 
-# description.
-
-ALWAYS_DETAILED_SEC    = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited 
-# members of a class in the documentation of that class as if those members were 
-# ordinary class members. Constructors, destructors and assignment operators of 
-# the base classes will not be shown.
-
-INLINE_INHERITED_MEMB  = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
-# path before files name in the file list and in the header files. If set 
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES        = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
-# can be used to strip a user defined part of the path. Stripping is 
-# only done if one of the specified strings matches the left-hand part of 
-# the path. It is allowed to use relative paths in the argument list.
-
-STRIP_FROM_PATH        = 
-
-# The INTERNAL_DOCS tag determines if documentation 
-# that is typed after a \internal command is included. If the tag is set 
-# to NO (the default) then the documentation will be excluded. 
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS          = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
-# doxygen to hide any special comment blocks from generated source code 
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS    = YES
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
-# file names in lower case letters. If set to YES upper case letters are also 
-# allowed. This is useful if you have classes or files whose names only differ 
-# in case and if your file system supports case sensitive file names. Windows 
-# users are adviced to set this option to NO.
-
-CASE_SENSE_NAMES       = YES
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
-# (but less readable) file names. This can be useful is your file systems 
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES            = NO
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
-# will show members with their full class and namespace scopes in the 
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES       = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
-# will generate a verbatim copy of the header file for each class for 
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS       = YES
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
-# will put list of the files that are included by a file in the documentation 
-# of that file.
-
-SHOW_INCLUDE_FILES     = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
-# will interpret the first line (until the first dot) of a JavaDoc-style 
-# comment as the brief description. If set to NO, the JavaDoc 
-# comments  will behave just like the Qt-style comments (thus requiring an 
-# explict @brief command for a brief description.
-
-JAVADOC_AUTOBRIEF      = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
-# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
-# comments) as a brief description. This used to be the default behaviour. 
-# The new default is to treat a multi-line C++ comment block as a detailed 
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the DETAILS_AT_TOP tag is set to YES then Doxygen 
-# will output the detailed description near the top, like JavaDoc.
-# If set to NO, the detailed description appears after the member 
-# documentation.
-
-DETAILS_AT_TOP         = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
-# member inherits the documentation from any documented member that it 
-# reimplements.
-
-INHERIT_DOCS           = YES
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
-# is inserted in the documentation for inline members.
-
-INLINE_INFO            = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
-# will sort the (detailed) documentation of file and class members 
-# alphabetically by member name. If set to NO the members will appear in 
-# declaration order.
-
-SORT_MEMBER_DOCS       = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
-# tag is set to YES, then doxygen will reuse the documentation of the first 
-# member in the group (if any) for the other members of the group. By default 
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC   = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE               = 8
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or 
-# disable (NO) the todo list. This list is created by putting \todo 
-# commands in the documentation.
-
-GENERATE_TODOLIST      = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or 
-# disable (NO) the test list. This list is created by putting \test 
-# commands in the documentation.
-
-GENERATE_TESTLIST      = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or 
-# disable (NO) the bug list. This list is created by putting \bug 
-# commands in the documentation.
-
-GENERATE_BUGLIST       = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
-# disable (NO) the deprecated list. This list is created by putting \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# This tag can be used to specify a number of aliases that acts 
-# as commands in the documentation. An alias has the form "name=value". 
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
-# put the command \sideeffect (or @sideeffect) in the documentation, which 
-# will result in a user defined paragraph with heading "Side Effects:". 
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES                = 
-
-# The ENABLED_SECTIONS tag can be used to enable conditional 
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS       = 
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
-# the initial value of a variable or define consist of for it to appear in 
-# the documentation. If the initializer consists of more lines than specified 
-# here it will be hidden. Use a value of 0 to hide initializers completely. 
-# The appearance of the initializer of individual variables and defines in the 
-# documentation can be controlled using \showinitializer or \hideinitializer 
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES  = 30
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources 
-# only. Doxygen will then generate output that is more tailored for C. 
-# For instance some of the names that are used will be different. The list 
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C  = YES
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources 
-# only. Doxygen will then generate output that is more tailored for Java. 
-# For instance namespaces will be presented as packages, qualified scopes 
-# will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA   = NO
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
-# at the bottom of the documentation of classes and structs. If set to YES the 
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES        = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated 
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET                  = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are 
-# generated by doxygen. Possible values are YES and NO. If left blank 
-# NO is used.
-
-WARNINGS               = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED   = YES
-
-# The WARN_FORMAT tag determines the format of the warning messages that 
-# doxygen can produce. The string should contain the $file, $line, and $text 
-# tags, which will be replaced by the file and line number from which the 
-# warning originated and the warning text.
-
-WARN_FORMAT            = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning 
-# and error messages should be written. If left blank the output is written 
-# to stderr.
-
-WARN_LOGFILE           = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain 
-# documented source files. You may enter file names like "myfile.cpp" or 
-# directories like "/usr/src/myproject". Separate the files or directories 
-# with spaces.
-
-INPUT                  =
-
-# If the value of the INPUT tag contains directories, you can use the 
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank the following patterns are tested: 
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp 
-# *.h++ *.idl *.odl
-
-FILE_PATTERNS          =
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
-# should be searched for input files as well. Possible values are YES and NO. 
-# If left blank NO is used.
-
-RECURSIVE              = NO
-
-# The EXCLUDE tag can be used to specify files and/or directories that should 
-# excluded from the INPUT source files. This way you can easily exclude a 
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE                = 
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories 
-# that are symbolic links (a Unix filesystem feature) are excluded from the input.
-
-EXCLUDE_SYMLINKS       = NO
-
-# If the value of the INPUT tag contains directories, you can use the 
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
-# certain files from those directories.
-
-EXCLUDE_PATTERNS       = 
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or 
-# directories that contain example code fragments that are included (see 
-# the \include command).
-
-EXAMPLE_PATH           = 
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank all files are included.
-
-EXAMPLE_PATTERNS       = 
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
-# searched for input files to be used with the \include or \dontinclude 
-# commands irrespective of the value of the RECURSIVE tag. 
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE      = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or 
-# directories that contain image that are included in the documentation (see 
-# the \image command).
-
-IMAGE_PATH             = 
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should 
-# invoke to filter for each input file. Doxygen will invoke the filter program 
-# by executing (via popen()) the command <filter> <input-file>, where <filter> 
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
-# input file. Doxygen will then use the output that the filter program writes 
-# to standard output.
-
-INPUT_FILTER           = 
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
-# INPUT_FILTER) will be used to filter the input files when producing source 
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES    = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
-# be generated. Documented entities will be cross-referenced with these sources.
-
-SOURCE_BROWSER         = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body 
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES         = NO
-
-# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
-# then for each documented function all documented 
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = NO
-
-# If the REFERENCES_RELATION tag is set to YES (the default) 
-# then for each documented function all documented entities 
-# called/used by that function will be listed.
-
-REFERENCES_RELATION    = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
-# of all compounds will be generated. Enable this if the project 
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX     = YES
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX    = 5
-
-# In case all classes in a project start with a common prefix, all 
-# classes will be put under the same header in the alphabetical index. 
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX          = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
-# generate HTML output.
-
-GENERATE_HTML          = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT            = doxygen
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION    = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard header.
-
-HTML_HEADER            =
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard footer.
-
-HTML_FOOTER            =
-
-# The HTML_STYLESHEET tag can be used to specify a user defined cascading 
-# style sheet that is used by each HTML page. It can be used to 
-# fine-tune the look of the HTML output. If the tag is left blank doxygen 
-# will generate a default style sheet
-
-HTML_STYLESHEET        = doxygen.css
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
-# files or namespaces will be aligned in HTML using tables. If set to 
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS     = YES
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
-# will be generated that can be used as input for tools like the 
-# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP      = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
-# be used to specify the file name of the resulting .chm file. You 
-# can add a path in front of the file if the result should not be 
-# written to the html output dir.
-
-CHM_FILE               = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
-# be used to specify the location (absolute path including file name) of 
-# the HTML help compiler (hhc.exe). If non empty doxygen will try to run 
-# the html help compiler on the generated index.hhp.
-
-HHC_LOCATION           = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
-# controls if a separate .chi index file is generated (YES) or that 
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI           = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
-# controls whether a binary table of contents is generated (YES) or a 
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC             = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members 
-# to the contents of the Html help documentation and to the tree view.
-
-TOC_EXPAND             = NO
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
-# top of each HTML page. The value NO (the default) enables the index and 
-# the value YES disables it.
-
-DISABLE_INDEX          = YES
-
-# This tag can be used to set the number of enum values (range [1..20]) 
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE   = 4
-
-# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
-# generated containing a tree-like index structure (just like the one that 
-# is generated for HTML Help). For this to work a browser that supports 
-# JavaScript and frames is required (for instance Mozilla, Netscape 4.0+, 
-# or Internet explorer 4.0+). Note that for large projects the tree generation 
-# can take a very long time. In such cases it is better to disable this feature. 
-# Windows users are probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW      = NO
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
-# used to set the initial width (in pixels) of the frame in which the tree 
-# is shown.
-
-TREEVIEW_WIDTH         = 250
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
-# generate Latex output.
-
-GENERATE_LATEX         = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT           = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be invoked. If left blank `latex' will be used as the default command name.
-
-LATEX_CMD_NAME         = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
-# generate index for LaTeX. If left blank `makeindex' will be used as the 
-# default command name.
-
-MAKEINDEX_CMD_NAME     = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
-# LaTeX documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_LATEX          = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used 
-# by the printer. Possible values are: a4, a4wide, letter, legal and 
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE             = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES         = 
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
-# the generated latex document. The header should contain everything until 
-# the first chapter. If it is left blank doxygen will generate a 
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER           = 
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
-# contain links (just like the HTML output) instead of page references 
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS         = NO
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
-# plain latex in the generated Makefile. Set this option to YES to get a 
-# higher quality PDF documentation.
-
-USE_PDFLATEX           = NO
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
-# command to the generated LaTeX files. This will instruct LaTeX to keep 
-# running if errors occur, instead of asking the user for help. 
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE        = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
-# The RTF output is optimised for Word 97 and may not look very pretty with 
-# other RTF readers or editors.
-
-GENERATE_RTF           = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT             = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
-# RTF documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_RTF            = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
-# will contain hyperlink fields. The RTF file will 
-# contain links (just like the HTML output) instead of page references. 
-# This makes the output suitable for online browsing using WORD or other 
-# programs which support those fields. 
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS         = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's 
-# config file, i.e. a series of assigments. You only have to provide 
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE    = 
-
-# Set optional variables used in the generation of an rtf document. 
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE    = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
-# generate man pages
-
-GENERATE_MAN           = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT             = man
-
-# The MAN_EXTENSION tag determines the extension that is added to 
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION          = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
-# then it will generate one additional man file for each entity 
-# documented in the real man page(s). These additional files 
-# only source the real man page, but without them the man command 
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS              = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will 
-# generate an XML file that captures the structure of 
-# the code including all documentation. Note that this 
-# feature is still experimental and incomplete at the 
-# moment.
-
-GENERATE_XML           = NO
-
-# The XML_SCHEMA tag can be used to specify an XML schema, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_SCHEMA             = 
-
-# The XML_DTD tag can be used to specify an XML DTD, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_DTD                = 
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
-# generate an AutoGen Definitions (see autogen.sf.net) file 
-# that captures the structure of the code including all 
-# documentation. Note that this feature is still experimental 
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF   = NO
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor   
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
-# evaluate all C-preprocessor directives found in the sources and include 
-# files.
-
-ENABLE_PREPROCESSING   = NO
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
-# names in the source code. If set to NO (the default) only conditional 
-# compilation will be performed. Macro expansion can be done in a controlled 
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION        = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
-# then the macro expansion is limited to the macros specified with the 
-# PREDEFINED and EXPAND_AS_PREDEFINED tags.
-
-EXPAND_ONLY_PREDEF     = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES        = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that 
-# contain include files that are not input files but should be processed by 
-# the preprocessor.
-
-INCLUDE_PATH           = 
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
-# patterns (like *.h and *.hpp) to filter out the header-files in the 
-# directories. If left blank, the patterns specified with FILE_PATTERNS will 
-# be used.
-
-INCLUDE_FILE_PATTERNS  = 
-
-# The PREDEFINED tag can be used to specify one or more macro names that 
-# are defined before the preprocessor is started (similar to the -D option of 
-# gcc). The argument of the tag is a list of macros of the form: name 
-# or name=definition (no spaces). If the definition and the = are 
-# omitted =1 is assumed.
-
-PREDEFINED             = 
-
-# If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then 
-# this tag can be used to specify a list of macro names that should be expanded. 
-# The macro definition that is found in the sources will be used. 
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED      = 
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
-# doxygen's preprocessor will remove all function-like macros that are alone 
-# on a line, have an all uppercase name, and do not end with a semicolon. Such 
-# function macros are typically used for boiler-plate code, and will confuse the 
-# parser if not removed.
-
-SKIP_FUNCTION_MACROS   = YES
-
-#---------------------------------------------------------------------------
-# Configuration::addtions related to external references   
-#---------------------------------------------------------------------------
-
-# The TAGFILES tag can be used to specify one or more tagfiles.
-
-TAGFILES               = 
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE       = 
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
-# in the class index. If set to NO only the inherited external classes 
-# will be listed.
-
-ALLEXTERNALS           = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
-# in the modules index. If set to NO, only the current project's groups will 
-# be listed.
-
-EXTERNAL_GROUPS        = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script 
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH              = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool   
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
-# generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or 
-# super classes. Setting the tag to NO turns the diagrams off. Note that this 
-# option is superceded by the HAVE_DOT option below. This is only a fallback. It is 
-# recommended to install and use dot, since it yield more powerful graphs.
-
-CLASS_DIAGRAMS         = YES
-
-# If set to YES, the inheritance and collaboration graphs will hide 
-# inheritance and usage relations if the target is undocumented 
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS   = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
-# available from the path. This tool is part of Graphviz, a graph visualization 
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT               = NO
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect inheritance relations. Setting this tag to YES will force the 
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH            = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect implementation dependencies (inheritance, containment, and 
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH    = YES
-
-# If set to YES, the inheritance and collaboration graphs will show the 
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS     = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
-# tags are set to YES then doxygen will generate a graph for each documented 
-# file showing the direct and indirect include dependencies of the file with 
-# other documented files.
-
-INCLUDE_GRAPH          = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
-# documented header file showing the documented files that directly or 
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH      = YES
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY    = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT       = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be 
-# found. If left blank, it is assumed the dot tool can be found on the path.
-
-DOT_PATH               = 
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that 
-# contain dot files that are included in the documentation (see the 
-# \dotfile command).
-
-DOTFILE_DIRS           = 
-
-# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width 
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
-# this value, doxygen will try to truncate the graph, so that it fits within 
-# the specified constraint. Beware that most browsers cannot cope with very 
-# large images.
-
-MAX_DOT_GRAPH_WIDTH    = 1024
-
-# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height 
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
-# this value, doxygen will try to truncate the graph, so that it fits within 
-# the specified constraint. Beware that most browsers cannot cope with very 
-# large images.
-
-MAX_DOT_GRAPH_HEIGHT   = 1024
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
-# generate a legend page explaining the meaning of the various boxes and 
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND        = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
-# remove the intermedate dot files that are used to generate 
-# the various graphs.
-
-DOT_CLEANUP            = YES
-
-#---------------------------------------------------------------------------
-# Configuration::addtions related to the search engine   
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be 
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE           = NO
-
-# The CGI_NAME tag should be the name of the CGI script that 
-# starts the search engine (doxysearch) with the correct parameters. 
-# A script with this name will be generated by doxygen.
-
-CGI_NAME               = search.cgi
-
-# The CGI_URL tag should be the absolute URL to the directory where the 
-# cgi binaries are located. See the documentation of your http daemon for 
-# details.
-
-CGI_URL                = 
-
-# The DOC_URL tag should be the absolute URL to the directory where the 
-# documentation is located. If left blank the absolute path to the 
-# documentation, with file:// prepended to it, will be used.
-
-DOC_URL                = 
-
-# The DOC_ABSPATH tag should be the absolute path to the directory where the 
-# documentation is located. If left blank the directory on the local machine 
-# will be used.
-
-DOC_ABSPATH            = 
-
-# The BIN_ABSPATH tag must point to the directory where the doxysearch binary 
-# is installed.
-
-BIN_ABSPATH            = /usr/local/bin/
-
-# The EXT_DOC_PATHS tag can be used to specify one or more paths to 
-# documentation generated for other projects. This allows doxysearch to search 
-# the documentation for these projects as well.
-
-EXT_DOC_PATHS          = 
diff --git a/org.gridsite.core/src/Makefile b/org.gridsite.core/src/Makefile
deleted file mode 100644 (file)
index bd66586..0000000
+++ /dev/null
@@ -1,280 +0,0 @@
-#
-#   Andrew McNab and Shiv Kaushal, University of Manchester.
-#   Copyright (c) 2002-4. All rights reserved.
-#
-#   Redistribution and use in source and binary forms, with or
-#   without modification, are permitted provided that the following
-#   conditions are met:
-#
-#     o Redistributions of source code must retain the above
-#       copyright notice, this list of conditions and the following
-#       disclaimer. 
-#     o Redistributions in binary form must reproduce the above
-#       copyright notice, this list of conditions and the following
-#       disclaimer in the documentation and/or other materials
-#       provided with the distribution. 
-#
-#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-#   CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-#   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-#   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-#   DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-#   BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-#   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-#   TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-#   ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-#   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-#   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#   POSSIBILITY OF SUCH DAMAGE.
-#
-#---------------------------------------------------------------
-# For more information about GridSite: http://www.gridsite.org/ 
-#---------------------------------------------------------------
-
-include ../VERSION
-
-RPMCMD=$(shell if [ -x /usr/bin/rpmbuild ] ; then echo /usr/bin/rpmbuild; else echo rpm; fi)
-
-ifndef MYRPMDIR
-export MYRPMDIR=$(shell pwd)/../RPMTMP
-endif
-
-ifndef prefix
-export prefix=/usr/local
-endif
-
-ifndef MYCFLAGS
-export MYCFLAGS=-I. -I../interface -I/usr/include/httpd -I/usr/include/apr-0 -I/opt/glite/include
-endif
-
-ifndef OPENSSL_FLAGS
-export OPENSSL_FLAGS=-I/usr/include/openssl
-endif
-
-ifndef MYLDFLAGS
-export MYLDFLAGS=-L.
-# export MYLDFLAGS=-L. -L/opt/glite/lib -lvomsc
-endif
-
-ifndef OPENSSL_LIBS
-export OPENSSL_LIBS=-L/usr/lib/openssl
-endif
-
-#
-# Build
-#
-
-build: libgridsite.so.$(VERSION) libgridsite.a htcp mod_gridsite.so \
-       urlencode findproxyfile real-gridsite-admin.cgi \
-       # gridsite-delegation.cgi # htproxyput
-
-libgridsite.so.$(VERSION): grst_x509.o grst_gacl.o grst_http.o
-       gcc -shared -Wl,-soname,libgridsite.so.$(MINOR_VERSION) \
-         -o libgridsite.so.$(PATCH_VERSION) grst_x509.o grst_gacl.o grst_http.o
-
-libgridsite.a: grst_x509.o grst_gacl.o grst_http.o
-       ar src libgridsite.a grst_x509.o grst_gacl.o grst_http.o
-
-grst_x509.o: grst_x509.c ../interface/gridsite.h
-       gcc $(MYCFLAGS) $(OPENSSL_FLAGS) \
-            -I/usr/kerberos/include -c grst_x509.c
-
-grst_gacl.o: grst_gacl.c ../interface/gridsite.h
-       gcc $(MYCFLAGS) $(OPENSSL_FLAGS) \
-            -I/usr/kerberos/include `xml2-config --cflags` -c grst_gacl.c
-
-grst_http.o: grst_http.c ../interface/gridsite.h
-       gcc $(MYCFLAGS) $(OPENSSL_FLAGS) \
-                        -I/usr/kerberos/include -c grst_http.c
-
-urlencode: urlencode.c libgridsite.a
-       gcc -DVERSION=\"$(PATCH_VERSION)\" $(MYCFLAGS) \
-            -o urlencode urlencode.c -L. \
-             $(OPENSSL_FLAGS) -I/usr/kerberos/include -lgridsite
-
-htcp: htcp.c
-       gcc -DVERSION=\"$(PATCH_VERSION)\" -I. -o htcp htcp.c \
-          `curl-config --cflags` `curl-config --libs` 
-
-mod_gridsite.so: mod_gridsite.c mod_ssl-private.h libgridsite.a
-       gcc $(MYCFLAGS) -shared -Wl,-soname=gridsite_module \
-            $(OPENSSL_FLAGS) -I/usr/kerberos/include \
-           -I/usr/include/libxml2 \
-           -DVERSION=\"$(VERSION)\" -o mod_gridsite.so \
-           mod_gridsite.c $(MYLDFLAGS) -lxml2 -lm -lz -lgridsite
-
-real-gridsite-admin.cgi: grst_admin_main.c grst_admin_gacl.c \
-                         grst_admin_file.c grst_admin.h
-       gcc $(MYCFLAGS) $(MYLDFLAGS) -o real-gridsite-admin.cgi \
-            grst_admin_main.c \
-            grst_admin_gacl.c \
-            grst_admin_file.c \
-             $(OPENSSL_FLAGS) -I/usr/kerberos/include \
-            -DVERSION=\"$(VERSION)\" $(OPENSSL_LIBS) -lgridsite -lssl -lcrypto -lxml2 -lz -lm
-
-findproxyfile: findproxyfile.c libgridsite.a
-       gcc -DVERSION=\"$(PATCH_VERSION)\" $(MYCFLAGS) $(MYLDFLAGS) \
-            -o findproxyfile findproxyfile.c -L. \
-             $(OPENSSL_FLAGS) -I/usr/kerberos/include -lgridsite \
-             $(OPENSSL_LIBS) -lssl -lcrypto -lxml2 -lz -lm
-
-apidoc:
-       doxygen Doxyfile
-
-gaclexample: gaclexample.c libgridsite.a
-       gcc -o gaclexample gaclexample.c -I. -L. \
-             $(OPENSSL_FLAGS) -I/usr/kerberos/include -lgridsite \
-            -lssl -lcrypto -lxml2 -lz -lm 
-
-#
-# Delegation machinery, including SOAP delegation portType. To build this
-# you need to install gSOAP and set GSOAPDIR to the directory containing
-# soapcpp2 and stdsoap2.h (unless GSOAPDIR is set already)
-#
-
-ifndef GSOAPDIR
-export GSOAPDIR=/usr/local/lib/gsoap
-endif
-
-delegation.wsdl: delegation.h
-       ls -lR $(GSOAPDIR)
-       $(GSOAPDIR)/bin/soapcpp2 -c delegation.h
-
-libstdsoap2.a: $(GSOAPDIR)/stdsoap2.c
-       gcc -c -DWITH_OPENSSL $(GSOAPDIR)/stdsoap2.c
-       ar src libstdsoap2.a stdsoap2.o
-
-gridsite-delegation.cgi: grst-delegation.c delegation.h delegation.wsdl \
-                         soapC.c soapServer.c
-       gcc $(MYCFLAGS) $(MYLDFLAGS) -o gridsite-delegation.cgi \
-            grst-delegation.c \
-             $(OPENSSL_FLAGS) -I/usr/kerberos/include -I$(GSOAPDIR)/include \
-            -DVERSION=\"$(VERSION)\" -L$(GSOAPDIR)/lib \
-            soapC.c soapServer.c -lgsoap \
-            -lgridsite -lcurl -lz -lssl -lcrypto -lxml2 -lm
-
-htproxyput: htproxyput.c delegation.h delegation.wsdl \
-            soapC.c soapServer.c
-       gcc $(MYCFLAGS) $(MYLDFLAGS) -o htproxyput \
-            htproxyput.c \
-             $(OPENSSL_FLAGS) -I/usr/kerberos/include \
-            -g -DVERSION=\"$(VERSION)\" \
-            -I$(GSOAPDIR)/include -DWITH_OPENSSL -L$(GSOAPDIR)/lib \
-            soapC.c soapClient.c -lgsoap \
-            -lgridsite -lcurl -lz -lssl -lcrypto -lxml2 -lm
-
-proxyput-example: proxyput-example.c delegation.h delegation.wsdl \
-            soapC.c soapServer.c libstdsoap2.a
-       gcc $(MYCFLAGS) $(MYLDFLAGS) -o proxyput-example \
-            proxyput-example.c \
-             $(OPENSSL_FLAGS) -I/usr/kerberos/include \
-            -g -DVERSION=\"$(VERSION)\" \
-            -I$(GSOAPDIR) -DWITH_OPENSSL \
-            soapC.c soapClient.c libstdsoap2.a \
-            -lgridsite -lcurl -lz -lssl -lcrypto -lxml2 -lm
-
-clean:
-
-#
-# Install
-#
-
-install: apidoc
-       mkdir -p $(prefix)/include \
-                 $(prefix)/lib \
-                 $(prefix)/bin \
-                 $(prefix)/sbin \
-                 $(prefix)/share/man/man1 \
-                 $(prefix)/lib/httpd/modules \
-                 $(prefix)/share/doc/gridsite-$(PATCH_VERSION)
-       cp -f ../interface/gridsite.h $(prefix)/include
-       cp -f ../interface/gridsite-gacl.h $(prefix)/include
-       cp -f urlencode $(prefix)/bin
-       cp -f findproxyfile $(prefix)/bin
-       cp -f libgridsite.a $(prefix)/lib
-       cp -f real-gridsite-admin.cgi $(prefix)/sbin
-       cp -f  libgridsite.so.$(PATCH_VERSION) $(prefix)/lib
-       ln -sf libgridsite.so.$(PATCH_VERSION) \
-                                 $(prefix)/lib/libgridsite.so
-       ln -sf libgridsite.so.$(PATCH_VERSION) \
-                                 $(prefix)/lib/libgridsite.so.$(MAJOR_VERSION)
-       ln -sf libgridsite.so.$(PATCH_VERSION) \
-                                 $(prefix)/lib/libgridsite.so.$(MINOR_VERSION)
-       cp -f doxygen/index.html \
-              $(prefix)/share/doc/gridsite-$(PATCH_VERSION)/doxygen-index.html
-       cp -f doxygen/* $(prefix)/share/doc/gridsite-$(PATCH_VERSION)
-       cp -f ../CHANGES ../README ../INSTALL ../LICENSE ../VERSION \
-               $(prefix)/share/doc/gridsite-$(PATCH_VERSION)
-       cp -f ../doc/*.html ../doc/*.conf ../doc/*.1 ../doc/*.sh \
-               $(prefix)/share/doc/gridsite-$(VERSION)
-       cp -f ../doc/*.1 $(prefix)/share/man/man1
-       gzip -f $(prefix)/share/man/man1/*.1
-       cd ../doc ; for i in *.1 ; do ../src/roffit < $$i \
-          > $(prefix)/share/doc/gridsite-$(VERSION)/$$i.html ; done
-       cp -f htcp $(prefix)/bin
-       ln -sf htcp $(prefix)/bin/htls
-       ln -sf htcp $(prefix)/bin/htll
-       ln -sf htcp $(prefix)/bin/htrm
-       ln -sf htcp $(prefix)/bin/htmkdir
-       cp -f mod_gridsite.so $(prefix)/lib/httpd/modules
-
-#
-# Distributions
-#
-
-# source files tarball
-dist:
-       mkdir -p ../gridsite-$(PATCH_VERSION)/src \
-                 ../gridsite-$(PATCH_VERSION)/doc \
-                 ../gridsite-$(PATCH_VERSION)/interface
-       cp -f ../VERSION ../README ../LICENSE ../CHANGES ../INSTALL \
-                 ../gridsite-$(PATCH_VERSION)
-       cp -f Makefile grst*.c htproxyput.c proxyput-example.c htcp.c \
-                 urlencode.c findproxyfile.c gaclexample.c mod_gridsite.c \
-                 delegation.h grst_admin.h mod_ssl-private.h \
-                 roffit gridsite.spec \
-                 Doxyfile doxygen.css doxyheader.html \
-                 ../gridsite-$(PATCH_VERSION)/src
-       cp -f ../doc/*.html ../doc/*.1 ../doc/*.conf ../doc/*.sh \
-                 ../gridsite-$(PATCH_VERSION)/doc
-       cp -f ../interface/*.h \
-                 ../gridsite-$(PATCH_VERSION)/interface
-       cd .. ; tar zcvf gridsite-$(PATCH_VERSION).src.tar.gz \
-                 gridsite-$(PATCH_VERSION)
-       rm -Rf ../gridsite-$(PATCH_VERSION)
-
-
-# binary tarball distribution for htcp users
-htcp-bin: htcp
-       mkdir -p ../htcp-bin-$(PATCH_VERSION)/bin \
-                 ../htcp-bin-$(PATCH_VERSION)/man/man1
-       cp -f ../doc/README.htcp-bin ../htcp-bin-$(PATCH_VERSION)
-       cp -f htcp ../htcp-bin-$(PATCH_VERSION)/bin
-       cp -f ../doc/htcp.1 ../doc/htrm.1 ../doc/htls.1 ../doc/htll.1 \
-              ../doc/htmkdir.1 ../htcp-bin-$(PATCH_VERSION)/man/man1
-       ln -sf htcp ../htcp-bin-$(PATCH_VERSION)/bin/htls
-       ln -sf htcp ../htcp-bin-$(PATCH_VERSION)/bin/htll
-       ln -sf htcp ../htcp-bin-$(PATCH_VERSION)/bin/htrm
-       ln -sf htcp ../htcp-bin-$(PATCH_VERSION)/bin/htmkdir
-       cd ../htcp-bin-$(VERSION) ; tar zcvf ../htcp-$(VERSION).bin.tar.gz .
-       rm -Rf ../htcp-bin-$(PATCH_VERSION)
-
-# RPM targets: build and RPMs go into subdirectories of ../RPMTMP/
-rpm: dist gridsite.spec
-       rm -Rf $(MYRPMDIR)/BUILDROOT $(MYRPMDIR)/BUILD
-       mkdir -p $(MYRPMDIR)/SOURCES $(MYRPMDIR)/SPECS $(MYRPMDIR)/BUILD \
-             $(MYRPMDIR)/SRPMS $(MYRPMDIR)/RPMS/i386 $(MYRPMDIR)/BUILDROOT
-       cp -f ../gridsite-$(PATCH_VERSION).src.tar.gz $(MYRPMDIR)/SOURCES
-       cp -f gridsite.spec $(MYRPMDIR)/SPECS
-       export MYPREFIX=/usr ; export MYVERSION=$(PATCH_VERSION) ; \
-         $(RPMCMD) --define "_topdir $(MYRPMDIR)" \
-                  -ba --buildroot $(MYRPMDIR)/BUILDROOT gridsite.spec
-
-
-wtf: 
-       pwd
-       printenv
-       ls -l
-       ls -lR /usr/local/
-
diff --git a/org.gridsite.core/src/delegation.h b/org.gridsite.core/src/delegation.h
deleted file mode 100644 (file)
index e612498..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-//gsoap ns service name:       delegation
-//gsoap ns service style:      rpc
-//gsoap ns service encoding:   encoded
-//gsoap ns service namespace:  http://www.gridsite.org/ns/delegation.wsdl
-//gsoap ns service location:   http://localhost/delegserver.cgi
-
-struct ns__putProxyResponse { } ;
-
-//gsoap ns schema namespace: urn:delegation
-int ns__getProxyReq(char *delegationID, char **request);
-int ns__putProxy(char *delegationID, char *proxy, 
-                 struct ns__putProxyResponse *unused);
diff --git a/org.gridsite.core/src/doxygen.css b/org.gridsite.core/src/doxygen.css
deleted file mode 100644 (file)
index 97ebc25..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-H1 { text-align: center; }
-CAPTION { font-weight: bold }
-A.qindex {}
-A.qindexRef {}
-A.el { text-decoration: none; font-weight: bold }
-A.elRef { font-weight: bold }
-A.code { text-decoration: none; font-weight: normal; color: #4444ee }
-A.codeRef { font-weight: normal; color: #4444ee }
-A:hover { text-decoration: none; background-color: #f2f2ff }
-DL.el { margin-left: -1cm }
-DIV.fragment { width: 100%; border: none; background-color: #eeeeee }
-DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
-TD.md { background-color: #f2f2ff; font-weight: bold; }
-TD.mdname1 { background-color: #f2f2ff; font-weight: bold; color: #602020; }
-TD.mdname { background-color: #f2f2ff; font-weight: bold; color: #602020; width: 600px; }
-DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold }
-DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller }
-XXBODY { background: white }
-TD.indexkey { 
-   background-color: #eeeeff; 
-   font-weight: bold; 
-   padding-right  : 10px; 
-   padding-top    : 2px; 
-   padding-left   : 10px; 
-   padding-bottom : 2px; 
-   margin-left    : 0px; 
-   margin-right   : 0px; 
-   margin-top     : 2px; 
-   margin-bottom  : 2px  
-}
-TD.indexvalue { 
-   background-color: #eeeeff; 
-   font-style: italic; 
-   padding-right  : 10px; 
-   padding-top    : 2px; 
-   padding-left   : 10px; 
-   padding-bottom : 2px; 
-   margin-left    : 0px; 
-   margin-right   : 0px; 
-   margin-top     : 2px; 
-   margin-bottom  : 2px  
-}
-span.keyword       { color: #008000 }
-span.keywordtype   { color: #604020 }
-span.keywordflow   { color: #e08000 }
-span.comment       { color: #800000 }
-span.preprocessor  { color: #806020 }
-span.stringliteral { color: #002080 }
-span.charliteral   { color: #008080 }
diff --git a/org.gridsite.core/src/doxyheader.html b/org.gridsite.core/src/doxyheader.html
deleted file mode 100644 (file)
index af78b52..0000000
+++ /dev/null
@@ -1 +0,0 @@
-<p><a href=http://www.gridsite.org/>GridSite</a> Version 1.1.x
diff --git a/org.gridsite.core/src/findproxyfile.c b/org.gridsite.core/src/findproxyfile.c
deleted file mode 100644 (file)
index 4485cc5..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
-   Copyright (c) 2002-4, Andrew McNab, University of Manchester
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or
-   without modification, are permitted provided that the following
-   conditions are met:
-
-     o Redistributions of source code must retain the above
-       copyright notice, this list of conditions and the following
-       disclaimer. 
-     o Redistributions in binary form must reproduce the above
-       copyright notice, this list of conditions and the following
-       disclaimer in the documentation and/or other materials
-       provided with the distribution. 
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-   CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-   BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-   TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-   ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-   POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef VERSION
-#define VERSION "0.0.0"
-#endif
-
-#define _GNU_SOURCE
-
-#include <pwd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <getopt.h>
-
-#include "gridsite.h"
-  
-void printsyntax(char *argv0)
-{
-  char *p;
-
-  p = rindex(argv0, '/');
-  if (p != NULL) ++p;
-  else           p = argv0;
-
-  fprintf(stderr, "%s [--outsidecache] [--proxycache=PATH] "
-                  "[--delegation-id=DELEGATION-ID] [--user-dn=USER-DN]\n"
-                  "(Version: %s)\n", p, VERSION);
-}
-  
-#define GRST_PROXY_CACHE "/var/www/proxycache"
-  
-int main(int argc, char *argv[])
-{
-  char  *delegation_id = "_", *proxycache = "", *user_dn = "",
-        *proxyfile = NULL;        
-  int    c, outsidecache = 0, verbose = 0, option_index;
-  struct option long_options[] = {      {"verbose",            0, 0, 'v'},
-                                        {"outsidecache",       0, 0, 0},
-                                        {"proxycache",         1, 0, 0},
-                                        {"delegation-id",      1, 0, 0},
-                                        {"user-dn",            1, 0, 0},
-                                        {0, 0, 0, 0}  };
-
-  if (argc == 1)
-    {
-      printsyntax(argv[0]);
-      return 0;
-    }
-
-  while (1)
-       {
-         option_index = 0;
-                                                                                
-         c = getopt_long(argc, argv, "v", long_options, &option_index);
-
-         if      (c == -1) break;
-         else if (c == 0)
-           {
-             if      (option_index == 1) outsidecache  = 1;
-             else if (option_index == 2) proxycache    = optarg;
-             else if (option_index == 3) delegation_id = optarg;
-             else if (option_index == 4) user_dn       = optarg;
-           }
-         else if (c == 'v') ++verbose;
-       }
-       
-  if (*user_dn != '\0') /* try to find in proxy cache */
-    {
-      if ((proxycache == NULL) || (*proxycache == '\0'))
-        proxycache = getenv("GRST_PROXY_CACHE");
-
-      if ((proxycache == NULL) || (*proxycache == '\0'))
-        proxycache = GRST_PROXY_CACHE;
-
-      proxyfile = GRSTx509CachedProxyFind(proxycache, delegation_id, user_dn);
-    }
-    
-  if (((proxyfile == NULL) || (*proxyfile == '\0')) && outsidecache)
-    {
-      proxyfile = GRSTx509FindProxyFileName();
-    }
-
-  if ((proxyfile != NULL) && (*proxyfile != '\0'))
-    {
-      puts(proxyfile);
-      return 0;   
-    }
-    
-  fputs("No proxy file found\n", stderr);
-    
-  return 1;
-}
diff --git a/org.gridsite.core/src/gaclexample.c b/org.gridsite.core/src/gaclexample.c
deleted file mode 100644 (file)
index 5ad29b7..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
-   Copyright (c) 2002-3, Andrew McNab, University of Manchester
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or
-   without modification, are permitted provided that the following
-   conditions are met:
-
-     o Redistributions of source code must retain the above
-       copyright notice, this list of conditions and the following
-       disclaimer. 
-     o Redistributions in binary form must reproduce the above
-       copyright notice, this list of conditions and the following
-       disclaimer in the documentation and/or other materials
-       provided with the distribution. 
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-   CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-   BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-   TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-   ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-   POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*---------------------------------------------------------------*
- * For more about GridSite: http://www.gridsite.org/             *
- *---------------------------------------------------------------*/
-
-/*
-   Example program using GACL 
-
-   Build with:
-   
-    gcc -o gaclexample gaclexample.c -L. -I. -lgridsite -lxml2 -lz -lm
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <gridsite.h>
-
-int main()
-{
-  GRSTgaclCred  *cred, *usercred;
-  GRSTgaclEntry *entry;
-  GRSTgaclAcl   *acl1, *acl2;
-  GRSTgaclUser  *user;
-  GRSTgaclPerm   perm0, perm1, perm2;
-  FILE          *fp;
-
-  /* must initialise GACL before using it */
-  
-  GRSTgaclInit();
-
-  /* build up an ACL, starting with a credential */
-
-  cred = GRSTgaclCredNew("person");
-
-  GRSTgaclCredAddValue(cred, "dn", "/O=Grid/CN=Mr Grid Person");
-  
-  /* create an entry to put it in */ 
-   
-  entry = GRSTgaclEntryNew();
-  
-  /* add the credential to it */
-  
-  GRSTgaclEntryAddCred(entry, cred);
-
-  /* add another credential */
-  
-  cred = GRSTgaclCredNew("dn-list");
-  GRSTgaclCredAddValue(cred, "url", "example-dn-list");
-  GRSTgaclEntryAddCred(entry, cred);
-
-  fp = fopen("example-dn-list", "w");
-  fputs("/O=Grid/CN=Mr Grid Person\n", fp);
-  fclose(fp);  
-  /* associate some permissions and denials to the credential */  
-  
-  GRSTgaclEntryAllowPerm( entry, GRST_PERM_READ);
-  GRSTgaclEntryAllowPerm( entry, GRST_PERM_WRITE);
-  GRSTgaclEntryAllowPerm( entry, GRST_PERM_ADMIN);
-  GRSTgaclEntryDenyPerm(  entry, GRST_PERM_ADMIN);
-  GRSTgaclEntryDenyPerm(  entry, GRST_PERM_LIST);
-
-  perm0 = GRST_PERM_READ | GRST_PERM_WRITE;
-  
-  printf("test perm should be %d\n", perm0);
-
-  /* create a new ACL and add the entry to it */
-  
-  acl1 = GRSTgaclAclNew();
-  
-  GRSTgaclAclAddEntry(acl1, entry);
-
-  /* create a GRSTgaclUser to compare with the ACL */
-
-  usercred = GRSTgaclCredNew("person");
-  
-  GRSTgaclCredAddValue(usercred, "dn", "/O=Grid/CN=Mr Grid Person");
-   
-  user = GRSTgaclUserNew(usercred);
-  
-  GRSTgaclUserSetDNlists(user, getcwd(NULL, 0));
-  printf("DN Lists dir %s\n", getcwd(NULL, 0));
-  
-//  putenv("GRST_DN_LISTS=.");
-    
-  perm1 = GRSTgaclAclTestUser(acl1, user);
-
-  printf("test /O=Grid/CN=Mr Grid Person in acl = %d\n", perm1);
-
-  /* print and save the whole ACL */
-
-  GRSTgaclAclPrint(acl1, stdout);
-  
-  GRSTgaclAclSave(acl1, "example.gacl");
-
-  puts("gridacl.out saved");
-
-  puts("");
-
-  /* load the ACL back off the disk, print and test it */
-
-  acl2 = GRSTgaclAclLoadFile("example.gacl");
-
-  puts("gridacl.out loaded");
-  
-  if (acl2 != NULL) GRSTgaclAclPrint(acl2, stdout); else puts("acl2 is NULL");
-
-  perm2 = GRSTgaclAclTestUser(acl2, user);
-
-  printf("test /O=Grid/CN=Mr Grid Person in acl = %d\n", perm2);
-
-  if (perm1 != perm0) return 1;
-  if (perm2 != perm0) return 2;
-  
-  return 0;
-}
diff --git a/org.gridsite.core/src/gridsite.spec b/org.gridsite.core/src/gridsite.spec
deleted file mode 100644 (file)
index 877f25d..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-Name: gridsite
-Version: %(echo ${MYVERSION:-1.1.x})
-Release: 2
-Summary: GridSite
-Copyright: Modified BSD
-Group: System Environment/Daemons
-Source: %{name}-%{version}.src.tar.gz
-Prefix: %(echo ${MYPREFIX:-/usr})
-URL: http://www.gridsite.org/
-Vendor: GridPP
-#Requires: libxml2,curl-ssl,mod_ssl
-#Buildrequires: libxml2-devel,curl-ssl-devel,httpd-devel
-Packager: Andrew McNab <Andrew.McNab@man.ac.uk>
-
-%description
-GridSite adds GSI, VOMS and GACL support to Apache 2.0 (mod_gridsite),
-a library for manipulating these technologies (libgridsite), and CGI
-programs for interactive management of HTTP(S) servers (gridsite-admin.cgi)
-
-See %(echo ${MYPREFIX:-/usr})/share/doc/gridsite-%{version} and
-http://www.gridsite.org/ for details.
-
-%package -n htcp
-Group: Applications/Internet
-Summary: HTTP(S) read/write client
-#Requires: curl-ssl
-
-%description -n htcp
-htcp is a client to fetch files or directory listings from remote
-servers using HTTP or HTTPS, or to put or delete files or directories
-onto remote servers using HTTPS. htcp is similar to scp(1), but uses
-HTTP/HTTPS rather than ssh as its transfer protocol.
-
-%prep
-
-%setup
-
-%build
-cd src
-make prefix=$RPM_BUILD_ROOT/%(echo ${MYPREFIX:-/usr})
-
-%install
-cd src
-make install prefix=$RPM_BUILD_ROOT/%(echo ${MYPREFIX:-/usr})
-
-%post
-/sbin/ldconfig
-ln -sf %(echo ${MYPREFIX:-/usr})/share/doc/gridsite-%{version} \
- %(echo ${MYPREFIX:-/usr})/share/doc/gridsite
-
-%postun
-rm -f %(echo ${MYPREFIX:-/usr})/share/doc/gridsite
-
-%files
-%attr(-, root, root) %(echo ${MYPREFIX:-/usr})/lib/libgridsite.so.%{version}
-%attr(-, root, root) %(echo ${MYPREFIX:-/usr})/lib/libgridsite.so
-%attr(-, root, root) %(echo ${MYPREFIX:-/usr})/bin/urlencode
-%attr(-, root, root) %(echo ${MYPREFIX:-/usr})/bin/findproxyfile
-%attr(-, root, root) %(echo ${MYPREFIX:-/usr})/share/doc/gridsite-%{version}
-%attr(-, root, root) %(echo ${MYPREFIX:-/usr})/share/man/man1/urlencode.1.gz
-%attr(-, root, root) %(echo ${MYPREFIX:-/usr})/share/man/man1/findproxyfile.1.gz
-%attr(-, root, root) %(echo ${MYPREFIX:-/usr})/include/gridsite.h
-%attr(-, root, root) %(echo ${MYPREFIX:-/usr})/include/gridsite-gacl.h
-%attr(-, root, root) %(echo ${MYPREFIX:-/usr})/lib/libgridsite.a
-%attr(-, root, root) %(echo ${MYPREFIX:-/usr})/lib/httpd/modules/mod_gridsite.so
-%attr(-, root, root) %(echo ${MYPREFIX:-/usr})/sbin/real-gridsite-admin.cgi
-
-%files -n htcp
-%attr(-, root, root) %(echo ${MYPREFIX:-/usr})/bin/htcp
-%attr(-, root, root) %(echo ${MYPREFIX:-/usr})/bin/htls
-%attr(-, root, root) %(echo ${MYPREFIX:-/usr})/bin/htll
-%attr(-, root, root) %(echo ${MYPREFIX:-/usr})/bin/htrm
-%attr(-, root, root) %(echo ${MYPREFIX:-/usr})/bin/htmkdir
-%attr(-, root, root) %(echo ${MYPREFIX:-/usr})/share/man/man1/htcp.1.gz
-%attr(-, root, root) %(echo ${MYPREFIX:-/usr})/share/man/man1/htrm.1.gz
-%attr(-, root, root) %(echo ${MYPREFIX:-/usr})/share/man/man1/htls.1.gz
-%attr(-, root, root) %(echo ${MYPREFIX:-/usr})/share/man/man1/htll.1.gz
-%attr(-, root, root) %(echo ${MYPREFIX:-/usr})/share/man/man1/htmkdir.1.gz
diff --git a/org.gridsite.core/src/grst-delegation.c b/org.gridsite.core/src/grst-delegation.c
deleted file mode 100644 (file)
index 2a8a9b2..0000000
+++ /dev/null
@@ -1,295 +0,0 @@
-/*
-   Copyright (c) 2002-4, Andrew McNab, University of Manchester
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or
-   without modification, are permitted provided that the following
-   conditions are met:
-
-     o Redistributions of source code must retain the above
-       copyright notice, this list of conditions and the following
-       disclaimer. 
-     o Redistributions in binary form must reproduce the above
-       copyright notice, this list of conditions and the following
-       disclaimer in the documentation and/or other materials
-       provided with the distribution. 
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-   CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-   BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-   TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-   ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-   POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*---------------------------------------------------------------------------*
- * This program is part of GridSite: http://www.gridpp.ac.uk/authz/gridsite/ *
- *---------------------------------------------------------------------------*/
-
-#ifndef VERSION
-#define VERSION "0.0.1"
-#endif
-
-#define _GNU_SOURCE
-#include <stdio.h>
-
-#include <time.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <unistd.h>
-#include <dirent.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include <openssl/rsa.h>
-#include <openssl/pem.h>
-#include <openssl/err.h>
-#include <openssl/evp.h>
-#include <openssl/bio.h>    
-#include <openssl/des.h>    
-#include <openssl/rand.h>
-
-#include <curl/curl.h>
-/* #include <gacl.h> */
-
-#include "gridsite.h"
-
-#include "soapH.h"
-#include "delegation.nsmap"
-
-#include <time.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <unistd.h>
-#include <dirent.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include <openssl/rsa.h>
-#include <openssl/pem.h>
-#include <openssl/err.h>
-#include <openssl/evp.h>
-#include <openssl/bio.h>    
-#include <openssl/des.h>    
-#include <openssl/rand.h>
-
-#define GRST_KEYSIZE       512
-#define GRST_PROXYCACHE    "/../proxycache/"
-#define GRST_SUPPORT_G_HTTPS
-
-#ifdef GRST_SUPPORT_G_HTTPS
-void GRSThttpError(char *status)
-{
-  printf("Status: %s\n", status);
-  printf("Server-CGI: GridSite %s\n", VERSION);
-  printf("Content-Length: %d\n", 2 * strlen(status) + 58);
-  puts("Content-Type: text/html\n");
-   
-  printf("<head><title>%s</title></head>\n", status);
-  printf("<body><h1   >%s</h1   ></body>\n", status);
-   
-  exit(0);
-}
-
-int GRSTmethodPutProxy(char *delegation_id, char *user_dn)
-/* return 0 on success; non-zero on error */
-{
-  int   c, len = 0, i;
-  char *docroot, *contentlen, *contenttype, *proxychain, *proxydir;
-  FILE *fp;
-
-  if (((contenttype = getenv("CONTENT_TYPE")) == NULL) ||
-       (strcmp(contenttype, "application/x-x509-user-cert-chain") != 0))
-                               return 2;
-  
-  contentlen = getenv("CONTENT_LENGTH");
-  if (contentlen == NULL) return 2;
-  len = atoi(contentlen);
-  
-  if ((delegation_id == NULL) || (*delegation_id == '\0')) 
-                                                    delegation_id = "_";
-  
-  docroot = getenv("DOCUMENT_ROOT");
-  asprintf(&proxydir, "%s/%s", docroot, GRST_PROXYCACHE);
-
-  if ((user_dn == NULL) || (user_dn[0] == '\0') ||
-      (GRSTx509CacheProxy(proxydir, delegation_id, user_dn, proxychain) 
-                                                      != GRST_RET_OK))
-    {
-      return GRST_RET_FAILED;
-    }
-    
-  free(proxydir);
-      
-  return GRST_RET_OK;
-}
-#endif
-
-int main(int argn, char *argv[])
-{
-  char      *docroot, *method, *request, *p, *client_dn, *user_dn,
-            *delegation_id, *reqtxt, *proxydir;
-  struct soap soap;
-  
-  method  = getenv("REQUEST_METHOD");
-  if (strcmp(method, "POST") == 0)
-    {
-      soap_init(&soap);
-      soap_serve(&soap); /* CGI application */
-      return 0;
-    }
-    
-#ifdef GRST_SUPPORT_G_HTTPS
-  docroot = getenv("DOCUMENT_ROOT");
-
-  request = strdup(getenv("REQUEST_URI"));
-  p = index(request, '?');
-  if (p != NULL) *p = '\0';
-
-      
-  /* non HTTP POST methods - ie special G-HTTPS methods */
-
-  delegation_id = getenv("HTTP_DELEGATION_ID");
-  if ((delegation_id == NULL) || (*delegation_id == '\0')) delegation_id = "_";
-
-  user_dn = NULL;
-  client_dn = getenv("SSL_CLIENT_S_DN"); 
-  if (client_dn != NULL) 
-    {
-      user_dn = strdup(client_dn);
-
-      /* we assume here that mod_ssl has verified proxy chain already ... */
-
-      p = strstr(user_dn, "/CN=proxy");
-      if (p != NULL) *p = '\0';      
-
-      p = strstr(user_dn, "/CN=limited proxy");
-      if (p != NULL) *p = '\0';      
-    }
-  
-  if (user_dn == NULL) /* all methods require client auth */
-    {
-      GRSThttpError("403 Forbidden");
-    }  
-  else if (strcmp(method, "GET-PROXY-REQ") == 0)
-    {
-      docroot = getenv("DOCUMENT_ROOT");
-      asprintf(&proxydir, "%s/%s", docroot, GRST_PROXYCACHE);
-    
-      if (GRSTx509MakeProxyRequest(&reqtxt, proxydir,
-                                   delegation_id, user_dn) == 0)
-        {
-          puts("Status: 200 OK");
-          puts("Content-Type: application/x-x509-cert-request");
-          printf("Content-Length: %d\n\n", strlen(reqtxt));
-          fputs(reqtxt, stdout);
-          free(proxydir);
-          return 0;
-        }
-      
-      puts("Status: 500 Internal Server Error\n");
-      free(proxydir);
-      return 0;
-    }  
-  else if (strcmp(method, "PUT-PROXY-CERT") == 0)
-    {
-      if (GRSTmethodPutProxy(delegation_id, user_dn) == 0)
-        {
-          puts("Status: 200 OK\n");
-          return 0;
-        }
-        
-      puts("Status: 500 Internal Server Error\n");
-      return 0;
-    }  
-  else 
-    {
-      GRSThttpError("501 Method Not Implemented");
-    }
-#endif
-}
-
-int ns__getProxyReq(struct soap *soap, char *delegation_id,                                        
-                                       char **request)
-{ 
-  char *p, *client_dn, *user_dn, *docroot, *proxydir;
-  
-  user_dn = NULL;
-  client_dn = getenv("SSL_CLIENT_S_DN"); 
-  if (client_dn != NULL) 
-    {
-      user_dn = strdup(client_dn);
-
-      /* we assume here that mod_ssl has verified proxy chain already ... */
-
-      p = strstr(user_dn, "/CN=proxy");
-      if (p != NULL) *p = '\0';      
-
-      p = strstr(user_dn, "/CN=limited proxy");
-      if (p != NULL) *p = '\0';      
-    }
-
-  if ((delegation_id == NULL) || (*delegation_id == '\0')) delegation_id = "_";
-  
-  docroot = getenv("DOCUMENT_ROOT");
-  asprintf(&proxydir, "%s/%s", docroot, GRST_PROXYCACHE);
-
-  if ((user_dn != NULL) && (user_dn[0] != '\0') && 
-      (GRSTx509MakeProxyRequest(request, proxydir,  
-                                delegation_id, user_dn) == 0))
-    {
-      return SOAP_OK;
-    }
-      
-  return SOAP_ERR;
-} 
-
-int ns__putProxy(struct soap *soap, char *delegation_id, 
-                                    char *proxy,
-                                    struct ns__putProxyResponse *unused)
-{ 
-  int   fd, c, len = 0, i;
-  char *docroot, *proxydir, *p, *client_dn, *user_dn;
-  
-  user_dn = NULL;
-  client_dn = getenv("SSL_CLIENT_S_DN"); 
-  if (client_dn != NULL) 
-    {
-      user_dn = strdup(client_dn);
-
-      /* we assume here that mod_ssl has verified proxy chain already ... */
-
-      p = strstr(user_dn, "/CN=proxy");
-      if (p != NULL) *p = '\0';      
-
-      p = strstr(user_dn, "/CN=limited proxy");
-      if (p != NULL) *p = '\0';      
-    }
-  
-  if ((delegation_id == NULL) || (*delegation_id == '\0')) 
-                                                    delegation_id = "_";
-  
-  docroot = getenv("DOCUMENT_ROOT");
-  asprintf(&proxydir, "%s/%s", docroot, GRST_PROXYCACHE);
-
-  if ((user_dn == NULL) || (user_dn[0] == '\0') ||
-      (GRSTx509CacheProxy(proxydir, delegation_id, user_dn, proxy) 
-                                                      != GRST_RET_OK))
-    {
-      return SOAP_ERR;
-    }
-      
-  return SOAP_OK;
-} 
-
diff --git a/org.gridsite.core/src/grst_admin.h b/org.gridsite.core/src/grst_admin.h
deleted file mode 100644 (file)
index cddc415..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-   Copyright (c) 2002-3, Andrew McNab and Shiv Kaushal, 
-   University of Manchester. All rights reserved.
-
-   Redistribution and use in source and binary forms, with or
-   without modification, are permitted provided that the following
-   conditions are met:
-
-     o Redistributions of source code must retain the above
-       copyright notice, this list of conditions and the following
-       disclaimer. 
-     o Redistributions in binary form must reproduce the above
-       copyright notice, this list of conditions and the following
-       disclaimer in the documentation and/or other materials
-       provided with the distribution. 
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-   CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-   BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-   TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-   ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-   POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*------------------------------------------------------------------*
- * This program is part of GridSite: http://www.gridsite.org/       *
- *------------------------------------------------------------------*/
-
-void  GRSThttpError(char *);
-void  adminfooter(GRSThttpBody *, char *, char *, char *, char *);
-int   GRSTstrCmpShort(char *, char *);
-char *makevfilename(char *, size_t, char *);
-
-/*CGI GACL - Edit interface functions*/
-void show_acl(int admin, GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file);
-void new_entry_form(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file);
-void new_entry(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file);
-void del_entry(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file);
-void edit_entry_form(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file);
-void edit_entry(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file);
-void add_cred_form(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file);
-void add_cred(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file);
-void del_cred(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file);
-void del_entry_sure(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file);
-void del_cred_sure(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file);
-
-/*Functions producing messages*/
-//void error(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file);
-void admin_continue(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file, GRSThttpBody *bp);
-
diff --git a/org.gridsite.core/src/grst_admin_file.c b/org.gridsite.core/src/grst_admin_file.c
deleted file mode 100644 (file)
index f89a004..0000000
+++ /dev/null
@@ -1,1571 +0,0 @@
-/*
-   Copyright (c) 2002-3, Andrew McNab, University of Manchester
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or
-   without modification, are permitted provided that the following
-   conditions are met:
-
-     o Redistributions of source code must retain the above
-       copyright notice, this list of conditions and the following
-       disclaimer. 
-     o Redistributions in binary form must reproduce the above
-       copyright notice, this list of conditions and the following
-       disclaimer in the documentation and/or other materials
-       provided with the distribution. 
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-   CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-   BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-   TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-   ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-   POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*------------------------------------------------------------------*
- * This program is part of GridSite: http://www.gridsite.org/       *
- *------------------------------------------------------------------*/
-
-#ifndef VERSION
-#define VERSION "x.x.x"
-#endif
-
-#include <stdio.h>
-#include <time.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <unistd.h>
-#include <dirent.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <fcntl.h>
-
-// when porting: remember that sendfile() is very OS-specific!
-#include <sys/sendfile.h>
-
-#include <gridsite.h>
-
-#include "grst_admin.h"
-
-char *storeuploadfile(char *boundary, int *bufferused)
-{
-// rewrite this to copy whole POSTed stdin HTTP body to disk then 
-// mmap() and pick apart? How to deal with 100MB uploaded files, say?
-
-  char *filebuffer = NULL;
-  int   bufferlen = 0, c, boundarylen;
-
-  *bufferused = 0;
-  boundarylen = strlen(boundary);
-
-  while ((c = getchar()) != EOF)
-       {
-         if (*bufferused > 1024*1024*100) return NULL;
-       
-         ++(*bufferused);
-   
-         if (*bufferused > bufferlen)
-           {
-             bufferlen = bufferlen + 1000;
-             filebuffer = realloc(filebuffer, (size_t) bufferlen);
-           }
-
-         filebuffer[*bufferused - 1] = c;         
-
-         if ( (*bufferused >= boundarylen + 4)    &&
-              (boundary[boundarylen-1] == c) && 
-              (boundary[boundarylen-2] == filebuffer[*bufferused - 2]) &&
-              (strncmp(boundary, &filebuffer[*bufferused - boundarylen],
-                                                       boundarylen) == 0))
-             {
-               *bufferused = *bufferused - boundarylen - 4;
-
-               if (filebuffer == NULL) return strdup("");
-               else return filebuffer;
-             }
-       }
-
-  return NULL;
-}
-
-void uploadfile(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, 
-                char *dir_uri, char *admin_file)
-{
-  char  *boundary, *p, oneline[200], *filename = NULL, 
-         tmpfilename[256], *filebuffer = NULL, *filepath,
-        *vfile, *dir_path_vfile;         
-  int    mimestate, bufferused = 0, itworked = 0;
-  FILE   *fp;
-  GRSThttpBody bp;
-
-#define MIMESTUNKNOWN  1
-#define MIMESTUPLOAD   2
-#define MIMESTFILENM   3
-
-  if (!GRSTgaclPermHasWrite(perm)) GRSThttpError("403 Forbidden");
-
-  p = getenv("CONTENT_TYPE");
-  boundary = &p[30];
-    
-  mimestate = MIMESTUNKNOWN;
-  
-  while (fgets(oneline, sizeof(oneline), stdin) != NULL)
-     {
-       if (*oneline == 13) // MIME has CR/LF line breaks, CR=13
-         {
-           if      (mimestate == MIMESTUPLOAD)
-             {
-               filebuffer = storeuploadfile(boundary, &bufferused);
-               mimestate = MIMESTUNKNOWN;
-             }
-           else if (mimestate == MIMESTFILENM)
-             {
-               fgets(tmpfilename, sizeof(tmpfilename), stdin);
-               if (*tmpfilename != 13)
-                 {
-                   p = index(tmpfilename, 13);
-                   *p = '\0';
-                   filename = strdup(tmpfilename);
-                 }
-               mimestate = MIMESTUNKNOWN;
-             }
-         }
-       else if (GRSTstrCmpShort(oneline,             
-            "Content-Disposition: form-data; name=\"uploadfile\"; filename=\"") 
-                == 0)
-         {
-           mimestate = MIMESTUPLOAD;
-           if (filename == NULL) 
-             {
-               filename = strdup(&oneline[61]);
-
-               p = rindex(&oneline[61], '\\');
-               if (p != NULL) { ++p ; filename = p; }
-
-               p = rindex(&oneline[61], '/');
-               if (p != NULL) { ++p ; filename = p; }
-                                  
-               p = index(filename, '"');
-               if (p != NULL) *p = '\0'; 
-             }
-         }
-       else if (GRSTstrCmpShort(oneline,
-                 "Content-Disposition: form-data; name=\"file\"") == 0)
-         {
-           mimestate = MIMESTFILENM;           
-         }      
-     }
-
-  if ((filebuffer != NULL) && (bufferused >= 0))
-    {
-      if (filename == NULL) GRSThttpError("403 Forbidden");
-      else if ((index(filename, '/') != NULL) ||
-               (strcmp(filename, GRST_ACL_FILE) == 0))
-        {
-          puts("Status: 403 Forbidden filename\nContent-Type: text/html");
-                                                                                
-          GRSThttpBodyInit(&bp);
-                                                                   
-          GRSThttpPrintf(&bp,"<title>Forbidden filename %s</title>\n", filename);
-          GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE);
-                                 
-          GRSThttpPrintf(&bp, "<h1 align=center>Forbidden filename %s</h1>\n",
-                         filename);
-                                                                                
-          GRSThttpPrintf(&bp,
-                      "<p align=center>New file names cannot include slashes "
-                      "or use the reserved ACL name, %s\n", GRST_ACL_FILE);
-                                                                                
-          GRSThttpPrintf(&bp,"<p align=center>"
-                     "<a href=\"%s%s?cmd=managedir\">Return to "
-                     "directory listing</a>\n", dir_uri, admin_file);
-                                                                                
-          adminfooter(&bp, dn, help_uri, dir_uri, admin_file);
-          GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE);
-                                                                                
-          GRSThttpWriteOut(&bp);
-          return;
-        }
-      else
-        {
-          vfile = makevfilename(filename, bufferused, dn);
-          asprintf(&dir_path_vfile, "%s/%s", dir_path, vfile);
-
-          fp = fopen(dir_path_vfile, "w");
-          if (fp != NULL)
-            {              
-              if ((fwrite(filebuffer, 
-                          sizeof(char), bufferused, fp) == bufferused) &&
-                  (fclose(fp) == 0)) 
-                {                  
-                  asprintf(&filepath, "%s/%s", dir_path, filename);
-          
-                  unlink(filepath); /* this can fail ok */
-          
-                  itworked = (link(dir_path_vfile, filepath) == 0);
-                }
-            }
-        }
-                 
-      free((void *) filebuffer);
-    }
-    
-  if (itworked) 
-    {
-      printf("Status: 302 Moved Temporarily\nContent-Length: 0\n"
-                  "Location: %s%s?cmd=managedir\n\n", dir_uri, admin_file);
-      return;
-    }
-
-  puts("Status: 500 Failed trying to upload\nContent-Type: text/html");
-  
-  GRSThttpBodyInit(&bp);
-
-  GRSThttpPrintf(&bp, "<title>Failed to upload</title>\n");
-
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE);
-
-  GRSThttpPrintf(&bp, "<h1 align=center>Failed to upload</h1>\n");
-  
-  GRSThttpPrintf(&bp, "<p align=center>GridSite considers you are authorized "
-                      "to upload the file, but the upload failed. This is "
-                      "probably a web server or operating system level "
-                      "misconfiguration. Consult the site administrator.");
-
-  GRSThttpPrintf(&bp,"<p align=center>"
-                     "<a href=\"%s%s?cmd=managedir\">Return to "
-                     "directory listing</a>\n", dir_uri, admin_file);
-  
-  adminfooter(&bp, dn, help_uri, dir_uri, admin_file);
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE);
-
-  GRSThttpWriteOut(&bp);
-}
-
-void deletefileaction(char *dn, GRSTgaclPerm perm, char *help_uri, 
-                      char *dir_path, char *file, char *dir_uri, 
-                      char *admin_file)
-{
-  int            fd, numfiles;
-  char          *dir_path_file, *dir_path_vfile, *p, *vfile, *dnlistsuri, 
-                *fulluri, *server_name, *realfile;
-  struct stat    statbuf;
-  GRSThttpBody   bp; 
-  struct dirent *subdirfile_ent;
-  DIR           *subDIR;
-
-  if (((strcmp(file, GRST_ACL_FILE) != 0) && !GRSTgaclPermHasWrite(perm)) ||
-      ((strcmp(file, GRST_ACL_FILE) == 0) && !GRSTgaclPermHasAdmin(perm)))
-                                               GRSThttpError("403 Forbidden");
-
-  dnlistsuri = getenv("GRST_DN_LISTS_URI");
-  if (dnlistsuri == NULL) dnlistsuri = getenv("REDIRECT_GRST_DN_LISTS_URI");
-
-  if ((dnlistsuri != NULL) && 
-      (strncmp(dnlistsuri, dir_uri, strlen(dnlistsuri)) == 0))
-       realfile = GRSThttpUrlEncode(file);
-  else if (index(file, '/') != NULL) GRSThttpError("403 Forbidden");
-  else realfile = file;
-
-  dir_path_file = malloc(strlen(dir_path) + strlen(realfile) + 2);
-  
-  strcpy(dir_path_file, dir_path);
-  strcat(dir_path_file, "/");
-  strcat(dir_path_file, realfile);
-
-  if ((stat(dir_path_file, &statbuf) == 0) && S_ISDIR(statbuf.st_mode))
-    {
-      subDIR = opendir(dir_path_file);
-      if (subDIR == NULL) numfiles = 99; /* stop deletion */
-      else
-        {
-          numfiles = 0; 
-          while ((subdirfile_ent = readdir(subDIR)) != NULL) 
-             if (subdirfile_ent->d_name[0] != '.') ++numfiles;
-             else if (strncmp(subdirfile_ent->d_name, 
-                              GRST_ACL_FILE,
-                              sizeof(GRST_ACL_FILE)) == 0) ++numfiles;
-          closedir(subDIR);
-        }
-                     
-      if (numfiles == 0)
-        {
-          vfile = makevfilename(file, 0, dn);
-          dir_path_vfile = malloc(strlen(dir_path) + strlen(vfile) + 2);  
-          strcpy(dir_path_vfile, dir_path);
-          strcat(dir_path_vfile, "/");
-          strcat(dir_path_vfile, vfile);
-          
-          if (rename(dir_path_file, dir_path_vfile) == 0)
-            {
-              printf("Status: 302 Moved Temporarily\nContent-Length: 0\n"
-                     "Location: %s%s?cmd=managedir\n\n", dir_uri, admin_file);
-              return; 
-            }
-        }
-    }
-  else if (unlink(dir_path_file) == 0)
-    {
-      if (strcmp(file, GRST_ACL_FILE) != 0)
-        {
-          vfile = makevfilename(file, 0, dn);
-          dir_path_file = malloc(strlen(dir_path) + strlen(vfile) + 2);  
-          strcpy(dir_path_file, dir_path);
-          strcat(dir_path_file, "/");
-          strcat(dir_path_file, vfile);
-
-          fd = open(dir_path_file, O_WRONLY | O_CREAT);
-          if (fd != -1) close(fd);           
-        }
-
-      printf("Status: 302 Moved Temporarily\nContent-Length: 0\n"
-             "Location: %s%s?cmd=managedir\n\n", dir_uri, admin_file);
-          
-      return;
-    }
-
-  puts("Status: 500 Failed trying to delete\nContent-Type: text/html");
-  
-  GRSThttpBodyInit(&bp);
-
-  GRSThttpPrintf(&bp, "<title>Error deleting %s%s</title>\n", dir_uri, file);
-
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE);
-
-  GRSThttpPrintf(&bp, "<h1 align=center>Error deleting %s%s</h1>\n", 
-                      dir_uri, file);
-  
-  GRSThttpPrintf(&bp, "<p align=center>GridSite considers you are authorized "
-                      "to delete %s, but the delete failed. This is "
-                      "probably a web server or operating system level "
-                      "misconfiguration. Consult the site administrator.",
-                      file);
-
-  GRSThttpPrintf(&bp,"<p align=center>"
-                     "<a href=\"%s%s?cmd=managedir\">Return to "
-                     "directory listing</a>\n", dir_uri, admin_file);
-  
-  adminfooter(&bp, dn, help_uri, dir_uri, admin_file);
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE);
-
-  GRSThttpWriteOut(&bp);
-}                    
-
-void deletefileform(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path,
-                    char *file, char *dir_uri, char *admin_file)
-{
-  GRSThttpBody bp; 
-
-  if (!GRSTgaclPermHasWrite(perm)) GRSThttpError("403 Forbidden");
-
-  puts("Status: 200 OK\nContent-Type: text/html");
-  
-  GRSThttpBodyInit(&bp);
-
-  GRSThttpPrintf(&bp, "<title>Delete %s</title>\n", file);
-
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE);
-
-  GRSThttpPrintf(&bp, "<h1 align=center>Delete %s</h1>\n", file);
-  
-  GRSThttpPrintf(&bp,"<form action=\"%s%s\" method=post>\n",dir_uri,admin_file);
-  GRSThttpPrintf(&bp,"<h2 align=center>Do you really want to delete %s?", file);
-  GRSThttpPrintf(&bp,"<p align=center><input type=submit value=\"Yes, delete %s\"></h2>\n", file);
-  GRSThttpPrintf(&bp,"<input type=hidden name=file value=\"%s\">\n", file);
-  GRSThttpPrintf(&bp,"<input type=hidden name=cmd value=deleteaction>\n");
-  GRSThttpPrintf(&bp,"</form>\n");
-
-  GRSThttpPrintf(&bp,"<p align=center>Or "
-                     "<a href=\"%s%s?cmd=managedir\">return to "
-                     "directory listing</a>\n", dir_uri, admin_file);
-  
-  adminfooter(&bp, dn, help_uri, dir_uri, admin_file);
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE);
-
-  GRSThttpWriteOut(&bp);
-}                    
-
-void renameform(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path,
-                    char *file, char *dir_uri, char *admin_file)
-{
-  GRSThttpBody bp; 
-
-  if (!GRSTgaclPermHasWrite(perm)) GRSThttpError("403 Forbidden");
-
-  puts("Status: 200 OK\nContent-Type: text/html");
-  
-  GRSThttpBodyInit(&bp);
-
-  GRSThttpPrintf(&bp, "<title>Rename %s</title>\n", file);
-
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE);
-
-  GRSThttpPrintf(&bp, "<h1 align=center>Rename %s%s</h1>\n", dir_uri, file);
-  
-  GRSThttpPrintf(&bp,"<form action=\"%s%s\" method=post>\n",dir_uri,admin_file);
-  GRSThttpPrintf(&bp,"<h2 align=center>What do you want to rename %s to?</h2>", file);
-  GRSThttpPrintf(&bp,"<input type=hidden name=file value=\"%s\">\n", file);
-  GRSThttpPrintf(&bp,"<p align=center>New name: <input type=text name=newfile value=\"%s\">\n", file);
-  GRSThttpPrintf(&bp,"<input type=submit value=\"Rename\">\n");
-  GRSThttpPrintf(&bp,"<input type=hidden name=cmd value=renameaction>\n");
-  GRSThttpPrintf(&bp,"</form>\n");
-
-  GRSThttpPrintf(&bp,"<p align=center>Or "
-                     "<a href=\"%s%s?cmd=managedir&diruri=%s\">return to "
-                     "directory listing</a>\n", dir_uri, admin_file, dir_uri);
-  
-  adminfooter(&bp, dn, help_uri, dir_uri, admin_file);
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE);
-
-  GRSThttpWriteOut(&bp);
-}                    
-
-void editfileaction(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path,
-                    char *file, char *dir_uri, char *admin_file)
-{
-  char         *pagetext, *dir_path_file, *vfile, *dir_path_vfile,
-               *dnlistsuri, *server_name, *fulluri, *realfile;
-  FILE         *fp;
-  GRSThttpBody  bp;
-  
-  if (!GRSTgaclPermHasWrite(perm) || (strcmp(file, GRST_ACL_FILE) == 0))
-                                               GRSThttpError("403 Forbidden");
-                                                 
-  dnlistsuri = getenv("GRST_DN_LISTS_URI");
-  if (dnlistsuri == NULL) dnlistsuri = getenv("REDIRECT_GRST_DN_LISTS_URI");
-
-  if ((dnlistsuri != NULL) && 
-      (strncmp(dnlistsuri, dir_uri, strlen(dnlistsuri)) == 0))
-    {
-      realfile = GRSThttpUrlEncode(file);
-      
-      if (realfile[0] == '.') GRSThttpError("403 Forbidden");
-    }
-  else if (index(file, '/') != NULL) GRSThttpError("403 Forbidden");
-  else realfile = file;
-
-  asprintf(&dir_path_file, "%s/%s", dir_path, realfile);
-
-  pagetext = GRSThttpGetCGI("pagetext");
-  vfile = makevfilename(file, strlen(pagetext), dn);
-  asprintf(&dir_path_vfile, "%s/%s", dir_path, vfile);
-      
-  fp = fopen(dir_path_vfile, "w");
-  if (fp == NULL)
-    {
-      puts("Status: 500 Failed trying to write\nContent-Type: text/html");
-  
-      GRSThttpBodyInit(&bp);
-
-      GRSThttpPrintf(&bp,"<title>Error writing %s%s</title>\n", dir_uri, file);
-      GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE);
-
-      GRSThttpPrintf(&bp, "<h1 align=center>Error writing %s%s</h1>\n", 
-                      dir_uri, file);
-  
-      GRSThttpPrintf(&bp, 
-                      "<p align=center>GridSite considers you are authorized "
-                      "to write the file, but the write failed. This is "
-                      "probably a web server or operating system level "
-                      "misconfiguration. Consult the site administrator.");
-
-      GRSThttpPrintf(&bp,"<p align=center>"
-                     "<a href=\"%s%s?cmd=managedir\">Return to "
-                     "directory listing</a>\n", dir_uri, admin_file);
-  
-      adminfooter(&bp, dn, help_uri, dir_uri, admin_file);
-      GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE);
-
-      GRSThttpWriteOut(&bp);
-      return;
-    }
-
-  fwrite(pagetext, strlen(pagetext), sizeof(char), fp);
-  
-  fclose(fp);
-  
-  unlink(dir_path_file);
-  
-  if (link(dir_path_vfile,dir_path_file) != 0) GRSThttpError("403 Forbidden");
-
-  if ((strlen(file) > 7) && (strcmp(&file[strlen(file) - 5], ".html") == 0))
-       printf("Status: 302 Moved Temporarily\nContent-Length: 0\n"
-              "Location: %s%s\n\n", dir_uri, file);      
-  else printf("Status: 302 Moved Temporarily\nContent-Length: 0\n"
-              "Location: %s%s?cmd=managedir\n\n", dir_uri, admin_file);
-}
-
-void create_acl(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path,
-                    char *file, char *dir_uri, char *admin_file)
-{
-  int           fd;
-  char         *tmpgacl, *newgacl;
-  GRSTgaclAcl  *acl;
-  FILE         *fp;
-  GRSThttpBody  bp;
-  
-  if (!GRSTgaclPermHasAdmin(perm)) GRSThttpError("403 Forbidden");
-
-  asprintf(&tmpgacl, "%s/.tmp.XXXXXX", dir_path);
-  asprintf(&newgacl, "%s/%s", dir_path, GRST_ACL_FILE);
-  
-  if (((acl = GRSTgaclAclLoadforFile(dir_path)) != NULL) &&
-      ((fd = mkstemp(tmpgacl)) != -1) && 
-      ((fp = fdopen(fd, "w+")) != NULL) &&
-      GRSTgaclAclPrint(acl, fp) &&
-      (fclose(fp) == 0) &&
-      (rename(tmpgacl, newgacl) == 0))
-    {
-      printf("Status: 302 Moved Temporarily\nContent-Length: 0\n"
-         "Location: %s%s?cmd=managedir\n\n", dir_uri, admin_file);
-
-      free(tmpgacl);
-      free(newgacl);
-      return;
-    }
-
-  puts("Status: 500 Failed trying to create\nContent-Type: text/html");
-  
-  GRSThttpBodyInit(&bp);
-
-  GRSThttpPrintf(&bp,"<title>Error creating %s%s</title>\n", dir_uri, 
-                                                             GRST_ACL_FILE);
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE);
-
-  GRSThttpPrintf(&bp, "<h1 align=center>Error creating %s%s</h1>\n", 
-                      dir_uri, GRST_ACL_FILE);
-  
-  GRSThttpPrintf(&bp, "<p align=center>GridSite considers you are authorized "
-                      "to create it, but the create failed. This is "
-                      "probably a web server or operating system level "
-                      "misconfiguration. Consult the site administrator.");
-
-  GRSThttpPrintf(&bp,"<p align=center>"
-                     "<a href=\"%s%s?cmd=managedir\">Return to "
-                     "directory listing</a>\n", dir_uri, admin_file);
-  
-  adminfooter(&bp, dn, help_uri, dir_uri, admin_file);
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE);
-
-  GRSThttpWriteOut(&bp);
-
-  free(tmpgacl);
-  free(newgacl);
-}
-
-void renameaction(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path,
-                  char *file, char *dir_uri, char *admin_file)
-{
-  int           len;
-  char         *dir_path_file, *vfile, *dir_path_vfile,
-               *dnlistsuri, *newfile, *dir_path_newfile;
-  struct stat   statbuf;
-  FILE         *fp;
-  GRSThttpBody  bp;
-  
-  if (!GRSTgaclPermHasWrite(perm) || (strcmp(file, GRST_ACL_FILE) == 0)) 
-                                              GRSThttpError("403 Forbidden");
-                                              
-  if (index(file, '/') != NULL) GRSThttpError("403 Forbidden");
-
-  dir_path_file = malloc(strlen(dir_path) + strlen(file) + 2);  
-  strcpy(dir_path_file, dir_path);
-  strcat(dir_path_file, "/");
-  strcat(dir_path_file, file);
-  
-  if (stat(dir_path_file, &statbuf) != 0) GRSThttpError("404 Not Found");
-
-  newfile = GRSThttpGetCGI("newfile");
-
-  if ((strcmp(newfile, GRST_ACL_FILE) == 0) ||
-      (strcmp(newfile, file) == 0)) GRSThttpError("403 Forbidden");
-
-  dir_path_newfile = malloc(strlen(dir_path) + strlen(newfile) + 2);  
-  strcpy(dir_path_newfile, dir_path);
-  strcat(dir_path_newfile, "/");
-  strcat(dir_path_newfile, newfile);
-
-  vfile = makevfilename(newfile, statbuf.st_size, dn);
-  dir_path_vfile = malloc(strlen(dir_path) + strlen(vfile) + 2);  
-  strcpy(dir_path_vfile, dir_path);
-  strcat(dir_path_vfile, "/");
-  strcat(dir_path_vfile, vfile);
-
-  unlink(dir_path_newfile); /* just in case */
-
-  if ((link(dir_path_file, dir_path_vfile  ) == 0) &&
-      (link(dir_path_file, dir_path_newfile) == 0) &&
-      (unlink(dir_path_file) == 0))
-    {
-      printf("Status: 302 Moved Temporarily\nContent-Length: 0\n"
-             "Location: %s\n\n", dir_uri);
-      return;
-    }
-
-  puts("Status: 500 Failed trying to rename\nContent-Type: text/html");
-  
-  GRSThttpBodyInit(&bp);
-
-  GRSThttpPrintf(&bp,"<title>Error renaming %s%s</title>\n", dir_uri, file);
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE);
-
-  GRSThttpPrintf(&bp, "<h1 align=center>Error renaming %s%s</h1>\n", 
-                      dir_uri, file);
-  
-  GRSThttpPrintf(&bp, "<p align=center>GridSite considers you are authorized "
-                      "to rename it, but the rename failed. This is "
-                      "probably a web server or operating system level "
-                      "misconfiguration. Consult the site administrator.");
-
-  GRSThttpPrintf(&bp,"<p align=center>"
-                     "<a href=\"%s%s?cmd=managedir\">Return to "
-                     "directory listing</a>\n", dir_uri, admin_file);
-  
-  adminfooter(&bp, dn, help_uri, dir_uri, admin_file);
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE);
-
-  GRSThttpWriteOut(&bp);
-}
-
-void newdirectory(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path,
-                    char *file, char *dir_uri, char *admin_file)
-{
-  int           len;
-  char         *dir_path_file, *vfile, *dir_path_vfile, *filedup;
-  FILE         *fp;
-  GRSThttpBody  bp;
-  
-  if ((file[0] == '\0') || 
-      !GRSTgaclPermHasWrite(perm) || (strcmp(file, GRST_ACL_FILE) == 0))
-                                                GRSThttpError("403 Forbidden");
-
-  filedup = strdup(file);
-  if (filedup[strlen(filedup)-1] == '/') filedup[strlen(filedup)-1] = '\0';
-  if (index(filedup, '/') != NULL) GRSThttpError("403 Forbidden");
-  
-  dir_path_file = malloc(strlen(dir_path) + strlen(file) + 2);  
-  strcpy(dir_path_file, dir_path);
-  strcat(dir_path_file, "/");
-  strcat(dir_path_file, file);
-
-  if (mkdir(dir_path_file, 0751) == 0)
-    {
-      printf("Status: 302 Moved Temporarily\nContent-Length: 0\n"
-             "Location: %s%s?cmd=managedir\n\n", dir_uri, admin_file);
-      return;    
-    }
-      
-  puts("Status: 500 Failed trying to create\nContent-Type: text/html");
-  
-  GRSThttpBodyInit(&bp);
-
-  GRSThttpPrintf(&bp,"<title>Error create %s%s</title>\n", dir_uri, file);
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE);
-
-  GRSThttpPrintf(&bp, "<h1 align=center>Error creating directory %s%s</h1>\n",
-                      dir_uri, file);
-  
-  GRSThttpPrintf(&bp, 
-                      "<p align=center>GridSite considers you are authorized "
-                      "to create the directory, but the creation failed. This "
-                      "is probably a web server or operating system level "
-                      "misconfiguration. Consult the site administrator.");
-
-  GRSThttpPrintf(&bp,"<p align=center>"
-                     "<a href=\"%s%s?cmd=managedir\">Return to "
-                     "parent directory listing</a>\n", dir_uri, admin_file);
-  
-  adminfooter(&bp, dn, help_uri, dir_uri, admin_file);
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE);
-
-  GRSThttpWriteOut(&bp);
-}
-
-void editdnlistaction(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path,
-                      char *file, char *dir_uri, char *admin_file)
-{
-  int           numdn = 0, ifd, ofd, numdnlines = 0, i, found;
-  char         *dir_path_file, *dir_path_tmpfile, *realfile,
-               *dnlistsuri, *server_name, *fulldiruri, *p, oneline[513],
-              **dnlines, name[81], *add;
-  FILE         *ofp;
-  struct stat   statbuf;
-  GRSThttpBody  bp;
-  
-  if (!GRSTgaclPermHasWrite(perm)) GRSThttpError("403 Forbidden");
-  
-  dnlistsuri = getenv("GRST_DN_LISTS_URI");
-  if (dnlistsuri == NULL) dnlistsuri = getenv("REDIRECT_GRST_DN_LISTS_URI");
-
-  server_name = getenv("SERVER_NAME");
-
-  if ((server_name == NULL) ||
-      (dnlistsuri == NULL) || 
-      (strncmp(dnlistsuri, dir_uri, strlen(dnlistsuri)) != 0))      
-                                         GRSThttpError("403 Forbidden");
-                                         
-  asprintf(&fulldiruri, "https://%s%s", server_name, dir_uri);
-  
-  if ((strncmp(fulldiruri, file, strlen(fulldiruri)) != 0) && 
-      ((strncmp(fulldiruri, file, strlen(fulldiruri) - 1) != 0) ||
-       (strlen(fulldiruri) - 1 != strlen(file))))
-    {
-      puts("Status: 403 Forbidden\nContent-Type: text/html");
-  
-      GRSThttpBodyInit(&bp);
-
-      GRSThttpPrintf(&bp,"<title>Error writing %s</title>\n", file);
-      GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE);
-
-      GRSThttpPrintf(&bp, "<h1 align=center>Error writing %s to %s</h1>\n", 
-                     file, dir_uri);
-  
-      GRSThttpPrintf(&bp, "<p align=center>You cannot create a DN List "
-                     "with that prefix in this directory. Please see the "
-                     "the GridSite User's Guide for an explanation."); 
-
-      GRSThttpPrintf(&bp,"<p align=center>"
-                     "<a href=\"%s%s?cmd=managedir\">Return to "
-                     "directory listing</a>\n", dir_uri, admin_file);
-  
-      adminfooter(&bp, dn, help_uri, dir_uri, admin_file);
-      GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE);
-
-      GRSThttpWriteOut(&bp);
-      return;    
-    }
-
-  p = GRSThttpGetCGI("numdn");
-  if ((p == NULL) || (sscanf(p, "%d", &numdn) != 1))
-                                         GRSThttpError("500 No number of DNs");
-
-  if (numdn > 0) 
-    {
-      dnlines = malloc(sizeof(char *) * numdn);
-      
-      for (i=1; i <= numdn; ++i)
-         {
-           sprintf(name, "dn%d", i);
-           p = GRSThttpGetCGI(name);
-           
-           if (*p != '\0') 
-             {
-               dnlines[numdnlines] = p;
-               ++numdnlines;
-             }           
-         } 
-    }
-    
-  add = GRSThttpGetCGI("add");
-
-  realfile = GRSThttpUrlEncode(file);
-
-  dir_path_file = malloc(strlen(dir_path) + strlen(realfile) + 2);  
-  strcpy(dir_path_file, dir_path);
-  strcat(dir_path_file, "/");
-  strcat(dir_path_file, realfile);
-      
-  dir_path_tmpfile = malloc(strlen(dir_path) + 13);  
-  strcpy(dir_path_tmpfile, dir_path);
-  strcat(dir_path_tmpfile, "/.tmp.XXXXXX");
-
-  if (((ofd = mkstemp(dir_path_tmpfile)) != -1) && 
-      ((ofp = fdopen(ofd, "w")) != NULL))
-    {
-      if (*add != '\0') 
-        {
-          fputs(add, ofp);
-          fputc('\n', ofp);
-        }
-
-      for (i=0; i < numdnlines; ++i)
-         {
-           fputs(dnlines[i], ofp);
-           fputc('\n', ofp);
-         }
-      if ((fclose(ofp) == 0) &&
-          ((stat(dir_path_file, &statbuf) != 0) || 
-           (unlink(dir_path_file) == 0)) &&
-          (rename(dir_path_tmpfile, dir_path_file) == 0))
-        {
-          printf("Status: 302 Moved Temporarily\nContent-Length: 0\n"
-                 "Location: %s%s?cmd=managedir\n\n", dir_uri, admin_file);
-          return;
-        }
-    }
-
-  puts("Status: 500 Failed trying to write\nContent-Type: text/html");
-  
-  GRSThttpBodyInit(&bp);
-
-  GRSThttpPrintf(&bp,"<title>Error writing %s%s</title>\n", dir_uri, file);
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE);
-
-  GRSThttpPrintf(&bp, "<h1 align=center>Error writing %s%s</h1>\n", 
-                      dir_uri, file);
-  
-  GRSThttpPrintf(&bp, "<p align=center>GridSite considers you are authorized "
-                      "to write the file, but the write failed. This is "
-                      "probably a web server or operating system level "
-                      "misconfiguration. Consult the site administrator.");
-
-  GRSThttpPrintf(&bp,"<p align=center>"
-                     "<a href=\"%s%s?cmd=managedir\">Return to "
-                     "directory listing</a>\n", dir_uri, admin_file);
-  
-  adminfooter(&bp, dn, help_uri, dir_uri, admin_file);
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE);
-
-  GRSThttpWriteOut(&bp);
-
-  /* try to clean up */
-  if (stat(dir_path_tmpfile, &statbuf) == 0) unlink(dir_path_tmpfile);    
-}
-
-void printfile(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, 
-                  char *file, char *dir_uri, char *admin_file)
-{
-  int   fd;
-  char *dir_path_file;
-  struct stat statbuf;
-  
-  if (!GRSTgaclPermHasRead(perm)) GRSThttpError("403 Forbidden");
-
-  if (index(file, '/') != NULL) GRSThttpError("403 Forbidden");
-  
-  dir_path_file = malloc(strlen(dir_path) + strlen(file) + 2);
-  
-  strcpy(dir_path_file, dir_path);
-  strcat(dir_path_file, "/");
-  strcat(dir_path_file, file);
-  
-  fd = open(dir_path_file, O_RDONLY);  
-  if (fd == -1) GRSThttpError("500 Internal server error");
-
-  if ((fstat(fd, &statbuf) != 0) ||
-        !S_ISREG(statbuf.st_mode)) GRSThttpError("403 Forbidden");
-       
-  printf("Status: 200 OK\nContent-Type: text/html\nContent-Length: %d\n\n",
-         statbuf.st_size);
-
-  fflush(stdout);
-
-  sendfile(1, fd, 0, statbuf.st_size);  
-}
-
-void filehistory(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path,
-                 char *file, char *dir_uri, char *admin_file)
-{
-  int             fd, n, i, j, enclen, num = 0;
-  char           *encodedfile, *p, *dndecoded, modified[99], *vfile, *q,
-                 *encdn;
-  time_t          file_time;
-  size_t          file_size;
-  struct stat     statbuf;
-  struct dirent **namelist;
-  struct tm       file_tm;
-  GRSThttpBody    bp;
-  
-  if (!GRSTgaclPermHasRead(perm)) GRSThttpError("403 Forbidden");
-
-  if (index(file, '/') != NULL) GRSThttpError("403 Forbidden");
-  
-  puts("Status: 200 OK\nContent-Type: text/html");
-                                                                                
-  GRSThttpBodyInit(&bp);
-  GRSThttpPrintf(&bp, "<title>History of %s%s</title>\n", dir_uri, file);
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE);
-  GRSThttpPrintf(&bp,
-   "<h1 align=center>History of <a href=\"%s%s\">%s%s</a></h1>\n",
-   dir_uri, file, dir_uri, file);
-
-  asprintf(&vfile, "%s/%s", dir_path, file);
-  if (stat(vfile, &statbuf) == 0)
-    {
-      localtime_r((const time_t *) &(statbuf.st_mtime), &file_tm);
-      strftime(modified, sizeof(modified), 
-               "%a&nbsp;%e&nbsp;%b&nbsp;%Y&nbsp;%k:%M", &file_tm);
-
-      GRSThttpPrintf(&bp, "<p align=center>Last modified: %s\n", modified);
-    }
-  free(vfile);
-  
-  encodedfile = GRSThttpUrlEncode(file);
-  for (p=encodedfile; *p != '\0'; ++p) if (*p == '%') *p = '=';
-  enclen = strlen(encodedfile);  
-  
-  n = scandir(dir_path, &namelist, 0, alphasort);
-  
-  if (n > 0)
-    {
-      for (i = n - 1; i >= 0; --i)
-         {
-           if ((strncmp(namelist[i]->d_name, GRST_HIST_PREFIX,
-                                        sizeof(GRST_HIST_PREFIX) - 1) == 0) &&
-               ((namelist[i]->d_name)[sizeof(GRST_HIST_PREFIX) - 1] == ':') &&
-               (strncmp(&((namelist[i]->d_name)[sizeof(GRST_HIST_PREFIX)]),
-                                                 encodedfile, enclen) == 0) &&
-               ((namelist[i]->d_name)[sizeof(GRST_HIST_PREFIX)+enclen] == ':'))
-             {
-               if (num == 0) GRSThttpPrintf(&bp, 
-                       "<p align=center><table border=1 cellpadding=5>\n"
-                       "<tr><td>Date</td><td>Size after</td>"
-                       "<td colspan=2>Changed by</td></tr>\n");
-                       
-               ++num;
-
-               p = index(namelist[i]->d_name, ':');
-               p = index(&p[1], ':');
-               sscanf(&p[1], "%X:", &file_time);
-               p = index(&p[1], ':'); /* skip over microseconds time */
-               p = index(&p[1], ':');
-               sscanf(&p[1], "%X:", &file_size);
-               p = index(&p[1], ':');
-
-               encdn = strdup(&p[1]);
-               q = index(encdn, ':');
-               if (q != NULL) *q = '\0';
-               
-               for (q=encdn; *q != '\0'; ++q) if (*q == '=') *q = '%';
-               dndecoded = GRSThttpUrlDecode(encdn);
-
-               localtime_r((const time_t *) &file_time, &file_tm);
-               strftime(modified, sizeof(modified), 
-                 "%a&nbsp;%e&nbsp;%b&nbsp;%Y&nbsp;%k:%M", &file_tm);
-
-               GRSThttpPrintf(&bp, 
-                 "<tr><td>%s</td><td align=right>%d</td><td>%s</td>\n",
-                 modified, file_size, dndecoded);
-
-               free(dndecoded);
-
-               asprintf(&vfile, "%s/%s", dir_path, namelist[i]->d_name);
-               if ((stat(vfile, &statbuf) == 0) && (statbuf.st_size > 0))
-               {
-                   GRSThttpPrintf(&bp, "<td><a href=\"");
-                    if (strcmp (file, GRST_ACL_FILE)==0)
-                        GRSThttpPrintf(&bp, "%s%s?cmd=acl_history&dir_uri=%s&file=%s\">View</a></td></tr>\n",
-                           dir_uri, admin_file, dir_uri, namelist[i]->d_name);
-                    else GRSThttpPrintf(&bp, "%s%s\">View</a></td></tr>\n",
-                       dir_uri, namelist[i]->d_name);
-               }
-               else GRSThttpPrintf(&bp, "<td>&nbsp;</td></tr>");
-                 
-               free(vfile);
-             }
-         }      
-    }
-  
-  if (num > 0) GRSThttpPrintf(&bp, "</table>\n");
-  else GRSThttpPrintf(&bp, "<p align=center>No history for this file\n");
-  
-  if (GRSTgaclPermHasList(perm))
-       adminfooter(&bp, dn, help_uri, dir_uri, admin_file);
-  else adminfooter(&bp, dn, help_uri, dir_uri, NULL);
-                                                                                
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE);
-  GRSThttpWriteOut(&bp);
-}
-
-void ziplist(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path,
-             char *file, char *dir_uri, char *admin_file)
-{
-  char           *shellcmd, *unzip, oneline[129];
-  FILE           *fp;
-  GRSThttpBody    bp;
-    
-  if (!GRSTgaclPermHasRead(perm)) GRSThttpError("403 Forbidden");
-
-  if (index(file, '/') != NULL) GRSThttpError("403 Forbidden");
-  
-  puts("Status: 200 OK\nContent-Type: text/html");
-                                                                                
-  GRSThttpBodyInit(&bp);
-  GRSThttpPrintf(&bp, "<title>Contents of %s%s</title>\n", dir_uri, file);
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE);
-  GRSThttpPrintf(&bp,
-   "<h1 align=center>Contents of ZIP file <a href=\"%s%s\">%s%s</a></h1>\n",
-   dir_uri, file, dir_uri, file);
-
-  unzip = getenv("GRST_UNZIP");
-  if (unzip == NULL) unzip = getenv("REDIRECT_GRST_UNZIP");
-
-  if (unzip != NULL)
-    {  
-      GRSThttpPrintf(&bp, "<center><table><tr><td><pre>\n");
-      asprintf(&shellcmd, "cd %s ; %s -Z %s", dir_path, unzip, file);
-      fp = popen(shellcmd, "r");
-  
-      while (fgets(oneline, sizeof(oneline), fp) != NULL)           
-                          GRSThttpPrintf(&bp, "%s", oneline);         
-      pclose(fp);
-      GRSThttpPrintf(&bp, "</pre></td></tr></table></center>\n");
-
-      if (GRSTgaclPermHasWrite(perm))
-           GRSThttpPrintf(&bp, 
-            "<p><center><form action=\"%s%s\" method=post>"
-            "<input type=submit value=\"Unzip this file\"> in %s"
-            "<input type=hidden name=cmd value=unzipfile>"
-            "<input type=hidden name=file value=\"%s\"></form>"
-            "<p>(All files are placed in the same directory and files "
-            "beginning with &quot;.&quot; are ignored.)</center>\n",
-            dir_uri, admin_file, dir_uri, file);
-    }
-  else GRSThttpPrintf(&bp, "<p align=center>unzip path not defined!\n");
-  
-  if (GRSTgaclPermHasList(perm))
-       adminfooter(&bp, dn, help_uri, dir_uri, admin_file);
-  else adminfooter(&bp, dn, help_uri, dir_uri, NULL);
-                                                                                
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE);
-  GRSThttpWriteOut(&bp);
-}
-
-void unzipfile(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, 
-               char *file, char *dir_uri, char *admin_file)
-{
-  char           *shellcmd, *unzip, oneline[129];
-  FILE           *fp;
-  GRSThttpBody    bp;
-    
-  if (!GRSTgaclPermHasWrite(perm)) GRSThttpError("403 Forbidden");
-  
-  if (index(file, '/') != NULL) GRSThttpError("403 Forbidden");
-  
-  puts("Status: 200 OK\nContent-Type: text/html");
-                                                                                
-  GRSThttpBodyInit(&bp);
-  GRSThttpPrintf(&bp, "<title>Unzipping %s%s</title>\n", dir_uri, file);
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE);
-  GRSThttpPrintf(&bp,
-   "<h1 align=center>Unzipping <a href=\"%s%s\">%s%s</a></h1>\n",
-   dir_uri, file, dir_uri, file);
-
-  unzip = getenv("GRST_UNZIP");
-  if (unzip == NULL) unzip = getenv("REDIRECT_GRST_UNZIP");
-
-  if (unzip != NULL)
-    {  
-      GRSThttpPrintf(&bp, "<center><table><tr><td><pre>\n");
-      asprintf(&shellcmd, "cd %s ; %s -jo %s -x '.*'", dir_path, unzip, file);
-      fp = popen(shellcmd, "r");
-  
-      while (fgets(oneline, sizeof(oneline), fp) != NULL)           
-                          GRSThttpPrintf(&bp, "%s", oneline);         
-      pclose(fp);
-      GRSThttpPrintf(&bp, "</pre></td></tr></table></center>\n");      
-
-      if (GRSTgaclPermHasList(perm))
-                GRSThttpPrintf(&bp, "<p align=center>"
-                                    "<b><a href=\"%s%s?cmd=managedir\">Back to "
-                                    "directory</a></b>", dir_uri, admin_file);
-    }
-  else GRSThttpPrintf(&bp, "<p align=center>unzip path not defined!\n");
-  
-  if (GRSTgaclPermHasList(perm))
-       adminfooter(&bp, dn, help_uri, dir_uri, admin_file);
-  else adminfooter(&bp, dn, help_uri, dir_uri, NULL);
-                                                                                
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE);
-  GRSThttpWriteOut(&bp);
-}
-
-void editfileform(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, 
-                  char *file, char *dir_uri, char *admin_file)
-{
-  int   fd, rawpagesize, i, c;
-  char *dir_path_file, *rawpage, *p;
-  FILE *fp = NULL;
-  struct stat statbuf;
-  GRSThttpBody    bp; 
-  
-  if (!GRSTgaclPermHasWrite(perm)) GRSThttpError("403 Forbidden");
-  
-  if (index(file, '/') != NULL) GRSThttpError("403 Forbidden");
-  
-  dir_path_file = malloc(strlen(dir_path) + strlen(file) + 2);
-  
-  strcpy(dir_path_file, dir_path);
-  strcat(dir_path_file, "/");
-  strcat(dir_path_file, file);
-  
-  fd = open(dir_path_file, O_RDONLY);      
-  if (fd != -1)
-    {
-      fp = fdopen(fd, "r");
-      if (fp == NULL) GRSThttpError("500 File open failed!");
-
-      if ((fstat(fd, &statbuf) != 0) ||
-        !S_ISREG(statbuf.st_mode)) GRSThttpError("500 Not a regular file!");
-    }
-       
-  puts("Status: 200 OK\nContent-Type: text/html");
-  
-  GRSThttpBodyInit(&bp);
-
-  GRSThttpPrintf(&bp, "<title>Edit file %s</title>\n", file);
-
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE);
-
-  GRSThttpPrintf(&bp, "<h1>Edit file %s</h1>\n", file);
-  
-  GRSThttpPrintf(&bp,"<form action=\"%s%s\" method=post>\n",dir_uri,admin_file);
-  GRSThttpPrintf(&bp,"<p><input type=submit value=\"Save changes\">\n");
-  GRSThttpPrintf(&bp,"<p>File name: <input type=text name=file value=\"%s\">\n", file);
-  GRSThttpPrintf(&bp,"<input type=hidden name=cmd value=editaction>\n");
-  GRSThttpPrintf(&bp,"<p><textarea name=pagetext cols=80 rows=22>");
-
-  if (fp != NULL)
-    {  
-      rawpagesize = statbuf.st_size + 1000;
-      rawpage = malloc(rawpagesize);
-  
-      i = 0;
-  
-      while ((c = fgetc(fp)) != EOF)
-           {
-             if (c == '<')      { strcpy(&rawpage[i], "&lt;");
-                                  i += 4; }
-             else if (c == '>') { strcpy(&rawpage[i], "&gt;");
-                                  i += 4; }
-             else if (c == '&') { strcpy(&rawpage[i], "&amp;");
-                                  i += 5; }
-             else if (c == '"') { strcpy(&rawpage[i], "&quot;");
-                                  i += 6; }
-             else               { rawpage[i] = c;
-                                  i += 1; }
-           
-             if (i >= rawpagesize - 7)
-               {
-                 rawpagesize += 1000;
-                 rawpage = realloc(rawpage, rawpagesize);           
-               }
-           }
-
-      rawpage[i] = '\0';
-  
-      GRSThttpPrintf(&bp, "%s", rawpage);
-    }
-    
-  GRSThttpPrintf(&bp, "</textarea>\n");  
-  GRSThttpPrintf(&bp, "<p><input type=submit value=\"Save changes\">\n");
-  GRSThttpPrintf(&bp, "</form>\n");
-
-  if (fp != NULL) fclose(fp);
-
-  adminfooter(&bp, dn, help_uri, dir_uri, admin_file);
-  
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE);
-  GRSThttpWriteOut(&bp);
-}
-
-void editdnlistform(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path,
-                    char *file, char *dir_uri, char *admin_file)
-{
-  int   fd, i, c, numdn = 0;
-  char *dir_path_file, *rawpage, *p, *dnlistsuri, *server_name, *fulluri,
-       *realfile, oneline[513];
-  FILE *fp = NULL;
-  struct stat statbuf;
-  GRSThttpBody    bp; 
-  
-  dnlistsuri = getenv("GRST_DN_LISTS_URI");
-  if (dnlistsuri == NULL) dnlistsuri = getenv("REDIRECT_GRST_DN_LISTS_URI");
-
-  if (!GRSTgaclPermHasWrite(perm) ||
-      (dnlistsuri == NULL) ||
-      (strncmp(dnlistsuri, dir_uri, strlen(dnlistsuri)) != 0)) 
-                                             GRSThttpError("403 Forbidden");
-  
-  realfile = GRSThttpUrlEncode(file);
-
-  dir_path_file = malloc(strlen(dir_path) + strlen(realfile) + 2);
-  
-  strcpy(dir_path_file, dir_path);
-  strcat(dir_path_file, "/");
-  strcat(dir_path_file, realfile);
-  
-  fd = open(dir_path_file, O_RDONLY);      
-  if (fd != -1) /* we dont mind open failing, but it must work if it doesnt */
-    {
-      fp = fdopen(fd, "r");
-      if (fp == NULL) GRSThttpError("500 File open failed!");
-
-      if ((fstat(fd, &statbuf) != 0) ||
-        !S_ISREG(statbuf.st_mode)) GRSThttpError("500 Not a regular file!");
-    }
-       
-  puts("Status: 200 OK\nContent-Type: text/html");
-  
-  GRSThttpBodyInit(&bp);
-
-  GRSThttpPrintf(&bp, "<title>Edit DN List %s</title>\n", file);
-
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE);
-
-  GRSThttpPrintf(&bp, "<h1>Edit DN List</h1>\n");
-  
-  GRSThttpPrintf(&bp,"<form action=\"%s%s\" method=post>\n",dir_uri,admin_file);
-  GRSThttpPrintf(&bp,"<p><input type=submit value=\"Update\">\n");
-  GRSThttpPrintf(&bp,"<p>List URL: <input type=text name=file value=\"%s\" "
-                     "size=%d>\n", file, strlen(file));
-  GRSThttpPrintf(&bp,"<input type=hidden name=cmd value=editdnlistaction>\n");
-
-  if (fp != NULL)
-    {
-      GRSThttpPrintf(&bp, "<p><table>\n<tr><th>Keep?</th>"
-                          "<th>Name</th></tr>\n");
-
-      while (fgets(oneline, sizeof(oneline), fp) != NULL)
-           {
-             ++numdn;
-         
-             p = rindex(oneline, '\n');
-             if (p != NULL) *p = '\0';
-         
-             GRSThttpPrintf(&bp, "<tr><td align=center><input type=checkbox "
-                             "name=\"dn%d\" value=\"%s\" checked></td>"
-                             "<td>%s</td></tr>\n", numdn, oneline, oneline);
-           }
-
-      GRSThttpPrintf(&bp,"</table>\n");
-    }
-    
-  GRSThttpPrintf(&bp,"<input type=hidden name=numdn value=\"%d\">\n", numdn);
-
-  GRSThttpPrintf(&bp, "<p>Add new DN: <input type=text name=add "
-                      "size=60 maxlength=512>\n");
-
-  GRSThttpPrintf(&bp,"<p><input type=submit value=\"Update\">\n");
-  GRSThttpPrintf(&bp, "</form>\n");
-
-  if (fp != NULL) fclose(fp);
-
-  adminfooter(&bp, dn, help_uri, dir_uri, admin_file);
-  
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE);
-  GRSThttpWriteOut(&bp);
-}
-
-void managedir(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path,
-               char *dir_uri, char *admin_file)
-{
-  int         n, is_dnlists_dir = 0, enclen, numfiles, encprefixlen;
-  char       *d_namepath, modified[99], *absaclpath, *editable, *p, *unzip,
-             *dnlistsuri, *d_name, *server_name, *fulluri, *encfulluri,
-             *encprefix, *dnlistsprefix;
-  GRSThttpBody    bp;
-  struct tm       mtime_tm;
-  struct stat     statbuf;
-  struct dirent **namelist, *subdirfile_ent;
-  DIR            *subDIR;
-
-  if (((!GRSTgaclPermHasWrite(perm)) &&
-       (!GRSTgaclPermHasList(perm))) ||
-      (stat(dir_path, &statbuf) != 0) || !S_ISDIR(statbuf.st_mode))
-                   GRSThttpError("403 Forbidden");
-
-  editable = getenv("GRST_EDITABLE");
-  if (editable == NULL) editable = getenv("REDIRECT_GRST_EDITABLE");
-  
-  unzip = getenv("GRST_UNZIP");
-  if (unzip == NULL) unzip = getenv("REDIRECT_GRST_UNZIP");
-  
-  dnlistsuri = getenv("GRST_DN_LISTS_URI");
-  if (dnlistsuri == NULL) dnlistsuri = getenv("REDIRECT_GRST_DN_LISTS_URI");
-
-  if (dnlistsuri && (strncmp(dnlistsuri, dir_uri, strlen(dnlistsuri)) == 0))
-    {
-      is_dnlists_dir = 1;
-      server_name = getenv("SERVER_NAME");
-
-      asprintf(&fulluri, "https://%s%s", server_name, dir_uri);
-      encfulluri = GRSThttpUrlEncode(fulluri);
-      enclen = strlen(encfulluri);
-
-      asprintf(&dnlistsprefix, "https://%s%s", server_name, dnlistsuri);
-      encprefix = GRSThttpUrlEncode(dnlistsprefix);
-      encprefixlen = strlen(encprefix);
-    }
-  
-  printf("Status: 200 OK\nContent-Type: text/html\n");
-
-  GRSThttpBodyInit(&bp);
-
-  GRSThttpPrintf(&bp,"<title>Manage directory %s</title>\n", dir_uri);
-
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE);
-    
-  GRSThttpPrintf(&bp, "<h1>Manage directory %s</h1>\n<table>\n", dir_uri);
-  
-  if (dir_uri[1] != '\0')
-     GRSThttpPrintf(&bp, 
-      "<tr><td colspan=3>[<a href=\"../%s?cmd=managedir\">Parent "
-       "directory</a>]</td></tr>\n", admin_file);
-
-  if (GRSTgaclPermHasList(perm) || GRSTgaclPermHasAdmin(perm))
-    {
-      absaclpath = malloc(strlen(dir_path) + sizeof(GRST_ACL_FILE) + 1);
-      strcpy(absaclpath, dir_path);
-      strcat(absaclpath, "/");
-      strcat(absaclpath, GRST_ACL_FILE);
-
-      if (stat(absaclpath, &statbuf) == 0) /* ACL exists in THIS directory */
-        {
-          localtime_r(&(statbuf.st_mtime), &mtime_tm);
-          strftime(modified, sizeof(modified), 
-           "<td align=right>%R</td><td align=right>%e&nbsp;%b&nbsp;%y</td>",
-                        &mtime_tm);    
-
-          if (!is_dnlists_dir)
-            {
-              GRSThttpPrintf(&bp,
-                      "<tr><td><a href=\"%s\">%s</a></td>"
-                      "<td align=right>%ld</td>%s\n",
-                      GRST_ACL_FILE,
-                      GRST_ACL_FILE,
-                      statbuf.st_size, modified);
-
-              GRSThttpPrintf(&bp,
-                   "<td><a href=\"%s%s?cmd=history&file=%s\">"
-                      "History</a></td>",
-                      dir_uri, admin_file, GRST_ACL_FILE);
-            }
-          else GRSThttpPrintf(&bp,
-                      "<tr><td>%s</td>"
-                      "<td align=right>%ld</td>%s\n",
-                      GRST_ACL_FILE,
-                      statbuf.st_size, modified);
-
-          if (GRSTgaclPermHasAdmin(perm)) 
-               GRSThttpPrintf(&bp,
-                   "<td><a href=\"%s%s?cmd=admin_acl\">Edit</a></td>"
-                   "<td><a href=\"%s%s?cmd=delete&file=%s\">Delete</a></td>",
-                   dir_uri, admin_file,
-                   dir_uri, admin_file, GRST_ACL_FILE);
-          else if (GRSTgaclPermHasRead(perm))
-               GRSThttpPrintf(&bp,
-                   "<td><a href=\"%s%s?cmd=show_acl\">View</a></td>"
-                   "<td>&nbsp;</td>", dir_uri, admin_file);
-          else GRSThttpPrintf(&bp, "<td>&nbsp;</td><td>&nbsp;</td>\n");
-
-          GRSThttpPrintf(&bp, "<td>&nbsp;</td></tr>\n");
-        }
-      else if (GRSTgaclPermHasAdmin(perm))
-          GRSThttpPrintf(&bp, "<form method=post action=\"%s%s\">\n"
-        "<tr><td colspan=8><input type=submit value=\"Create .gacl\"></td>\n"
-        "<input type=hidden name=cmd value=\"create_acl\"></tr></form>\n",
-        dir_uri, admin_file);
-    }
-
-  if (GRSTgaclPermHasList(perm))
-    {
-      n = scandir(dir_path, &namelist, 0, alphasort);
-      while (n--)
-       {
-         if (namelist[n]->d_name[0] != '.')
-           {
-               d_namepath = malloc(strlen(dir_path) + 
-                                   strlen(namelist[n]->d_name) + 2);
-               strcpy(d_namepath, dir_path);
-               strcat(d_namepath, "/");
-               strcat(d_namepath, namelist[n]->d_name);
-               stat(d_namepath, &statbuf);
-               
-               if (S_ISDIR(statbuf.st_mode))
-                 { 
-                   subDIR = opendir(d_namepath);
-                   
-                   if (subDIR == NULL) numfiles = 99; /* stop deletion */
-                   else
-                     {
-                       numfiles = 0; 
-                       while ((subdirfile_ent = readdir(subDIR)) != NULL) 
-                         if (subdirfile_ent->d_name[0] != '.') ++numfiles;
-                         else if (strncmp(subdirfile_ent->d_name, 
-                                     GRST_ACL_FILE,
-                                    sizeof(GRST_ACL_FILE)) == 0) ++numfiles;
-
-                       closedir(subDIR);
-                     }                     
-                 }
-                              
-               free(d_namepath);
-               
-               localtime_r(&(statbuf.st_mtime), &mtime_tm);
-               strftime(modified, sizeof(modified), 
-               "<td align=right>%R</td><td align=right>%e&nbsp;%b&nbsp;%y</td>",
-                        &mtime_tm);    
-                              
-               if (S_ISDIR(statbuf.st_mode)) 
-                 {
-                   GRSThttpPrintf(&bp,
-                      "<tr><td><a href=\"%s%s/%s?cmd=managedir\">"
-                      "%s/</a></td>"
-                      "<td align=right>%ld</td>%s\n<td colspan=2>&nbsp;</td>",
-                      dir_uri, namelist[n]->d_name, admin_file,
-                      namelist[n]->d_name,
-                      statbuf.st_size, modified);
-
-                   if (numfiles == 0)
-                        GRSThttpPrintf(&bp,
-                        "<td><a href=\"%s%s?cmd=delete&file=%s\">"
-                        "Delete</a></td>\n", 
-                        dir_uri, admin_file, namelist[n]->d_name);
-                   else GRSThttpPrintf(&bp, "<td>&nbsp;</td>\n");
-                      
-                   GRSThttpPrintf(&bp, "<td>&nbsp;</td></tr>\n");
-                 }
-               else if (is_dnlists_dir) 
-                 {        
-                   if ((strlen(namelist[n]->d_name) <= encprefixlen) ||
-                       (strncmp(namelist[n]->d_name, encprefix, 
-                                              encprefixlen) != 0)) continue;
-
-                   d_name = GRSThttpUrlDecode(namelist[n]->d_name);
-
-                   GRSThttpPrintf(&bp, "<tr><td><a href=\"%s\">%s</a></td>"
-                                       "<td align=right>%ld</td>%s"
-                                       "<td>&nbsp;</td>",
-                                       d_name, d_name,
-                                       statbuf.st_size, modified);
-
-                   if (GRSTgaclPermHasWrite(perm))
-                     GRSThttpPrintf(&bp, "<form action=\"%s%s\" method=post>"
-                        "<td><input type=submit value=Edit></td>"
-                        "<input type=hidden name=cmd value=editdnlist>"
-                        "<input type=hidden name=file value=\"%s\">"
-                        "</form>\n",
-                        dir_uri, admin_file, d_name);
-                   else GRSThttpPrintf(&bp, "<td>&nbsp;</td>\n");
-                   
-                   if (GRSTgaclPermHasWrite(perm))
-                     GRSThttpPrintf(&bp, "<form action=\"%s%s\" method=post>"
-                        "<td><input type=submit value=Delete></td>"
-                        "<input type=hidden name=cmd value=delete>"
-                        "<input type=hidden name=file value=\"%s\">"
-                        "</form>\n",
-                        dir_uri, admin_file, d_name);
-                   else GRSThttpPrintf(&bp, "<td>&nbsp;</td>\n");
-
-                   GRSThttpPrintf(&bp, "<td>&nbsp;</td></tr>");
-                 }
-               else /* regular directory, not DN Lists */
-                 {        
-                   d_name   = namelist[n]->d_name;
-
-                   GRSThttpPrintf(&bp,
-                          "<tr><td><a href=\"%s%s\">%s</a></td>"
-                          "<td align=right>%ld</td>%s",
-                          dir_uri, d_name, 
-                          d_name, 
-                          statbuf.st_size, modified);                                        
-
-                   GRSThttpPrintf(&bp,
-                     "<td><a href=\"%s%s?cmd=history&file=%s\">"
-                      "History</a></td>",
-                      dir_uri, admin_file, d_name);
-
-                   p = rindex(namelist[n]->d_name, '.');
-
-                   if      ((unzip != NULL) &&
-                            (p != NULL) && 
-                            (strcasecmp(&p[1], "zip") == 0) &&
-                            GRSTgaclPermHasRead(perm))
-                             GRSThttpPrintf(&bp,
-                               "<td><a href=\"%s%s?cmd=ziplist&file=%s\">"
-                               "List</a></td>\n",
-                               dir_uri, admin_file, d_name);                   
-                   else if ((p != NULL) && 
-                       (strstr(editable, &p[1]) != NULL) &&
-                       GRSTgaclPermHasWrite(perm))
-                         GRSThttpPrintf(&bp,
-                               "<td><a href=\"%s%s?cmd=edit&file=%s\">"
-                               "Edit</a></td>\n",
-                               dir_uri, admin_file, d_name);
-                   else  GRSThttpPrintf(&bp, "<td>&nbsp;</td>");
-
-                   if (GRSTgaclPermHasWrite(perm))
-                    GRSThttpPrintf(&bp,
-                     "<td><a href=\"%s%s?cmd=delete&file=%s\">"
-                     "Delete</a></td>\n", dir_uri, admin_file, d_name);
-                   else
-                    GRSThttpPrintf(&bp, "<td>&nbsp;</td>\n");
-
-                   if (GRSTgaclPermHasWrite(perm))
-                    GRSThttpPrintf(&bp,
-                     "<td><a href=\"%s%s?cmd=rename&file=%s\">"
-                     "Rename</a></td></tr>\n", dir_uri, admin_file, d_name);
-                   else
-                    GRSThttpPrintf(&bp, "<td>&nbsp;</td></tr>");
-                 }
-           }
-
-         free(namelist[n]);
-       }
-                    
-      free(namelist);
-    }
-
-  if (GRSTgaclPermHasWrite(perm))
-    {
-      if (is_dnlists_dir)
-        {
-          GRSThttpPrintf(&bp, "<form method=post action=\"%s%s\">\n"
-        "<tr><td colspan=4>New list name: "
-        "<input type=text name=file value=\"%sNEW_LIST\" size=%d>\n"
-        "<input type=hidden name=cmd value=editdnlist></td>"
-        "<td colspan=2 align=center><input type=submit value=Create></td>\n"
-        "</tr></form>\n",
-        dir_uri, admin_file, fulluri, strlen(fulluri)+8);
-
-          GRSThttpPrintf(&bp, "<form method=post action=\"%s%s\">\n"
-        "<tr><td colspan=4>New directory: "
-        "<input type=text name=file>\n"
-        "<td colspan=2 align=center><input type=submit name=button value=\"Create\"></td>\n"
-        "<input type=hidden name=cmd value=edit></td></tr></form>\n",
-        dir_uri, admin_file);      
-        }
-      else
-        {
-          GRSThttpPrintf(&bp, "<form method=post action=\"%s%s\">\n"
-        "<tr><td colspan=8><hr width=\"75%\"></td></tr>\n"
-        "<tr><td>New name:</td>"
-        "<td colspan=3><input type=text name=file size=25>\n"
-        "<td colspan=2 align=center><input type=submit name=button value=\"New file\"></td>\n"
-        "<td colspan=2 align=center><input type=submit name=button value=\"New directory\"></td>\n"
-        "<input type=hidden name=cmd value=edit></td></tr></form>\n",
-        dir_uri, admin_file);
-      
-          GRSThttpPrintf(&bp,
-        "<form method=post action=\"%s%s\" enctype=\"multipart/form-data\">\n"
-        "<tr><td colspan=8><hr width=\"75%\"></td></tr>\n"
-        "<tr><td rowspan=2>Upload file:</td>"
-        "<td colspan=2>New name:</td>"
-        "<td colspan=6><input type=text name=file size=25> "
-        "<input type=submit value=Upload></td></tr>\n"
-        "<tr><td colspan=2>Local name:</td>"
-        "<td colspan=6><input type=file name=uploadfile size=25></td></tr>\n"
-        "</form>\n", dir_uri, admin_file);
-        }
-    }
-
-  GRSThttpPrintf(&bp, "</table>\n");
-
-  if (!is_dnlists_dir) adminfooter(&bp, dn, help_uri, dir_uri, NULL);
-
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE);
-  GRSThttpWriteOut(&bp);
-}
-
diff --git a/org.gridsite.core/src/grst_admin_gacl.c b/org.gridsite.core/src/grst_admin_gacl.c
deleted file mode 100644 (file)
index 2a40b28..0000000
+++ /dev/null
@@ -1,968 +0,0 @@
-/*
-  Copyright (c) 2003, Shiv Kaushal, University of Manchester
-  All rights reserved.
-
-  Redistribution and use in source and binary forms, with or
-  without modification, are permitted provided that the following
-  conditions are met:
-
-  o Redistributions of source code must retain the above
-  copyright notice, this list of conditions and the following
-  disclaimer.
-  o Redistributions in binary form must reproduce the above
-  copyright notice, this list of conditions and the following
-  disclaimer in the documentation and/or other materials
-  provided with the distribution.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-   CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-   BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-   TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-   ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-   POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*-----------------------------------------------------------*
-* This program is part of GridSite: http://www.gridsite.org/ *
-*------------------------------------------------------------*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <gridsite.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-extern char *grst_perm_syms[];
-extern int grst_perm_vals[];
-
-#include "grst_admin.h"
-
-// CGI GACL Editor interface functions
-void show_acl(int admin, GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file);
-void new_entry_form(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file);
-void new_entry(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file);
-void del_entry(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file);
-void edit_entry_form(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file);
-void edit_entry(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file);
-void add_cred_form(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file);
-void add_cred(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file);
-void del_cred(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file);
-void del_entry_sure(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file);
-void del_cred_sure(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file);
-void admin_continue(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file, GRSThttpBody *bp);
-
-// Functions for producing HTML output
-void StartHTML(GRSThttpBody *bp, char *dir_uri, char* dir_path);
-void StartForm(GRSThttpBody *bp, char* dir_uri, char* dir_path, char* admin_file, int timestamp, char* target_function);
-void EndForm(GRSThttpBody *bp);
-void GRSTgaclCredTableStart(GRSThttpBody *bp);
-void GRSTgaclCredTableAdd(GRSTgaclUser *user, GRSTgaclEntry *entry, GRSTgaclCred *cred, GRSTgaclNamevalue *namevalue, int cred_no, int entry_no, int admin, int timestamp, GRSThttpBody *bp, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file);
-void GRSTgaclCredTableEnd(GRSTgaclEntry* entry, int entry_no, int admin, int timestamp, GRSThttpBody *bp, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file);
-
-// ACL Manipulation functions
-int GACLentriesInAcl(GRSTgaclAcl *acl);
-int GRSTgaclCredsInEntry(GRSTgaclEntry *entry);
-void check_acl_save(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file, GRSTgaclUser* user, GRSTgaclAcl *acl, GRSThttpBody *bp);
-void GACLeditGetPerms(GRSTgaclEntry *entry);
-GRSTgaclEntry *GACLreturnEntry(GRSTgaclAcl *acl, int entry_no);
-GRSTgaclCred *GACLreturnCred(GRSTgaclEntry *entry, int cred_no);
-
-void StringHTMLEncode (char* string, GRSThttpBody *bp);
-
-void revert_acl(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file);
-
-/*****************************************/
-/********** FUNCTIONS FOLLOW *************/
-/*****************************************/
-
-void show_acl(int admin, GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file){
-  // Shows the contents of the ACL. Gives edit 'buttons' if (int admin) == 1
-  GRSTgaclAcl *acl;
-  GRSTgaclEntry *entry;
-  GRSTgaclCred *cred;
-  GRSTgaclNamevalue *namevalue;
-  int entry_no, cred_no, allow, deny,timestamp;
-  GRSThttpBody bp;
-  char* AclFilename;
-  struct stat file_info;
-  int history_mode=0;
-
-  if (admin==2){
-    history_mode=1;
-    admin=0;
-  }
-
-  /*double-check access permision*/
-  if (!GRSTgaclPermHasAdmin(perm)) admin=0;
-
-  StartHTML(&bp, dir_uri, dir_path);
-
-  /* Load ACL from file and get timestamp*/
-  if (history_mode==1) {
-    AclFilename=malloc(strlen(dir_path)+strlen(file)+2);
-    strcpy(AclFilename, dir_path);
-    strcat(AclFilename, "/");
-    strcat(AclFilename, file);
-  }
-  else  AclFilename=GRSTgaclFileFindAclname(dir_path);
-  
-  if (AclFilename==NULL){
-    GRSThttpPrintf ( &bp,"The ACL was not found !!!<br>\n");
-    admin_continue(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, &bp);
-    return;
-  }
-
-  stat(GRSTgaclFileFindAclname(dir_path), &file_info);
-  timestamp=file_info.st_mtime;
-  acl = GRSTgaclAclLoadFile(AclFilename);
-
-  if (acl==NULL){
-    GRSThttpPrintf ( &bp,"The ACL was found but could not be loaded - it could be incorrectly formatted<br>\n");
-    adminfooter(&bp, dn, help_uri, dir_uri, NULL);
-    GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE); 
-    GRSThttpWriteOut(&bp);
-    return;
-  }
-
-  if (admin) GRSThttpPrintf (&bp,"<a href=\"%s%s?cmd=new_entry_form&diruri=%s&timestamp=%d\">New&nbsp;Entry</a><br>\n", dir_uri, admin_file, dir_uri, timestamp );
-
-  // Start with the first entry in the list and work through
-  entry=acl->firstentry;
-  entry_no=1;
-  while (entry!=NULL){
-
-    GRSThttpPrintf (&bp,"<br>Entry %d:\n", entry_no);
-    if (admin){
-      GRSThttpPrintf (&bp,"<a href=\"%s%s?cmd=edit_entry_form&entry_no=%d&diruri=%s&timestamp=%d\">Edit&nbsp;Entry</a> ", dir_uri, admin_file, entry_no, dir_uri, timestamp );
-      GRSThttpPrintf (&bp,"<a href=\"%s%s?cmd=del_entry_sure&entry_no=%d&diruri=%s&timestamp=%d\">Delete&nbsp;Entry</a> ",dir_uri, admin_file, entry_no, dir_uri, timestamp );
-      GRSThttpPrintf (&bp,"<p>\n");
-    }
-
-    GRSTgaclCredTableStart(&bp);
-
-    // Start with the first credential in the entry and work through
-    cred=entry->firstcred;
-    cred_no=1;
-    while (cred!=NULL){
-      namevalue=cred->firstname;
-      GRSTgaclCredTableAdd(user, entry, cred, namevalue, cred_no, entry_no, admin, timestamp, &bp, dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-      // Change to next credential
-      cred=cred->next;
-      cred_no++;
-    }
-
-    GRSTgaclCredTableEnd (entry, entry_no, admin, timestamp, &bp, dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-    // Change to next entry
-    entry=entry->next;
-    entry_no++;
-  }
-
-  if (!admin && GRSTgaclPermHasAdmin(perm) && !history_mode) //Print a link for admin mode, if not in admin mode but the user has admin permissions
-    GRSThttpPrintf (&bp,"<a href=\"%s%s?cmd=admin_acl&diruri=%s&timestamp=%d\">Admin&nbsp;Mode</a>",  dir_uri, admin_file, dir_uri, timestamp );
-  if (history_mode==1 && GRSTgaclDNlistHasUser(getenv("REDIRECT_GRST_ADMIN_LIST"), user)){
-    StartForm(&bp, dir_uri, dir_path, admin_file, timestamp, "revert_acl");
-//GRSThttpPrintf (&bp,"<a href=\"%s%s?cmd=revert_acl&diruri=%s&timestamp=%d&file=%s\">Revert to this Version</a>",  dir_uri, admin_file, dir_uri, timestamp, file );
-    GRSThttpPrintf (&bp, "<input type=\"hidden\" name=\"file\" value=\"%s\">\n", file);
-    // Revert Button
-    GRSThttpPrintf (&bp, "<p align=center><input type=\"submit\" value=\"Revert to this ACL\" name=\"B1\"></p>\n</form>\n");
-  }
-
-  adminfooter(&bp, dn, help_uri, dir_uri, NULL);
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE); GRSThttpWriteOut(&bp); return;
-}
-
-
-void new_entry_form(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm,char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file){
-  // Presents the user with a form asking for details required to create a new entry
-  GRSThttpBody bp;
-  int timestamp=atol(GRSThttpGetCGI("timestamp"));
-  GRSTgaclCred* cred;
-  GRSTgaclEntry *entry;
-  GRSTgaclNamevalue* namevalue;
-
-  if (!GRSTgaclPermHasAdmin(perm)) GRSThttpError ("403 Forbidden");
-
-  StartHTML(&bp, dir_uri, dir_path);
-  StartForm(&bp, dir_uri, dir_path, admin_file, timestamp, "new_entry");
-  GRSThttpPrintf (&bp, "<font size=\"4\"><b>NEW ENTRY IN ACL FOR %s </b></font></p>\n", dir_uri);
-
-  GRSTgaclCredTableStart(&bp);
-  GRSTgaclCredTableAdd(user, entry,cred, namevalue, 0, 0, 0, timestamp, &bp, dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  GRSTgaclCredTableEnd (entry, 0, 0, timestamp, &bp, dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-
-  /*Submit and reset buttons -  submit button sends the data in the form back to the script & new_entry() to be called*/
-  EndForm(&bp);
-  admin_continue(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, &bp);
-  return;
-}
-
-void new_entry(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file){
-  // Processes the information entered into the form from new_entry_form() and adds a new entry to the ACL
-  GRSTgaclAcl *acl;
-  GRSTgaclEntry *entry;
-  GRSTgaclCred *cred;
-  char *type, *value;
-  GRSThttpBody bp;
-  if (!GRSTgaclPermHasAdmin(perm)) GRSThttpError ("403 Forbidden");
-
-  // Get new credential info and perform checks
-  type=GRSThttpGetCGI("type");
-  value=GRSThttpGetCGI("cred0_value");
-
-  if (strcmp(type, "not_chosen")==0){
-    GRSThttpError ("500 Invalid input - credential type not chosen");
-    return;
-  }
-
-  // Create the credential
-  cred=GRSTgaclCredNew(type);
-  if (strcmp(type, "person")==0) GRSTgaclCredAddValue(cred,"dn", value);
-  else if (strcmp(type, "dn-list")==0) GRSTgaclCredAddValue(cred, "url", value);
-  else if (strcmp(type, "voms")==0) GRSTgaclCredAddValue(cred, "fqan", value);
-  else if (strcmp(type, "dns")==0) GRSTgaclCredAddValue(cred, "hostname", value);
-  else if (strcmp(type, "any-user")==0) {} // namevalue not entered for any-user credential
-  else{
-    GRSThttpError ("500 Invalid input - credential type not valid");
-    return;
-  }
-
-  // Create and empty entry, add the credential and get permissions
-  entry = GRSTgaclEntryNew();
-  GRSTgaclEntryAddCred(entry, cred);
-  GACLeditGetPerms(entry);
-
-  // Load the ACL, add the entry and save
-  acl = GRSTgaclAclLoadFile(GRSTgaclFileFindAclname(dir_path));
-  GRSTgaclAclAddEntry(acl, entry);
-  check_acl_save(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, user, acl, &bp);
-  return;
-}
-
-void del_entry(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file){
-  // Deletes the entry denoted by the GCI variable "entry_no"*/
-  int entry_no;
-  GRSTgaclAcl *acl;
-  GRSTgaclEntry *previous, *entry;
-  GRSThttpBody bp;
-
-  if (!GRSTgaclPermHasAdmin(perm)) GRSThttpError ("403 Forbidden");
-
-  // Load the ACL
-  acl = GRSTgaclAclLoadFile(GRSTgaclFileFindAclname(dir_path));
-
-  // Get the number of the entry to be deleted and check okay to delete
-  entry_no=atol(GRSThttpGetCGI("entry_no"));
-  if(GACLentriesInAcl(acl)<=1){
-    StartHTML(&bp, dir_uri, dir_path);
-    GRSThttpPrintf (&bp, "ERROR: Cannot delete all entries from the ACL<br>\n");
-    admin_continue(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, &bp);
-    return;
-  }
-
-  // Get pointer to entry and previous entry
-  entry = GACLreturnEntry(acl, entry_no);
-  if (entry_no!=1) previous = GACLreturnEntry(acl, entry_no-1);
-
-  if(entry==NULL || entry_no<1 || entry_no>GACLentriesInAcl(acl) ){
-    GRSThttpError ("500 Unable to read entry from ACL file");
-    return;
-  }
-
-  // Perform deletion from the list by changing pointers
-  if (entry_no==1) acl->firstentry=entry->next;
-  else if (entry_no==GACLentriesInAcl(acl)) previous->next=NULL;
-  else previous->next=entry->next;
-
-  // Save ACL and exit
-  check_acl_save(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, user, acl, &bp);
-
-  return;
-}
-
-
-void edit_entry_form(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file){
-  // Presents the user with an editable form containing details of entry denoted by CGI variable entry_no*/
-  int entry_no, cred_no, i, admin=0, timestamp=atol(GRSThttpGetCGI("timestamp"));
-  GRSTgaclAcl *acl;
-  GRSTgaclEntry *entry;
-  GRSTgaclCred *cred;
-  GRSTgaclNamevalue *namevalue;
-  //  struct _GACLnamevalue *namevalue;
-  GRSThttpBody bp;
-
-  if (!GRSTgaclPermHasAdmin(perm)) GRSThttpError ("403 Forbidden");
-
-  // Load ACL from file
-  acl = GRSTgaclAclLoadFile(GRSTgaclFileFindAclname(dir_path));
-
-  // Get pointer to the entry and check okay
-  entry_no=atol(GRSThttpGetCGI("entry_no"));
-  entry = GACLreturnEntry(acl, entry_no);
-  if(entry==NULL || entry_no<1 || entry_no>GACLentriesInAcl(acl) ){
-    GRSThttpError ("500 Unable to read from ACL file");
-    return;
-  }
-
-  StartHTML(&bp, dir_uri, dir_path);
-  GRSThttpPrintf (&bp, "<b><font size=\"4\">EDITING ENTRY %d IN ACL FOR %s </font></b></p>\n", entry_no, dir_uri);
-
-  // Start with first credential in the entry and display them in order*/
-  cred=entry->firstcred;
-  cred_no=1;
-  StartForm(&bp, dir_uri, dir_path, admin_file, timestamp, "edit_entry");
-  GRSThttpPrintf (&bp, "<input type=\"hidden\" name=\"entry_no\" value=\"%d\">\n", entry_no);
-
-  GRSTgaclCredTableStart(&bp);
-
-  while (cred!=NULL){
-    // Start with the first namevalue in the credential
-    namevalue=cred->firstname;
-    GRSTgaclCredTableAdd(user, entry, cred, namevalue, cred_no, entry_no, admin, timestamp, &bp, dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-    // Change to next credential
-    cred=cred->next;
-    cred_no++;
-  }
-  GRSTgaclCredTableEnd (entry, entry_no, admin, timestamp, &bp, dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  EndForm(&bp);
-
-  admin_continue(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, &bp);
-  return;
-}
-
-
-void edit_entry(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file){
-  //Processes the information entered into the form from edit_entry_form() and updates the entry corresponding to entry_no*/
-  int entry_no, cred_no, i;
-  GRSTgaclAcl *acl;
-  GRSTgaclEntry *entry;
-  GRSTgaclCred *cred;
-  GRSTgaclNamevalue *namevalue;
-  char variable[30];
-  GRSThttpBody bp;
-
-  if (!GRSTgaclPermHasAdmin(perm)) GRSThttpError ("403 Forbidden");
-
-  // Load the ACL
-  acl = GRSTgaclAclLoadFile(GRSTgaclFileFindAclname(dir_path));
-
-  // Get pointer to the entry and perform checks
-  entry_no=atol(GRSThttpGetCGI("entry_no"));
-  entry = GACLreturnEntry(acl, entry_no);
-  if(entry==NULL || entry_no<1 || entry_no>GACLentriesInAcl(acl) ){
-    GRSThttpError ("500 Unable to read from ACL file");
-    return;
-  }
-
-  // Start with the first credential and update each one
-  cred=entry->firstcred;
-  cred_no=1;
-
-  while (cred!=NULL){
-   if (strcmp(cred->type, "any-user")!=0){
-      namevalue=cred->firstname;
-      sprintf(variable, "cred%d_value", cred_no);
-      namevalue->value=GRSThttpGetCGI(variable);
-   }
-    //Change to next credential*/
-    cred=cred->next;
-    cred_no++;
-  }
-
-  // Update permissions
-  GACLeditGetPerms(entry);
-  check_acl_save(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, user, acl, &bp);
-  return;
-}
-
-
-void add_cred_form(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file){
-  // Presents the user with a form asking for details required to create a new credential in the entry denoted by entry_no
-  GRSThttpBody bp;
-  int timestamp=atol(GRSThttpGetCGI("timestamp")), entry_no=atol(GRSThttpGetCGI("entry_no"));
-  GRSTgaclAcl *acl;
-  GRSTgaclEntry* entry;
-  GRSTgaclCred* cred;
-  GRSTgaclNamevalue* namevalue;
-  
-  if (!GRSTgaclPermHasAdmin(perm)) GRSThttpError ("403 Forbidden");
-
-  acl = GRSTgaclAclLoadFile(GRSTgaclFileFindAclname(dir_path)); // Load the ACL
-
-  //Get pointer to the entry  and perform checks
-  entry = GACLreturnEntry(acl, entry_no);
-  if(entry==NULL || entry_no<1 || entry_no>GACLentriesInAcl(acl) ){
-    GRSThttpError ("500 Unable to read from ACL file");
-    return;
-  }
-
-
-  if (strcmp(GRSThttpGetCGI("cmd"), "add_cred_form")==0){ //if not a new entry check to see if <any-user> cred exists
-    cred=entry->firstcred;
-    while (cred!=NULL) {
-      if (strcmp (cred->type, "any-user")==0) {
-        StartHTML(&bp, dir_uri, dir_path);
-        GRSThttpPrintf (&bp, "ERROR: AND-ing \"any-user\" credential with other credential does not make sense <br>\n");
-        admin_continue(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, &bp);
-       return;
-      }
-     cred=cred->next;
-    }
-  }
-
-  StartHTML(&bp, dir_uri, dir_path);
-  GRSThttpPrintf (&bp, " <font size=\"4\"><b>NEW CREDENTIAL IN ENTRY %d OF ACL FOR %s</b></font></p>\n", entry_no, dir_uri);
-  StartForm(&bp, dir_uri, dir_path, admin_file, timestamp, "add_cred");
-
-  GRSThttpPrintf (&bp, " <input type=\"hidden\" name=\"entry_no\" value=\"%d\">\n", entry_no);
-
-  GRSTgaclCredTableStart(&bp);
-  GRSTgaclCredTableAdd(user, entry, cred, namevalue, 0, 0, 0, timestamp, &bp, dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  GRSTgaclCredTableEnd (entry, 0, 0, timestamp, &bp, dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-
-  EndForm(&bp);
-  admin_continue(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, &bp);
-  return;
-}
-
-
-void add_cred(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file){
-  // Processes the information entered into the form [add_cred_form()]and adds a new credential to the entry corresponding to entry_no
-  int entry_no;
-  GRSTgaclAcl *acl;
-  GRSTgaclEntry *entry;
-  GRSTgaclCred *cred;
-  GRSThttpBody bp;
-  char *type, *value;
-
-  if (!GRSTgaclPermHasAdmin(perm)) GRSThttpError ("403 Forbidden");
-
-  acl = GRSTgaclAclLoadFile(GRSTgaclFileFindAclname(dir_path));// Load the ACL
-
-  // Get pointer to the entry  and perform checks
-  entry_no=atol(GRSThttpGetCGI("entry_no"));
-  entry = GACLreturnEntry(acl, entry_no);
-  if(entry==NULL || entry_no<1 || entry_no>GACLentriesInAcl(acl)){
-    GRSThttpError ("500 Unable to read from ACL file");
-    return;
-  }
-
-  // Create new credential and add it to entry
-  type=GRSThttpGetCGI("type");
-  value=GRSThttpGetCGI("cred0_value");
-  cred=GRSTgaclCredNew(type);
-  if      (strcmp(type, "person")  ==0) GRSTgaclCredAddValue(cred,"dn", value);
-  else if (strcmp(type, "dn-list") ==0) GRSTgaclCredAddValue(cred, "url", value);
-  else if (strcmp(type, "voms")    ==0) GRSTgaclCredAddValue(cred, "fqan", value);
-  else if (strcmp(type, "dns")     ==0) GRSTgaclCredAddValue(cred, "hostname", value);
-  else if (strcmp(type, "any-user")==0) {}// namevalue not entered for any-user credential
-  else{
-    GRSThttpError ("500 Credential type not valid");
-    return;
-  }
-  GRSTgaclEntryAddCred(entry, cred);
-
-  check_acl_save(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, user, acl, &bp);
-  return;
-}
-
-
-void del_cred(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file){
-  // Deletes the credential denoted by the GCI variable "cred_no", in the entry denoted by "entry_no"
-  int entry_no, cred_no;
-  GRSTgaclAcl *acl;
-  GRSTgaclEntry *entry;
-  GRSTgaclCred *previous, *cred;
-  GRSThttpBody bp;
-
-  if (!GRSTgaclPermHasAdmin(perm)) GRSThttpError ("403 Forbidden");
-
-  acl = GRSTgaclAclLoadFile(GRSTgaclFileFindAclname(dir_path));
-
-  // Get pointer to the entry and perform checks
-  entry_no=atol(GRSThttpGetCGI("entry_no"));
-  entry = GACLreturnEntry(acl, entry_no);
-  if(entry==NULL || entry_no<1 || entry_no>GACLentriesInAcl(acl) ){
-    GRSThttpError ("500 Unable to read from ACL file");
-    return;
-  }
-  // Get pointer the the credential and perform checks
-  cred_no=atol(GRSThttpGetCGI("cred_no"));
-  cred=GACLreturnCred(entry, cred_no);
-  if(entry==NULL || entry_no<1 || cred_no>GRSTgaclCredsInEntry(entry)){
-    GRSThttpError ("500 Unable to read from ACL file");
-    return;
-  }
-  // Get pointer to previous credential - if needed
-  if (cred_no!=1) previous = GACLreturnCred(entry, cred_no-1);
-
-  // Perform deletion from the list by changing pointers
-  if (cred_no==1) entry->firstcred=cred->next;
-  else if (cred_no==GRSTgaclCredsInEntry(entry)) previous->next=NULL;
-  else previous->next=cred->next;
-
-  check_acl_save(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, user, acl, &bp);
-  return;
-}
-
-void admin_continue(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file, GRSThttpBody *bp){
-  // Single line printed out to forward users back to show_acl in admin mode
-  // Should ALWAYS called from another function so no HTML header required
-  // Should ALWAYS be the end of a page
-  GRSThttpPrintf (bp, "\n<br><a href=\"%s%s?diruri=%s&cmd=admin_acl&timestamp=%d\">Click&nbsp;Here</a> to return to the editor", dir_uri,admin_file,dir_uri, time(NULL));
-  adminfooter(bp, dn, help_uri, dir_uri, NULL);
-  GRSThttpPrintHeaderFooter(bp, dir_path, GRST_FOOTFILE);
-  GRSThttpWriteOut(bp);
-  return;
-}
-
-
-void del_entry_sure(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file){
-  // Prints out entry denoted by entry_no and asks if the user really wants to delete it
-  GRSTgaclAcl *acl;
-  GRSTgaclEntry *entry;
-  GRSTgaclCred *cred;
-  GRSTgaclNamevalue *namevalue;
-  int entry_no, cred_no, allow, deny, i, timestamp;
-  GRSThttpBody bp;
-
-  if (!GRSTgaclPermHasAdmin(perm)) GRSThttpError ("403 Forbidden");
-
-  acl = GRSTgaclAclLoadFile(GRSTgaclFileFindAclname(dir_path));// Load ACL from file
-
-  if (acl==NULL){
-    GRSThttpError ("500 Unable to read from ACL file");
-    return;
-  }
-
-  // Get pointer to the entry and check okay
-  entry_no=atol(GRSThttpGetCGI("entry_no"));
-  entry = GACLreturnEntry(acl, entry_no);
-  if(entry==NULL || entry_no<1 || entry_no>GACLentriesInAcl(acl) ){
-    GRSThttpError ("500 Unable to read from ACL file");
-    return;
-  }
-
-  StartHTML(&bp, dir_uri, dir_path);
-  GRSThttpPrintf (&bp, "<h1 align=center>Do you really want to delete the following entry?</h1><br><br>\n");
-  GRSThttpPrintf (&bp,"<br>Entry %d:<br>\n", entry_no);
-
-  // Print the entry out
-  // Start with the first credential in the entry and work through
-  cred=entry->firstcred;
-  cred_no=1;
-
-  GRSTgaclCredTableStart(&bp);
-  while (cred!=NULL){
-    // Start with the first namevalue in the credential
-    namevalue=cred->firstname;
-    GRSTgaclCredTableAdd(user, entry, cred, namevalue, cred_no, entry_no, 0, 0, &bp, dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-    // Change to next credential
-    cred=cred->next;
-    cred_no++;
-  }
-
-  GRSTgaclCredTableEnd (entry, entry_no, 0, 0, &bp, dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-
-  StartForm(&bp, dir_uri, dir_path, admin_file, atol(GRSThttpGetCGI("timestamp")), "del_entry");
-  GRSThttpPrintf (&bp, "<input type=\"hidden\" name=\"entry_no\" value=\"%d\">\n", entry_no);
-  GRSThttpPrintf (&bp, " <p align=center><input type=\"submit\" value=\"Yes\" name=\"B1\"></p>\n</form>\n");
-
-  admin_continue(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, &bp);
-  return;
-}
-
-void del_cred_sure(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file){
-  // Prints out credential denoted by entry_no/cred_no and asks if the user really wants to delete it
-  GRSTgaclAcl *acl;
-  GRSTgaclEntry *entry;
-  GRSTgaclCred *cred;
-  GRSTgaclNamevalue *namevalue;
-  int entry_no, cred_no, allow, deny, timestamp, i;
-  GRSThttpBody bp;
-
-  if (!GRSTgaclPermHasAdmin(perm)) GRSThttpError ("403 Forbidden");
-
-  acl = GRSTgaclAclLoadFile(GRSTgaclFileFindAclname(dir_path));// Load ACL from file
-
-  if (acl==NULL){
-    GRSThttpError ("500 Unable to read from ACL file");
-    return;
-  }
-
-  // Get pointer to the entry and check okay
-  entry_no=atol(GRSThttpGetCGI("entry_no"));
-  entry = GACLreturnEntry(acl, entry_no);
-  if(entry==NULL || entry_no<1 || entry_no>GACLentriesInAcl(acl) ){
-    GRSThttpError ("500 Unable to read from ACL file");
-    return;
-  }
-
-  // Get pointer to the credential and check okay
-  cred_no=atol(GRSThttpGetCGI("cred_no"));
-  cred=GACLreturnCred(entry, cred_no);
-  if(entry==NULL || entry_no<1 || cred_no>GRSTgaclCredsInEntry(entry)){
-    GRSThttpError ("500 Unable to read from ACL file");
-    return;
-  }
-
-  if(GRSTgaclCredsInEntry(entry)<=1){
-    del_entry_sure(user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-    return;
-  }
-
-  StartHTML(&bp, dir_uri, dir_path);
-  GRSThttpPrintf (&bp, "<h1 align=center>Do you really want to delete the following credential from entry %d?</h1><br><br>", entry_no);
-
-  // Print the credential out
-  GRSTgaclCredTableStart(&bp);
-  GRSTgaclCredTableAdd(user, entry, cred, cred->firstname, cred_no, entry_no, 0, 0, &bp, dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  GRSTgaclCredTableEnd (entry, entry_no, 0, 0, &bp, dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  GRSThttpPrintf (&bp,"<br>\n");
-
-  // Yes Button
-  StartForm(&bp, dir_uri, dir_path, admin_file, atol(GRSThttpGetCGI("timestamp")), "del_cred");
-  GRSThttpPrintf (&bp, "<input type=\"hidden\" name=\"entry_no\" value=\"%d\">\n", entry_no);
-  GRSThttpPrintf (&bp, "<input type=\"hidden\" name=\"cred_no\" value=\"%d\">\n", cred_no);
-  GRSThttpPrintf (&bp, " <p align=center><input type=\"submit\" value=\"Yes\" name=\"B1\"></p>\n</form>\n");
-
-  admin_continue(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, &bp);
-  return;
-}
-
-
-int GACLentriesInAcl(GRSTgaclAcl *acl){
-  // Returns the number of entries in acl
-  GRSTgaclEntry *entry;
-  int number;
-
-  entry=acl->firstentry;
-  number=0;
-
-  while (entry!=NULL)
-  {
-    number++;
-    entry=entry->next;
-  }
-
-  return number;
-}
-
-int GRSTgaclCredsInEntry(GRSTgaclEntry *entry){
-  // Returns the number of credentials in entry
-  int number;
-  GRSTgaclCred *cred;
-
-  cred=entry->firstcred;
-  number=0;
-
-  while (cred!=NULL)
-  {
-    number++;
-    cred=cred->next;
-  }
-
-  return number;
-}
-
-
-void GACLeditGetPerms(GRSTgaclEntry *entry){
-  // Updates the permissions entry using permissions from a form produced using GRSTgaclCredTableEnd
-  int i;
-  char buf[30];
-
-
-  for (i=0; grst_perm_syms[i]!=NULL; i++)  /* Print the list of allowed permissions*/
-  {
-    sprintf (buf, "allow_%s", grst_perm_syms[i]); // Update allowed
-    if (strcmp (GRSThttpGetCGI(buf), "ON") == 0 )  GRSTgaclEntryAllowPerm(entry, grst_perm_vals[i]);  else GRSTgaclEntryUnallowPerm(entry, grst_perm_vals[i]);
-
-    sprintf (buf, "deny_%s", grst_perm_syms[i]); // Update denied
-    if (strcmp (GRSThttpGetCGI(buf), "ON") == 0 )  GRSTgaclEntryDenyPerm(entry, grst_perm_vals[i]);  else GRSTgaclEntryUndenyPerm(entry, grst_perm_vals[i]);
-
-  }
-
-  return;
-}
-
-GRSTgaclEntry *GACLreturnEntry(GRSTgaclAcl *acl, int entry_no){
-  // Returns a pointer to entry in ACL denoted by entry_no, returns NULL if not found
-  int number;
-  GRSTgaclEntry *entry;
-
-  if (acl==NULL) return NULL;
-
-  entry=acl->firstentry;
-  number=1;
-
-  while (entry!=NULL)
-  {
-    if (number==entry_no) return entry;
-    number++;
-    entry=entry->next;
-  }
-
-  return NULL;
-}
-
-
-GRSTgaclCred *GACLreturnCred(GRSTgaclEntry *entry, int cred_no){
-  // Returns a pointer to credential denoted by cred_no in entry, returns NULL if not found
-  int number;
-  GRSTgaclCred *cred;
-
-  if (entry==NULL) return NULL;
-
-  cred=entry->firstcred;
-  number=1;
-
-  while (cred!=NULL)
-  {
-    if (number==cred_no) return cred;
-    number++;
-    cred=cred->next;
-  }
-
-  return NULL;
-}
-void StartHTML(GRSThttpBody *bp, char *dir_uri, char* dir_path){
-  //Start HTML output and insert page title
-  printf("Status: 200 OK\nContent-Type: text/html\n");
-  GRSThttpBodyInit(bp);
-  GRSThttpPrintf(bp, "<title>Access Control List for %s</title>\n", dir_uri);
-  GRSThttpPrintHeaderFooter(bp, dir_path, GRST_HEADFILE);
-  return;
-}
-void StartForm(GRSThttpBody *bp, char* dir_uri, char* dir_path, char* admin_file, int timestamp, char* target_function){
-  // Starts an HTML form with gridsite admin as the target and target_function as the value of cmd.
-  // Also inputs the dir_uri and the timestamp
-  GRSThttpPrintf (bp, "<form method=\"POST\" action=\"%s%s?diruri=%s\">\n", dir_uri, admin_file, dir_uri);
-  GRSThttpPrintf (bp, " <input type=\"hidden\" name=\"cmd\" value=\"%s\">\n", target_function);
-  GRSThttpPrintf (bp, " <input type=\"hidden\" name=\"timestamp\" value=\"%d\">\n", timestamp);
-  return;
-}
-
-void EndForm(GRSThttpBody *bp){
-  GRSThttpPrintf (bp, " <br><input type=\"submit\" value=\"Submit\" name=\"B1\"><input type=\"reset\" value=\"Reset\" name=\"B2\"></p>\n");
-  GRSThttpPrintf (bp, "</form>\n");
-  return;
-}
-
-void GRSTgaclCredTableStart(GRSThttpBody *bp){
-  //Starts an HTML table of credentials by setting the column widths and inputting the headings
-  GRSThttpPrintf (bp,"<table border=\"1\" cellpadding=\"2\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" width=\"100%\" id=\"CredentialTable\">");
-  GRSThttpPrintf (bp,"<tr><td align=center width=\"10%\"><b>Credential No.</td><td align=center width=\"15%\"><b>Type</td><td align=left width=\"75%\"><b>Value</td></tr>");
-  return;
-}
-
-void GRSTgaclCredTableAdd(GRSTgaclUser *user, GRSTgaclEntry *entry, GRSTgaclCred *cred, GRSTgaclNamevalue *namevalue, int cred_no, int entry_no, int admin, int timestamp, GRSThttpBody *bp, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file){
-  // Adds the credential "cred" to a table started byGRSTgaclCredTableStart allowing the user to edit if appropriate
-  char* cmd = GRSThttpGetCGI("cmd");
-  int edit_values=0, new_cred=0, allow_new_person=1;
-  int site_admin=GRSTgaclDNlistHasUser(getenv("REDIRECT_GRST_ADMIN_LIST"), user);
-
-  if (strcmp(cmd, "new_entry_form")==0 || strcmp(cmd, "add_cred_form")==0) new_cred=1;
-  if (new_cred || strcmp(cmd, "edit_entry_form")==0) edit_values=1;
-
-  if (new_cred) { /*Print out type and descriptor*/
-     if (strcmp(cmd, "add_cred_form")==0){ /*if not a new entry check to see if <person> cred exists.*/
-       cred=entry->firstcred;
-       while (cred!=NULL) {if (strcmp (cred->type, "person")==0) allow_new_person=0; cred=cred->next;}
-     }
-     //create dummy credential for the user to edit
-     cred=GRSTgaclCredNew("new");
-     GRSTgaclCredAddValue(cred, "", "");
-     namevalue=cred->firstname;
-     //Drop down list of types
-     GRSThttpPrintf(bp,"<tr><td align=center >New</td>");
-     GRSThttpPrintf(bp,"<td align=center >");
-     GRSThttpPrintf (bp, " <select size=\"1\" name=\"type\">\n");
-     GRSThttpPrintf (bp, " <option selected value=\"not_chosen\">(choose)</option>\n");
-     if (allow_new_person) GRSThttpPrintf (bp, " <option value=\"person\">Person &lt;dn&gt; &lt;/dn&gt;</option>\n");
-     GRSThttpPrintf (bp, " <option value=\"dn-list\">DN-List &lt;url&gt; &lt;/url&gt;</option>\n");
-     GRSThttpPrintf (bp, " <option value=\"dns\">DNS &lt;hostname&gt; &lt;/hostname&gt;</option>\n");
-     GRSThttpPrintf (bp, " <option value=\"voms\">VOMS &lt;fqan&gt; &lt;/fqan&gt;</option>\n");
-     // Only alow any-user credential to be chosen if it is  new entry
-     if (strcmp(cmd, "new_entry_form")==0) GRSThttpPrintf (bp, " <option value=\"any-user\">Any User</option>\n");
-     GRSThttpPrintf (bp, " </select></td>");
-   }
-
-  else { //Print out type and descriptor for existing cred
-
-    GRSThttpPrintf(bp,"<tr><td align=center >%d", cred_no);
-    if (admin) GRSThttpPrintf (bp,"<a href=\"%s%s?diruri=%s&cmd=del_cred_sure&entry_no=%d&cred_no=%d&timestamp=%d\">(Delete)</a>", dir_uri,admin_file,dir_uri, entry_no, cred_no, timestamp);
-    GRSThttpPrintf(bp, "</td><td align=center >%s ", cred->type);
-  }
-
-  if (strcmp(cred->type, "any-user")==0) GRSThttpPrintf (bp, "</td><td>&nbsp;"); /* Do not print out namevalue for any-user credential*/
-  else{
-    if (edit_values){ // Place namevalue in an editable box if appropriate
-      GRSThttpPrintf (bp, "<td align=left><input type=\"text\" name=\"cred%d_value\"\n", cred_no);
-      GRSThttpPrintf (bp, "size=\"50\" value=\"");
-      StringHTMLEncode(namevalue->value, bp);
-      GRSThttpPrintf (bp, "\">");
-    }
-    else if (strcmp(cred->type, "dn-list")==0){
-         GRSThttpPrintf(bp, "<td align=left ><a href=\"");
-        StringHTMLEncode(namevalue->value, bp);
-        GRSThttpPrintf(bp, " \">");
-        StringHTMLEncode(namevalue->value, bp);
-        GRSThttpPrintf(bp, "</a>");
-      }
-    else { GRSThttpPrintf(bp, "<td align=left> "); StringHTMLEncode(namevalue->value, bp);}
-
-  }
-  //Print out warning symbol if cred being printed relates to current user - but NOT for users in site admin list
-  if (GRSTgaclUserHasCred(user, cred) && !site_admin)  GRSThttpPrintf(bp, "<font color=red><b>&nbsp;&lt;--</b></font>");
-  GRSThttpPrintf(bp, "</td></tr>");
-}
-
-void GRSTgaclCredTableEnd(GRSTgaclEntry* entry, int entry_no, int admin, int timestamp, GRSThttpBody *bp, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file){
-  // Finishes off a table of credentials by inputting "Add Credential" link and a list of premissions in the final row
-  int i, blank_perms, edit_perms, show_perms;
-  char* cmd = GRSThttpGetCGI("cmd");
-
-  if (strcmp(cmd, "add_cred_form")==0 ||strcmp(cmd, "del_cred_sure")==0) show_perms=0; else show_perms=1;
-  if (strcmp(cmd, "edit_entry_form")==0 || strcmp(cmd, "new_entry_form")==0) edit_perms=1; else edit_perms=0;
-  if (strcmp(cmd, "new_entry_form")==0) blank_perms=1; else blank_perms=0;
-
-  // If showing the last row is not required then exit
-  if (show_perms==0){GRSThttpPrintf (bp,"</table><br>\n"); return;}
-
-  GRSThttpPrintf (bp,"<tr><td align=center>");
-
-  if (admin) GRSThttpPrintf (bp,"<a href=\"%s%s?diruri=%s&cmd=add_cred_form&entry_no=%d&timestamp=%d\">Add&nbsp;Credential</a>", dir_uri,admin_file,dir_uri, entry_no, timestamp);
-
-  GRSThttpPrintf (bp, "</td>\n<td>&nbsp;</td><td align=left>");
-
-  if (blank_perms) entry->allowed=entry->denied=GRST_PERM_NONE;
-
-  // Show Permissions - will produce a list or a list of check boxes depending on whether the permissions are to be edited or not
-  GRSThttpPrintf (bp, "<b>Allowed:</b>  ");
-  for (i=0; grst_perm_syms[i]!=NULL; i++)  /* Print the list of allowed permissions*/
-  {
-    if ( entry->allowed & grst_perm_vals[i]){
-      if (edit_perms) GRSThttpPrintf (bp, "%s<input type=\"checkbox\" name=\"allow_%s\" value=\"ON\" checked>&nbsp;&nbsp;&nbsp;\n", grst_perm_syms[i],grst_perm_syms[i]);
-      else GRSThttpPrintf(bp,"%s ", grst_perm_syms[i]); if (strcmp(grst_perm_syms[i], "none")==0) break;
-    }
-    else if (strcmp(grst_perm_syms[i], "none")!=0 && edit_perms) GRSThttpPrintf (bp, "%s<input type=\"checkbox\" name=\"allow_%s\" value=\"ON\" unchecked>&nbsp;&nbsp;&nbsp;\n", grst_perm_syms[i],grst_perm_syms[i]);
-  }
-
-  if (edit_perms) GRSThttpPrintf (bp, "<p>");
-  GRSThttpPrintf (bp, "<b>Denied:&nbsp;</b>");
-  for (i=0; grst_perm_syms[i]!=NULL; i++)  /* Print the list of denied permissions*/
-  {
-   if  ( entry->denied & grst_perm_vals[i])
-   {
-     if (edit_perms) GRSThttpPrintf (bp, "%s<input type=\"checkbox\" name=\"deny_%s\" value=\"ON\" checked>&nbsp;&nbsp;&nbsp;\n", grst_perm_syms[i],grst_perm_syms[i]);
-     else GRSThttpPrintf(bp,"%s ", grst_perm_syms[i]);
-     if (strcmp(grst_perm_syms[i], "none")==0) break;
-   }
-   else if (strcmp(grst_perm_syms[i], "none")!=0 && edit_perms) GRSThttpPrintf (bp, "%s<input type=\"checkbox\" name=\"deny_%s\" value=\"ON\" unchecked>&nbsp;&nbsp;&nbsp;\n", grst_perm_syms[i],grst_perm_syms[i]);
-  }
-
-  GRSThttpPrintf (bp, "</td></tr>");
-  GRSThttpPrintf (bp,"</table><br>\n");
-  GRSThttpPrintf (bp,"\n");
-}
-
-void check_acl_save(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file, GRSTgaclUser* user, GRSTgaclAcl *acl, GRSThttpBody *bp){
-  // Checks if the acl for the current directory has been changed, check the current user's permissions.
-  // If all is okay the ACl is saved -> returns 1 else returns 0
-  struct stat file_info;
-  GRSTgaclPerm new_perm;
-  char *vfile, *dir_path_vfile, *dir_path_file;
-  FILE *fp;
-
-
-  /*Check ACL has not been modified*/
-  stat(GRSTgaclFileFindAclname(dir_path), &file_info);
-  if (atol(GRSThttpGetCGI("timestamp"))!=file_info.st_mtime){
-    StartHTML(bp, dir_uri, dir_path);
-    GRSThttpPrintf (bp, "ERROR: CANNOT SAVE CHANGES<p><p> The ACL has been modified since it was last viewed\n<p>");
-    admin_continue(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, bp);
-    return;
-  }
-
-  // check users permissions in the new ACL
-
-  if (!GRSTgaclDNlistHasUser(getenv("REDIRECT_GRST_ADMIN_LIST"), user))
-  {
-    new_perm = GRSTgaclAclTestUser(acl, user);
-    if (new_perm != perm){
-      StartHTML(bp, dir_uri, dir_path);
-      if (!GRSTgaclPermHasAdmin(new_perm)){//Check that user still has Admin permissions - if not then exit without saving the new ACL
-        GRSThttpPrintf (bp, "ERROR: CANNOT SAVE CHANGES\n\n<p><p> You cannot deny yourself admin access from within the editor\n");
-        admin_continue(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, bp);
-        return;
-      }
-      //Functions to inform of other permission changes come next
-      GRSThttpPrintf (bp, "WARNING: OPERATION CHANGED YOUR PERMISSIONS!\n\n<p><p> You still have Admin permissions<p>\n");
-      admin_continue(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, bp);
-      return;
-    }
-  }
-  // ACL not modified, notified of permission changes - can now save
-
-  dir_path_file=GRSTgaclFileFindAclname(dir_path);
-  vfile=makevfilename(".gacl", file_info.st_size, dn); // Make temporary file name
-  dir_path_vfile = malloc(strlen(dir_path) + strlen(vfile) + 2);
-  strcpy(dir_path_vfile, dir_path);
-  strcat(dir_path_vfile, "/");
-  strcat(dir_path_vfile, vfile);
-
-  GRSTgaclAclSave(acl, dir_path_vfile); // save the new ACL to the temporary file
-  unlink(dir_path_file);
-  if (link (dir_path_vfile,dir_path_file)!=0) GRSThttpError("403 Forbidden");
-
-  printf ("Status: 302 Moved Temporarily\n Content Length: 0\nLocation: %s%s?cmd=admin_acl\n\n", dir_uri, admin_file);
-  return;
-}
-
-void StringHTMLEncode (char* string, GRSThttpBody *bp){
-
-  char* current_char;
-  char* tmp;
-  int n;
-  tmp=malloc(2);
-
-  *(tmp+1)='\0';
-  current_char=string;
-  while(*current_char != '\0'){
-
-    if  (*current_char  == '<')     GRSThttpPrintf (bp,"&lt;");
-    else if (*current_char == '>')  GRSThttpPrintf (bp,"&gt;");
-    else if (*current_char == '&')  GRSThttpPrintf (bp,"&amp;");
-    else if (*current_char == '\'') GRSThttpPrintf (bp,"&apos;");
-    else if (*current_char == '"')  GRSThttpPrintf (bp,"&quot;");
-    else{
-       *tmp=*current_char;
-       GRSThttpPrintf(bp, "%s", tmp);
-
-    }
-    current_char++;
-  }
-  return;
-}
-
-void revert_acl(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path, char *file, char *dir_uri, char *admin_file){
-  char *AclFilename;
-  GRSTgaclAcl *acl;
-  GRSThttpBody bp;
-  // Load the old ACL, add the entry and save
-  AclFilename=malloc(strlen(dir_path)+strlen(file)+2);
-  strcpy(AclFilename, dir_path);
-  strcat(AclFilename, "/");
-  strcat(AclFilename, file);
-
-  acl = GRSTgaclAclLoadFile(AclFilename);
-  check_acl_save(dn, perm, help_uri, dir_path, file, dir_uri, admin_file, user, acl, &bp);
-  return;
-}
diff --git a/org.gridsite.core/src/grst_admin_main.c b/org.gridsite.core/src/grst_admin_main.c
deleted file mode 100644 (file)
index d884bf5..0000000
+++ /dev/null
@@ -1,365 +0,0 @@
-/*
-   Andrew McNab and Shiv Kaushal, University of Manchester. 
-   Copyright (c) 2002-3. All rights reserved.
-
-   Redistribution and use in source and binary forms, with or
-   without modification, are permitted provided that the following
-   conditions are met:
-
-     o Redistributions of source code must retain the above
-       copyright notice, this list of conditions and the following
-       disclaimer. 
-     o Redistributions in binary form must reproduce the above
-       copyright notice, this list of conditions and the following
-       disclaimer in the documentation and/or other materials
-       provided with the distribution. 
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-   CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-   BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-   TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-   ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-   POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*------------------------------------------------------------------*
- * This program is part of GridSite: http://www.gridsite.org/       *
- *------------------------------------------------------------------*/
-
-#ifndef VERSION
-#define VERSION "x.x.x"
-#endif
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#include <stdio.h>
-#include <time.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <unistd.h>
-#include <dirent.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <fcntl.h>
-
-// when porting: remember that sendfile() is very OS-specific!
-#include <sys/sendfile.h>
-
-#include <gridsite.h>
-
-#include "grst_admin.h"
-
-/*
-
-   GridSite human/interactive management interface. This should produce
-   a CGI executable, usually ./sbin/real-gridsite-admin.cgi, which is
-   called from HTML forms either by GET or POST methods or both (ie input 
-   present in both QUERY_STRING and the stdin of the CGI process.)
-
-   The CGI name/value pairs used are: 
-    
-    cmd  = edit, managedir, print, history
-    file = short name of file, without path
-
-   If real-gridsite-admin.cgi is run by an internal redirection inside 
-   mod_gridsite (as should ALWAYS be the case) then the environment 
-   variable  REDIRECT_GRST_DIR_PATH  will be set to the full path of
-   the directory holding the file in question. This respects any complex
-   URI -> file path mapping done by Apache.
-
-*/
-
-void GRSThttpError(char *status)
-{
-  printf("Status: %s\n", status);
-  printf("Server-CGI: GridSite Admin %s\n", VERSION);
-  printf("Content-Length: %d\n", 2 * strlen(status) + 58);
-  puts("Content-Type: text/html\n");
-   
-  printf("<head><title>%s</title></head>\n", status);
-  printf("<body><h1   >%s</h1   ></body>\n", status);
-   
-  exit(0);
-}
-
-void adminfooter(GRSThttpBody *bp, char *dn, char *help_uri, char *dir_uri,
-                 char *admin_file)
-{
-  GRSThttpPrintf(bp, "<p><small>\n");  
-
-  if (dn != NULL) GRSThttpPrintf(bp, "<hr>You are %s<br>\n", dn);
-  else            GRSThttpPrintf(bp, "<hr>\n");
-
-  if (admin_file != NULL)
-       GRSThttpPrintf(bp, "<a href=\"%s%s?cmd=managedir\">"
-                      "Manage&nbsp;directory</a> .\n", 
-                      dir_uri, admin_file);
-  else GRSThttpPrintf(bp, "<a href=\"%s\">"
-                      "Back&nbsp;to&nbsp;directory</a> .\n", dir_uri);
-  
-  if (help_uri != NULL) 
-    GRSThttpPrintf(bp, "<a href=\"%s\">Website&nbsp;Help</a> .\n", help_uri);
-
-  if ((getenv("GRST_NO_LINK") == NULL) &&
-      (getenv("REDIRECT_GRST_NO_LINK") == NULL))
-    GRSThttpPrintf(bp, "Built with "
-     "<a href=\"http://www.gridsite.org/\">GridSite</a> %s\n",
-     VERSION);
-   
-  GRSThttpPrintf(bp, "</small>\n");
-}
-
-int GRSTstrCmpShort(char *long_s, char *short_s)
-{
-  while (*short_s != '\0')
-       {
-         if (*long_s > *short_s) return +1;
-         if (*long_s < *short_s) return -1;
-         
-         ++long_s;
-         ++short_s;
-       }
-
-  return 0;
-}
-
-char *makevfilename(char *publicname, size_t size, char *dn)
-{
-  int             i;
-  char           *ext, *vfilename, *encpublicname, *encdn, *p;
-  struct timeval  tv_now;
-  
-  gettimeofday(&tv_now, NULL);
-
-  ext = rindex(publicname, '.');
-  if (ext == NULL) ext = "";
-  
-  encpublicname = GRSThttpUrlEncode(publicname);  
-  for (p=encpublicname; *p != '\0'; ++p) if (*p == '%') *p = '=';
-  
-  encdn = GRSThttpUrlEncode(dn);  
-  for (p=encdn; *p != '\0'; ++p) if (*p == '%') *p = '=';
-
-  /* we used zero-padding for times so 
-     alphanumeric sorting will sort chronologically too */
-
-  asprintf(&vfilename, "%s:%s:%08X:%05X:%X:%s:%s", GRST_HIST_PREFIX,
-           encpublicname, tv_now.tv_sec, tv_now.tv_usec, size, encdn, ext);
-   
-  return vfilename;
-}
-
-void justheader(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path,
-                char *dir_uri, char *admin_file)
-{
-  GRSThttpBody bp;
-  puts("Status: 200 OK\nContent-Type: text/html");
-   
-  GRSThttpBodyInit(&bp);
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_HEADFILE);
-
-  GRSThttpWriteOut(&bp);
-}
-
-void justfooter(char *dn, GRSTgaclPerm perm, char *help_uri, char *dir_path,
-                char *dir_uri, char *admin_file)
-{
-  GRSThttpBody bp;
-  puts("Status: 200 OK\nContent-Type: text/html");
-   
-  GRSThttpBodyInit(&bp);
-  if (GRSTgaclPermHasList(perm) || GRSTgaclPermHasWrite(perm) 
-                                || GRSTgaclPermHasAdmin(perm)) 
-               adminfooter(&bp, dn, help_uri, dir_uri, admin_file);
-
-  GRSThttpPrintHeaderFooter(&bp, dir_path, GRST_FOOTFILE);
-                                                                                
-  GRSThttpWriteOut(&bp);
-}
-
-int main()
-{
-  int           gsiproxylimit_i = 1;
-  char         *cmd, *dir_uri, *file, *dir_path, *admin_file, *dn = NULL,
-               *help_uri, *p, *content_type, *request_uri, *button, 
-               *grst_cred_0, *gsiproxylimit, *dn_lists;
-  GRSTgaclCred *cred;
-  GRSTgaclUser *user = NULL;
-  GRSTgaclAcl  *acl;
-  GRSTgaclPerm  perm = GRST_PERM_NONE;
-
-  help_uri      = getenv("REDIRECT_GRST_HELP_URI"); /* can be NULL */
-  admin_file    = getenv("REDIRECT_GRST_ADMIN_FILE");
-  dir_path      = getenv("REDIRECT_GRST_DIR_PATH");
-  request_uri   = getenv("REQUEST_URI");
-  
-  if ((dir_path == NULL) || (admin_file == NULL) || (request_uri == NULL))
-    {
-      puts("Status: 500 Internal Server Error\nContent-type: text/plain\n\n"
-           "REDIRECT_GRST_DIR_PATH or REDIRECT_GRST_ADMIN_FILE "
-           "or REQUEST_URI missing");
-      return;
-    }
-
-  GRSTgaclInit();
-
-  grst_cred_0 = getenv("GRST_CRED_0");
-  
-  if ((grst_cred_0 != NULL) && (cred = GRSTx509CompactToCred(grst_cred_0)))
-    {
-      gsiproxylimit = getenv("REDIRECT_GRST_GSIPROXY_LIMIT");
-      if (gsiproxylimit != NULL) sscanf(gsiproxylimit, "%d", &gsiproxylimit_i);
-
-      if (GRSTgaclCredGetDelegation(cred) <= gsiproxylimit_i)
-        {
-          user = GRSTgaclUserNew(cred);
-
-          if ((p = index(grst_cred_0, ' ')) &&
-              (p = index(++p, ' ')) &&
-              (p = index(++p, ' ')) &&
-              (p = index(++p, ' '))) dn = &p[1];          
-        }                                               
-    }
-  else if ((dn = getenv("SSL_CLIENT_S_DN")) != NULL)
-    {      
-      cred = GRSTgaclCredNew("person");
-      GRSTgaclCredAddValue(cred, "dn", dn);
-      user = GRSTgaclUserNew(cred);
-    }
-
-  dn_lists = getenv("REDIRECT_GRST_DN_LISTS");
-  if (dn_lists == NULL) dn_lists = getenv("GRST_DN_LISTS");
-  if (dn_lists != NULL) GRSTgaclUserSetDNlists(user, dn_lists);
-
-  if (GRSTgaclDNlistHasUser(getenv("REDIRECT_GRST_ADMIN_LIST"), 
-                            user)) perm = GRST_PERM_ALL;
-  else
-    {
-      p = getenv("REMOTE_HOST");
-      if (p != NULL)
-        {
-          cred = GRSTgaclCredNew("dns");
-          GRSTgaclCredAddValue(cred, "hostname", p);
-  
-          if (user == NULL) user = GRSTgaclUserNew(cred);
-          else              GRSTgaclUserAddCred(user, cred);
-        }
-
-      acl = GRSTgaclAclLoadforFile(dir_path);
-      if (acl != NULL) perm = GRSTgaclAclTestUser(acl, user);
-    }
-    
-  /* we're relying on being a CGI with all this un-free()ed strdup()ing */
-
-  dir_uri  = strdup(request_uri);
-  p = rindex(dir_uri, '?');
-  if (p != NULL) *p = '\0';
-  p = rindex(dir_uri, '/');
-  if (p != NULL) p[1] = '\0';
-
-  content_type = getenv("CONTENT_TYPE");
-
-  if ((content_type != NULL) &&
-      (GRSTstrCmpShort(content_type, "multipart/form-data; boundary=") == 0))
-    {    
-      uploadfile(dn, perm, help_uri, dir_path, dir_uri, admin_file);
-      return 0;
-    }
-  
-  cmd    = GRSThttpGetCGI("cmd");
-  file   = GRSThttpGetCGI("file");
-  button = GRSThttpGetCGI("button");
-
-  /* file and directory functions in grst_admin_file.c */
-
-  if (strcmp(cmd, "header") == 0) 
-      justheader(dn, perm, help_uri, dir_path, dir_uri, admin_file);
-  else if (strcmp(cmd, "footer") == 0) 
-      justfooter(dn, perm, help_uri, dir_path, dir_uri, admin_file);
-  else if (strcmp(cmd, "managedir") == 0) 
-      managedir(dn, perm, help_uri, dir_path, dir_uri, admin_file);
-  else if (strcmp(cmd, "print") == 0) 
-      printfile(dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  else if (strcmp(cmd, "history") == 0) 
-      filehistory(dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  else if (strcmp(cmd, "editdnlist") == 0) 
-      editdnlistform(dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  else if (strcmp(cmd, "edit") == 0)
-    { 
-      if ((strcasecmp(button, "new directory") == 0) ||
-          (strcasecmp(button, "Create") == 0))
-       newdirectory(dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-      else
-       editfileform(dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-    }
-  else if (strcmp(cmd, "editaction") == 0) 
-      editfileaction(dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  else if (strcmp(cmd, "editdnlistaction") == 0) 
-      editdnlistaction(dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  else if (strcmp(cmd, "delete") == 0) 
-      deletefileform(dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  else if (strcmp(cmd, "deleteaction") == 0) 
-     deletefileaction(dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  else if (strcmp(cmd, "rename") == 0) 
-     renameform(dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  else if (strcmp(cmd, "renameaction") == 0) 
-     renameaction(dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  else if (strcmp(cmd, "ziplist") == 0) 
-     ziplist(dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  else if (strcmp(cmd, "unzipfile") == 0) 
-     unzipfile(dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  else if (strcmp(cmd, "create_acl") == 0) 
-     create_acl(dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-
-  /* GACL functions in grst_admin_gacl.c */
-
-  else if (strcmp(cmd, "show_acl") == 0)
-     show_acl(0, user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  else if (strcmp(cmd, "admin_acl") == 0)
-     show_acl(1, user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  else if (strcmp(cmd, "acl_history") == 0)
-     show_acl(2, user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  else if (strcmp(cmd, "revert_acl") == 0)
-    revert_acl(user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-    //show_acl(2, user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  else if (strcmp(cmd,"new_entry_form")==0)
-     new_entry_form(user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  else if (strcmp(cmd,"new_entry")==0)
-     new_entry(user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  else if (strcmp(cmd,"del_entry_sure")==0)
-     del_entry_sure(user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  else if (strcmp(cmd,"del_entry")==0)
-     del_entry(user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  else if (strcmp(cmd,"edit_entry_form")==0)
-     edit_entry_form(user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  else if (strcmp(cmd,"edit_entry")==0)
-     edit_entry(user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  else if (strcmp(cmd,"add_cred_form")==0)
-     add_cred_form(user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  else if (strcmp(cmd,"add_cred")==0)
-     add_cred(user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  else if (strcmp(cmd,"del_cred_sure")==0)
-     del_cred_sure(user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-  else if (strcmp(cmd,"del_cred")==0)
-     del_cred(user, dn, perm, help_uri, dir_path, file, dir_uri, admin_file);
-
-  /* you what? */
-
-  else GRSThttpError("500 Internal Server Error");
-}
diff --git a/org.gridsite.core/src/grst_gacl.c b/org.gridsite.core/src/grst_gacl.c
deleted file mode 100644 (file)
index 13b46c8..0000000
+++ /dev/null
@@ -1,1154 +0,0 @@
-/*
-   Copyright (c) 2002-3, Andrew McNab, University of Manchester
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or
-   without modification, are permitted provided that the following
-   conditions are met:
-
-     o Redistributions of source code must retain the above
-       copyright notice, this list of conditions and the following
-       disclaimer. 
-     o Redistributions in binary form must reproduce the above
-       copyright notice, this list of conditions and the following
-       disclaimer in the documentation and/or other materials
-       provided with the distribution. 
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-   CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-   BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-   TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-   ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-   POSSIBILITY OF SUCH DAMAGE.
-*/
-/*---------------------------------------------------------------*
- * For more information about GridSite: http://www.gridsite.org/ *
- *---------------------------------------------------------------*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>              
-#include <string.h>
-#include <dirent.h>
-#include <ctype.h>
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-#include <fnmatch.h>
-
-#include <libxml/xmlmemory.h>
-#include <libxml/tree.h>
-#include <libxml/parser.h>
-
-#include "gridsite.h"
-
-/*                                                                      *
- * Global variables, shared by all GACL functions by private to libgacl *
- *                                                                      */
-char     *grst_perm_syms[] =  { "none",
-                                "read",
-                                "exec",
-                                "list",
-                                "write",
-                                "admin",
-                                NULL              };
-
-GRSTgaclPerm grst_perm_vals[] =  {   GRST_PERM_NONE,
-                                     GRST_PERM_READ,
-                                     GRST_PERM_EXEC,
-                                     GRST_PERM_LIST,
-                                     GRST_PERM_WRITE,
-                                     GRST_PERM_ADMIN,
-                                     -1                };
-                                 
-int GRSTgaclInit(void)
-{
-  xmlInitParser();
-
-  LIBXML_TEST_VERSION
-
-  xmlKeepBlanksDefault(0);
-
-  return 1;
-}                             
-
-/*                                             *
- * Functions to manipulate GRSTgaclCred structures *
- *                                             */
-
-GRSTgaclCred *GRSTgaclCredNew(char *type)
-/*
-    GRSTgaclCredNew - allocate a new GRSTgaclCred structure, and return
-                      it's pointer or NULL on (malloc) error.
-*/
-{
-  GRSTgaclCred *newcred; 
-
-  if (type == NULL) return NULL;
-
-  newcred = malloc(sizeof(GRSTgaclCred));
-  if (newcred == NULL) return NULL;
-  
-  newcred->type       = strdup(type);
-  newcred->delegation = 0;
-  newcred->firstname  = NULL;
-  newcred->next       = NULL;
-
-  return newcred;
-}
-
-int GRSTgaclCredAddValue(GRSTgaclCred *cred, char *rawname, char *rawvalue)
-/*
-    GRSTgaclCredAddValue - add a name/value pair to a GRSTgaclCred
-*/
-{
-  int                i;
-  char              *name, *value;
-  GRSTgaclNamevalue *p;
-
-  name  = strdup(rawname);
-
-  /* no leading or trailing space in value */
-
-  value = rawvalue; 
-  while ((*value != '\0') && isspace(*value)) ++value;
-
-  value = strdup(value);
-
-  for (i=strlen(value) - 1; (i >= 0) && isspace(value[i]); --i) value[i]='\0';
-  
-  if (cred->firstname == NULL) 
-    {
-      cred->firstname = malloc(sizeof (GRSTgaclNamevalue));
-      (cred->firstname)->name  = name;
-      (cred->firstname)->value = value;
-      (cred->firstname)->next  = NULL;
-    }
-  else
-    {
-      p = cred->firstname; 
-  
-      while (p->next != NULL) p = (GRSTgaclNamevalue *) p->next;
-  
-      p->next = malloc(sizeof(GRSTgaclNamevalue));
-      ((GRSTgaclNamevalue *) p->next)->name  = name;
-      ((GRSTgaclNamevalue *) p->next)->value = value;
-      ((GRSTgaclNamevalue *) p->next)->next  = NULL;
-    } 
-  
-  return 1;
-}
-
-static int GRSTgaclNamevalueFree(GRSTgaclNamevalue *p)
-{
-  if (p == NULL) return 1;
-  
-  if (p->next  != NULL) 
-        GRSTgaclNamevalueFree((GRSTgaclNamevalue *) p->next);
-  if (p->name  != NULL) free(p->name);
-  if (p->value != NULL) free(p->value);
-  free(p);
-  
-  return 1;
-}
-
-int GRSTgaclCredFree(GRSTgaclCred *cred)
-/*
-    GRSTgaclCredFree - free memory structures of a GRSTgaclCred, 
-    returning 1 always!
-*/
-{
-  if (cred == NULL) return 1;
-
-  GRSTgaclNamevalueFree(cred->firstname);  
-  if (cred->type != NULL) free(cred->type);
-  free(cred);
-  
-  return 1;
-}
-
-static int GRSTgaclCredsFree(GRSTgaclCred *firstcred)
-/*
-    GRSTgaclCredsFree - free a cred and all the creds in its *next chain
-*/
-{
-  if (firstcred == NULL) return 0;
-  
-  if (firstcred->next != NULL) GRSTgaclCredsFree(firstcred->next);
-  
-  return GRSTgaclCredFree(firstcred);
-}
-
-static int GRSTgaclCredInsert(GRSTgaclCred *firstcred, GRSTgaclCred *newcred)
-/* 
-    GRSTgaclCredInsert - insert a cred in the *next chain of firstcred
-
-    FOR THE MOMENT THIS JUST APPENDS!
-*/
-{
-  if (firstcred == NULL) return 0;
-  
-  if (firstcred->next == NULL)
-    {
-      firstcred->next = newcred;
-      return 1;
-    }
-
-  return GRSTgaclCredInsert(firstcred->next, newcred);     
-}
-
-int GRSTgaclEntryAddCred(GRSTgaclEntry *entry, GRSTgaclCred *cred)
-/*  
-    GRSTaddCred - add a new credential to an existing entry, returning 1
-    on success or 0 on error 
-*/ 
-{
-  if (entry == NULL) return 0;
-  if (entry->firstcred == NULL) 
-    {
-      entry->firstcred = cred;
-      return 1;
-    }
-  else return GRSTgaclCredInsert(entry->firstcred, cred);
-}
-
-static int GRSTgaclCredRemoveCred(GRSTgaclCred *firstcred, GRSTgaclCred *oldcred)
-/* 
-    (Private)
-
-    GRSTgaclCredRemoveCred - remove a cred in the *next chain of firstcred
-                     and relink the chain
-*/
-{
-  if (firstcred == NULL) return 0;
-
-// yeah, I know
-}
-
-int GRSTgaclEntryDelCred(GRSTgaclEntry *entry, GRSTgaclCred *cred)
-/*  
-    GRSTgaclEntryDelCred - remove a new cred from an entry, returning 1
-    on success (or absense) or 0 on error.
-*/ 
-{
-  if (entry == NULL) return 0;
-
-  return GRSTgaclCredRemoveCred(entry->firstcred, cred);
-}
-
-int GRSTgaclCredPrint(GRSTgaclCred *cred, FILE *fp)
-/* 
-   GRSTgaclCredPrint - print a credential and any name-value pairs is contains
-*/
-{
-  char              *q;
-  GRSTgaclNamevalue *p;
-
-  if (cred->firstname != NULL)
-    {
-      fprintf(fp, "<%s>\n", cred->type);
-    
-      p = cred->firstname;
-      
-      do { 
-           fprintf(fp, "<%s>", p->name);
-
-            for (q=p->value; *q != '\0'; ++q)
-              if      (*q == '<')  fputs("&lt;",   fp);
-              else if (*q == '>')  fputs("&gt;",   fp);
-              else if (*q == '&')  fputs("&amp;" , fp);
-              else if (*q == '\'') fputs("&apos;", fp);
-              else if (*q == '"')  fputs("&quot;", fp);
-              else                 fputc(*q, fp);
-
-           fprintf(fp, "</%s>\n", p->name);
-
-           p = (GRSTgaclNamevalue *) p->next;
-         
-         } while (p != NULL);
-
-      fprintf(fp, "</%s>\n", cred->type);
-    }
-  else fprintf(fp, "<%s/>\n", cred->type);
-  
-  return 1;  
-}
-
-/*                                              *
- * Functions to manipulate GRSTgaclEntry structures *
- *                                              */
-
-GRSTgaclEntry *GRSTgaclEntryNew(void)
-/*
-    GRSTgaclEntryNew - allocate space for a new entry, returning its pointer
-                   or NULL on failure.
-*/
-{
-  GRSTgaclEntry *newentry;
-  
-  newentry = (GRSTgaclEntry *) malloc(sizeof(GRSTgaclEntry));
-  if (newentry == NULL) return NULL;
-
-  newentry->firstcred    = NULL;
-  newentry->allowed      = 0;
-  newentry->denied       = 0;
-  newentry->next         = NULL;
-      
-  return newentry;
-}
-
-int GRSTgaclEntryFree(GRSTgaclEntry *entry)
-/* 
-    GRSTgaclEntryFree - free up space used by an entry (always returns 1)
-*/
-{
-  int i;
-  
-  if (entry == NULL) return 1;
-
-  GRSTgaclCredsFree(entry->firstcred);  
-
-  free(entry);
-  
-  return 1;
-}
-
-static int GRSTgaclEntriesFree(GRSTgaclEntry *entry)
-/*
-    GRSTgaclEntriesFree - free up entry and all entries linked to in its *next 
-                      chain
-*/
-{
-  if (entry == NULL) return 0;
-  
-  if (entry->next != NULL) GRSTgaclEntriesFree(entry->next);
-  
-  return GRSTgaclEntryFree(entry);  
-}
-
-static int GRSTgaclEntryInsert(GRSTgaclEntry *firstentry, GRSTgaclEntry *newentry)
-/* 
-    GRSTgaclEntryInsert - insert an entry in the *next chain of firstentry
-
-    FOR THE MOMENT THIS JUST APPENDS
-*/
-{
-  if (firstentry == NULL) return 0;
-  
-  if (firstentry->next == NULL)
-    {
-      firstentry->next = newentry;
-      return 1;
-    }
-
-  return GRSTgaclEntryInsert(firstentry->next, newentry);     
-}
-
-int GRSTgaclAclAddEntry(GRSTgaclAcl *acl, GRSTgaclEntry *entry)
-/*  
-    GRSTgaclAclAddEntry - add a new entry to an existing acl, returning 1
-    on success or 0 on error 
-*/ 
-{
-  if (acl == NULL) return 0;
-
-  if (acl->firstentry == NULL) 
-    { 
-      acl->firstentry = entry;
-      return 1;
-    }
-  else return GRSTgaclEntryInsert(acl->firstentry, entry);
-}
-
-int GRSTgaclEntryPrint(GRSTgaclEntry *entry, FILE *fp)
-{
-  GRSTgaclCred  *cred;
-  GRSTgaclPerm  i;
-  
-  fputs("<entry>\n", fp);
-  
-  for (cred = entry->firstcred; cred != NULL; cred = cred->next)
-                                            GRSTgaclCredPrint(cred, fp);
-
-  if (entry->allowed)
-    {
-      fputs("<allow>", fp);
-
-      for (i=GRST_PERM_READ; i <= GRST_PERM_ADMIN; ++i)
-       if ((entry->allowed) & i) GRSTgaclPermPrint(i, fp);
-
-      fputs("</allow>\n", fp);
-    }
-    
-
-  if (entry->denied)
-    {
-      fputs("<deny>", fp);
-
-      for (i=GRST_PERM_READ; i <= GRST_PERM_ADMIN; ++i)
-       if (entry->denied & i) GRSTgaclPermPrint(i, fp);
-
-      fputs("</deny>\n", fp);
-    }
-    
-  fputs("</entry>\n", fp);
-
-  return 1;
-}
-
-/*                                         *
- * Functions to manipulate GRSTgaclPerm items *
- *                                         */
-
-int GRSTgaclPermPrint(GRSTgaclPerm perm, FILE *fp)
-{
-  GRSTgaclPerm i;
-  
-  for (i=GRST_PERM_READ; grst_perm_syms[i] != NULL; ++i)
-       if (perm == grst_perm_vals[i]) 
-         {
-           fprintf(fp, "<%s/>", grst_perm_syms[i]);
-           return 1;
-         }
-         
-  return 0;
-}
-
-int GRSTgaclEntryAllowPerm(GRSTgaclEntry *entry, GRSTgaclPerm perm)
-{
-  entry->allowed = entry->allowed | perm;
-
-  return 1;
-}
-
-int GRSTgaclEntryUnallowPerm(GRSTgaclEntry *entry, GRSTgaclPerm perm)
-{
-  entry->allowed = entry->allowed & ~perm;
-
-  return 1;
-}
-
-int GRSTgaclEntryDenyPerm(GRSTgaclEntry *entry, GRSTgaclPerm perm)
-{
-  entry->denied = entry->denied | perm;
-
-  return 1;
-}
-
-int GRSTgaclEntryUndenyPerm(GRSTgaclEntry *entry, GRSTgaclPerm perm)
-{
-  entry->denied = entry->denied & ~perm;
-
-  return 1;
-}
-
-char *GRSTgaclPermToChar(GRSTgaclPerm perm)
-/*
-   GRSTgaclPermToChar - return char * or NULL corresponding to most significant
-                     set bit of perm.
-*/
-{
-  char      *p = NULL;
-  GRSTgaclPerm  i;
-  
-  for (i=0; grst_perm_syms[i] != NULL; ++i)
-       if (perm & grst_perm_vals[i]) p = grst_perm_syms[i];
-
-  return p;
-}
-
-GRSTgaclPerm GRSTgaclPermFromChar(char *s)
-/*
-   GRSTgaclPermToChar - return access perm corresponding to symbol s[]
-*/
-{
-  GRSTgaclPerm i;
-
-  for (i=0; grst_perm_syms[i] != NULL; ++i)
-       if (strcasecmp(grst_perm_syms[i], s) == 0) return grst_perm_vals[i];
-
-  return -1; 
-}
-
-/*                                            *
- * Functions to manipulate GRSTgaclAcl structures *
- *                                            */
-
-GRSTgaclAcl *GRSTgaclAclNew(void)
-/*  
-    GRSTgaclAclNew - allocate a new acl and return its pointer (or NULL 
-                 on failure.)
-*/
-{
-  GRSTgaclAcl *newacl;
-  
-  newacl = (GRSTgaclAcl *) malloc(sizeof(GRSTgaclAcl));
-  if (newacl == NULL) return NULL;
-  
-  newacl->firstentry = NULL;
-
-  return newacl;
-}
-
-int GRSTgaclAclFree(GRSTgaclAcl *acl)
-/*
-    GRSTgaclAclFree - free up space used by *acl. Always returns 1.
-*/
-{
-  if (acl == NULL) return 1;
-
-  GRSTgaclEntriesFree(acl->firstentry);  
-
-  return 1;
-}
-
-int GRSTgaclAclPrint(GRSTgaclAcl *acl, FILE *fp)
-{
-  GRSTgaclEntry *entry;
-  
-  fputs("<gacl version=\"0.0.1\">\n", fp);
-  
-  for (entry = acl->firstentry; entry != NULL; entry = entry->next)
-                                            GRSTgaclEntryPrint(entry, fp);
-
-  fputs("</gacl>\n", fp);
-
-  return 1;
-}
-
-int GRSTgaclAclSave(GRSTgaclAcl *acl, char *filename)
-{
-  int   ret;
-  FILE *fp;
-  
-  fp = fopen(filename, "w");
-  if (fp == NULL) return 0;
-  
-  fputs("<?xml version=\"1.0\"?>\n", fp);
-  
-  ret = GRSTgaclAclPrint(acl, fp);
-  
-  fclose(fp);
-  
-  return ret;
-}
-
-/*                                                    *
- * Functions for loading and parsing XML using libxml *
- *                                                    */
-// need to check these for libxml memory leaks? - what needs to be freed?
-
-static GRSTgaclCred *GRSTgaclCredParse(xmlNodePtr cur)
-/*
-    GRSTgaclCredParse - parse a credential stored in the libxml structure cur, 
-                    returning it as a pointer or NULL on error.
-*/
-{
-  xmlNodePtr  cur2;
-  GRSTgaclCred   *cred;
-  
-  cred = GRSTgaclCredNew((char *) cur->name);
-  
-  cred->firstname = NULL;
-  cred->next      = NULL;
-  
-  for (cur2 = cur->xmlChildrenNode; cur2 != NULL; cur2=cur2->next)
-     {
-       GRSTgaclCredAddValue(cred, (char *) cur2->name, 
-                           (char *) xmlNodeGetContent(cur2));     
-     }
-
-  return cred;
-}
-
-static GRSTgaclEntry *GRSTgaclEntryParse(xmlNodePtr cur)
-/*
-    GRSTgaclEntryParse - parse an entry stored in the libxml structure cur,
-                     returning it as a pointer or NULL on error.
-*/
-{
-  int        i;
-  xmlNodePtr cur2;
-  GRSTgaclEntry *entry;
-  GRSTgaclCred  *cred;
-  GRSTgaclPerm  perm;
-
-  if (xmlStrcmp(cur->name, (const xmlChar *) "entry") != 0) return NULL;
-  
-  cur = cur->xmlChildrenNode;
-  
-  entry = GRSTgaclEntryNew();
-  
-  while (cur != NULL)
-       {
-         if (xmlStrcmp(cur->name, (const xmlChar *) "allow") == 0)
-           {
-             for (cur2 = cur->xmlChildrenNode; cur2 != NULL; cur2=cur2->next)
-              for (i=0; grst_perm_syms[i] != NULL; ++i)
-               if (xmlStrcmp(cur2->name, 
-                             (const xmlChar *) grst_perm_syms[i]) == 0)
-                     GRSTgaclEntryAllowPerm(entry, grst_perm_vals[i]);
-           }
-         else if (xmlStrcmp(cur->name, (const xmlChar *) "deny") == 0)
-           {
-             for (cur2 = cur->xmlChildrenNode; cur2 != NULL; cur2=cur2->next)
-              for (i=0; grst_perm_syms[i] != NULL; ++i)
-               if (xmlStrcmp(cur2->name, 
-                             (const xmlChar *) grst_perm_syms[i]) == 0)
-                     GRSTgaclEntryDenyPerm(entry, grst_perm_vals[i]);
-           }
-         else if ((cred = GRSTgaclCredParse(cur)) != NULL) 
-           {
-             if (!GRSTgaclEntryAddCred(entry, cred))
-               { 
-                 GRSTgaclCredFree(cred);                
-                 GRSTgaclEntryFree(entry);
-                 return NULL;
-               }
-           }
-         else /* I cannot parse this - give up rather than get it wrong */
-           {
-             GRSTgaclEntryFree(entry);
-             return NULL;
-           }
-           
-         cur=cur->next;
-       } 
-       
-  return entry;
-}
-
-GRSTgaclAcl *GRSTgaclAclLoadFile(char *filename)
-{
-  xmlDocPtr   doc;
-  xmlNodePtr  cur;
-  GRSTgaclAcl    *acl;
-  GRSTgaclEntry  *entry;
-        
-  doc = xmlParseFile(filename);
-  if (doc == NULL) return NULL;
-    
-  cur = xmlDocGetRootElement(doc);
-  
-  if (xmlStrcmp(cur->name, (const xmlChar *) "gacl"))
-    {
-      free(doc);
-      free(cur);
-      return NULL;
-    }
-
-  cur = cur->xmlChildrenNode;
-
-  acl = GRSTgaclAclNew();
-  
-  while (cur != NULL)
-       {
-         entry = GRSTgaclEntryParse(cur);
-         if (entry == NULL)
-           {
-             GRSTgaclAclFree(acl);
-             xmlFreeDoc(doc);
-             return NULL;
-           }
-
-         GRSTgaclAclAddEntry(acl, entry);
-         
-         cur=cur->next;
-       }
-
-  xmlFreeDoc(doc);
-  return acl;
-}
-
-int GRSTgaclFileIsAcl(char *pathandfile)
-/* Return 1 if filename in *pathandfile starts GRST_ACL_FILE 
-   Return 0 otherwise. */
-{ 
-  char *filename;
-      
-  filename = rindex(pathandfile, '/');
-  if (filename == NULL) filename = pathandfile;
-  else                  filename++;
-            
-  return (strncmp(filename, GRST_ACL_FILE, sizeof(GRST_ACL_FILE) - 1) == 0);
-}
-
-char *GRSTgaclFileFindAclname(char *pathandfile)
-/* Return malloc()ed ACL filename that governs the given file or directory 
-   (for directories, the ACL file is in the directory itself), or NULL if none
-   can be found. */
-{
-  int          len;
-  char        *path, *file, *p;
-  struct stat  statbuf;
-   
-  len = strlen(pathandfile);
-  if (len == 0) return NULL;
-  
-  path = malloc(len + sizeof(GRST_ACL_FILE) + 2);
-  strcpy(path, pathandfile);
-
-  if ((stat(path, &statbuf) == 0)      && 
-       S_ISDIR(statbuf.st_mode)                &&
-      (path[len-1] != '/'))
-    {
-      strcat(path, "/");
-      ++len;
-    }
-    
-  if (path[len-1] != '/')
-    {
-      p = rindex(pathandfile, '/');
-      if (p != NULL)
-        {
-          file = &p[1];          
-          p = rindex(path, '/');          
-          sprintf(p, "/%s:%s", GRST_ACL_FILE, file);
-
-          if (stat(path, &statbuf) == 0) return path;
-
-          *p = '\0'; /* otherwise strip off any filename */
-        }
-    }
-
-  while (path[0] != '\0')
-       {
-         strcat(path, "/");
-         strcat(path, GRST_ACL_FILE);
-         
-         if (stat(path, &statbuf) == 0) return path;
-           
-         p = rindex(path, '/');
-         *p = '\0';     /* strip off the / we added for ACL */
-
-         p = rindex(path, '/');
-         if (p == NULL) break; /* must start without / and we there now ??? */
-
-         *p = '\0';     /* strip off another layer of / */                 
-       }
-       
-  free(path);
-  return NULL;
-}
-
-GRSTgaclAcl *GRSTgaclAclLoadforFile(char *pathandfile)
-/* Return ACL that governs the given file or directory (for directories,
-   the ACL file is in the directory itself.) */
-{
-  char        *path;
-  GRSTgaclAcl     *acl;
-
-  path = GRSTgaclFileFindAclname(pathandfile);
-  
-  if (path != NULL)
-    {
-      acl = GRSTgaclAclLoadFile(path);
-      free(path);
-      return acl;
-    }
-    
-  return NULL;
-}
-
-/*                                        *
- * Functions to create and query GACLuser *
- *                                        */
-
-GRSTgaclUser *GRSTgaclUserNew(GRSTgaclCred *cred)
-{
-  GRSTgaclUser *user;
-  
-  if (cred == NULL) return NULL;
-  
-  user = malloc(sizeof(GRSTgaclUser));
-  
-  if (user != NULL) user->firstcred = cred;
-  
-  user->dnlists = NULL;
-  
-  return user;
-}
-
-int GRSTgaclUserFree(GRSTgaclUser *user)
-{
-  if (user == NULL) return 1;
-  
-  if (user->firstcred != NULL) GRSTgaclCredsFree(user->firstcred);
-
-  if (user->dnlists != NULL) free(user->dnlists);
-  
-  free(user);
-  
-  return 1;
-}
-
-int GRSTgaclUserAddCred(GRSTgaclUser *user, GRSTgaclCred *cred)
-{
-  GRSTgaclCred *crediter;
-
-  if ((user == NULL) || (cred == NULL)) return 0;
-
-  if (user->firstcred == NULL) 
-    {
-      user->firstcred = cred;
-      cred->next = NULL; /* so cannot be used to add whole lists */
-      return 1;
-    }
-  
-  crediter = user->firstcred;  
-
-  while (crediter->next != NULL) crediter = crediter->next;
-
-  crediter->next = cred;
-  cred->next = NULL; /* so cannot be used to add whole lists */
-       
-  return 1;
-}
-
-int GRSTgaclUserHasCred(GRSTgaclUser *user, GRSTgaclCred *cred)
-/* test if the user has the given credential */
-{
-  GRSTgaclCred      *crediter;
-  GRSTgaclNamevalue *usernamevalue, *crednamevalue;
-
-  if (cred == NULL) return 0;
-
-  if (strcmp(cred->type, "any-user") == 0) return 1;
-  
-  if (user == NULL) return 0;
-  
-  if (strcmp(cred->type, "dn-list") == 0) 
-    {
-      if ((cred->firstname == NULL) ||
-          (strcmp((cred->firstname)->name, "url") != 0) ||
-          ((cred->firstname)->next != NULL))                 return 0;
-      
-      return GRSTgaclDNlistHasUser((cred->firstname)->value, user);
-    }
-    
-  if (strcmp(cred->type, "dns") == 0) 
-    {
-      if ((user->firstcred == NULL) ||
-          ((user->firstcred)->firstname == NULL) ||
-          (cred->firstname == NULL) ||
-          (strcmp((cred->firstname)->name, "hostname") != 0) ||
-          ((cred->firstname)->next != NULL)) return 0;
-      
-      for (crediter=user->firstcred; 
-           crediter != NULL; 
-           crediter = crediter->next)
-        if (strcmp(crediter->type, "dns") == 0) 
-          {            
-            if ((crediter->firstname == NULL) ||
-              (strcmp((crediter->firstname)->name, "hostname") != 0)) return 0;
-               
-            return (fnmatch((cred->firstname)->value, 
-                            (crediter->firstname)->value, FNM_CASEFOLD) == 0);
-          }
-                
-      return 0;    
-    }
-    
-  if (strcmp(cred->type, "auth-user") == 0)
-    {
-      if ((user->firstcred == NULL) ||
-          ((user->firstcred)->firstname == NULL)) return 0;
-      
-      for (crediter=user->firstcred; 
-           crediter != NULL; 
-           crediter = crediter->next)
-        if (strcmp(crediter->type, "person") == 0) return 1;
-                
-      return 0;    
-    }
-  
-  for (crediter=user->firstcred; crediter != NULL; crediter = crediter->next)
-       {
-         if (strcmp(crediter->type, cred->type) != 0) continue;
-         
-         if ((crediter->firstname == NULL) && 
-             (cred->firstname     == NULL)) return 1;
-         
-         if ((crediter->firstname == NULL) || 
-             (cred->firstname     == NULL)) continue;
-             
-         usernamevalue = crediter->firstname;
-         crednamevalue = cred->firstname;
-         
-         for (;;)
-            {
-              if (strcmp(usernamevalue->name,crednamevalue->name) != 0) break;
-
-              if (strcmp(cred->type, "person") == 0)
-                {
-                  if (GRSTx509NameCmp(usernamevalue->value, 
-                                      crednamevalue->value) != 0) break;
-                }
-              else if (strcmp(usernamevalue->value,
-                              crednamevalue->value) != 0) break;
-              
-              /* ok if cred list runs out before user's cred list */
-              if (crednamevalue->next == NULL) return 1;
-
-              /* but not ok if more names to match which user doesn't have */
-              if (usernamevalue->next == NULL) break;
-             
-              crednamevalue = (GRSTgaclNamevalue *) crednamevalue->next;
-              usernamevalue = (GRSTgaclNamevalue *) usernamevalue->next;
-            }
-       }
-       
-  return 0;
-}
-
-GRSTgaclCred *GRSTgaclUserFindCredtype(GRSTgaclUser *user, char *type)
-/* find the first credential of a given type for this user */
-{
-  GRSTgaclCred *cred;
-
-  if (user == NULL) return NULL;
-  
-  cred = user->firstcred;  
-
-  while (cred != NULL)
-       {
-         if (strcmp(cred->type, type) == 0) return cred;
-         
-         cred = cred->next;       
-       }
-       
-  return NULL;
-}
-
-int GRSTgaclUserSetDNlists(GRSTgaclUser *user, char *dnlists)
-{
-  if ((user == NULL) || (dnlists == NULL)) return 0;
-
-  if (user->dnlists != NULL) free(user->dnlists);
-
-  user->dnlists = strdup(dnlists);
-
-  return 1;
-}
-
-/*                                                     *
- * Functions to test for access perm of an individual  *
- *                                                     */
-
-static char *recurse4file(char *dir, char *file, int recurse_level)
-/* try to find file[] in dir[]. try subdirs if not found. 
-   return full path to first found version or NULL on failure */
-{
-  char          *fullfilename, *fulldirname;
-  struct stat    statbuf;
-  DIR           *dirDIR;
-  struct dirent *file_ent;
-
-  /* try to find in current directory */
-
-  asprintf(&fullfilename, "%s/%s", dir, file);  
-  if (stat(fullfilename, &statbuf) == 0) return fullfilename;
-  free(fullfilename);
-
-  /* maybe search in subdirectories */
-  
-  if (recurse_level >= GRST_RECURS_LIMIT) return NULL;
-
-  dirDIR = opendir(dir);
-  
-  if (dirDIR == NULL) return NULL;
-  
-  while ((file_ent = readdir(dirDIR)) != NULL)
-       {
-         if (file_ent->d_name[0] == '.') continue;
-       
-         asprintf(&fulldirname, "%s/%s", dir, file_ent->d_name);
-
-         if ((stat(fulldirname, &statbuf) == 0) &&
-             S_ISDIR(statbuf.st_mode) &&
-             ((fullfilename = recurse4file(fulldirname, file, 
-                                             recurse_level + 1)) != NULL))
-           {
-             closedir(dirDIR);             
-             return fullfilename;
-           }
-           
-         free(fulldirname);
-       }
-  
-  closedir(dirDIR);  
-
-  return NULL;
-}
-
-int GRSTgaclDNlistHasUser(char *listurl, GRSTgaclUser *user)
-{
-  char *dn_lists_dirs, *dn_list_ptr, *enclisturl, *filename, *dirname,
-        line[512], *p;
-  FILE *fp;
-  GRSTgaclCred  *cred;
-    
-  if ((listurl == NULL) || (user == NULL)) return 0;
-
-  enclisturl = GRSThttpUrlEncode(listurl);
-
-  if (user->dnlists != NULL) p = user->dnlists;
-  else p = getenv("GRST_DN_LISTS");
-
-  if (p == NULL) p = GRST_DN_LISTS;
-  dn_lists_dirs = strdup(p);     /* we need to keep this for free() later! */
-  dn_list_ptr   = dn_lists_dirs; /* copy, for naughty function strsep()    */
-
-  while ((dirname = strsep(&dn_list_ptr, ":")) != NULL)
-       {    
-         filename = recurse4file(dirname, enclisturl, 0);
-         if (filename == NULL) continue;
-  
-         fp = fopen(filename, "r");
-         free(filename);
-  
-         if (fp == NULL) continue;
-
-         while (fgets(line, sizeof(line), fp) != NULL)
-              {
-                p = index(line, '\n');
-                if (p != NULL) *p = '\0';
-
-                cred = user->firstcred;
-         
-                while (cred != NULL)                  
-                     {
-                       if ((strcmp(cred->type, "person") == 0)          && 
-                           (cred->firstname != NULL)                    &&
-                           (strcmp("dn", (cred->firstname)->name) == 0) &&
-                 (GRSTx509NameCmp(line, (cred->firstname)->value) == 0))
-                         {
-                           fclose(fp);
-                           free(dn_lists_dirs);
-                           free(enclisturl);
-                           return 1;
-                         }
-                  
-                       cred = cred->next;
-                     }
-              }
-       
-         fclose(fp);
-       }
-
-  free(dn_lists_dirs);
-  free(enclisturl);
-
-  return 0;
-}
-
-GRSTgaclPerm GRSTgaclAclTestUser(GRSTgaclAcl *acl, GRSTgaclUser *user)
-/*
-    GACLgaclAclTestUser - return bit fields depending on access perms user has
-                      for given acl. All zero for no access. If *user is
-                      NULL, matching to "any-user" will still work.
-*/
-{
-  int        flag, onlyanyuser;
-  GRSTgaclPerm   allowperms = 0, denyperms = 0, allowed;
-  GRSTgaclEntry *entry;
-  GRSTgaclCred  *cred, *usercred;
-  
-  if (acl == NULL) return 0;
-  
-  for (entry = acl->firstentry; entry != NULL; entry = entry->next)
-     {
-       flag = 1;        /* begin by assuming this entry applies to us */
-       onlyanyuser = 1; /* begin by assuming just <any-user/> */
-       
-       /* now go through creds, checking they all do apply to us */
-     
-       for (cred = entry->firstcred; cred != NULL; cred = cred->next)
-             if (!GRSTgaclUserHasCred(user, cred)) flag = 0;
-             else if (strcmp(cred->type, "any-user") != 0) onlyanyuser = 0;
-
-       if (!flag) continue; /* flag false if a subtest failed */
-
-       /* does apply to us, so we remember this entry's perms */
-       
-       /* we dont allow Write or Admin on the basis of any-user alone */
-
-       allowed = entry->allowed;
-
-       if (onlyanyuser)
-            allowed = entry->allowed & ~GRST_PERM_WRITE & ~GRST_PERM_ADMIN;
-       else allowed = entry->allowed;
-
-       allowperms = allowperms | allowed;
-       denyperms  = denyperms  | entry->denied;
-     }
-
-  return (allowperms & (~ denyperms)); 
-  /* for each perm type, any deny we saw kills any allow */
-}
-
-GRSTgaclPerm GRSTgaclAclTestexclUser(GRSTgaclAcl *acl, GRSTgaclUser *user)
-/*
-    GRSTgaclAclTestexclUser - 
-                      return bit fields depending on ALLOW perms OTHER users 
-                      have for given acl. All zero if they have no access.
-                      (used for testing if a user has exclusive access)
-*/
-{
-  int        flag;
-  GRSTgaclPerm  perm = 0;
-  GRSTgaclEntry *entry;
-  GRSTgaclCred  *cred;
-  
-  if (acl == NULL) return 0;
-  
-  for (entry = acl->firstentry; entry != NULL; entry = entry->next)
-     {
-       flag = 0; /* flag will be set if cred implies other users */
-     
-       for (cred = entry->firstcred; cred != NULL; cred = cred->next)
-          {
-            if (strcmp(cred->type, "person") != 0)
-             /* if we ever add support for other person-specific credentials,
-                they must also be recognised here */
-              {
-                flag = 1;
-                break; 
-              }
-
-            if (!GRSTgaclUserHasCred(user, cred))
-                 /* if user doesnt have this person credential, assume
-                    it refers to a different individual */
-              {
-                flag = 1;
-                break;
-              }
-          }
-
-       if (flag) perm = perm | entry->allowed;
-     }
-
-  return perm;     
-}
-
-/* 
-    Wrapper functions for gridsite-gacl.h support of legacy API
-*/
-
-GRSTgaclEntry *GACLparseEntry(xmlNodePtr cur)
-{
-  return GRSTgaclEntryParse(cur);
-}
diff --git a/org.gridsite.core/src/grst_http.c b/org.gridsite.core/src/grst_http.c
deleted file mode 100644 (file)
index c7b375e..0000000
+++ /dev/null
@@ -1,407 +0,0 @@
-/*
-   Copyright (c) 2002-3, Andrew McNab, University of Manchester
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or
-   without modification, are permitted provided that the following
-   conditions are met:
-
-     o Redistributions of source code must retain the above
-       copyright notice, this list of conditions and the following
-       disclaimer. 
-     o Redistributions in binary form must reproduce the above
-       copyright notice, this list of conditions and the following
-       disclaimer in the documentation and/or other materials
-       provided with the distribution. 
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-   CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-   BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-   TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-   ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-   POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef VERSION
-#define VERSION "x.x.x"
-#endif
-
-#define _GNU_SOURCE
-#include <stdio.h>
-
-#include <time.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <unistd.h>
-#include <dirent.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-#include "gridsite.h"
-
-void GRSThttpBodyInit(GRSThttpBody *thisbody)
-{
-  thisbody->size = 0; /* simple, but we don't expose internals to callers */
-}
-
-void GRSThttpPrintf(GRSThttpBody *thisbody, char *fmt, ...)
-/* append printf() style format and arguments to *thisbody.
-   This requires vasprintf from glibc!! */
-{
-  char    *p;
-  size_t   size;
-  va_list  args;
-
-  va_start(args, fmt);
-  size = vasprintf(&p, fmt, args);  
-  va_end(args);
-
-  if      (size == 0) free(p); /* don't need to bother in this case */
-  else if (size >  0)
-    {
-      if (thisbody->size == 0) /* need to initialise */
-        {
-          thisbody->first = (GRSThttpCharsList *)malloc(sizeof(GRSThttpCharsList));
-          thisbody->first->text = p;
-          thisbody->first->next = NULL;
-      
-          thisbody->last = thisbody->first;          
-          thisbody->size = size;
-        }
-      else
-        {
-          thisbody->last->next = (GRSThttpCharsList *)
-                                               malloc(sizeof(GRSThttpCharsList));
-          ((GRSThttpCharsList *) thisbody->last->next)->text = p;
-          ((GRSThttpCharsList *) thisbody->last->next)->next = NULL;
-      
-          thisbody->last = thisbody->last->next;          
-          thisbody->size = thisbody->size + size;
-        }
-    }
-}
-
-int GRSThttpCopy(GRSThttpBody *thisbody, char *file)
-/* 
-   copy a whole file, named file[], into the body output buffer, returning
-   1 if file was found and copied ok, or 0 otherwise.
-*/
-{
-  int         fd, len;
-  char        c, *p;
-  struct stat statbuf;
-
-  fd = open(file, O_RDONLY);
-
-  if (fd == -1) return 0;
-
-  if (fstat(fd, &statbuf) != 0)
-    {
-      close(fd);
-      return 0;
-    }
-
-  p = malloc(statbuf.st_size + 1);
-
-  if (p == NULL)
-    {
-      close(fd);
-      return 0;
-    }
-
-  len = read(fd, p, statbuf.st_size);
-  p[len] = '\0';
-
-  close(fd);
-   
-  if (thisbody->size == 0) /* need to initialise */
-    {
-      thisbody->first = (GRSThttpCharsList *) malloc(sizeof(GRSThttpCharsList));
-      thisbody->first->text = p;
-      thisbody->first->next = NULL;
-      
-      thisbody->last = thisbody->first;
-      thisbody->size = len;
-    }
-  else
-    { 
-      thisbody->last->next=(GRSThttpCharsList *)malloc(sizeof(GRSThttpCharsList));
-      ((GRSThttpCharsList *) thisbody->last->next)->text = p;
-      ((GRSThttpCharsList *) thisbody->last->next)->next = NULL;
-      
-      thisbody->last = thisbody->last->next;
-      thisbody->size = thisbody->size + len;
-    }
-
-  return 1;      
-}
-
-void GRSThttpWriteOut(GRSThttpBody *thisbody)
-/* output Content-Length header, blank line then whole of the body to
-   standard output */
-{
-  GRSThttpCharsList *p;
-  
-  printf("Content-Length: %d\n\n", thisbody->size);
-
-  p = thisbody->first;
-  
-  while (p != NULL)
-    {
-      fputs(p->text, stdout);
-    
-      p = p->next;      
-    }
-}
-
-int GRSThttpPrintHeaderFooter(GRSThttpBody *bp, char *file, char *headfootname)
-/* 
-    try to print Header or Footer appropriate for absolute path file[],
-    returning 1 rather than 0 if found.
-*/
-{
-  int          found = 0;
-  char        *pathfile, *p;
-  struct stat  statbuf;
-
-  pathfile = malloc(strlen(file) + strlen(headfootname) + 2);
-  strcpy(pathfile, file);
-
-  if ((pathfile[strlen(pathfile) - 1] != '/') &&
-      (stat(pathfile, &statbuf) == 0) && 
-       S_ISDIR(statbuf.st_mode)) strcat(pathfile, "/");
-  
-  for (;;)
-     {
-       p = rindex(pathfile, '/');
-       if (p == NULL) break;
-       p[1] = '\0';
-       strcat(p, headfootname);
-
-       if (stat(pathfile, &statbuf) == 0)
-         {
-           found = GRSThttpCopy(bp, pathfile);
-           break;
-         }
-
-       p[0] = '\0';
-     }
-
-  free(pathfile);
-  return found;
-}
-
-char *GRSThttpGetCGI(char *name)
-/* 
-   Return a malloc()ed copy of CGI form parameter identified by name[],
-   either received by QUERY_STRING (via GET) or on stdin (via POST).
-   Caller must free() the returned string itself. If name[] is not found,
-   an empty NUL-terminated malloc()ed string is returned. name[] has any
-   URL-encoding reversed.
-*/
-{
-  char   *p, *namepattern, *valuestart, *returnvalue, *querystring;
-  int     c, i, j, n, contentlength = 0;
-  static char *cgiposted = NULL;
-  size_t  size_needed;
-
-  if (cgiposted == NULL) /* have to initialise cgiposted */
-    {
-      p = getenv("CONTENT_LENGTH");
-      if (p != NULL) sscanf(p, "%d", &contentlength);
-
-      querystring = getenv("REDIRECT_QUERY_STRING");
-      if (querystring == NULL) querystring = getenv("QUERY_STRING");
-      
-      if (querystring == NULL) cgiposted = malloc(contentlength + 3);
-      else cgiposted = malloc(contentlength + strlen(querystring) + 4);
-
-      cgiposted[0] = '&';
-
-      for (i = 1; i <= contentlength; ++i)
-         {
-           c = getchar();
-           if (c == EOF) break;
-           cgiposted[i] = c;           
-         }
-
-      cgiposted[i]   = '&';
-      cgiposted[i+1] = '\0';
-
-      if (querystring != NULL)
-        {
-          strcat(cgiposted, querystring);
-          strcat(cgiposted, "&");
-        }
-    }
-    
-  namepattern = malloc(strlen(name) + 3);
-  sprintf(namepattern, "&%s=", name);
-  
-  p = strstr(cgiposted, namepattern);
-  free(namepattern);
-  if (p == NULL) return strdup("");
-     
-  valuestart = &p[strlen(name) + 2];
-
-  for (n=0; valuestart[n] != '&'; ++n) ;
-  
-  returnvalue = malloc(n + 1);
-  
-  j=0;
-  
-  for (i=0; i < n; ++i) 
-     {
-       if ((i < n - 2) && (valuestart[i] == '%')) /* url encoded as %HH */
-         {
-           returnvalue[j] = 0;
-           
-           if (isdigit(valuestart[i+1])) 
-                 returnvalue[j] += 16 * (valuestart[i+1] - '0');
-           else if (isalpha(valuestart[i+1])) 
-                 returnvalue[j] += 16 * (10 + tolower(valuestart[i+1]) - 'a');
-                         
-           if (isdigit(valuestart[i+2])) 
-                 returnvalue[j] += valuestart[i+2] - '0';
-           else if (isalpha(valuestart[i+2])) 
-                 returnvalue[j] += 10 + tolower(valuestart[i+2]) - 'a';
-
-           i = i + 2;
-         }
-       else if (valuestart[i] == '+') returnvalue[j] = ' ';
-       else                           returnvalue[j] = valuestart[i];
-       
-       if (returnvalue[j] == '\r') continue; /* CR/LF -> LF */
-       ++j;
-     }
-
-  returnvalue[j] = '\0';
-
-  return returnvalue;
-}
-
-/*                   *
- * Utility functions *
- *                   */
-
-char *GRSThttpUrlDecode(char *in)
-{
-  int   i, j, n;
-  char *out;
-                                                                                
-  n = strlen(in);
-  out = malloc(n + 1);
-                                                                                
-  j=0;
-                                                                                
-  for (i=0; i < n; ++i)
-     {
-       if ((i < n - 2) && (in[i] == '%')) /* url encoded as %HH */
-         {
-           out[j] = 0;
-                                                                                
-           if (isdigit(in[i+1]))
-                 out[j] += 16 * (in[i+1] - '0');
-           else if (isalpha(in[i+1]))
-                 out[j] += 16 * (10 + tolower(in[i+1]) - 'a');
-                                                                                
-           if (isdigit(in[i+2]))
-                 out[j] += in[i+2] - '0';
-           else if (isalpha(in[i+2]))
-                 out[j] += 10 + tolower(in[i+2]) - 'a';
-                                                                                
-           i = i + 2;
-         }
-       else if (in[i] == '+') out[j] = ' ';
-       else                   out[j] = in[i];
-                                                                                
-       ++j;
-     }
-                                                                                
-  out[j] = '\0';
-                                                                                
-  return out;
-}
-
-char *GRSThttpUrlEncode(char *in)
-/* Return a pointer to a malloc'd string holding a URL-encoded (RFC 1738)
-   version of *in. Only A-Z a-z 0-9 . _ - are passed through unmodified.
-   (DN's processed by GRSThttpUrlEncode can be used as valid Unix filenames,
-   assuming they do not exceed restrictions on filename length.) */
-{
-  char *out, *p, *q;
-  
-  out = malloc(3*strlen(in) + 1);
-  
-  p = in;
-  q = out;
-  
-  while (*p != '\0')
-       {
-         if (isalnum(*p) || (*p == '.') || (*p == '_') || (*p == '-'))
-           {
-             *q = *p;
-             ++q;
-           }
-         else
-           {
-             sprintf(q, "%%%2X", *p);
-             q = &q[3];
-           }
-
-         ++p;
-       }
-  
-  *q = '\0';  
-  return out;
-}
-
-char *GRSThttpUrlMildencode(char *in)
-/* Return a pointer to a malloc'd string holding a partially URL-encoded
-   version of *in. "Partially" means that A-Z a-z 0-9 . = - _ @ and / 
-   are passed through unmodified. (DN's processed by GRSThttpUrlMildencode()
-   can be used as valid Unix paths+filenames if you are prepared to
-   create or simulate the resulting /X=xyz directories.) */
-{
-  char *out, *p, *q;
-  
-  out = malloc(3*strlen(in) + 1);
-  
-  p = in;
-  q = out;
-  
-  while (*p != '\0')
-       {
-         if (isalnum(*p) || (*p == '.') || (*p == '=') || (*p == '-') 
-                         || (*p == '/') || (*p == '@') || (*p == '_'))
-           {
-             *q = *p;
-             ++q;
-           }
-         else if (*p == ' ')
-           {
-             *q = '+';
-             ++q;
-           }
-         else
-           {
-             sprintf(q, "%%%2X", *p);
-             q = &q[3];
-           }
-
-         ++p;
-       }
-  
-  *q = '\0';  
-  return out;
-}
diff --git a/org.gridsite.core/src/grst_x509.c b/org.gridsite.core/src/grst_x509.c
deleted file mode 100644 (file)
index 37b60e6..0000000
+++ /dev/null
@@ -1,1398 +0,0 @@
-/*
-   Copyright (c) 2002-4, Andrew McNab, University of Manchester
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or
-   without modification, are permitted provided that the following
-   conditions are met:
-
-   o Redistributions of source code must retain the above
-     copyright notice, this list of conditions and the following
-     disclaimer. 
-   o Redistributions in binary form must reproduce the above
-     copyright notice, this list of conditions and the following
-     disclaimer in the documentation and/or other materials
-     provided with the distribution. 
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-   CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-   BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-   TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-   ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-   POSSIBILITY OF SUCH DAMAGE.
-
-   ---------------------------------------------------------------
-    For more information about GridSite: http://www.gridsite.org/
-   ---------------------------------------------------------------
-*/ 
-
-#define _GNU_SOURCE
-
-#include <stdio.h>
-#include <unistd.h>       
-#include <stdlib.h>
-#include <time.h>
-#include <stdarg.h>
-#include <dirent.h>
-#include <string.h>
-#include <pwd.h>
-#include <errno.h>
-#include <getopt.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include <openssl/x509.h>
-#include <openssl/x509v3.h>
-#include <openssl/err.h>
-#include <openssl/pem.h>
-
-#include <openssl/rsa.h>
-#include <openssl/pem.h>
-#include <openssl/err.h>
-#include <openssl/evp.h>
-#include <openssl/bio.h>    
-#include <openssl/des.h>    
-#include <openssl/rand.h>
-
-#ifdef GRST_VOMS_SUPPORT
-#include <glite/security/voms/voms_apic.h>
-#endif
-
-#include "gridsite.h"
-
-#define GRST_KEYSIZE   512
-#define GRST_PROXYCACHE        "/../proxycache/"
-#define GRST_MAX_CHAIN_LEN 9
-
-/// Compare X509 Distinguished Name strings
-int GRSTx509NameCmp(char *a, char *b)
-/**
- *  This function attempts to do with string representations what
- *  would ideally be done with OIDs/values. In particular, we equate
- *  "/Email=" == "/emailAddress=" to deal with this important change
- *  between OpenSSL 0.9.6 and 0.9.7. 
- *  Other than that, it is currently the same as ordinary strcmp(3).
- */
-{
-   int   ret;
-   char *aa, *bb, *p;
-
-   aa = strdup(a);
-   while ((p = strstr(aa, "/emailAddress=")) != NULL)
-        {
-          memmove(&p[6], &p[13], strlen(&p[13]) + 1);
-          p[1] = 'E';
-        }
-
-   bb = strdup(b);
-   while ((p = strstr(bb, "/emailAddress=")) != NULL)
-        {
-          memmove(&p[6], &p[13], strlen(&p[13]) + 1);
-          p[1] = 'E';
-        }
-
-   ret = strcmp(aa, bb);
-
-   free(aa);
-   free(bb);
-                                                                                
-   return ret;
-}
-
-
-/// Check critical extensions
-/**
- *  Returning GRST_RET_OK if all of extensions are known to us or 
- *  OpenSSL; GRST_REF_FAILED otherwise.   
- *
- *  Since this function relies on functionality (X509_supported_extension)
- *  introduced in 0.9.7, then we do nothing and report an error 
- *  (GRST_RET_FAILED) if one of the associated defines 
- *  (X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION) is absent.
- */
-
-int GRSTx509KnownCriticalExts(X509 *cert)
-{
-   int  i;
-   char s[80];
-   X509_EXTENSION *ex;
-   
-#ifdef X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION        
-   for (i = 0; i < X509_get_ext_count(cert); ++i)
-      {
-        ex = X509_get_ext(cert, i);
-
-        if (X509_EXTENSION_get_critical(ex) &&
-                                 !X509_supported_extension(ex))
-          {
-            OBJ_obj2txt(s, sizeof(s), X509_EXTENSION_get_object(ex), 1);
-
-            if (strcmp(s, GRST_PROXYCERTINFO_OID) != 0) return GRST_RET_FAILED;
-          }
-      }
-
-   return GRST_RET_OK;
-#else
-   return GRST_RET_FAILED;
-#endif
-}
-
-/// ASN1 time string (in a char *) to time_t
-/** 
- *  (Use ASN1_STRING_data() to convert ASN1_GENERALIZEDTIME to char * if
- *   necessary)
- */
-time_t GRSTasn1TimeToTimeT(char *asn1time)
-{
-   char   zone;
-   struct tm time_tm;
-  
-   if ((sscanf(asn1time, "%02d%02d%02d%02d%02d%02d%c", 
-         &(time_tm.tm_year),
-         &(time_tm.tm_mon),
-         &(time_tm.tm_mday),
-         &(time_tm.tm_hour),
-         &(time_tm.tm_min),
-         &(time_tm.tm_sec),
-         &zone) != 7) || (zone != 'Z')) return 0; /* dont understand */
-         
-   /* time format fixups */
-  
-   if (time_tm.tm_year < 90) time_tm.tm_year += 100;
-   --(time_tm.tm_mon);
-  
-   return timegm(&time_tm);         
-}
-
-/// Check if certificate can be used as a CA to sign standard X509 certs
-/*
- *  Return GRST_RET_OK if true; GRST_RET_FAILED if not.
- */
-
-int GRSTx509IsCA(X509 *cert)
-{
-   int idret, purpose_id;
-
-   purpose_id = X509_PURPOSE_get_by_sname("sslclient");
-
-   /* final argument to X509_check_purpose() is whether to check for CAness */   
-
-   if (X509_check_purpose(cert, purpose_id + X509_PURPOSE_MIN, 1))
-        return GRST_RET_OK;
-   else return GRST_RET_FAILED;
-}   
-
-/// Check certificate chain for GSI proxy acceptability.
-/**
- *  Returns X509_V_OK/GRST_RET_OK if valid; OpenSSL X509 errors otherwise.
- *
- *  Inspired by GSIcheck written by Mike Jones, SVE, Manchester Computing,
- *  The University of Manchester.
- *
- *  The GridSite version handles old and new style Globus proxies, and
- *  proxies derived from user certificates issued with "X509v3 Basic
- *  Constraints: CA:FALSE" (eg UK e-Science CA)
- *
- *  We do not check chain links between certs here: this is done by
- *  GRST_check_issued/X509_check_issued in mod_ssl's ssl_engine_init.c
- *
- *  TODO: we do not yet check ProxyCertInfo and ProxyCertPolicy extensions
- *        (although via GRSTx509KnownCriticalExts() we can accept them.)
- */
-
-int GRSTx509CheckChain(int *first_non_ca, X509_STORE_CTX *ctx)
-{
-   STACK_OF(X509) *certstack;   /* Points to the client's cert chain */
-   X509 *cert;                  /* Points to the client's cert */
-   int depth;                   /* Depth of cert chain */
-   size_t len,len2;             /* Lengths of issuer and cert DN */
-   int IsCA;                    /* Holds whether cert is allowed to sign */
-   int prevIsCA;                /* Holds whether previous cert in chain is 
-                                   allowed to sign */
-   int prevIsLimited;          /* previous cert was proxy and limited */
-   int i,j;                     /* Iteration variables */
-   char *cert_DN;               /* Pointer to current-certificate-in-chain's 
-                                   DN */
-   char *issuer_DN;             /* Pointer to 
-                                   issuer-of-current-cert-in-chain's DN */
-   char *proxy_part_DN;         /* Pointer to end part of current-cert-in-chain
-                                   maybe eg "/CN=proxy" */
-   time_t now;
-   
-   time(&now);
-
-   *first_non_ca = 0; /* set to something predictable if things fail */
-
-   /* Check for context */
-   if (!ctx) return X509_V_ERR_INVALID_CA; 
-     /* Can't GSI-verify if there is no context. Here and throughout this
-        function we report all errors as X509_V_ERR_INVALID_CA. */
-   /* Set necessary preliminary values */
-   IsCA          = TRUE;           /* =prevIsCA - start from a CA */
-   prevIsLimited = 0;
-   /* Get the client cert chain */
-   certstack = X509_STORE_CTX_get_chain(ctx);     /* Get the client's chain  */
-   depth     = sk_X509_num(certstack);            /* How deep is that chain? */
-   /* Check the client chain */
-   for (i=depth-1; i >= 0; --i) 
-      /* loop through client-presented chain starting at CA end */
-      {
-        prevIsCA=IsCA;
-
-        /* Check for X509 certificate and point to it with 'cert' */
-        if (cert = sk_X509_value(certstack, i))
-          {
-            /* we check times and reject immediately if invalid */
-          
-            if (now <
-                GRSTasn1TimeToTimeT(ASN1_STRING_data(X509_get_notBefore(cert))))
-                  return X509_V_ERR_INVALID_CA;
-                
-            if (now > 
-                GRSTasn1TimeToTimeT(ASN1_STRING_data(X509_get_notAfter(cert))))
-                  return X509_V_ERR_INVALID_CA;
-
-            /* If any forebear certificate is not allowed to sign we must 
-               assume all decendents are proxies and cannot sign either */
-            if (prevIsCA)
-              {
-                /* always treat the first cert (from the CA files) as a CA */
-                if (i == depth-1) IsCA = TRUE;
-                /* check if this cert is valid CA for signing certs */
-                else IsCA = (GRSTx509IsCA(cert) == GRST_RET_OK);
-                
-                if (!IsCA) *first_non_ca = i;
-              } 
-            else 
-              {
-                IsCA = FALSE; 
-                /* Force proxy check next iteration. Important because I can
-                   sign any CA I create! */
-              }
-            cert_DN   = X509_NAME_oneline(X509_get_subject_name(cert),NULL,0);
-            issuer_DN = X509_NAME_oneline(X509_get_issuer_name(cert),NULL,0);
-            len       = strlen(cert_DN);
-            len2      = strlen(issuer_DN);
-
-            /* issuer didn't have CA status, so this is (at best) a proxy:
-               check for bad proxy extension*/
-
-            if (!prevIsCA)
-              {
-                if (prevIsLimited) /* we reject proxies of limited proxies! */
-                                return X509_V_ERR_INVALID_CA;
-              
-                /* User not allowed to sign shortened DN */
-                if (len2 > len) return X509_V_ERR_INVALID_CA;                           
-                  
-                /* Proxy subject must begin with issuer. */
-                if (strncmp(cert_DN, issuer_DN, len2) != 0) 
-                              return X509_V_ERR_INVALID_CA;
-
-                /* Set pointer to end of base DN in cert_DN */
-                proxy_part_DN = &cert_DN[len2];
-
-                /* First attempt at support for Old and New style GSI
-                   proxies: /CN=anything is ok for now */
-                if (strncmp(proxy_part_DN, "/CN=", 4) != 0)
-                                         return X509_V_ERR_INVALID_CA;
-                                         
-                if ((strncmp(proxy_part_DN, "/CN=limited proxy", 17) == 0) &&
-                    (i > 0)) prevIsLimited = 1; /* ready for next cert ... */
-              } 
-          }
-      }
-
-   /* Check cert whose private key is being used by client. If previous in 
-      chain is not allowed to be a CA then need to check this final cert for 
-      valid proxy-icity too */
-   if (!prevIsCA) 
-     { 
-       if (prevIsLimited) return X509_V_ERR_INVALID_CA;
-        /* we do not accept proxies signed by limited proxies */
-     
-       if (cert = sk_X509_value(certstack, 0)) 
-         {
-           /* Load DN & length of DN and either its issuer or the
-              first-bad-issuer-in-chain */
-           cert_DN = X509_NAME_oneline(X509_get_subject_name(cert), NULL, 0);
-           issuer_DN = X509_NAME_oneline(X509_get_issuer_name(cert),  NULL, 0);
-           len = strlen(cert_DN);
-           len2 = strlen(issuer_DN);
-           /* issuer didn't have CA status, check for bad proxy extension */
-
-           if (len2 > len) return X509_V_ERR_INVALID_CA;
-             /* User not allowed to sign shortened DN */
-
-           if (strncmp(cert_DN, issuer_DN, len2) != 0) 
-                           return X509_V_ERR_INVALID_CA;
-             /* Proxy subject must begin with issuer. */
-
-           proxy_part_DN = &cert_DN[len2];                         
-             /* Set pointer to end of DN base in cert_DN */
-             
-           /* Remander of subject must be either "/CN=proxy" or 
-              "/CN=limited proxy" (or /CN=XYZ for New style GSI) */
-              
-           /* First attempt at support for Old and New style GSI
-              proxies: /CN=anything is ok for now. */
-           if (strncmp(proxy_part_DN, "/CN=", 4) != 0)
-                                   return X509_V_ERR_INVALID_CA;
-         }
-     }
-   return X509_V_OK; /* this is also GRST_RET_OK, of course - by choice */
-}
-
-/// Example VerifyCallback routine
-
-/**
- *   
- */
-
-int GRSTx509VerifyCallback (int ok, X509_STORE_CTX *ctx)
-{
-   int errnum   = X509_STORE_CTX_get_error(ctx);
-   int errdepth = X509_STORE_CTX_get_error_depth(ctx);
-   int first_non_ca;
-
-#ifndef X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION
-#define X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION 34
-#endif
-
-   if (errnum == X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION)
-     {
-       if (GRSTx509KnownCriticalExts(X509_STORE_CTX_get_current_cert(ctx))
-           == GRST_RET_OK)
-         {
-           ok = TRUE;
-           errnum = X509_V_OK;
-           X509_STORE_CTX_set_error(ctx, errnum);
-         }                               
-     }
-   else if ((errdepth == 0)       && 
-            (errnum == X509_V_OK) && 
-            (GRSTx509CheckChain(&first_non_ca, ctx) != X509_V_OK)) ok = FALSE;
-   
-   
-   return ok;
-  
-// check this 
-   
-//   if (ok) return GRST_RET_OK;
-//   else    return GRST_RET_FAILED;
-}
-
-/// Get the VOMS attributes in the extensions to the given cert
-/*
- *  Puts any VOMS credentials found into the Compact Creds string array
- *  starting at *creds. Always returns GRST_RET_OK.
- */
-
-int GRSTx509GetVomsCreds(int *lastcred, int maxcreds, size_t credlen, 
-                         char *creds, X509 *cert, STACK_OF(X509) *certstack,
-                         char *vomsdir)
-{
-#ifndef GRST_VOMS_SUPPORT
-   return GRST_RET_OK;
-}
-#else
-
-/*
-   int  j;   
-   unsigned int siglen=-1, datalength=-1, dataoffset = -1;
-   char s[80];
-   unsigned char *charstr, *p, *time1 = NULL, *time2 = NULL, *vo = NULL,
-                 *uri = NULL, *user = NULL, *group = "NULL", *role = "NULL", 
-                 *cap = "NULL", *server = NULL, *ucuser, *signature = NULL,
-                 *data = NULL, *datalen = NULL;
-   X509_EXTENSION *ex;
-   ASN1_STRING    *asn1str;
-   time_t          now, time1_time = 0, time2_time = 0, 
-                   uctime1_time, uctime2_time;
-*/
-
-
-   struct vomsdata *vd;
-   int    i, j, vomserror;
-
-   vd = VOMS_Init(NULL, NULL);
-
-   if (VOMS_Retrieve(cert, certstack, RECURSE_CHAIN, vd, &vomserror) &&
-       (vd->data != NULL))
-     {     
-       for (i = 0; vd->data[i] != NULL; ++i)
-          {
-            if (vd->data[i]->fqan != NULL)
-                for (j = 0; vd->data[i]->fqan[j] != NULL; ++j)
-                   {
-                     if (*lastcred >= maxcreds - 1)
-                       {
-                         VOMS_Destroy(vd);
-                         return GRST_RET_OK;
-                       }
-
-                     ++(*lastcred);
-            
-                     snprintf(&creds[*lastcred * (credlen + 1)], 
-                           credlen+1,
-                           "VOMS %010lu %010lu 0 %s",
-                           GRSTasn1TimeToTimeT(vd->data[i]->date1), 
-                           GRSTasn1TimeToTimeT(vd->data[i]->date2),
-                           vd->data[i]->fqan[j]);
-                   }
-          }
-     }
-   else
-     {
-       FILE *fp = fopen("/tmp/getvoms.log", "w");
-       fprintf(fp, "%d\n", vomserror);
-       fclose(fp);
-     }
-   
-   VOMS_Destroy(vd);   
-   return GRST_RET_OK;
-}
-
-#if 0
-
-   time(&now);
-
-   uctime1_time = 
-        GRSTasn1TimeToTimeT(ASN1_STRING_data(X509_get_notBefore(usercert)));
-   uctime2_time =       
-        GRSTasn1TimeToTimeT(ASN1_STRING_data(X509_get_notAfter(usercert)));
-   ucuser =
-        X509_NAME_oneline(X509_get_subject_name(usercert), NULL, 0);
-
-   for (i = 0; i < X509_get_ext_count(cert); ++i)
-      {
-        ex = X509_get_ext(cert, i);
-        
-        OBJ_obj2txt(s, sizeof(s), X509_EXTENSION_get_object(ex), 1);
-
-        if (strcmp(s, GRST_VOMS_OID) == 0) /* a VOMS extension */
-          {
-            asn1str = X509_EXTENSION_get_data(ex);
-            charstr = (char *) malloc(ASN1_STRING_length(asn1str) + 1);
-            memcpy(charstr, ASN1_STRING_data(asn1str), 
-                            ASN1_STRING_length(asn1str));
-            charstr[ASN1_STRING_length(asn1str)] = '\0';
-
-            siglen = -1;
-            
-            if ((sscanf(charstr, "SIGLEN:%u", &siglen) != 1) ||
-                (siglen == -1) ||
-                ((p = index(charstr, '\n')) == NULL))
-              {
-                free(charstr);
-                continue;
-              }
-                            
-            ++p;
-
-            if (strncmp(p, "SIGNATURE:", sizeof("SIGNATURE:") - 1) != 0)
-              {
-                free(charstr);
-                continue;
-              }
-
-            signature = &p[sizeof("SIGNATURE:") - 1];
-            
-            p = &p[siglen + sizeof("SIGNATURE:") - 1];
-            data = p;
-
-            /* nasty pointer arithmetic! */
-            dataoffset = (unsigned int) ((long) data - (long) charstr);
-            datalength = (unsigned int) 
-                            (ASN1_STRING_length(asn1str) - dataoffset);
-
-            if (datalength <= 0)
-              {
-                free(charstr);
-                continue;
-              }
-
-            while (1)
-             {
-               if (strncmp(p, "USER:", sizeof("USER:") - 1) == 0)
-                 {
-                   p = &p[sizeof("USER:") - 1];
-                   while ((*p != '\n') && (*p != '\0') && (*p <= ' ')) ++p;
-                   user = p;   
-                   p = index(p, '\n');
-                   if (p == NULL) break;
-                   *p = '\0';
-                   ++p;
-                 }
-               else if (strncmp(p, "TIME1:", sizeof("TIME1:") - 1) == 0)
-                 {
-                   p = &p[sizeof("TIME1:") - 1];
-                   while ((*p != '\n') && (*p != '\0') && (*p <= ' ')) ++p;
-                   time1 = p;                
-                   p = index(p, '\n');
-                   if (p != NULL) *p = '\0';
-                  
-                   time1_time = GRSTasn1TimeToTimeT(time1);                   
-                   if (time1_time < uctime1_time) time1_time = uctime1_time;
-                   if (p == NULL) break;
-                   ++p;
-                 }
-               else if (strncmp(p, "TIME2:", sizeof("TIME2:") - 1) == 0)
-                 {
-                   p = &p[sizeof("TIME2:") - 1];
-                   while ((*p != '\n') && (*p != '\0') && (*p <= ' ')) ++p;
-                   time2 = p;
-                   p = index(p, '\n');
-                   if (p != NULL) *p = '\0';
-
-                   time2_time = GRSTasn1TimeToTimeT(time2); 
-                   if (time2_time > uctime2_time) time2_time = uctime2_time;
-                   if (p == NULL) break;
-                   ++p;
-                 }
-               else if (strncmp(p, "VO:", sizeof("VO:") - 1) == 0)
-                 {
-                   p = &p[sizeof("VO:") - 1];
-                   while ((*p != '\n') && (*p != '\0') && (*p <= ' ')) ++p;
-                   vo = p;
-                
-                   p = index(p, '\n');
-                   if (p == NULL) break;
-                   *p = '\0';
-                   ++p;
-                 }
-               else if (strncmp(p, "SERVER:", sizeof("SERVER:") - 1) == 0)
-                 {
-                   p = &p[sizeof("SERVER:") - 1];
-                   while ((*p != '\n') && (*p != '\0') && (*p <= ' ')) ++p;
-                   server = p;
-
-                   p = index(p, '\n');
-                   if (p == NULL) break;
-                   *p = '\0';
-                   ++p;
-                 }
-               else if (strncmp(p, "DATALEN:", sizeof("DATALEN:") - 1) == 0)
-                 {
-                   p = &p[sizeof("DATALEN:") - 1];
-                   while ((*p != '\n') && (*p != '\0') && (*p <= ' ')) ++p;
-                   datalen = p;                
-                   p = index(p, '\n');
-                   if (p == NULL) break; 
-                   *p = '\0';
-                   ++p;
-                   break;
-                 }
-               else /* not something we use */
-                 {
-                   p = index(p, '\n');
-                   if (p == NULL) break;
-                   *p = '\0';
-                   ++p;
-                 }
-             }
-/*             
-            if ((now >= time1_time) &&
-                (now <= time2_time) &&
-                (signature != NULL) &&
-                (data != NULL) &&
-                (siglen > 0) &&
-                (user != NULL) &&
-                (ucuser != NULL) &&
-                (strcmp(user, ucuser) == 0) &&
-                (GRSTx509CheckVomsSig(signature, siglen, 
-                                    &((ASN1_STRING_data(asn1str))[dataoffset]),
-                                    datalength, vomsdir, vo, 
-                                    server) == GRST_RET_OK)) 
-                                    while (1)
-*/
-             {
-               if (strncmp(p, "GROUP:", sizeof("GROUP:") - 1) == 0)
-                 {
-                   p = &p[sizeof("GROUP:") - 1];
-                   while ((*p != '\n') && (*p != '\0') && (*p <= ' ')) ++p;
-                   group = p;
-                   role = "NULL";
-                   cap = "NULL";
-
-                   p = index(p, '\n');
-                   if (p == NULL) break;
-                   *p = '\0';
-                   ++p;
-                 }
-               else if (strncmp(p, "ROLE:", sizeof("ROLE:") - 1) == 0)
-                 {
-                   p = &p[sizeof("ROLE:") - 1];
-                   while ((*p != '\n') && (*p != '\0') && (*p <= ' ')) ++p;
-                   role = p;
-
-                   p = index(p, '\n');
-                   if (p == NULL) break;
-                   *p = '\0';
-                   ++p;
-                 }
-               else if (strncmp(p, "CAP:", sizeof("CAP:") - 1) == 0)
-                 {
-                   p = &p[sizeof("CAP:") - 1];
-                   while ((*p != '\n') && (*p != '\0') && (*p <= ' ')) ++p;
-                   cap = p;
-
-                   p = index(p, '\n');
-                   if (p != NULL) *p = '\0';
-
-                   if (*lastcred < maxcreds - 1)
-                     {
-                       ++(*lastcred);
-
-                       if ((strcmp(role, "NULL") == 0) &&
-                           (strcmp(cap , "NULL") == 0))                       
-                         snprintf(&creds[*lastcred * (credlen + 1)], credlen+1,
-                           "VOMS %010lu %010lu 0 /%s%s", 
-                           time1_time, time2_time, vo, group);
-                       else if ((strcmp(role, "NULL") != 0) &&
-                                (strcmp(cap , "NULL") == 0))  
-                         snprintf(&creds[*lastcred * (credlen + 1)], credlen+1,
-                           "VOMS %010lu %010lu 0 /%s%s/Role=%s", 
-                           time1_time, time2_time, vo, group, role);
-                       else if ((strcmp(role, "NULL") == 0) &&
-                                (strcmp(cap , "NULL") != 0))     
-                         snprintf(&creds[*lastcred * (credlen + 1)], credlen+1,
-                           "VOMS %010lu %010lu 0 /%s%s/Capability=%s", 
-                           time1_time, time2_time, vo, group, cap);
-                       else 
-                         snprintf(&creds[*lastcred * (credlen + 1)], credlen+1,
-                           "VOMS %010lu %010lu 0 /%s%s/Role=%s/Capability=%s", 
-                           time1_time, time2_time, vo, group, role, cap);
-                     }
-                      
-                   if (p == NULL) break;
-                   ++p;
-                 }
-               else /* not something we use */
-                 {
-                   p = index(p, '\n');
-                   if (p == NULL) break;
-                   *p = '\0';
-                   ++p;
-                 }
-             }
-             
-            free(charstr); 
-          }
-      }
-
-   return GRST_RET_OK;
-}
-#endif
-
-#endif
-
-/// Turn a Compact Cred line into a GRSTgaclCred object
-/**
- *  Returns pointer to created GRSTgaclCred or NULL or failure.
- */
-GRSTgaclCred *GRSTx509CompactToCred(char *grst_cred)
-{
-   int       delegation;
-   char     *p;
-   time_t    now, notbefore, notafter;
-   GRSTgaclCred *cred = NULL;
-
-   time(&now);
-
-   if (grst_cred == NULL) return NULL; /* just in case */
-
-   if (strncmp(grst_cred, "X509USER ", 9) == 0)
-     {
-       if ((sscanf(grst_cred, "X509USER %lu %lu %d", 
-                              &notbefore, &notafter, &delegation) == 3)
-            && (now >= notbefore)
-            && (now <= notafter)
-            && (p = index(grst_cred, ' '))
-            && (p = index(++p, ' '))
-            && (p = index(++p, ' '))
-            && (p = index(++p, ' ')))
-         {
-           cred = GRSTgaclCredNew("person");
-           GRSTgaclCredSetDelegation(cred, delegation);
-           GRSTgaclCredAddValue(cred, "dn", &p[1]);
-         }
-
-       return cred;
-     }
-
-   if (strncmp(grst_cred, "VOMS ", 5) == 0)
-     {
-       if ((sscanf(grst_cred, "VOMS %lu %lu", 
-                              &notbefore, &notafter, &delegation) == 3)
-            && (now >= notbefore)
-            && (now <= notafter)
-            && (p = index(grst_cred, ' '))
-            && (p = index(++p, ' '))
-            && (p = index(++p, ' '))
-            && (p = index(++p, ' ')))
-         {
-           /* include /VO/group/subgroup/Role=role/Capability=cap */
-
-           if (*p != '/') return NULL; /* must begin with / */
-
-           cred = GRSTgaclCredNew("voms");
-           GRSTgaclCredSetDelegation(cred, delegation);
-           GRSTgaclCredAddValue(cred, "fqan", p);
-         }
-
-       return cred;
-     }
-
-   return NULL; /* dont recognise this credential type */
-}
-
-/// Get the credentials in an X509 cert/GSI proxy, including any VOMS
-/**
- *  Credentials are placed in Compact Creds string array at *creds.
- * 
- *  Function returns GRST_RET_OK on success, or GRST_RET_FAILED if
- *  some inconsistency found in certificate.
- */
-int GRSTx509CompactCreds(int *lastcred, int maxcreds, size_t credlen, 
-                         char *creds, STACK_OF(X509) *certstack, char *vomsdir)
-{   
-   int   i, j, delegation = 0;
-   char  credtemp[credlen+1];
-   X509 *cert, *usercert = NULL, *gsiproxycert = NULL;
-
-   *lastcred = -1;
-
-   for (i = sk_X509_num(certstack) - 1; i >= 0; --i) 
-      {
-         cert = sk_X509_value(certstack, i);
-
-         if (usercert != NULL) 
-           {           /* found a (GSI proxy) cert after the user cert */
-             gsiproxycert = cert;
-             ++delegation;
-           }
-           
-         if ((usercert == NULL) && 
-             (i < sk_X509_num(certstack) - 1) &&
-             (GRSTx509IsCA(cert) != GRST_RET_OK)) usercert = cert;
-                                          /* found the 1st non-CA cert */
-      }
-
-   if ((usercert == NULL) /* if no usercert ("EEC"), we're not interested */
-       ||
-       (snprintf(credtemp, credlen+1, "X509USER %010lu %010lu %d %s",
-          GRSTasn1TimeToTimeT(ASN1_STRING_data(X509_get_notBefore(usercert))), 
-          GRSTasn1TimeToTimeT(ASN1_STRING_data(X509_get_notAfter(usercert))),
-          delegation,
-     X509_NAME_oneline(X509_get_subject_name(usercert), NULL, 0)) >= credlen+1)
-       || 
-       (*lastcred >= maxcreds-1))
-     {
-       *lastcred = -1;  /* just in case the caller looks at it */
-       return GRST_RET_FAILED; /* tell caller that things didn't work out */
-     }
-
-   ++(*lastcred);
-   strcpy(&creds[*lastcred * (credlen + 1)], credtemp);
-
-   if ((gsiproxycert != NULL) 
-       &&
-       (snprintf(credtemp, credlen+1, "GSIPROXY %010lu %010lu %d %s",
-     GRSTasn1TimeToTimeT(ASN1_STRING_data(X509_get_notBefore(gsiproxycert))), 
-     GRSTasn1TimeToTimeT(ASN1_STRING_data(X509_get_notAfter(gsiproxycert))),
-     delegation,
-  X509_NAME_oneline(X509_get_subject_name(gsiproxycert), NULL, 0)) < credlen+1)
-       &&
-       (*lastcred < maxcreds-1))
-     {
-       ++(*lastcred);
-       strcpy(&creds[*lastcred * (credlen + 1)], credtemp);
-       
-       GRSTx509GetVomsCreds(lastcred, maxcreds, credlen, creds, 
-                            gsiproxycert, certstack, vomsdir);
-     }
-         
-   return GRST_RET_OK;
-}
-
-/// Find proxy file name of the current user
-/**
- *  Return a string with the proxy file name or NULL if not present.
- *  This function does not check if the proxy has expired.
- */
-char *GRSTx509FindProxyFileName(void)
-{
-  char *p;
-  
-  p = getenv("X509_USER_PROXY");
-  
-  if (p != NULL) return strdup(p);
-  
-  p = malloc(sizeof("/tmp/x509up_uXYYYXXXYYY"));
-  
-  sprintf(p, "/tmp/x509up_u%d", getuid());  
-
-  return p;
-}
-
-static void mpcerror(FILE *debugfp, char *msg)
-{
-  if (debugfp != NULL)
-    {
-      fputs(msg, debugfp);
-      ERR_print_errors_fp(debugfp);
-    }
-}
-
-/// Make a GSI Proxy chain from a request, certificate and private key
-/**
- *  The proxy chain is returned in *proxychain. If debugfp is non-NULL,
- *  errors are output to that file pointer. The proxy will expired in
- *  the given number of minutes starting from the current time.
- */
-
-int GRSTx509MakeProxyCert(char **proxychain, FILE *debugfp, 
-                           char *reqtxt, char *cert, char *key, int minutes)
-{
-  char *ptr, *certchain;
-  int i, subjAltName_pos, ncerts;
-  long serial = 1, ptrlen;
-  EVP_PKEY *pkey, *CApkey;
-  const EVP_MD *digest;
-  X509 *certs[GRST_MAX_CHAIN_LEN];
-  X509_REQ *req;
-  X509_NAME *name, *CAsubject, *newsubject;
-  X509_NAME_ENTRY *ent;
-  X509V3_CTX ctx;
-  X509_EXTENSION *subjAltName;
-  STACK_OF (X509_EXTENSION) * req_exts;
-  FILE *fp;
-  BIO *reqmem, *certmem;
-
-  /* read in the request */
-  reqmem = BIO_new(BIO_s_mem());
-  BIO_puts(reqmem, reqtxt);
-    
-  if (!(req = PEM_read_bio_X509_REQ(reqmem, NULL, NULL, NULL)))
-    {
-      mpcerror(debugfp,
-              "GRSTx509MakeProxyCert(): error reading request from BIO memory\n");
-      BIO_free(reqmem);
-      return GRST_RET_FAILED;
-    }
-    
-  BIO_free(reqmem);
-
-  /* verify signature on the request */
-  if (!(pkey = X509_REQ_get_pubkey (req)))
-    {
-      mpcerror(debugfp,
-              "GRSTx509MakeProxyCert(): error getting public key from request\n");
-      return GRST_RET_FAILED;
-    }
-
-  if (X509_REQ_verify(req, pkey) != 1)
-    {
-      mpcerror(debugfp,
-            "GRSTx509MakeProxyCert(): error verifying signature on certificate\n");
-      return GRST_RET_FAILED;
-    }
-    
-  /* read in the signing certificate */
-  if (!(fp = fopen(cert, "r")))
-    {
-      mpcerror(debugfp,
-            "GRSTx509MakeProxyCert(): error opening signing certificate file\n");
-      return GRST_RET_FAILED;
-    }    
-
-  for (ncerts = 1; ncerts < GRST_MAX_CHAIN_LEN; ++ncerts)
-   if (!(certs[ncerts] = PEM_read_X509(fp, NULL, NULL, NULL))) break;
-
-  if (ncerts == 1) /* zeroth cert with be new proxy cert */
-    {
-      mpcerror(debugfp,
-            "GRSTx509MakeProxyCert(): error reading signing certificate file\n");
-      return GRST_RET_FAILED;
-    }    
-
-  fclose(fp);
-  
-  CAsubject = X509_get_subject_name(certs[1]);
-
-  /* read in the CA private key */
-  if (!(fp = fopen(key, "r")))
-    {
-      mpcerror(debugfp,
-            "GRSTx509MakeProxyCert(): error reading signing private key file\n");
-      return GRST_RET_FAILED;
-    }    
-
-  if (!(CApkey = PEM_read_PrivateKey (fp, NULL, NULL, NULL)))
-    {
-      mpcerror(debugfp,
-            "GRSTx509MakeProxyCert(): error reading signing private key in file\n");
-      return GRST_RET_FAILED;
-    }    
-
-  fclose(fp);
-  
-  /* get subject name */
-  if (!(name = X509_REQ_get_subject_name (req)))
-    {
-      mpcerror(debugfp,
-            "GRSTx509MakeProxyCert(): error getting subject name from request\n");
-      return GRST_RET_FAILED;
-    }    
-
-  /* create new certificate */
-  if (!(certs[0] = X509_new ()))
-    {
-      mpcerror(debugfp,
-            "GRSTx509MakeProxyCert(): error creating X509 object\n");
-      return GRST_RET_FAILED;
-    }    
-
-  /* set version number for the certificate (X509v3) and the serial number   
-     need 3 = v4 for GSI proxy?? */
-  if (X509_set_version (certs[0], 3L) != 1)
-    {
-      mpcerror(debugfp,
-            "GRSTx509MakeProxyCert(): error setting certificate version\n");
-      return GRST_RET_FAILED;
-    }    
-
-  ASN1_INTEGER_set (X509_get_serialNumber (certs[0]), serial++);
-
-  if (!(name = X509_get_subject_name(certs[1])))
-    {
-      mpcerror(debugfp,
-      "GRSTx509MakeProxyCert(): error getting subject name from CA certificate\n");
-      return GRST_RET_FAILED;
-    }    
-
-  if (X509_set_issuer_name (certs[0], name) != 1)
-    {
-      mpcerror(debugfp,
-      "GRSTx509MakeProxyCert(): error setting issuer name of certificate\n");
-      return GRST_RET_FAILED;
-    }    
-
-  /* set issuer and subject name of the cert from the req and the CA */
-  ent = X509_NAME_ENTRY_create_by_NID(NULL, OBJ_txt2nid("commonName"), 
-                                      MBSTRING_ASC, "proxy", -1);
-
-  newsubject = X509_NAME_dup(CAsubject);
-
-  X509_NAME_add_entry(newsubject, ent, -1, 0);
-
-  if (X509_set_subject_name(certs[0], newsubject) != 1)
-    {
-      mpcerror(debugfp,
-      "GRSTx509MakeProxyCert(): error setting subject name of certificate\n");
-      return GRST_RET_FAILED;
-    }    
-
-  /* set public key in the certificate */
-  if (X509_set_pubkey(certs[0], pkey) != 1)
-    {
-      mpcerror(debugfp,
-      "GRSTx509MakeProxyCert(): error setting public key of the certificate\n");
-      return GRST_RET_FAILED;
-    }    
-
-// need to set validity within limits of earlier certificates in the chain
-
-  /* set duration for the certificate */
-  if (!(X509_gmtime_adj (X509_get_notBefore(certs[0]), 0)))
-    {
-      mpcerror(debugfp,
-      "GRSTx509MakeProxyCert(): error setting beginning time of the certificate\n");
-      return GRST_RET_FAILED;
-    }    
-
-  if (!(X509_gmtime_adj (X509_get_notAfter(certs[0]), 60 * minutes)))
-    {
-      mpcerror(debugfp,
-      "GRSTx509MakeProxyCert(): error setting ending time of the certificate\n");
-      return GRST_RET_FAILED;
-    }    
-
-  /* sign the certificate with the signing private key */
-  if (EVP_PKEY_type (CApkey->type) == EVP_PKEY_RSA)
-    digest = EVP_md5();
-  else
-    {
-      mpcerror(debugfp,
-      "GRSTx509MakeProxyCert(): error checking signing private key for a valid digest\n");
-      return GRST_RET_FAILED;
-    }    
-
-  if (!(X509_sign (certs[0], CApkey, digest)))
-    {
-      mpcerror(debugfp,
-      "GRSTx509MakeProxyCert(): error signing certificate\n");
-      return GRST_RET_FAILED;
-    }    
-
-  /* store the completed certificate chain */
-
-  certchain = strdup("");
-
-  for (i=0; i < ncerts; ++i)
-     {
-       certmem = BIO_new(BIO_s_mem());
-
-       if (PEM_write_bio_X509(certmem, certs[i]) != 1)
-         {
-           mpcerror(debugfp,
-            "GRSTx509MakeProxyCert(): error writing certificate to memory BIO\n");            
-           return GRST_RET_FAILED;
-         }
-
-       ptrlen = BIO_get_mem_data(certmem, &ptr);
-  
-       certchain = realloc(certchain, strlen(certchain) + ptrlen + 1);
-       
-       strncat(certchain, ptr, ptrlen);
-    
-       BIO_free(certmem);
-     }
-    
-  *proxychain = certchain;
-    
-  return GRST_RET_OK;
-}
-
-/// Find a proxy file in the proxy cache
-/**
- *  Returns the full path and file name of proxy file associated
- *  with given delegation ID and user DN.
- */
-
-char *GRSTx509CachedProxyFind(char *proxydir, char *delegation_id, 
-                              char *user_dn)
-/* 
-    Return a pointer to a malloc'd string with the full path of the 
-    proxy file corresponding to the given delegation_id, or NULL
-    if not found.
-*/
-{
-  int   ret, len;
-  char *filename = NULL, *line, *p, *proxyfile = NULL;
-  DIR *proxyDIR;
-  FILE *fp;  
-  struct dirent *ent;
-  struct stat entstat;
-     
-  if ((proxyDIR = opendir(proxydir)) == NULL) return NULL;
-  len = strlen(delegation_id);
-  if (strlen(user_dn) > len) len = strlen(user_dn);
-  if ((line = malloc(len + 2)) == NULL) return NULL;
-  while ((ent = readdir(proxyDIR)) != NULL)
-       {
-         if (ent->d_name[0] != '.') /* private keys begin with . */
-           {       
-             if (asprintf(&filename, "%s/%s", proxydir, ent->d_name) == -1)
-                                                                      break;
-             if ((stat(filename, &entstat) != 0) 
-                 || !S_ISREG(entstat.st_mode))
-               {
-                 free(filename);
-                 continue;
-               }
-               
-             fp = fopen(filename, "r");
-             if (fp != NULL)
-               {
-                 if (fgets(line, len + 2, fp) != NULL)
-                   {
-                     p = index(line, '\n');
-                     
-                     if (p != NULL)
-                       {
-                         *p = '\0';
-                         if (strcmp(line, delegation_id) == 0)
-                           {
-                             if (fgets(line, len + 2, fp) != NULL)
-                               {
-                                 p = index(line, '\n');
-
-                                 if (p != NULL)
-                                   {
-                                     *p = '\0';
-                           
-                                     if (strcmp(line, user_dn) == 0)
-                                       {                           
-                                         proxyfile = filename;
-                                         fclose(fp);
-                                         break;
-                                       }
-                                   }
-                               }
-                           }
-                       }
-                   }
-               
-                 fclose(fp);
-               }
-               
-             free(filename);
-           }         
-       }
-  
-  closedir(proxyDIR);
-  free(line);
-  return proxyfile;
-}
-
-/// Find a temporary proxy private key file in the proxy cache
-/**
- *  Returns the full path and file name of the private key file associated
- *  with given delegation ID and user DN.
- */
-
-char *GRSTx509CachedProxyKeyFind(char *proxydir, char *delegation_id, 
-                                 char *user_dn)
-/* 
-    Return a pointer to a malloc'd string with the full path of the 
-    private proxy key corresponding to the given delegation_id, or NULL
-    if not found.
-*/
-{
-  int   ret, len;
-  char *filename = NULL, *line, *p, *keyfile = NULL;
-  DIR *proxyDIR;
-  FILE *fp;  
-  struct dirent *ent;
-  struct stat entstat;
-     
-  if ((proxyDIR = opendir(proxydir)) == NULL) return NULL;
-  len = strlen(delegation_id);
-  if (strlen(user_dn) > len) len = strlen(user_dn);
-  if ((line = malloc(len + 2)) == NULL) return NULL;
-  while ((ent = readdir(proxyDIR)) != NULL)
-       {
-         if (ent->d_name[0] == '.') /* private keys begin with . */
-           {       
-             if (asprintf(&filename, "%s/%s", proxydir, ent->d_name) == -1)
-                                                                      break;             
-             if ((stat(filename, &entstat) != 0) 
-                 || !S_ISREG(entstat.st_mode))
-               {
-                 free(filename);
-                 continue;
-               }
-               
-             fp = fopen(filename, "r");
-             if (fp != NULL)
-               {
-                 if (fgets(line, len + 2, fp) != NULL)
-                   {
-                     p = index(line, '\n');
-                     
-                     if (p != NULL)
-                       {
-                         *p = '\0';
-                         if (strcmp(line, delegation_id) == 0)
-                           {
-                             if (fgets(line, len + 2, fp) != NULL)
-                               {
-                                 p = index(line, '\n');
-
-                                 if (p != NULL)
-                                   {
-                                     *p = '\0';
-                           
-                                     if (strcmp(line, user_dn) == 0)
-                                       {                           
-                                         keyfile = filename;
-                                         fclose(fp);
-                                         break;
-                                       }
-                                   }
-                               }
-                           }
-                       }
-                   }
-               
-                 fclose(fp);
-               }
-               
-             free(filename);
-           }         
-       }
-  
-  closedir(proxyDIR);
-  free(line);
-  return keyfile;
-}
-
-/// Make and store a X.509 request for a GSI proxy
-/**
- *  Returns GRST_RET_OK on success, non-zero otherwise. Request string
- *  is PEM encoded, and the key is stored in proxydir as temporary file
- *  with a filename like .XXXXXX
- */ 
-
-int GRSTx509MakeProxyRequest(char **reqtxt, char *proxydir, 
-                             char *delegation_id, char *user_dn)
-{
-  int              i, fd;
-  char            *docroot, *reqfile, *prvkeyfile, *ptr;
-  size_t           ptrlen;
-  FILE            *fp;
-  RSA             *keypair;
-  X509_NAME       *subject;
-  X509_NAME_ENTRY *ent;
-  EVP_PKEY        *pkey;
-  X509_REQ        *certreq;
-  BIO             *reqmem;
-  const EVP_MD          *digest;
-  struct stat      statbuf;
-
-  if ((keypair = RSA_generate_key(GRST_KEYSIZE, 3, NULL, NULL)) == NULL)
-                                                               return 1;
-  asprintf(&prvkeyfile, "%s/.XXXXXX", proxydir);
-          
-  fd = mkstemp(prvkeyfile);
-    
-  if ((fp = fdopen(fd, "w")) == NULL) return 1;
-                               
-  fprintf(fp, "%s\n%s\n", delegation_id, user_dn);
-    
-  if (!PEM_write_RSAPrivateKey(fp, keypair, NULL, NULL, 0, NULL, NULL))
-                               return 1;
-  
-  if (fclose(fp) != 0) return 1;
-  
-  /* now create the certificate request */
-
-  certreq = X509_REQ_new();
-  if (certreq == NULL) return 1;
-
-  OpenSSL_add_all_algorithms();
-
-  pkey = EVP_PKEY_new();
-  EVP_PKEY_assign_RSA(pkey, keypair);
-
-  X509_REQ_set_pubkey(certreq, pkey);
-  
-  subject = X509_NAME_new();
-  ent = X509_NAME_ENTRY_create_by_NID(NULL, OBJ_txt2nid("organizationName"), 
-                                      MBSTRING_ASC, "Dummy", -1);
-  X509_NAME_add_entry (subject, ent, -1, 0);
-  X509_REQ_set_subject_name (certreq, subject);
-  
-  digest = EVP_md5();
-  X509_REQ_sign(certreq, pkey, digest);
-
-  reqmem = BIO_new(BIO_s_mem());
-  PEM_write_bio_X509_REQ(reqmem, certreq);
-  ptrlen = BIO_get_mem_data(reqmem, &ptr);
-  
-  *reqtxt = malloc(ptrlen + 1);
-  memcpy(*reqtxt, ptr, ptrlen);
-  (*reqtxt)[ptrlen] = '\0';
-
-  BIO_free(reqmem);
-
-  X509_REQ_free(certreq);
-  
-  return 0;
-}
-
-/// Store a GSI proxy chain in the proxy cache, along with the private key
-/**
- *  Returns GRST_RET_OK on success, non-zero otherwise. The existing
- *  private key with the same delegation ID and user DN is appended to
- *  make a valid proxy file, and the temporary private key file deleted.
- */
-
-int GRSTx509CacheProxy(char *proxydir, char *delegation_id, 
-                                       char *user_dn, char *proxychain)
-{
-  int   fd, c, len = 0, i;
-  char *cert, *upcertfile, *prvkeyfile, *p;
-  FILE *ifp, *ofp;
-    
-  prvkeyfile = GRSTx509CachedProxyKeyFind(proxydir, delegation_id, user_dn);
-
-  if (prvkeyfile == NULL)  
-    {
-      free(proxydir);
-      return GRST_RET_FAILED;
-    }
-        
-  if ((ifp = fopen(prvkeyfile, "r")) == NULL) 
-    {
-      free(prvkeyfile);
-      free(proxydir);
-      return GRST_RET_FAILED;
-    }
-
-  if (asprintf(&upcertfile, "%s/XXXXXX", proxydir) == -1) 
-                                                    return GRST_RET_FAILED;
-
-  if ((fd = mkstemp(upcertfile)) == -1)
-    {
-      fclose(ifp);
-      free(prvkeyfile);
-      free(upcertfile);
-      return GRST_RET_FAILED;
-    }
-    
-  if ((ofp = fdopen(fd, "w")) == NULL)
-    {
-      close(fd);
-      fclose(ifp);
-      free(prvkeyfile);
-      free(upcertfile);
-      return GRST_RET_FAILED;
-    }
-
-  fprintf(ofp, "%s\n%s\n", delegation_id, user_dn);
-  fputs(proxychain, ofp); /* write out certificates */
-  
-  while ((c = fgetc(ifp)) != EOF) fputc(c, ofp); /* append proxy private key */
-      
-  if (fclose(ifp) != 0) return GRST_RET_FAILED;
-  if (fclose(ofp) != 0) return GRST_RET_FAILED;
-  
-  unlink(prvkeyfile);
-  
-  free(prvkeyfile);
-  free(upcertfile);
-  
-/* should also check validity of proxy cert to avoid suprises? */
-      
-  return GRST_RET_OK;
-} 
diff --git a/org.gridsite.core/src/htcp b/org.gridsite.core/src/htcp
deleted file mode 100644 (file)
index ac0153b..0000000
Binary files a/org.gridsite.core/src/htcp and /dev/null differ
diff --git a/org.gridsite.core/src/htcp.c b/org.gridsite.core/src/htcp.c
deleted file mode 100644 (file)
index 3275806..0000000
+++ /dev/null
@@ -1,1237 +0,0 @@
-/*
-   Copyright (c) 2002-4, Andrew McNab, University of Manchester
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or
-   without modification, are permitted provided that the following
-   conditions are met:
-
-     o Redistributions of source code must retain the above
-       copyright notice, this list of conditions and the following
-       disclaimer. 
-     o Redistributions in binary form must reproduce the above
-       copyright notice, this list of conditions and the following
-       disclaimer in the documentation and/or other materials
-       provided with the distribution. 
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-   CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-   BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-   TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-   ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-   POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*---------------------------------------------------------------*
- * For more about GridSite: http://www.gridsite.org/             *
- *---------------------------------------------------------------*/
-
-#ifndef VERSION
-#define VERSION "0.0.0"
-#endif
-
-#define _GNU_SOURCE
-
-#include <pwd.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <getopt.h>
-#include <string.h>
-#include <malloc.h>
-#include <dirent.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <curl/curl.h>
-
-/* deal with older versions of libcurl and curl.h */
-
-#ifndef CURLOPT_WRITEDATA
-#define CURLOPT_WRITEDATA CURLOPT_FILE
-#endif
-#ifndef CURLOPT_READDATA
-#define CURLOPT_READDATA CURLOPT_FILE
-#endif
-
-#ifndef CURLE_HTTP_RETURNED_ERROR
-#define CURLE_HTTP_RETURNED_ERROR CURLE_HTTP_NOT_FOUND
-#endif
-#define HTCP_GET       1
-#define HTCP_PUT       2
-#define HTCP_DELETE    3
-#define HTCP_LIST      4
-#define HTCP_LONGLIST  5
-#define HTCP_MKDIR     6
-
-struct grst_stream_data { char *source;
-                          char *destination;
-                          int   ishttps;
-                          int   method;
-                          FILE *fp;
-                          char *cert;
-                          char *key;
-                          char *capath;
-                          char *useragent;
-                          char *errorbuf;
-                          int   noverify;
-                          int   anonymous;
-                          long long downgrade;
-                          int   verbose;       } ;
-                          
-struct grst_index_blob { char   *text;
-                         size_t  used;
-                         size_t  allocated; } ;
-
-struct grst_dir_list { char   *filename;
-                       size_t  length;
-                       int     length_set;
-                       time_t  modified;
-                       int     modified_set; } ; 
-
-struct grst_header_data { int    retcode;                         
-                          char  *location;
-                          char  *gridauthonetime;
-                          size_t length;
-                          int    length_set;
-                          time_t modified;                           
-                          int    modified_set;
-                          struct grst_stream_data *common_data; } ;
-
-size_t headers_callback(void *ptr, size_t size, size_t nmemb, void *p)
-/* Find the values of the return code, Content-Length, Last-Modified
-   and Location headers */
-{
-  float f;
-  char  *s, *q;
-  size_t realsize;
-  struct tm modified_tm;
-  struct grst_header_data *header_data;
-   
-  header_data = (struct grst_header_data *) p;
-  realsize = size * nmemb;
-  s = malloc(realsize + 1);
-  memcpy(s, ptr, realsize);
-  s[realsize] = '\0';
-
-  if      (sscanf(s, "Content-Length: %d", &(header_data->length)) == 1) 
-            header_data->length_set = 1;
-  else if (sscanf(s, "HTTP/%f %d ", &f, &(header_data->retcode)) == 2) ;
-  else if (strncmp(s, "Location: ", 10) == 0) 
-      {
-        header_data->location = strdup(&s[10]);
-         
-        if (header_data->common_data->verbose > 0)
-             fprintf(stderr, "Received Location: %s\n", header_data->location);
-      }
-  else if (strncmp(s, "Set-Cookie: GRID_AUTH_ONETIME=", 30) == 0) 
-      {
-        header_data->gridauthonetime = strdup(&s[12]);
-        q = index(header_data->gridauthonetime, ';');
-        if (q != NULL) *q = '\0';       
-
-        if (header_data->common_data->verbose > 0)
-             fprintf(stderr, "Received Grid Auth Cookie: %s\n", 
-                             header_data->gridauthonetime);
-      }
-  else if (strncmp(s, "Last-Modified: ", 15) == 0)
-      {
-        /* follow RFC 2616: first try RFC 822 (kosher), then RFC 850 and 
-           asctime() formats too. Must be GMT whatever the format. */
-
-        if (strptime(&s[15], "%a, %d %b %Y %T GMT", &modified_tm) != NULL)
-          {
-            header_data->modified = mktime(&modified_tm);
-            header_data->modified_set = 1;
-          }
-        else if (strptime(&s[15], "%a, %d-%b-%y %T GMT", &modified_tm) != NULL)
-          {
-            header_data->modified = mktime(&modified_tm);
-            header_data->modified_set = 1;
-          }
-        else if (strptime(&s[15], "%a %b %d %T %Y", &modified_tm) != NULL)
-          {
-            header_data->modified = mktime(&modified_tm);
-            header_data->modified_set = 1;
-          }
-      }
-    
-  free(s);
-  return realsize;
-}
-
-int set_std_opts(CURL *easyhandle, struct grst_stream_data *common_data)
-{
-  struct stat statbuf;
-
-  curl_easy_setopt(easyhandle, CURLOPT_FOLLOWLOCATION, 0);
-
-  if ((common_data->cert != NULL) && (common_data->key != NULL))
-    {
-       curl_easy_setopt(easyhandle, CURLOPT_SSLENGINE,   NULL);
-       curl_easy_setopt(easyhandle, CURLOPT_SSLCERTTYPE, "PEM");
-       curl_easy_setopt(easyhandle, CURLOPT_SSLCERT,     common_data->cert);
-       curl_easy_setopt(easyhandle, CURLOPT_SSLKEY,      common_data->key);
-    }
-  else
-    {
-       curl_easy_setopt(easyhandle, CURLOPT_SSLENGINE,   "RSA");
-       curl_easy_setopt(easyhandle, CURLOPT_SSLCERTTYPE, "ENG");
-    }
-
-  if (common_data->capath != NULL)
-    {
-#if (LIBCURL_VERSION_NUM >= 0x070908)
-       if ((stat(common_data->capath, &statbuf) == 0) &&
-           S_ISDIR(statbuf.st_mode))
-            curl_easy_setopt(easyhandle, CURLOPT_CAPATH, common_data->capath);
-       else 
-#endif       
-            curl_easy_setopt(easyhandle, CURLOPT_CAINFO, common_data->capath);
-    }
-
-  if (common_data->noverify)
-       curl_easy_setopt(easyhandle, CURLOPT_SSL_VERIFYHOST, 0);
-  else curl_easy_setopt(easyhandle, CURLOPT_SSL_VERIFYHOST, 2);
-  
-  return 1;
-}
-
-int do_copies(char *sources[], char *destination,
-              struct grst_stream_data *common_data)
-{
-  char        *p, *thisdestination;
-  int          isrc, anyerror = 0, thiserror, isdirdest;
-  CURL        *easyhandle;
-  struct stat  statbuf;
-  struct       grst_header_data header_data;
-  struct curl_slist *dgheader_slist = NULL, *nodgheader_slist = NULL;
-  
-  easyhandle = curl_easy_init();
-  
-  if (common_data->downgrade >= (long long) 0)
-    {               
-      asprintf(&p, "HTTP-Downgrade-Size: %lld", common_data->downgrade);      
-      dgheader_slist = curl_slist_append(dgheader_slist, p);
-      free(p);
-      
-      nodgheader_slist = curl_slist_append(nodgheader_slist,
-                                           "HTTP-Downgrade-Size:");
-    }
-  
-  curl_easy_setopt(easyhandle, CURLOPT_USERAGENT, common_data->useragent);
-  if (common_data->verbose > 1)
-                   curl_easy_setopt(easyhandle, CURLOPT_VERBOSE, 1);
-
-  curl_easy_setopt(easyhandle, CURLOPT_HEADERFUNCTION, headers_callback);
-  curl_easy_setopt(easyhandle, CURLOPT_WRITEHEADER,   &header_data);
-
-  set_std_opts(easyhandle, common_data);
-
-  curl_easy_setopt(easyhandle, CURLOPT_ERRORBUFFER, common_data->errorbuf);
-
-  if (destination[strlen(destination) - 1] != '/') 
-    {
-      isdirdest = 0;
-      thisdestination = destination;
-    }
-  else isdirdest = 1;
-
-  for (isrc=0; sources[isrc] != NULL; ++isrc)
-     {
-       if (isdirdest)
-         {
-           p = rindex(sources[isrc], '/');
-           if (p == NULL) p = sources[isrc];
-           else           p++;
-
-           asprintf(&thisdestination, "%s%s", destination, p);
-         }
-       if (common_data->verbose > 0)
-            fprintf(stderr, "%s -> %s\n", sources[isrc], thisdestination);
-
-       if (common_data->method == HTCP_GET)
-         {
-           common_data->fp = fopen(thisdestination, "w");
-           if (common_data->fp == NULL)
-             {
-               fprintf(stderr,"... failed to open destination source file %s\n",
-                               thisdestination);
-               anyerror = 99;
-               if (isdirdest) free(thisdestination);
-               continue;
-             }
-
-           curl_easy_setopt(easyhandle, CURLOPT_WRITEDATA, common_data->fp);
-           curl_easy_setopt(easyhandle, CURLOPT_URL,       sources[isrc]);
-           
-           if ((common_data->downgrade >= (long long) 0) &&
-               (strncmp(sources[isrc], "https://", 8) == 0))
-             {
-               if (common_data->verbose > 0)
-                 fprintf(stderr, "Add  HTTP-Downgrade-Size: %lld  header\n",
-                         common_data->downgrade);
-                 
-               curl_easy_setopt(easyhandle,CURLOPT_HTTPHEADER,dgheader_slist);
-             }
-           else 
-             curl_easy_setopt(easyhandle,CURLOPT_HTTPHEADER,nodgheader_slist);
-         }
-       else if (common_data->method == HTCP_PUT)
-         {
-           if (stat(sources[isrc], &statbuf) != 0)
-             {
-               fprintf(stderr, "... source file %s not found\n", sources[isrc]);
-               anyerror = 99;
-               if (isdirdest) free(thisdestination);
-               continue;
-             }
-           
-           common_data->fp = fopen(sources[isrc], "r");
-           if (common_data->fp == NULL)
-             {
-               fprintf(stderr, "... failed to open source file %s\n",
-                               sources[isrc]);
-               anyerror = 99;
-               if (isdirdest) free(thisdestination);
-               continue;
-             }
-
-           curl_easy_setopt(easyhandle, CURLOPT_READDATA,   common_data->fp);
-           curl_easy_setopt(easyhandle, CURLOPT_URL,        thisdestination);
-           curl_easy_setopt(easyhandle, CURLOPT_INFILESIZE, statbuf.st_size);
-           curl_easy_setopt(easyhandle, CURLOPT_UPLOAD,   1);
-
-           if (((long long) statbuf.st_size >= common_data->downgrade) &&
-               (strncmp(thisdestination, "https://", 8) == 0))
-               curl_easy_setopt(easyhandle,CURLOPT_HTTPHEADER,dgheader_slist);
-           else 
-             curl_easy_setopt(easyhandle,CURLOPT_HTTPHEADER,nodgheader_slist);
-         }
-
-       header_data.retcode  = 0;
-       header_data.location = NULL;
-       header_data.gridauthonetime = NULL;
-       header_data.common_data = common_data;
-       thiserror = curl_easy_perform(easyhandle);
-       
-       fclose(common_data->fp);
-
-       if ((common_data->downgrade >= (long long) 0) &&
-           (thiserror == 0) &&
-           (header_data.retcode == 302) &&
-           (header_data.location != NULL) &&
-           (strncmp(header_data.location, "http://", 7) == 0) &&
-           (header_data.gridauthonetime != NULL))
-         {
-           if (common_data->verbose > 0)
-             fprintf(stderr, "... Found (%d)\nHTTP-Downgrade to %s\n", 
-                     header_data.retcode, header_data.location);
-
-           /* try again with new URL and all the previous CURL options */
-
-           if (common_data->method == HTCP_GET)
-             {
-               common_data->fp = fopen(thisdestination, "w");
-               if (common_data->fp == NULL)
-                 {
-                   fprintf(stderr, "... failed to open destination source "
-                                   "file %s\n", thisdestination);
-                   anyerror = 99;
-                   if (isdirdest) free(thisdestination);
-                   continue;
-                 }
-             }
-           else if (common_data->method == HTCP_PUT)
-             {
-               common_data->fp = fopen(sources[isrc], "r");
-               if (common_data->fp == NULL)
-                 {
-                   fprintf(stderr, "... failed to open source file %s\n",
-                               sources[isrc]);
-                   anyerror = 99;
-                   if (isdirdest) free(thisdestination);
-                   continue;
-                 }
-             }
-
-           header_data.retcode  = 0;           
-           curl_easy_setopt(easyhandle, CURLOPT_URL, header_data.location);
-           curl_easy_setopt(easyhandle, CURLOPT_HTTPHEADER, nodgheader_slist);
-           curl_easy_setopt(easyhandle, CURLOPT_COOKIE, 
-                                                  header_data.gridauthonetime);
-           thiserror = curl_easy_perform(easyhandle);
-
-           fclose(common_data->fp);
-         }
-
-       if ((thiserror != 0) ||
-           (header_data.retcode <  200) ||
-           (header_data.retcode >= 300))
-         {
-           fprintf(stderr, "... curl error: %s (%d), HTTP error: %d\n",
-                   common_data->errorbuf, thiserror, header_data.retcode);
-                   
-           if (thiserror != 0) anyerror = thiserror;
-           else                anyerror = header_data.retcode;
-         }
-       else if (common_data->verbose > 0) 
-                  fprintf(stderr, "... OK (%d)\n", header_data.retcode);
-        
-       if (isdirdest) free(thisdestination);
-     }
-
-  curl_easy_cleanup(easyhandle);
-     
-  return anyerror;
-}
-
-int do_deletes(char *sources[], struct grst_stream_data *common_data)
-{
-  int    isrc, anyerror = 0, thiserror;
-  CURL  *easyhandle;
-  struct grst_header_data header_data;
-  
-  header_data.common_data = common_data;
-
-  easyhandle = curl_easy_init();
-  
-  curl_easy_setopt(easyhandle, CURLOPT_USERAGENT, common_data->useragent);
-  if (common_data->verbose > 1)
-                   curl_easy_setopt(easyhandle, CURLOPT_VERBOSE, 1);
-
-  curl_easy_setopt(easyhandle, CURLOPT_HEADERFUNCTION, headers_callback);
-  curl_easy_setopt(easyhandle, CURLOPT_WRITEHEADER,   &header_data);
-
-  curl_easy_setopt(easyhandle, CURLOPT_ERRORBUFFER,   common_data->errorbuf);
-  curl_easy_setopt(easyhandle, CURLOPT_CUSTOMREQUEST, "DELETE");
-  curl_easy_setopt(easyhandle, CURLOPT_NOBODY,        1);
-
-  set_std_opts(easyhandle, common_data);
-
-  for (isrc=0; sources[isrc] != NULL; ++isrc)
-     {
-       if (common_data->verbose > 0)
-            fprintf(stderr, "Deleting %s\n", sources[isrc]);
-
-       curl_easy_setopt(easyhandle, CURLOPT_URL, sources[isrc]);
-
-       header_data.retcode = 0;
-       thiserror = curl_easy_perform(easyhandle);
-       
-       if ((thiserror != 0) ||
-           (header_data.retcode <  200) ||
-           (header_data.retcode >= 300))
-         {
-           fprintf(stderr, "... curl error: %s (%d), HTTP error: %d\n",
-                   common_data->errorbuf, thiserror, header_data.retcode);
-           
-           if (thiserror != 0) anyerror = thiserror;
-           else                anyerror = header_data.retcode;
-         }
-       else if (common_data->verbose > 0) 
-                     fprintf(stderr, "... OK (%d)\n", header_data.retcode);
-     }
-
-  curl_easy_cleanup(easyhandle);
-     
-  return anyerror;
-}
-
-int do_mkdirs(char *sources[], struct grst_stream_data *common_data)
-{
-  int    isrc, anyerror = 0, thiserror;
-  CURL  *easyhandle;
-  struct grst_header_data header_data;
-  
-  header_data.common_data = common_data;
-
-  easyhandle = curl_easy_init();
-  
-  curl_easy_setopt(easyhandle, CURLOPT_USERAGENT, common_data->useragent);
-  if (common_data->verbose > 1)
-                   curl_easy_setopt(easyhandle, CURLOPT_VERBOSE, 1);
-
-  curl_easy_setopt(easyhandle, CURLOPT_HEADERFUNCTION, headers_callback);
-  curl_easy_setopt(easyhandle, CURLOPT_WRITEHEADER,   &header_data);
-
-  curl_easy_setopt(easyhandle, CURLOPT_ERRORBUFFER,   common_data->errorbuf);
-  curl_easy_setopt(easyhandle, CURLOPT_CUSTOMREQUEST, "PUT");
-  curl_easy_setopt(easyhandle, CURLOPT_NOBODY,        1);
-
-  set_std_opts(easyhandle, common_data);
-
-  for (isrc=0; sources[isrc] != NULL; ++isrc)
-     {
-       if (common_data->verbose > 0)
-            fprintf(stderr, "Make directory %s\n", sources[isrc]);
-
-       curl_easy_setopt(easyhandle, CURLOPT_URL, sources[isrc]);
-
-       header_data.retcode = 0;
-       thiserror = curl_easy_perform(easyhandle);
-       
-       if ((thiserror != 0) ||
-           (header_data.retcode <  200) ||
-           (header_data.retcode >= 300))
-         {
-           fprintf(stderr, "... curl error: %s (%d), HTTP error: %d\n",
-                   common_data->errorbuf, thiserror, header_data.retcode);
-           
-           if (thiserror != 0) anyerror = thiserror;
-           else                anyerror = header_data.retcode;
-         }
-       else if (common_data->verbose > 0)  
-                        fprintf(stderr, "... OK (%d)\n", header_data.retcode);
-     }
-
-  curl_easy_cleanup(easyhandle);
-     
-  return anyerror;
-}
-
-size_t rawindex_callback(void *ptr, size_t size, size_t nmemb, void *data)
-{
-  if ( ((struct grst_index_blob *) data)->used + size * nmemb >=
-                             ((struct grst_index_blob *) data)->allocated )
-    {
-      ((struct grst_index_blob *) data)->allocated = 
-        ((struct grst_index_blob *) data)->used + size * nmemb + 4096;
-
-      ((struct grst_index_blob *) data)->text = 
-         realloc( ((struct grst_index_blob *) data)->text,
-                  ((struct grst_index_blob *) data)->allocated );
-    }
-    
-  memcpy( &( ((struct grst_index_blob *) 
-                 data)->text[((struct grst_index_blob *) data)->used] ),
-          ptr, size * nmemb);
-          
-  ((struct grst_index_blob *) data)->used += size * nmemb;
-  
-  return size * nmemb;
-}
-
-char *canonicalise(char *link, char *source)
-{
-  int   i, j, srclen;
-  char *s;
-
-  srclen = strlen(source);
-
-  if ((strncmp(link, "https://", 8) == 0) ||
-      (strncmp(link, "http://", 7) == 0))
-    {
-      if (strncmp(link, source, srclen) != 0) return NULL; /* other site */
-      
-      if (link[srclen] == '\0') return NULL; /* we dont self-link! */
-      
-      for (i=0; link[srclen + i] != '\0'; ++i)
-        if (link[srclen + i] == '/')
-          { 
-            if (link[srclen + i + 1] != '\0') return NULL; /* no subdirs */
-            else return strdup(&link[srclen]); /* resolves to this dir */
-          }
-    }
-  else if (link[0] != '/') /* relative link - need to check for subsubdirs */
-    {
-      for (i=0; link[i] != '\0'; ++i) 
-        if ((link[i] == '/') && (link[i+1] != '\0')) return NULL;
-
-      s = strdup(link);
-      
-      for (i=0; s[i] != '\0'; ++i) 
-       if (s[i] == '#')
-         {
-           s[i] = '\0';
-           break;
-         }
-
-      return s;
-    }
-
-  /* absolute link on this server, starting / */
-
-  for (i=8; source[i] != '\0'; ++i) if (source[i] == '/') break;
-       
-  if (strncmp(link, &source[i], srclen - i) != 0) return NULL;
-
-  for (j = srclen - i; link[j] != '\0'; ++j) 
-        if ((link[j] == '/') && (link[j+1] != '\0')) return NULL;
-        
-  s = strdup(&link[srclen - i]);
-      
-  for (i=0; s[i] != '\0'; ++i) 
-       if (s[i] == '#')
-         {
-           s[i] = '\0';
-           break;
-         }
-
-  if (s[0] == '\0') /* on second thoughts... */
-    {
-      free(s);
-      return NULL;
-    }
-         
-  return s;      
-}
-
-int grst_dir_list_cmp(const void *a, const void *b)
-{
-  return strcmp( ((struct grst_dir_list *) a)->filename, 
-                 ((struct grst_dir_list *) b)->filename);
-}
-
-struct grst_dir_list *index_to_dir_list(char *text, char *source)
-{
-  int   taglevel = 0, wordnew = 1, i, namestart, used = 0, 
-        allocated = 256;
-  char *p, *s;
-  struct grst_dir_list *list;
-  
-  list = (struct grst_dir_list *)
-              malloc(allocated * sizeof(struct grst_dir_list));
-              
-  list[0].filename     = NULL;
-  list[0].length       = 0;
-  list[0].length_set   = 0;
-  list[0].modified     = 0;
-  list[0].modified_set = 0;
-    
-  for (p=text; *p != '\0'; ++p)
-     {
-       if (*p == '<') 
-         {
-           ++taglevel;
-           
-           if ((taglevel == 1) && (list[used].filename != NULL))
-             {
-               ++used;
-               if (used >= allocated) 
-                 {
-                   allocated += 256;
-                   list = (struct grst_dir_list *)
-                           realloc((void *) list,
-                                   allocated * sizeof(struct grst_dir_list));
-                 }
-                 
-               list[used].filename     = NULL;
-               list[used].length       = 0;
-               list[used].length_set   = 0;
-               list[used].modified     = 0;
-               list[used].modified_set = 0;
-             }
-
-           wordnew = 1;
-           continue;
-         }
-
-       if (*p == '>') 
-         {
-           --taglevel;
-           wordnew = 1;
-           continue;
-         }
-         
-       if (isspace(*p))
-         {
-           wordnew = 1;
-           continue;
-         }
-
-       if ((wordnew) && (taglevel == 1))
-         {        
-           if (((*p == 'h') || (*p == 'H')) && 
-               (strncasecmp(p, "href=", 5) == 0))
-             {
-               if (p[5] == '"') { namestart = 6;
-                                  for (i=namestart; (p[i] != '\0') &&
-                                                    (p[i] != '"' ) &&
-                                                    (p[i] != '\n') &&
-                                                    (p[i] != '\t') &&
-                                                    (p[i] != '>' ) ; ++i) ; }
-               else { namestart = 5;
-                      for (i=namestart; (p[i] != '\0') &&
-                                        (p[i] != '"' ) &&
-                                        (p[i] != ' ' ) &&
-                                        (p[i] != '\n') &&
-                                        (p[i] != '\t') &&
-                                        (p[i] != ')' ) &&
-                                        (p[i] != '>' ) ; ++i) ; }
-               if (i > namestart) 
-                 {
-                   s = malloc(1 + i - namestart);
-                   memcpy(s, &p[namestart], i - namestart);
-                   s[i - namestart] = '\0';
-
-                   list[used].filename = canonicalise(s, source);
-                   free(s);
-                 }
-                 
-               p = &p[i-1]; /* -1 since continue results in ++i */
-               continue;
-             }
-
-           if (((*p == 'c') || (*p == 'C')) && 
-               (strncasecmp(p, "content-length=", 15) == 0))
-             {
-               list[used].length     = 0;
-               list[used].length_set = 1;
-               
-               if (p[15] == '"') list[used].length = atoi(&p[16]);
-               else              list[used].length = atoi(&p[15]);
-
-               p = &p[15];
-               continue;
-             }
-
-           if (((*p == 'l') || (*p == 'L')) && 
-               (strncasecmp(p, "last-modified=", 14) == 0))
-             {
-               list[used].modified     = 0;
-               list[used].modified_set = 1;
-               
-               if (p[14] == '"') list[used].modified = atoi(&p[15]);
-               else              list[used].modified = atoi(&p[14]);
-
-               p = &p[14];
-               continue;
-             }
-         }
-         
-       wordnew = 0;
-     }  
-
-  qsort((void *) list, used, sizeof(struct grst_dir_list), grst_dir_list_cmp);
-
-  return list;  
-}
-
-int do_listings(char *sources[], struct grst_stream_data *common_data,
-                int islonglist)
-{
-  int          isrc, anyerror = 0, thiserror, i, isdir, ilast;
-  CURL        *easyhandle;
-  const char  *months[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", 
-                            "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
-  char        *s;
-  struct       grst_index_blob  rawindex;
-  struct       grst_dir_list   *list;
-  struct       grst_header_data header_data;
-  struct       tm               modified_tm;
-  time_t                        now;
-
-  time(&now);
-
-  header_data.common_data = common_data;
-
-  easyhandle = curl_easy_init();
-  
-  curl_easy_setopt(easyhandle, CURLOPT_USERAGENT, common_data->useragent);
-  if (common_data->verbose > 1)
-                   curl_easy_setopt(easyhandle, CURLOPT_VERBOSE, 1);
-
-  curl_easy_setopt(easyhandle, CURLOPT_WRITEHEADER,   &header_data);
-  curl_easy_setopt(easyhandle, CURLOPT_HEADERFUNCTION, headers_callback);
-
-  curl_easy_setopt(easyhandle, CURLOPT_ERRORBUFFER, common_data->errorbuf);
-
-  set_std_opts(easyhandle, common_data);
-
-  for (isrc=0; sources[isrc] != NULL; ++isrc)
-     {
-       if (common_data->verbose > 0)
-            fprintf(stderr, "Listing %s\n", sources[isrc]);
-            
-       if (sources[1] != NULL) printf("\n%s:\n", sources[isrc]);
-
-       curl_easy_setopt(easyhandle, CURLOPT_URL, sources[isrc]);
-
-       if (sources[isrc][strlen(sources[isrc])-1] == '/')
-         {
-           isdir = 1;
-           curl_easy_setopt(easyhandle,CURLOPT_WRITEFUNCTION,rawindex_callback);
-           curl_easy_setopt(easyhandle,CURLOPT_WRITEDATA,(void *) &rawindex);
-           curl_easy_setopt(easyhandle,CURLOPT_NOBODY,0);
-           rawindex.text      = NULL;
-           rawindex.used      = 0;
-           rawindex.allocated = 0;
-         }
-       else
-         {
-           isdir = 0;
-           curl_easy_setopt(easyhandle, CURLOPT_WRITEFUNCTION, NULL);
-           curl_easy_setopt(easyhandle, CURLOPT_WRITEDATA, NULL);
-           curl_easy_setopt(easyhandle, CURLOPT_NOBODY, 1);
-         }
-
-       header_data.gridauthonetime = NULL;
-       header_data.length_set   = 0;
-       header_data.modified_set = 0;
-       header_data.retcode      = 0;
-       thiserror = curl_easy_perform(easyhandle);
-       
-       if ((thiserror != 0) ||
-           (header_data.retcode <  200) ||
-           (header_data.retcode >= 300))
-         {
-           fprintf(stderr, "... curl error: %s (%d), HTTP error: %d\n",
-                   common_data->errorbuf, thiserror, header_data.retcode);
-           
-           if (thiserror != 0) anyerror = thiserror;
-           else                anyerror = header_data.retcode;
-         }
-       else if (isdir)
-         {
-           if (common_data->verbose > 0) 
-                  fprintf(stderr, "... OK (%d)\n", header_data.retcode);
-           
-           rawindex.text[rawindex.used] = '\0';
-
-           list  = index_to_dir_list(rawindex.text, sources[isrc]);
-           ilast = -1;
-
-           for (i=0; list[i].filename != NULL; ++i)
-              {
-                if (list[i].filename[0] == '.') continue;
-                
-                if (strncmp(list[i].filename, "mailto:", 7) == 0) continue;
-                
-                if ((ilast >= 0) && 
-                    (strcmp(list[i].filename, list[ilast].filename) == 0))
-                                                                 continue;
-                ilast=i;
-
-                if (islonglist)
-                  {
-                    if (!list[i].length_set || !list[i].modified_set)
-                      {
-                        curl_easy_setopt(easyhandle, CURLOPT_WRITEFUNCTION, 
-                                                                        NULL);
-                        curl_easy_setopt(easyhandle, CURLOPT_WRITEDATA, NULL);
-                        curl_easy_setopt(easyhandle, CURLOPT_NOBODY, 1);
-                        
-                        asprintf(&s, "%s%s", sources[isrc], list[i].filename);                        
-                        curl_easy_setopt(easyhandle, CURLOPT_URL, s);
-
-                        header_data.gridauthonetime = NULL;
-                        header_data.length_set   = 0;
-                        header_data.modified_set = 0;
-                        header_data.retcode = 0;
-                        thiserror = curl_easy_perform(easyhandle);                        
-                        free(s);
-                        
-                        if ((thiserror == 0) && 
-                            (header_data.retcode >= 200) &&
-                            (header_data.retcode <= 299))
-                          {
-                            if (header_data.length_set)
-                              {
-                                list[i].length_set = 1;
-                                list[i].length     = header_data.length;
-                              }
-                          
-                            if (header_data.modified_set)
-                              {
-                                list[i].modified_set = 1;
-                                list[i].modified     = header_data.modified;
-                              }
-                          }
-                      }
-
-                    if (list[i].length_set) printf("%10ld ", list[i].length);
-                    else fputs("         ? ", stdout);
-                    
-                    if (list[i].modified_set)
-                      {
-                        localtime_r(&(list[i].modified), &modified_tm);
-
-                        if (list[i].modified < now - 15552000)
-                             printf("%s %2d  %4d ", 
-                               months[modified_tm.tm_mon],
-                               modified_tm.tm_mday, 
-                               modified_tm.tm_year + 1900);
-                        else printf("%s %2d %02d:%02d ",
-                               months[modified_tm.tm_mon],
-                               modified_tm.tm_mday, 
-                               modified_tm.tm_hour,
-                               modified_tm.tm_min);
-                      }
-                    else fputs("  ?  ?     ? ", stdout);
-                  }
-
-                puts(list[i].filename);                  
-              }
-         }
-       else
-         {
-           if (islonglist)
-             {
-               printf("%10ld ", header_data.length);
-                    
-               localtime_r(&(header_data.modified), &modified_tm);
-
-               if (header_data.modified < now - 15552000)
-                         printf("%s %2d  %4d ", 
-                             months[modified_tm.tm_mon],
-                             modified_tm.tm_mday, 
-                             modified_tm.tm_year + 1900);
-               else printf("%s %2d %02d:%02d ",
-                             months[modified_tm.tm_mon],
-                             modified_tm.tm_mday, 
-                             modified_tm.tm_hour,
-                             modified_tm.tm_min);
-             }
-
-           puts(sources[isrc]);
-         }
-     }
-
-  curl_easy_cleanup(easyhandle);
-     
-  return anyerror;
-}
-
-#if (LIBCURL_VERSION_NUM < 0x070908)
-char *make_tmp_ca_roots(char *dir)
-/* libcurl before 7.9.8 doesnt support CURLOPT_CAPATH and the directory,
-   so we make a temporary file with the concatenated CA root certs: that
-   is, all the files in that directory which end in .0 */
-{
-  int    ofd, ifd, c;
-  size_t size;
-  char   tmp_ca_roots[] = "/tmp/.ca-roots-XXXXXX", buffer[4096], *s;
-  DIR   *rootsDIR;
-  struct dirent *root_ent;
-  
-  if ((rootsDIR = opendir(dir)) == NULL) return NULL;
-  
-  if ((ofd = mkstemp(tmp_ca_roots)) == -1)
-    {
-      closedir(rootsDIR);
-      return NULL;
-    }
-
-  while ((root_ent = readdir(rootsDIR)) != NULL)
-       {
-         if ((root_ent->d_name[0] != '.') &&
-             (strlen(root_ent->d_name) > 2) && 
-             (strncmp(&(root_ent->d_name[strlen(root_ent->d_name)-2]),
-                                                        ".0", 2) == 0))
-           {
-             asprintf(&s, "%s/%s", dir, root_ent->d_name);           
-             ifd = open(s, O_RDONLY);             
-             free(s);
-             
-             if (ifd != -1)
-               {
-                 while ((size = read(ifd, buffer, sizeof(buffer))) > 0)
-                                                 write(ofd, buffer, size);             
-                 close(ifd);
-               }
-           }
-       }
-
-  closedir(rootsDIR);
-  
-  if (close(ofd) == 0) return strdup(tmp_ca_roots);
-
-  unlink(tmp_ca_roots); /* try to clean up */
-  
-  return NULL;
-}
-#endif
-
-void printsyntax(char *argv0)
-{
-  char *p;
-  
-  p = rindex(argv0, '/');
-  if (p != NULL) ++p;
-  else           p = argv0;
-
-  fprintf(stderr, "%s [options]  Source-URL[s]  [Destination URL]\n"
-  "%s is one of a set of clients to fetch files or directory listings\n"
-"from remote servers using HTTP or HTTPS, or to put or delete files or\n"
-"directories onto remote servers using HTTPS. htcp is similar to scp(1)\n"
-"but uses HTTP/HTTPS rather than ssh as its transfer protocol.\n"
-"See the htcp(1) or http://www.gridsite.org/ for details.\n"
-"(Version: %s)\n", p, p, VERSION);
-}
-
-int main(int argc, char *argv[])
-{
-  char **sources, *destination = NULL, *executable, *p;
-  int    c, i, option_index, anyerror;
-  struct stat statbuf;
-  struct grst_stream_data common_data;
-  struct passwd *userpasswd;
-  struct option long_options[] = {     {"verbose",             0, 0, 'v'},
-                                       {"cert",                1, 0, 0},
-                                       {"key",                 1, 0, 0},
-                                       {"capath",              1, 0, 0},
-                                       {"delete",              0, 0, 0},
-                                       {"list",                0, 0, 0},
-                                       {"long-list",           0, 0, 0},
-                                       {"mkdir",               0, 0, 0},
-                                       {"no-verify",           0, 0, 0},
-                                       {"anon",                0, 0, 0},
-                                       {"downgrade-size",      1, 0, 0},
-//                                     {"streams",             1, 0, 0},
-//                                     {"blocksize",           1, 0, 0},
-//                                     {"recursive",           0, 0, 0},
-                                       {0, 0, 0, 0}  };
-
-#if (LIBCURL_VERSION_NUM < 0x070908)
-  char *tmp_ca_roots = NULL;
-#endif
-
-  if (argc == 1) 
-    {
-      printsyntax(argv[0]);
-      return 0;
-    }
-  common_data.cert      = NULL;
-  common_data.key       = NULL;
-  common_data.capath    = NULL;
-  common_data.method    = 0;
-  common_data.errorbuf  = malloc(CURL_ERROR_SIZE);
-  asprintf(&(common_data.useragent),
-                          "htcp/%s (http://www.gridsite.org/)", VERSION);
-  common_data.verbose   = 0;
-  common_data.noverify  = 0;
-  common_data.anonymous = 0;
-  common_data.downgrade = (long long) -1;
-  
-  while (1)
-       {
-         option_index = 0;
-
-         c = getopt_long(argc, argv, "v", long_options, &option_index);
-
-         if      (c == -1) break;
-         else if (c == 0)
-           {
-             if      (option_index == 1) common_data.cert      = optarg;
-             else if (option_index == 2) common_data.key       = optarg; 
-             else if (option_index == 3) common_data.capath    = optarg;
-             else if (option_index == 4) common_data.method    = HTCP_DELETE;
-             else if (option_index == 5) common_data.method    = HTCP_LIST;
-             else if (option_index == 6) common_data.method    = HTCP_LONGLIST;
-             else if (option_index == 7) common_data.method    = HTCP_MKDIR;
-             else if (option_index == 8) common_data.noverify  = 1;
-             else if (option_index == 9) common_data.anonymous = 1;
-             else if (option_index ==10) common_data.downgrade = atoll(optarg);
-           }
-         else if (c == 'v') ++(common_data.verbose);
-       }
-
-  if (common_data.verbose > 0) 
-    {
-      p = rindex(argv[0], '/');
-      if (p != NULL) ++p;
-      else           p = argv[0];
-      fprintf(stderr, "%s version %s\n", p, VERSION);
-    }
-
-  if (common_data.anonymous) /* prevent any use of user certs */
-    {
-      common_data.cert = NULL;
-      common_data.key  = NULL;
-    }  
-  else if ((common_data.cert == NULL) && (common_data.key != NULL)) 
-           common_data.cert = common_data.key;
-  else if ((common_data.cert != NULL) && (common_data.key == NULL))
-           common_data.key = common_data.cert;
-  else if ((common_data.cert == NULL) && (common_data.key == NULL))
-    {
-      common_data.cert = getenv("X509_USER_PROXY");
-      if (common_data.cert != NULL) common_data.key = common_data.cert;
-      else
-        {
-          asprintf(&(common_data.cert), "/tmp/x509up_u%d", geteuid());
-          
-          /* one fine day, we will check the proxy file for expiry too ... */
-          
-          if (stat(common_data.cert, &statbuf) == 0)
-                     common_data.key = common_data.cert;                     
-          else
-            {
-              common_data.cert = getenv("X509_USER_CERT");
-              common_data.key  = getenv("X509_USER_KEY");
-              
-              userpasswd = getpwuid(geteuid());
-              
-              if ((common_data.cert == NULL) &&
-                  (userpasswd != NULL) &&
-                  (userpasswd->pw_dir != NULL))
-                asprintf(&(common_data.cert), "%s/.globus/usercert.pem", 
-                                                    userpasswd->pw_dir);
-              
-              if ((common_data.key == NULL) &&
-                  (userpasswd != NULL) &&
-                  (userpasswd->pw_dir != NULL))
-                asprintf(&(common_data.key), "%s/.globus/userkey.pem", 
-                                                    userpasswd->pw_dir);              
-            }            
-        }    
-    }
-
-  if (common_data.capath == NULL) common_data.capath = getenv("X509_CERT_DIR");
-
-  if (common_data.capath == NULL) 
-                        common_data.capath = "/etc/grid-security/certificates";
-
-#if (LIBCURL_VERSION_NUM < 0x070908)
-  /* libcurl before 7.9.8 doesnt support CURLOPT_CAPATH and the directory */
-
-  if ((common_data.capath != NULL) && 
-      (stat(common_data.capath, &statbuf) == 0) && S_ISDIR(statbuf.st_mode))
-    {
-      tmp_ca_roots = make_tmp_ca_roots(common_data.capath);
-      common_data.capath = tmp_ca_roots;
-    }
-#endif
-
-  executable = rindex(argv[0], '/');
-  if (executable != NULL) executable++;
-  else                    executable = argv[0];
-  
-  if (common_data.method == 0) /* command-line options override exec name */
-    {
-      if      (strcmp(executable,"htls")==0) common_data.method=HTCP_LIST;
-      else if (strcmp(executable,"htll")==0) common_data.method=HTCP_LONGLIST;
-      else if (strcmp(executable,"htrm")==0) common_data.method=HTCP_DELETE;
-      else if (strcmp(executable,"htmkdir")==0) common_data.method=HTCP_MKDIR;
-    }
-
-  if ((common_data.method == HTCP_DELETE) || 
-      (common_data.method == HTCP_LIST)   ||
-      (common_data.method == HTCP_MKDIR)  ||
-      (common_data.method == HTCP_LONGLIST))
-    {
-      if (optind >= argc)
-          {
-            fprintf(stderr, "Must give at least 1 non-option argument\n\n"); 
-            printsyntax(argv[0]);
-            return CURLE_URL_MALFORMAT;
-          }
-          
-      sources = (char **) malloc(sizeof(char *) * (1 + argc - optind));  
-      for (i=0; i < argc - optind; ++i) 
-         {
-           sources[i] = argv[optind + i];
-           
-           if ((common_data.method == HTCP_MKDIR) &&
-               (sources[i][strlen(sources[i])-1] != '/'))
-             {
-               fprintf(stderr, "Argument \"%s\" is not a "
-                       "directory URL (no trailing /)\n\n", sources[i]);
-               printsyntax(argv[0]);
-               return CURLE_URL_MALFORMAT;
-             }
-         }
-
-      sources[i]  = NULL;  
-
-      if (common_data.method == HTCP_DELETE) 
-                            anyerror = do_deletes(sources, &common_data);
-      else if (common_data.method == HTCP_MKDIR) 
-                            anyerror = do_mkdirs(sources, &common_data);
-      else if (common_data.method == HTCP_LONGLIST) 
-                            anyerror = do_listings(sources, &common_data, 1);
-      else anyerror = do_listings(sources, &common_data, 0);
-
-      if (anyerror > 99) anyerror = CURLE_HTTP_RETURNED_ERROR;
-
-      return anyerror;
-    }
-
-  if (optind >= argc - 1) 
-    {
-      fputs("Must give at least 2 non-option arguments\n\n", stderr);
-      printsyntax(argv[0]);
-      return CURLE_URL_MALFORMAT;
-    }
-    
-  sources = (char **) malloc(sizeof(char *) * (argc - optind));
-  
-  for (i=0; i < (argc - optind - 1); ++i) 
-     {
-       if (strncmp(argv[optind + i], "file:", 5) == 0)
-            sources[i] = &argv[optind + i][5];
-       else sources[i] =  argv[optind + i];
-       
-       if (sources[i][0] == '\0') 
-         {
-           fprintf(stderr, "Source argument %d is empty\n\n", i + 1);
-           printsyntax(argv[0]);
-           return CURLE_URL_MALFORMAT;
-         }
-     }
-  
-  sources[i]  = NULL;  
-
-  if (strncmp(argv[optind + i], "file:", 5) == 0)
-       destination = &argv[optind + i][5];
-  else destination =  argv[optind + i];
-  
-  if (destination[0] == '\0')
-    {
-      fputs("Destination argument is empty\n\n", stderr);
-      printsyntax(argv[0]);
-      return CURLE_URL_MALFORMAT;
-    }
-
-  if ((argc - optind > 2) && (destination[strlen(destination)-1] != '/'))
-    {
-      fputs("For multiple sources, destination "
-            "must be a directory (end in /)\n\n", stderr);
-      printsyntax(argv[0]);
-      return CURLE_URL_MALFORMAT;
-    }
-  
-  if ((strncmp(destination, "http://",  7) == 0) ||
-      (strncmp(destination, "https://", 8) == 0)) 
-       common_data.method = HTCP_PUT;
-  else common_data.method = HTCP_GET;
-  
-  for (i=0; sources[i] != NULL; ++i)
-         {
-           if ((common_data.method == HTCP_PUT) && 
-               ((strncmp(sources[i], "http://",  7) == 0) ||
-                (strncmp(sources[i], "https://", 8) == 0)))
-             {
-               fputs("Cannot have both source and destination remote\n\n",stderr);
-               printsyntax(argv[0]);
-               return CURLE_URL_MALFORMAT;
-             }
-         
-           if ((common_data.method == HTCP_GET) && 
-               ((strncmp(sources[i], "http://",  7) != 0) &&
-                (strncmp(sources[i], "https://", 8) != 0)))
-             {
-               fputs("Cannot have both source and "
-                     "destination local (for now)\n\n",stderr);
-               printsyntax(argv[0]);
-               return CURLE_URL_MALFORMAT;
-             }
-         }
-         
-  anyerror = do_copies(sources, destination, &common_data);
-  if (anyerror > 99) anyerror = CURLE_HTTP_RETURNED_ERROR;
-  
-  return anyerror;
-}
diff --git a/org.gridsite.core/src/htproxyput.c b/org.gridsite.core/src/htproxyput.c
deleted file mode 100644 (file)
index 834bea2..0000000
+++ /dev/null
@@ -1,565 +0,0 @@
-/*
-   Copyright (c) 2002-4, Andrew McNab, University of Manchester
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or
-   without modification, are permitted provided that the following
-   conditions are met:
-
-     o Redistributions of source code must retain the above
-       copyright notice, this list of conditions and the following
-       disclaimer. 
-     o Redistributions in binary form must reproduce the above
-       copyright notice, this list of conditions and the following
-       disclaimer in the documentation and/or other materials
-       provided with the distribution. 
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-   CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-   BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-   TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-   ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-   POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
-
-Build with:
-
-gcc -lcurl -lssl -lcrypto -o grst-proxy-put grst-proxy-put.c libgridsite.a
-
-http://www.gridpp.ac.uk/authz/gridsite/
-
-*/
-
-#ifndef VERSION
-#define VERSION "0.0.0"
-#endif
-
-#define _GNU_SOURCE
-
-#include <pwd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <curl/curl.h>
-#include <curl/types.h>
-#include <curl/easy.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-#include <openssl/x509.h>
-#include <openssl/x509v3.h>
-#include <openssl/err.h>
-#include <openssl/pem.h>
-
-#include <curl/curl.h>
-#include <curl/types.h>
-#include <curl/easy.h>
-
-#include <getopt.h>
-
-#include "gridsite.h"
-
-#include "soapH.h"
-#include "delegation.nsmap"
-
-#define USE_SOAP               0
-#define USE_G_HTTPS            1
-#define HTPROXY_PUT            0
-
-int debugfunction(CURL *curl, curl_infotype type, char *s, size_t n, void *p)
-{
-  fwrite(s, sizeof(char), n, (FILE *) p);
-
-  return 0;
-}
-
-size_t parsegprheaders(void *ptr, size_t size, size_t nmemb, void *p)
-{
-  int   i;
-  
-  if ((size * nmemb > 15) && 
-      (strncmp((char *) ptr, "Delegation-ID: ", 15) == 0))
-    {
-      *((char **) p) = malloc( size * nmemb - 14 );
-      
-      memcpy(*((char **) p), &(((char *) ptr)[15]), size * nmemb - 15);
-  
-      for (i=0; i < size * nmemb - 15; ++i) 
-        if (((*((char **) p))[i] == '\n') || ((*((char **) p))[i] == '\r'))
-          {
-            (*((char **) p))[i] = '\0'; /* drop trailing newline */
-            break;
-          }
-          
-      (*((char **) p))[size * nmemb - 15] = '\0';
-    }
-    
-  return size * nmemb;
-}
-
-struct gprparams { char *req; size_t len; } ;
-
-size_t storegprbody(void *ptr, size_t size, size_t nmemb, void *p)
-{
-  ((struct gprparams *) p)->req = realloc( ((struct gprparams *) p)->req,
-                          ((struct gprparams *) p)->len + size * nmemb + 1);
-
-  memcpy( &((((struct gprparams *) p)->req)[((struct gprparams *) p)->len]),
-           ptr, size * nmemb);
-         
-  ((struct gprparams *) p)->len += size * nmemb;
-
-  return size * nmemb;
-}
-
-int GRSTgetProxyReq(CURL *curl, FILE *debugfp, char *delegid, char **reqtxt, 
-                    char *requrl, char *cert, char *key)
-{
-  char     *delheader;
-  struct    curl_slist *headerlist = NULL;
-  CURLcode  res;
-  struct    gprparams params;
-
-  params.req = NULL;
-  params.len = 0;
-
-  curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *) &params);
-  curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, storegprbody);
-
-  curl_easy_setopt(curl, CURLOPT_SSLCERTTYPE,  "PEM");
-  curl_easy_setopt(curl, CURLOPT_SSLCERT,      cert);
-
-  curl_easy_setopt(curl, CURLOPT_SSLKEYTYPE,   "PEM");
-  curl_easy_setopt(curl, CURLOPT_SSLKEY,       key);    
-  curl_easy_setopt(curl, CURLOPT_SSLKEYPASSWD, NULL);
-
-//  curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, parsegprheaders);
-//  curl_easy_setopt(curl, CURLOPT_WRITEHEADER,    (void *) delegid);
-  
-  curl_easy_setopt(curl, CURLOPT_CAPATH, "/etc/grid-security/certificates/");
-
-  curl_easy_setopt(curl, CURLOPT_URL,           requrl);
-  curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET-PROXY-REQ");
-
-  curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER,0);
-  curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST,0);
-
-  asprintf(&delheader, "Delegation-ID: %s", delegid);
-  headerlist = curl_slist_append(headerlist, delheader);                                                                           
-  curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
-
-  if (debugfp != NULL)
-    {
-      curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);       
-      curl_easy_setopt(curl, CURLOPT_DEBUGDATA,     debugfp);
-      curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, debugfunction);
-    }
-       
-  res = curl_easy_perform(curl);
-  
-  if (params.req != NULL)
-    {
-      params.req[params.len] = '\0';
-      *reqtxt = params.req;
-    }
-  else *reqtxt = NULL;
-  
-  return (int) res;
-}
-
-struct ppcparams{ char *cert; size_t len; };
-
-size_t getppcbody(void *ptr, size_t size, size_t nmemb, void *p)
-{
-  size_t i;
-  
-  if (((struct ppcparams *) p)->len == 0) return 0;
-  
-  if (size * nmemb < ((struct ppcparams *) p)->len) i = size * nmemb;
-  else                             i = ((struct ppcparams *) p)->len;
-  
-  memcpy(ptr, ((struct ppcparams *) p)->cert, i);
-  
-  ((struct ppcparams *) p)->len -= i;   
-  ((struct ppcparams *) p)->cert = &((((struct ppcparams *) p)->cert)[i+1]);
-     
-  return i;
-}
-
-int GRSTputProxyCerts(CURL *curl, FILE *debugfp, char *delegid, char *certtxt,
-                      char *requrl, char *cert, char *key)
-{
-  CURLcode    res;
-  char       *delheader;
-  long        httpcode;
-  struct curl_slist *headerlist = NULL;
-  struct ppcparams params;
-
-  params.cert = certtxt;
-  params.len  = strlen(certtxt);
-
-  curl_easy_setopt(curl, CURLOPT_READDATA,     &params);
-  curl_easy_setopt(curl, CURLOPT_READFUNCTION, getppcbody);
-  curl_easy_setopt(curl, CURLOPT_INFILESIZE,   strlen(certtxt));
-  curl_easy_setopt(curl, CURLOPT_UPLOAD,       1);
-
-  curl_easy_setopt(curl, CURLOPT_NOBODY,       1);  
-
-  curl_easy_setopt(curl, CURLOPT_SSLCERTTYPE,  "PEM");
-  curl_easy_setopt(curl, CURLOPT_SSLCERT,      cert);
-
-  curl_easy_setopt(curl, CURLOPT_SSLKEYTYPE,   "PEM");
-  curl_easy_setopt(curl, CURLOPT_SSLKEY,       key);    
-//  curl_easy_setopt(curl, CURLOPT_SSLKEYPASSWD, NULL);
-
-  curl_easy_setopt(curl, CURLOPT_CAPATH, "/etc/grid-security/certificates/");
-
-  curl_easy_setopt(curl, CURLOPT_URL,           requrl);
-  curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PUT-PROXY-CERT");
-
-  headerlist = curl_slist_append(headerlist, 
-                 "Content-Type: application/x-x509-user-cert-chain");
-                                   
-  asprintf(&delheader, "Delegation-ID: %s", delegid);
-  headerlist = curl_slist_append(headerlist, delheader);
-  curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
-  
-curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
-curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
-
-  if (debugfp != NULL)
-    {
-      curl_easy_setopt(curl, CURLOPT_VERBOSE,       1);       
-      curl_easy_setopt(curl, CURLOPT_DEBUGDATA,     debugfp);
-      curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, debugfunction);
-    } 
-     
-  res = curl_easy_perform(curl);
-
-  curl_easy_getinfo(curl, CURLINFO_HTTP_CODE, &httpcode);
-  
-  curl_slist_free_all(headerlist);
-
-  free(delheader);
-  
-  return (int) res;
-}
-
-
-#if (LIBCURL_VERSION_NUM < 0x070908)
-char *make_tmp_ca_roots(char *dir)
-/* libcurl before 7.9.8 doesnt support CURLOPT_CAPATH and the directory,
-   so we make a temporary file with the concatenated CA root certs: that
-   is, all the files in that directory which end in .0 */
-{
-  int    ofd, ifd, c;
-  size_t size;
-  char   tmp_ca_roots[] = "/tmp/.ca-roots-XXXXXX", buffer[4096], *s;
-  DIR   *rootsDIR;
-  struct dirent *root_ent;
-
-  if ((rootsDIR = opendir(dir)) == NULL) return NULL;
-
-  if ((ofd = mkstemp(tmp_ca_roots)) == -1)
-    {
-      closedir(rootsDIR);
-      return NULL;
-    }
-
-  while ((root_ent = readdir(rootsDIR)) != NULL)
-       {
-         if ((root_ent->d_name[0] != '.') &&
-             (strlen(root_ent->d_name) > 2) &&
-             (strncmp(&(root_ent->d_name[strlen(root_ent->d_name)-2]),
-                                                        ".0", 2) == 0))
-           {
-             asprintf(&s, "%s/%s", dir, root_ent->d_name);
-             ifd = open(s, O_RDONLY);
-             free(s);
-
-             if (ifd != -1)
-               {
-                 while ((size = read(ifd, buffer, sizeof(buffer))) > 0)
-                                                 write(ofd, buffer, size);
-
-                 close(ifd);
-               }
-           }
-       }
-
-  closedir(rootsDIR);
-
-  if (close(ofd) == 0) return strdup(tmp_ca_roots);
-
-  unlink(tmp_ca_roots); /* try to clean up if errors */
-
-  return NULL;
-}
-#endif
-  
-void printsyntax(char *argv0)
-{
-  char *p;
-
-  p = rindex(argv0, '/');
-  if (p != NULL) ++p;
-  else           p = argv0;
-
-  fprintf(stderr, "%s [options] URL\n"
-          "(Version: %s)\n", p, VERSION);
-}
-  
-int main(int argc, char *argv[])
-{
-  char  *delegation_id = "", *reqtxt, *certtxt, *valid = NULL, 
-        *cert = NULL, *key = NULL, *capath = NULL, *keycert;
-  struct ns__putProxyResponse *unused;
-  int    option_index, c, protocol = USE_SOAP, noverify = 0, 
-         method = HTPROXY_PUT, verbose = 0, fd, minutes;
-  struct soap soap_get, soap_put;
-  FILE   *ifp, *ofp;
-  struct stat statbuf;
-  struct passwd *userpasswd; 
-  struct option long_options[] = {      {"verbose",     0, 0, 'v'},
-                                        {"cert",        1, 0, 0},
-                                        {"key",         1, 0, 0},
-                                        {"capath",      1, 0, 0},
-                                        {"soap",        0, 0, 0},
-                                        {"g-https",     0, 0, 0},
-                                        {"no-verify",   0, 0, 0},
-                                        {"valid",       1, 0, 0},
-                                        {"delegation-id",1, 0, 0},
-                                        {"put",         0, 0, 0},
-                                        {0, 0, 0, 0}  };
-  CURL *curl;
-
-  if (argc == 1)
-    {
-      printsyntax(argv[0]);
-      return 0;
-    }
-
-  while (1)
-       {
-         option_index = 0;
-                                                                                
-         c = getopt_long(argc, argv, "v", long_options, &option_index);
-
-         if      (c == -1) break;
-         else if (c == 0)
-           {
-             if      (option_index == 1) cert      = optarg;
-             else if (option_index == 2) key       = optarg;
-             else if (option_index == 3) capath    = optarg;
-             else if (option_index == 4) protocol  = USE_SOAP;
-             else if (option_index == 5) protocol  = USE_G_HTTPS;
-             else if (option_index == 6) noverify  = 1;
-             else if (option_index == 7) valid     = optarg;
-             else if (option_index == 8) delegation_id = optarg;
-             else if (option_index == 9) method    = HTPROXY_PUT;
-           }
-         else if (c == 'v') ++verbose;
-       }
-
-  if (optind + 1 != argc)
-    {
-      fprintf(stderr, "Must specify a target URL!\n");
-      return 1;
-    }
-    
-  if (valid == NULL) minutes = 60 * 12;
-  else minutes = atoi(valid);
-  
-  if (verbose) fprintf(stderr, "Proxy valid for %d minutes\n", minutes);
-  ERR_load_crypto_strings ();
-  OpenSSL_add_all_algorithms();
-
-  if      ((cert == NULL) && (key != NULL)) cert = key;
-  else if ((cert != NULL) && (key == NULL)) key = cert;
-  else if ((cert == NULL) && (key == NULL))
-    {
-      cert = getenv("X509_USER_PROXY");
-      if (cert != NULL) key = cert;
-      else
-        {
-          asprintf(&(cert), "/tmp/x509up_u%d", geteuid());
-                                                                                
-          /* one fine day, we will check the proxy file for 
-             expiry too to avoid suprises when we try to use it ... */
-
-          if (stat(cert, &statbuf) == 0) key = cert;
-          else
-            {
-              cert = getenv("X509_USER_CERT");
-              key  = getenv("X509_USER_KEY");
-                                                                                
-              userpasswd = getpwuid(geteuid());
-                                                                                
-              if ((cert == NULL) &&
-                  (userpasswd != NULL) &&
-                  (userpasswd->pw_dir != NULL))
-                asprintf(&(cert), "%s/.globus/usercert.pem",
-                                                    userpasswd->pw_dir);
-                                                                                
-              if ((key == NULL) &&
-                  (userpasswd != NULL) &&
-                  (userpasswd->pw_dir != NULL))
-                asprintf(&(key), "%s/.globus/userkey.pem",
-                                                    userpasswd->pw_dir);
-                                                                                
-            }
-        }
-    }
-                                                                                
-  if (capath == NULL) capath = getenv("X509_CERT_DIR");
-  if (capath == NULL) capath = "/etc/grid-security/certificates";
-
-  if (verbose) fprintf(stderr, "key=%s\ncert=%s\ncapath=%s\n",
-                       key, cert, capath);
-
-#if (LIBCURL_VERSION_NUM < 0x070908)
-  /* libcurl before 7.9.8 doesnt support CURLOPT_CAPATH and the directory */
-
-  if ((capath != NULL) &&
-      (stat(capath, &statbuf) == 0) && S_ISDIR(statbuf.st_mode))
-    {
-      tmp_ca_roots = make_tmp_ca_roots(capath);
-      capath = tmp_ca_roots;
-    }
-#endif
-
-  if (protocol == USE_G_HTTPS)
-    {
-      if (verbose) fprintf(stderr, "Using G-HTTPS delegation protocol\n");
-
-      if (verbose) fprintf(stderr, "Delegation-ID: %s\n", delegation_id);
-
-      curl_global_init(CURL_GLOBAL_DEFAULT);   
-      curl = curl_easy_init();
-      
-//  curl_easy_setopt(curl, CURLOPT_SSLKEYPASSWD, NULL);
-
-      GRSTgetProxyReq(curl, stderr, delegation_id, &reqtxt, 
-                      argv[optind], cert, key);
-  
-      if (GRSTx509MakeProxyCert(&certtxt, stderr, reqtxt, cert, key, minutes)
-          != GRST_RET_OK)     
-        {
-          return 1;
-        }
-
-      GRSTputProxyCerts(curl, stderr, delegation_id, certtxt, 
-                        argv[optind], cert, key);
-
-      curl_easy_cleanup(curl);  
-      curl_global_cleanup();
-  
-      return 0;
-    }
-  else if (protocol == USE_SOAP)
-    {
-      if (strcmp(key, cert) != 0) /* we have to concatenate for gSOAP */
-        {
-          keycert = strdup("/tmp/XXXXXX");
-        
-          fd = mkstemp(keycert);          
-          ofp = fdopen(fd, "w");
-          
-          ifp = fopen(key, "r");          
-          while ((c = fgetc(ifp)) != EOF) fputc(c, ofp);          
-          fclose(ifp);
-          
-          ifp = fopen(cert, "r");          
-          while ((c = fgetc(ifp)) != EOF) fputc(c, ofp);          
-          fclose(ifp);
-          
-          fclose(ofp);       
-          
-          if (verbose) fprintf(stderr, "Created %s key/cert file\n", keycert);            
-        }
-      else keycert = key;
-
-      if (verbose) 
-        {
-          fprintf(stderr, "Using SOAP delegation protocol\n");
-          fprintf(stderr, "Delegation-ID: %s\n", delegation_id);
-          fprintf(stderr, "Send getProxyReq to service\n");
-        }
-
-      soap_init(&soap_get);
-  
-      if (soap_ssl_client_context(&soap_get,
-                                  SOAP_SSL_DEFAULT,
-                                  keycert, 
-                                  "",
-                                  NULL,
-                                  capath,
-                                  NULL))
-        {
-          soap_print_fault(&soap_get, stderr);
-          return 1;
-        } 
-
-      soap_call_ns__getProxyReq(&soap_get, 
-                                argv[optind],  /* HTTPS url of service */
-                                "",            /* no password on proxy */
-                                delegation_id, 
-                                &reqtxt);
-      
-      if (soap_get.error)
-        {
-          soap_print_fault(&soap_get, stderr);
-          return 1;        
-        }
-        
-      if (verbose) fprintf(stderr, "reqtxt:\n%s", reqtxt);
-      
-      if (GRSTx509MakeProxyCert(&certtxt, stderr, reqtxt, cert, key, minutes) 
-          != GRST_RET_OK)
-        {
-          return 1;
-        }
-
-      soap_init(&soap_put);
-  
-      if (verbose) fprintf(stderr, "Send putProxy to service:\n%s\n", certtxt);
-
-      if (soap_ssl_client_context(&soap_put,
-                                  SOAP_SSL_DEFAULT,
-                                  keycert, 
-                                  "",
-                                  NULL,
-                                  capath,
-                                  NULL))
-        {
-          soap_print_fault(&soap_put, stderr);
-          return 1;
-        } 
-
-      soap_call_ns__putProxy(&soap_put, argv[optind], "", delegation_id, 
-                             certtxt, unused);      
-      if (soap_put.error)
-        {
-          soap_print_fault(&soap_put, stderr);
-          return 1;        
-        }
-
-      return 0;
-    }  
-
-  /* weirdness */
-}
-
diff --git a/org.gridsite.core/src/mod_gridsite.c b/org.gridsite.core/src/mod_gridsite.c
deleted file mode 100644 (file)
index 78d853c..0000000
+++ /dev/null
@@ -1,2357 +0,0 @@
-/*
-   Copyright (c) 2003-4, Andrew McNab, University of Manchester
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or
-   without modification, are permitted provided that the following
-   conditions are met:
-
-     o Redistributions of source code must retain the above
-       copyright notice, this list of conditions and the following
-       disclaimer. 
-     o Redistributions in binary form must reproduce the above
-       copyright notice, this list of conditions and the following
-       disclaimer in the documentation and/or other materials
-       provided with the distribution. 
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-   CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-   BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-   TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-   ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-   POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*------------------------------------------------------------------*
- * This program is part of GridSite: http://www.gridsite.org/       *
- *------------------------------------------------------------------*/
-
-#ifndef VERSION
-#define VERSION "x.x.x"
-#endif
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#include <apr_strings.h>
-
-#include <ap_config.h>
-#include <httpd.h>
-#include <http_config.h>
-#include <http_core.h>
-#include <http_log.h>
-#include <http_protocol.h>
-#include <http_request.h>
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>              
-#include <malloc.h>
-#include <stdlib.h>
-#include <string.h>
-#include <dirent.h>
-#include <ctype.h>
-#include <time.h>
-
-#include <libxml/parser.h>
-#include <libxml/tree.h>
-
-
-#include "mod_ssl-private.h"
-
-#include "gridsite.h"
-
-#ifndef UNSET
-#define UNSET -1
-#endif
-
-module AP_MODULE_DECLARE_DATA gridsite_module;
-
-typedef struct
-{
-   int   auth;
-   int   envs;
-   int   format;
-   int   indexes;
-   char *indexheader;
-   int   gridsitelink;
-   char *adminfile;
-   char *adminuri;
-   char *helpuri;
-   char *dnlists;
-   char *dnlistsuri;
-   char *adminlist;
-   int   gsiproxylimit;
-   char *unzip;
-   char *methods;
-   char *editable;
-   char *headfile;
-   char *footfile;
-   int   downgrade;
-   char *authcookiesdir;
-   int   soap2cgi;
-}  mod_gridsite_cfg; /* per-directory config choices */
-
-
-typedef struct
-{
-  xmlDocPtr doc;
-//  char *outbuffer;
-} soap2cgi_ctx; /* store per-request context for Soap2cgi in/out filters */
-
-static const char Soap2cgiFilterName[]="Soap2cgiFilter";
-
-static void mod_gridsite_soap2cgi_insert(request_rec *r)
-{
-    mod_gridsite_cfg *conf;
-    soap2cgi_ctx     *ctx;
-    
-    conf = (mod_gridsite_cfg *) ap_get_module_config(r->per_dir_config,
-                                                      &gridsite_module);
-                                                      
-    if (conf->soap2cgi) 
-      {
-        ctx = (soap2cgi_ctx *) malloc(sizeof(soap2cgi_ctx));        
-        ctx->doc = NULL;
-        
-        ap_add_output_filter(Soap2cgiFilterName, ctx, r, r->connection);
-
-        ap_add_input_filter(Soap2cgiFilterName, NULL, r, r->connection);
-      }
-}
-
-xmlNodePtr find_one_child(xmlNodePtr parent_node, char *name)
-{
-    xmlNodePtr cur;
-
-    for (cur = parent_node->children; cur != NULL; cur = cur->next)
-       {
-         if ((cur->type == XML_ELEMENT_NODE) &&
-             (strcmp(cur->name, name) == 0)) return cur;
-       }
-
-    return NULL;
-}
-
-int add_one_node(xmlDocPtr doc, char *line)
-{
-    char *p, *name, *aftername, *attrname = NULL, *value = NULL;
-    xmlNodePtr cur, cur_child;
-
-    cur = xmlDocGetRootElement(doc);
-
-    p = index(line, '=');
-    if (p == NULL) return 1;
-
-    *p = '\0';
-    value = &p[1];
-
-    name = line;
-
-    while (1) /* go through each .-deliminated segment of line[] */
-         {
-           if ((p = index(name, '.')) != NULL)
-             {
-               *p = '\0';
-               aftername = &p[1];
-             }
-           else aftername = &name[strlen(name)];
-
-           if ((p = index(name, '_')) != NULL)
-             {
-               *p = '\0';
-               attrname = &p[1];
-             }
-
-           cur_child = find_one_child(cur, name);
-
-           if (cur_child == NULL)
-                    cur_child = xmlNewChild(cur, NULL, name, NULL);
-
-           cur = cur_child;
-
-           name = aftername;
-
-           if (attrname != NULL)
-             {
-               xmlSetProp(cur, attrname, value);
-               return 0;
-             }
-
-           if (*name == '\0')
-             {
-               xmlNodeSetContent(cur, value);
-               return 0;
-             }             
-         }
-}
-
-static apr_status_t mod_gridsite_soap2cgi_out(ap_filter_t *f,
-                                              apr_bucket_brigade *bbIn)
-{
-    char        *p, *name, *outbuffer;
-    request_rec *r = f->r;
-    conn_rec    *c = r->connection;
-    apr_bucket         *bucketIn, *pbktEOS;
-    apr_bucket_brigade *bbOut;
-
-    const char *data;
-    apr_size_t len;
-    char *buf;
-    apr_size_t n;
-    apr_bucket *pbktOut;
-
-    soap2cgi_ctx *ctx;
-    xmlNodePtr   root_node = NULL;
-    xmlBufferPtr buff;
-
-    ctx = (soap2cgi_ctx *) f->ctx;
-
-// LIBXML_TEST_VERSION;
-
-    bbOut = apr_brigade_create(r->pool, c->bucket_alloc);
-
-    if (ctx->doc == NULL)
-      {
-        ctx->doc = xmlNewDoc("1.0");
-             
-        root_node = xmlNewNode(NULL, "Envelope");
-        xmlDocSetRootElement(ctx->doc, root_node);
-                                                                                
-        xmlNewChild(root_node, NULL, "Header", NULL);
-        xmlNewChild(root_node, NULL, "Body",   NULL);
-      }
-    
-    apr_brigade_pflatten(bbIn, &outbuffer, &len, r->pool);
-       
-    /* split up buffer and feed each line to add_one_node() */
-    
-    name = outbuffer;
-    
-    while (*name != '\0')
-         {
-           p = index(name, '\n');
-           if (p != NULL) 
-             {
-               *p = '\0';
-               ++p;             
-             }
-           else p = &name[strlen(name)]; /* point to final NUL */
-           
-           add_one_node(ctx->doc, name);
-           
-           name = p;
-         }
-
-    APR_BRIGADE_FOREACH(bucketIn, bbIn)
-       {
-         if (APR_BUCKET_IS_EOS(bucketIn))
-           {
-             /* write out XML tree we have built */
-
-             buff = xmlBufferCreate();
-             xmlNodeDump(buff, ctx->doc, root_node, 0, 0);
-
-// TODO: simplify/reduce number of copies or libxml vs APR buffers?
-
-             buf = (char *) xmlBufferContent(buff);
-
-             pbktOut = apr_bucket_heap_create(buf, strlen(buf), NULL, 
-                                              c->bucket_alloc);
-
-             APR_BRIGADE_INSERT_TAIL(bbOut, pbktOut);
-       
-             xmlBufferFree(buff);
-
-             pbktEOS = apr_bucket_eos_create(c->bucket_alloc);
-             APR_BRIGADE_INSERT_TAIL(bbOut, pbktEOS);
-
-             continue;
-           }
-       }
-       
-    return ap_pass_brigade(f->next, bbOut);
-}
-
-static apr_status_t mod_gridsite_soap2cgi_in(ap_filter_t *f,
-                                             apr_bucket_brigade *pbbOut,
-                                             ap_input_mode_t eMode,
-                                             apr_read_type_e eBlock,
-                                             apr_off_t nBytes)
-{
-    request_rec *r = f->r;
-    conn_rec *c = r->connection;
-//    CaseFilterInContext *pCtx;
-    apr_status_t ret;
-
-#ifdef NEVERDEFINED
-
-    ret = ap_get_brigade(f->next, pCtx->pbbTmp, eMode, eBlock, nBytes);    
-    if (!(pCtx = f->ctx)) {
-        f->ctx = pCtx = apr_palloc(r->pool, sizeof *pCtx);
-        pCtx->pbbTmp = apr_brigade_create(r->pool, c->bucket_alloc);
-    }
-    if (APR_BRIGADE_EMPTY(pCtx->pbbTmp)) {
-        ret = ap_get_brigade(f->next, pCtx->pbbTmp, eMode, eBlock, nBytes);
-        if (eMode == AP_MODE_EATCRLF || ret != APR_SUCCESS)
-            return ret;
-    }
-    while(!APR_BRIGADE_EMPTY(pCtx->pbbTmp)) {
-        apr_bucket *pbktIn = APR_BRIGADE_FIRST(pCtx->pbbTmp);
-        apr_bucket *pbktOut;
-        const char *data;
-        apr_size_t len;
-        char *buf;
-        int n;
-        /* It is tempting to do this...
-         * APR_BUCKET_REMOVE(pB);
-         * APR_BRIGADE_INSERT_TAIL(pbbOut,pB);
-         * and change the case of the bucket data, but that would be wrong
-         * for a file or socket buffer, for example...
-         */
-                                                                                
-        if(APR_BUCKET_IS_EOS(pbktIn)) {
-            APR_BUCKET_REMOVE(pbktIn);
-            APR_BRIGADE_INSERT_TAIL(pbbOut, pbktIn);
-            break;
-        }
-                                                                                
-        ret=apr_bucket_read(pbktIn, &data, &len, eBlock);
-        if(ret != APR_SUCCESS)
-            return ret;
-                                                                                
-        buf = malloc(len);
-        for(n=0 ; n < len ; ++n)
-            buf[n] = apr_toupper(data[n]);
-                                                                                
-        pbktOut = apr_bucket_heap_create(buf, len, 0, c->bucket_alloc);
-        APR_BRIGADE_INSERT_TAIL(pbbOut, pbktOut);
-        apr_bucket_delete(pbktIn);
-    }
-#endif
-                                                                                
-    return APR_SUCCESS;
-}
-
-char *make_admin_footer(request_rec *r, mod_gridsite_cfg *conf,
-                        int isdirectory)
-/*
-    make string holding last modified text and admin links
-*/
-{
-    char     *out, *https, *p, *dn = NULL, *file = NULL, *permstr = NULL, 
-             *temp, modified[99], *dir_uri, *grst_cred_0 = NULL;
-    GRSTgaclPerm  perm = GRST_PERM_NONE;
-    struct tm mtime_tm;
-    time_t    mtime_time;
-
-    https = (char *) apr_table_get(r->subprocess_env, "HTTPS");
-
-    dir_uri = apr_pstrdup(r->pool, r->uri);
-    p = rindex(dir_uri, '/');
-
-    if (p == NULL) return "";
-    
-    file = apr_pstrdup(r->pool, &p[1]);
-    p[1] = '\0';
-    /* dir_uri always gets both a leading and a trailing slash */
-       
-    out = apr_pstrdup(r->pool, "<p><small>\n");
-
-    if (!isdirectory)
-      {
-        mtime_time = apr_time_sec(r->finfo.mtime);
-
-        localtime_r(&mtime_time, &mtime_tm);
-        strftime(modified, sizeof(modified), 
-                 "%a&nbsp;%e&nbsp;%B&nbsp;%Y", &mtime_tm);    
-        temp = apr_psprintf(r->pool,"<hr>Last modified %s\n", modified);
-        out = apr_pstrcat(r->pool, out, temp, NULL);
-
-        if ((conf->adminuri != NULL) &&
-            (conf->adminuri[0] != '\0') &&
-            (conf->adminfile != NULL) &&
-            (conf->adminfile[0] != '\0') &&
-            (strncmp(file, GRST_HIST_PREFIX, sizeof(GRST_HIST_PREFIX)-1) != 0))
-          {
-            temp = apr_psprintf(r->pool, 
-                            ". <a href=\"%s?cmd=history&file=%s\">"
-                            "View&nbsp;page&nbsp;history</a>\n",
-                            conf->adminfile, file);
-            out = apr_pstrcat(r->pool, out, temp, NULL);
-          }
-      }
-
-    out = apr_pstrcat(r->pool, out, "<hr>", NULL);
-
-    if (r->connection->notes != NULL)
-         grst_cred_0 = (char *) 
-                       apr_table_get(r->connection->notes, "GRST_CRED_0");
-
-    if ((grst_cred_0 != NULL) && 
-        (strncmp(grst_cred_0, "X509USER ", sizeof("X509USER")) == 0))
-      {
-         p = index(grst_cred_0, ' ');
-         if (p != NULL)
-           {
-             p = index(++p, ' ');
-             if (p != NULL)
-               {
-                 p = index(++p, ' ');
-                 if (p != NULL)
-                   {
-                     p = index(++p, ' ');
-                     if (p != NULL) dn = p;
-                   }
-               }
-           }
-      }
-  
-    if (dn != NULL) 
-      {
-        temp = apr_psprintf(r->pool, "You are %s<br>\n", dn);
-        out = apr_pstrcat(r->pool, out, temp, NULL);
-               
-        if (r->notes != NULL)
-                permstr = (char *) apr_table_get(r->notes, "GRST_PERM");
-
-        if ((permstr != NULL) &&
-            (conf->adminuri != NULL) &&
-            (conf->adminuri[0] != '\0') &&
-            (conf->adminfile != NULL) &&
-            (conf->adminfile[0] != '\0'))
-          {
-            sscanf(permstr, "%d", &perm);
-            
-            if (!isdirectory &&
-                GRSTgaclPermHasWrite(perm) &&
-                (strncmp(file, GRST_HIST_PREFIX,
-                         sizeof(GRST_HIST_PREFIX) - 1) != 0))
-              {
-                temp = apr_psprintf(r->pool, 
-                     "<a href=\"%s?cmd=edit&file=%s\">"
-                     "Edit&nbsp;page</a> .\n", conf->adminfile, file);
-                out = apr_pstrcat(r->pool, out, temp, NULL);
-              }
-                 
-            if (GRSTgaclPermHasList(perm) || GRSTgaclPermHasWrite(perm))
-              {
-                temp = apr_psprintf(r->pool, 
-                 "<a href=\"%s%s?cmd=managedir\">Manage&nbsp;directory</a> .\n",
-                 dir_uri, conf->adminfile);
-
-                out = apr_pstrcat(r->pool, out, temp, NULL);
-              }                 
-          }
-      }
-    
-    if ((https != NULL) && (strcasecmp(https, "on") == 0))
-         temp = apr_psprintf(r->pool,
-                   "<a href=\"http://%s%s\">Switch&nbsp;to&nbsp;HTTP</a> \n", 
-                   r->server->server_hostname, r->unparsed_uri);
-    else temp = apr_psprintf(r->pool,
-                   "<a href=\"https://%s%s\">Switch&nbsp;to&nbsp;HTTPS</a> \n",
-                   r->server->server_hostname, r->unparsed_uri);
-    
-    out = apr_pstrcat(r->pool, out, temp, NULL);
-
-    if ((conf->helpuri != NULL) && (conf->helpuri[0] != '\0'))
-      {
-        temp = apr_psprintf(r->pool,
-                   ". <a href=\"%s\">Website&nbsp;Help</a>\n", conf->helpuri);
-        out = apr_pstrcat(r->pool, out, temp, NULL);
-      }
-
-    if ((!isdirectory) &&
-        (conf->adminuri != NULL) &&
-        (conf->adminuri[0] != '\0') &&
-        (conf->adminfile != NULL) &&
-        (conf->adminfile[0] != '\0'))
-      {
-        temp = apr_psprintf(r->pool, ". <a href=\"%s?cmd=print&file=%s\">"
-               "Print&nbsp;View</a>\n", conf->adminfile, file);
-        out = apr_pstrcat(r->pool, out, temp, NULL);
-      }
-
-    if (conf->gridsitelink)
-      {
-        temp = apr_psprintf(r->pool,
-           ". Built with <a href=\"http://www.gridsite.org/\">"
-           "GridSite</a>&nbsp;%s\n", VERSION);
-        out = apr_pstrcat(r->pool, out, temp, NULL);
-      }
-                     
-    out = apr_pstrcat(r->pool, out, "\n</small>\n", NULL);
-
-    return out;
-}
-
-int html_format(request_rec *r, mod_gridsite_cfg *conf)
-/* 
-    try to do GridSite formatting of .html files (NOT .shtml etc)
-*/
-{
-    int    i, fd, errstatus;
-    char  *buf, *p, *file, *s, *head_formatted, *header_formatted,
-          *body_formatted, *admin_formatted, *footer_formatted;
-    size_t length;
-    struct stat statbuf;
-    apr_file_t *fp;
-    
-    if (r->finfo.filetype == APR_NOFILE) return HTTP_NOT_FOUND;
-    
-    if (apr_file_open(&fp, r->filename, APR_READ, 0, r->pool) != 0)
-                                     return HTTP_INTERNAL_SERVER_ERROR;
-        
-    file = rindex(r->uri, '/');
-    if (file != NULL) ++file; /* file points to name without path */
-
-    buf = apr_palloc(r->pool, (size_t)(r->finfo.size + 1));
-    length = r->finfo.size;
-    apr_file_read(fp, buf, &length);
-    buf[r->finfo.size] = '\0';
-    apr_file_close(fp);
-
-    /* **** try to find a header file in this or parent directories **** */
-
-    /* first make a buffer big enough to hold path names we want to try */
-    fd = -1;
-    s = malloc(strlen(r->filename) + strlen(conf->headfile) + 1);
-    strcpy(s, r->filename);
-    
-    for (;;)
-       {
-         p = rindex(s, '/');
-         if (p == NULL) break; /* failed to find one */
-         p[1] = '\0';
-         strcat(p, conf->headfile);
-
-         fd = open(s, O_RDONLY);
-         if (fd != -1) break; /* found one */
-
-         *p = '\0';
-       }
-            
-    free(s);
-
-    if (fd == -1) /* not found, so set up not to output one */
-      {
-        head_formatted   = apr_pstrdup(r->pool, "");
-        header_formatted = apr_pstrdup(r->pool, "");
-        body_formatted   = buf;
-      }
-    else /* found a header file, so set up head and body to surround it */
-      {
-        fstat(fd, &statbuf);
-        header_formatted = apr_palloc(r->pool, statbuf.st_size + 1);
-        read(fd, header_formatted, statbuf.st_size);
-        header_formatted[statbuf.st_size] = '\0';
-        close(fd);
-
-        p = strstr(buf, "<body");
-        if (p == NULL) p = strstr(buf, "<BODY");
-        if (p == NULL) p = strstr(buf, "<Body");
-
-        if (p == NULL) 
-          {
-            head_formatted = apr_pstrdup(r->pool, "");
-            body_formatted = buf;
-          }
-        else
-          {
-            *p = '\0';
-            head_formatted = buf;
-            ++p;
-        
-            while ((*p != '>') && (*p != '\0')) ++p;
-
-            if (*p == '\0')
-              {
-                body_formatted = p;
-              }
-            else
-              {
-                *p = '\0';
-                ++p;
-                body_formatted = p;
-              }        
-          }
-      }
-
-    /* **** remove closing </body> tag from body **** */
-
-    p = strstr(body_formatted, "</body");
-    if (p == NULL) p = strstr(body_formatted, "</BODY");
-    if (p == NULL) p = strstr(body_formatted, "</Body");
-    
-    if (p != NULL) *p = '\0';
-
-    /* **** set up dynamic part of footer to go at end of body **** */
-
-    admin_formatted = make_admin_footer(r, conf, FALSE);
-    
-    /* **** try to find a footer file in this or parent directories **** */
-
-    /* first make a buffer big enough to hold path names we want to try */
-    fd = -1;
-    s  = malloc(strlen(r->filename) + strlen(conf->footfile));
-    strcpy(s, r->filename);
-    
-    for (;;)
-       {
-         p = rindex(s, '/');
-         if (p == NULL) break; /* failed to find one */
-    
-         p[1] = '\0';
-         strcat(p, conf->footfile);
-    
-         fd = open(s, O_RDONLY);
-         if (fd != -1) break; /* found one */
-
-         *p = '\0';
-       }
-            
-    free(s);
-
-    if (fd == -1) /* failed to find a footer, so set up empty default */
-      { 
-        footer_formatted = apr_pstrdup(r->pool, "");
-      }
-    else /* found a footer, so set up to use it */
-      {
-        fstat(fd, &statbuf);
-        footer_formatted = apr_palloc(r->pool, statbuf.st_size + 1);
-        read(fd, footer_formatted, statbuf.st_size);
-        footer_formatted[statbuf.st_size] = '\0';
-        close(fd);
-      }
-
-    /* **** can now calculate the Content-Length and output headers **** */
-      
-    length = strlen(head_formatted) + strlen(header_formatted) + 
-             strlen(body_formatted) + strlen(admin_formatted)  +
-             strlen(footer_formatted);
-
-    ap_set_content_length(r, length);
-    ap_set_content_type(r, "text/html");
-
-    /* ** output the HTTP body (HTML Head+Body) ** */
-
-    ap_rputs(head_formatted,   r);
-    ap_rputs(header_formatted, r);
-    ap_rputs(body_formatted,   r);
-    ap_rputs(admin_formatted,  r);
-    ap_rputs(footer_formatted, r);
-
-    return OK;
-}
-
-int html_dir_list(request_rec *r, mod_gridsite_cfg *conf)
-/* 
-    output HTML directory listing, with level of formatting controlled
-    by GridSiteHtmlFormat/conf->format
-*/
-{
-    int    i, fd, n;
-    char  *buf, *p, *s, *head_formatted, *header_formatted,
-          *body_formatted, *admin_formatted, *footer_formatted, *temp,
-           modified[99], *d_namepath, *indexheaderpath, *indexheadertext;
-    size_t length;
-    struct stat statbuf;
-    struct tm   mtime_tm;
-    struct dirent **namelist;
-    
-    if (r->finfo.filetype == APR_NOFILE) return HTTP_NOT_FOUND;
-        
-    head_formatted = apr_psprintf(r->pool, 
-      "<head><title>Directory listing %s</title></head>\n", r->uri);
-
-    if (conf->format)
-      {
-        /* **** try to find a header file in this or parent directories **** */
-
-        /* first make a buffer big enough to hold path names we want to try */
-        fd = -1;
-        s = malloc(strlen(r->filename) + strlen(conf->headfile) + 1);
-        strcpy(s, r->filename);
-    
-        for (;;)
-           {
-             p = rindex(s, '/');
-             if (p == NULL) break; /* failed to find one */
-             p[1] = '\0';
-             strcat(p, conf->headfile);
-    
-             fd = open(s, O_RDONLY);
-             if (fd != -1) break; /* found one */
-
-             *p = '\0';
-           }
-            
-        free(s);
-
-        if (fd == -1) /* not found, so set up to output sensible default */
-          {
-            header_formatted = apr_pstrdup(r->pool, "<body bgcolor=white>");
-          }
-        else /* found a header file, so set up head and body to surround it */
-          {
-            fstat(fd, &statbuf);
-            header_formatted = apr_palloc(r->pool, statbuf.st_size + 1);
-            read(fd, header_formatted, statbuf.st_size);
-            header_formatted[statbuf.st_size] = '\0';
-            close(fd);
-          }
-      }
-    else header_formatted = apr_pstrdup(r->pool, "<body bgcolor=white>");
-            
-    body_formatted = apr_psprintf(r->pool, 
-      "<h1>Directory listing %s</h1>\n", r->uri);
-      
-    if (conf->indexheader != NULL)
-      {
-        indexheaderpath = apr_psprintf(r->pool, "%s/%s", r->filename, 
-                                                         conf->indexheader);
-        fd = open(indexheaderpath, O_RDONLY);
-        if (fd != -1)
-          {
-            fstat(fd, &statbuf);
-            indexheadertext = apr_palloc(r->pool, statbuf.st_size + 1);
-            read(fd, indexheadertext, statbuf.st_size);
-            indexheadertext[statbuf.st_size] = '\0';
-            close(fd);
-            
-            body_formatted = apr_pstrcat(r->pool, body_formatted,
-                                         indexheadertext, NULL);
-          }
-      }
-
-    body_formatted = apr_pstrcat(r->pool, body_formatted, "<p><table>\n", NULL);
-
-    if (r->unparsed_uri[1] != '\0')
-     body_formatted = apr_pstrcat(r->pool, body_formatted, 
-        "<tr><td colspan=3>[<a href=\"../\">Parent directory</a>]</td></tr>\n", 
-         NULL);
-      
-    n = scandir(r->filename, &namelist, 0, versionsort);
-    while (n--)
-         {
-           if ((namelist[n]->d_name[0] != '.') && 
-               ((conf->indexheader == NULL) || 
-                (strcmp(conf->indexheader, namelist[n]->d_name) != 0)))
-             {
-               d_namepath = apr_psprintf(r->pool, "%s/%s", r->filename,
-                                                  namelist[n]->d_name);
-               stat(d_namepath, &statbuf);
-               
-               localtime_r(&(statbuf.st_mtime), &mtime_tm);
-               strftime(modified, sizeof(modified), 
-              "<td align=right>%R</td><td align=right>%e&nbsp;%b&nbsp;%y</td>",
-                        &mtime_tm);    
-                              
-               if (S_ISDIR(statbuf.st_mode))
-                    temp = apr_psprintf(r->pool, 
-                      "<tr><td><a href=\"%s/\" content-length=\"%ld\" "
-                      "last-modified=\"%ld\">"
-                      "%s/</a></td>"
-                      "<td align=right>%ld</td>%s</tr>\n", 
-                      namelist[n]->d_name, statbuf.st_size, statbuf.st_mtime,
-                      namelist[n]->d_name, 
-                      statbuf.st_size, modified);
-               else temp = apr_psprintf(r->pool, 
-                      "<tr><td><a href=\"%s\" content-length=\"%ld\" "
-                      "last-modified=\"%ld\">"
-                      "%s</a></td>"
-                      "<td align=right>%ld</td>%s</tr>\n", 
-                      namelist[n]->d_name, statbuf.st_size, statbuf.st_mtime,
-                      namelist[n]->d_name, 
-                      statbuf.st_size, modified);
-
-               body_formatted = apr_pstrcat(r->pool,body_formatted,temp,NULL);
-             }
-
-           free(namelist[n]);
-         }
-                 
-    free(namelist);
-    
-    body_formatted = apr_pstrcat(r->pool, body_formatted, "</table>\n", NULL);
-
-    if (conf->format)
-      {
-        /* **** set up dynamic part of footer to go at end of body **** */
-
-        admin_formatted = make_admin_footer(r, conf, TRUE);
-    
-        /* **** try to find a footer file in this or parent directories **** */
-
-        /* first make a buffer big enough to hold path names we want to try */
-        fd = -1;
-        s  = malloc(strlen(r->filename) + strlen(conf->footfile));
-        strcpy(s, r->filename);
-    
-        for (;;)
-           {
-             p = rindex(s, '/');
-             if (p == NULL) break; /* failed to find one */
-    
-             p[1] = '\0';
-             strcat(p, conf->footfile);
-    
-             fd = open(s, O_RDONLY);
-             if (fd != -1) break; /* found one */
-
-             *p = '\0';
-           }
-            
-        free(s);
-
-        if (fd == -1) /* failed to find a footer, so use standard default */
-          {
-            footer_formatted = apr_pstrdup(r->pool, "</body>");
-          }
-        else /* found a footer, so set up to use it */
-          {
-            fstat(fd, &statbuf);
-            footer_formatted = apr_palloc(r->pool, statbuf.st_size + 1);
-            read(fd, footer_formatted, statbuf.st_size);
-            footer_formatted[statbuf.st_size] = '\0';
-            close(fd);
-          }
-      }
-    else
-      {
-        admin_formatted = apr_pstrdup(r->pool, "");
-        footer_formatted = apr_pstrdup(r->pool, "</body>");
-      }
-
-    /* **** can now calculate the Content-Length and output headers **** */
-      
-    length = strlen(head_formatted) + strlen(header_formatted) + 
-             strlen(body_formatted) + strlen(admin_formatted)  +
-             strlen(footer_formatted);
-
-    ap_set_content_length(r, length);
-    ap_set_content_type(r, "text/html");
-
-    /* ** output the HTTP body (HTML Head+Body) ** */
-
-    ap_rputs(head_formatted,   r);
-    ap_rputs(header_formatted, r);
-    ap_rputs(body_formatted,   r);
-    ap_rputs(admin_formatted,  r);
-    ap_rputs(footer_formatted, r);
-
-    return OK;
-}
-
-int http_downgrade(request_rec *r, mod_gridsite_cfg *conf)
-{ 
-    int          i;
-    char        *httpurl, *filetemplate, *cookievalue, *envname_i, 
-                *grst_cred_i, expires_str[APR_RFC822_DATE_LEN];
-    apr_uint64_t gridauthcookie;
-    apr_table_t *env;
-    apr_time_t   expires_time;
-    apr_file_t  *fp;
-
-    /* create random cookie and gridauthcookie file */
-
-    if (apr_generate_random_bytes((char *) &gridauthcookie, 
-                                  sizeof(gridauthcookie))
-         != APR_SUCCESS) return HTTP_INTERNAL_SERVER_ERROR;
-    
-    filetemplate = apr_psprintf(r->pool, "%s/%016llxXXXXXX", 
-                                ap_server_root_relative(r->pool,
-                                                        conf->authcookiesdir),
-                                gridauthcookie);
-                                    
-    if (apr_file_mktemp(&fp, 
-                        filetemplate, 
-                        APR_CREATE | APR_WRITE | APR_EXCL,
-                        r->pool)
-                      != APR_SUCCESS) return HTTP_INTERNAL_SERVER_ERROR;
-
-    expires_time = apr_time_now() + apr_time_from_sec(300); 
-    /* onetime cookies are valid for only 5 mins! */
-
-    apr_file_printf(fp, "expires=%lu\ndomain=%s\npath=%s\nonetime=yes\n", 
-                   (time_t) apr_time_sec(expires_time), r->hostname, r->uri);
-
-    for (i=0; ; ++i)
-       {
-         envname_i = apr_psprintf(r->pool, "GRST_CRED_%d", i);
-         if (grst_cred_i = (char *)
-                           apr_table_get(r->connection->notes, envname_i))
-           {
-             apr_file_printf(fp, "%s=%s\n", envname_i, grst_cred_i);
-           }
-         else break; /* GRST_CRED_i are numbered consecutively */
-       }
-
-    if (apr_file_close(fp) != APR_SUCCESS) 
-      {
-        apr_file_remove(filetemplate, r->pool); /* try to clean up */
-        return HTTP_INTERNAL_SERVER_ERROR;
-      }
-    
-    /* send redirection header back to client */
-       
-    cookievalue = rindex(filetemplate, '/');
-    if (cookievalue != NULL) ++cookievalue;
-    else cookievalue = filetemplate;
-       
-    apr_rfc822_date(expires_str, expires_time);
-
-    apr_table_add(r->headers_out, 
-                  apr_pstrdup(r->pool, "Set-Cookie"), 
-                  apr_psprintf(r->pool, 
-                  "GRID_AUTH_ONETIME=%s; "
-                  "expires=%s; "
-                  "domain=%s; "
-                  "path=%s",
-                  cookievalue, expires_str, r->hostname, r->uri));
-    
-    httpurl = apr_pstrcat(r->pool, "http://", r->hostname,
-                        ap_escape_uri(r->pool, r->uri), NULL);
-    apr_table_setn(r->headers_out, apr_pstrdup(r->pool, "Location"), httpurl);
-
-    r->status = HTTP_MOVED_TEMPORARILY;  
-    return OK;
-}
-
-int http_put_method(request_rec *r, mod_gridsite_cfg *conf)
-{
-  char        buf[2048];
-  size_t      length;
-  int         retcode;
-  apr_file_t *fp;
-    
-  /* ***  check if directory creation: PUT /.../  *** */
-
-  if ((r->unparsed_uri    != NULL) && 
-      (r->unparsed_uri[0] != '\0') &&
-      (r->unparsed_uri[strlen(r->unparsed_uri) - 1] == '/'))
-    {
-      if (apr_dir_make(r->filename, APR_UREAD | APR_UWRITE | APR_UEXECUTE, 
-                          r->pool) != 0) return HTTP_INTERNAL_SERVER_ERROR;
-
-      ap_set_content_length(r, 0);
-      ap_set_content_type(r, "text/html");
-      return OK;
-    }
-
-  /* ***  otherwise assume trying to create a regular file *** */
-
-  if (apr_file_open(&fp, r->filename, APR_WRITE | APR_CREATE | APR_BUFFERED,
-      APR_UREAD | APR_UWRITE, r->pool) != 0) return HTTP_INTERNAL_SERVER_ERROR;
-   
-// TODO: need to add Range: support at some point too
-
-  retcode = ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK);
-  if (retcode == OK)
-    {
-      if (ap_should_client_block(r))
-        while ((length = ap_get_client_block(r, buf, sizeof(buf))) > 0)
-               if (apr_file_write(fp, buf, &length) != 0) 
-                 {
-                   retcode = HTTP_INTERNAL_SERVER_ERROR;
-                   break;
-                 }
-
-      ap_set_content_length(r, 0);
-      ap_set_content_type(r, "text/html");
-    }
-
-  if (apr_file_close(fp) != 0) return HTTP_INTERNAL_SERVER_ERROR;
-
-  return retcode;
-}
-
-int http_delete_method(request_rec *r, mod_gridsite_cfg *conf)
-{
-  if (remove(r->filename) != 0) return HTTP_FORBIDDEN;
-       
-  ap_set_content_length(r, 0);
-  ap_set_content_type(r, "text/html");
-
-  return OK;
-}
-
-static int mod_gridsite_dir_handler(request_rec *r, mod_gridsite_cfg *conf)
-/*
-   handler switch for directories
-*/
-{
-    /* *** is this a write method? only possible if  GridSiteAuth on *** */
-
-    if (conf->auth)
-      {
-        if ((r->method_number == M_PUT) && 
-            (conf->methods != NULL) &&
-            (strstr(conf->methods, " PUT "   ) != NULL))
-                                           return http_put_method(r, conf);
-
-        if ((r->method_number == M_DELETE) &&
-            (conf->methods != NULL) &&
-            (strstr(conf->methods, " DELETE ") != NULL)) 
-                                           return http_delete_method(r, conf);
-      }
-      
-    /* *** directory listing? *** */
-    
-    if ((r->method_number == M_GET) && (conf->indexes))       
-                       return html_dir_list(r, conf); /* directory listing */
-    
-    return DECLINED; /* *** nothing to see here, move along *** */
-}
-
-static int mod_gridsite_nondir_handler(request_rec *r, mod_gridsite_cfg *conf)
-/*
-   one big handler switch for everything other than directories, since we 
-   might be responding to MIME * / * for local PUT, MOVE, COPY and DELETE, 
-   and GET inside ghost directories.
-*/
-{
-    char      *downgradesize;
-    apr_off_t  numericsize;
-
-    /* *** is this a write method or HTTP downgrade? 
-           only possible if  GridSiteAuth on *** */
-    
-    if (conf->auth)
-      {
-        if ((conf->downgrade) &&
-            ((downgradesize = (char *) apr_table_get(r->headers_in, 
-                                       "HTTP-Downgrade-Size")) != NULL) &&
-            ((numericsize = (apr_off_t) atoll(downgradesize)) >= 0) &&
-
-// TODO: what if we're pointing at a CGI or some dynamic content???
-            (((r->method_number == M_GET) && (r->finfo.size >= numericsize))
-             || (r->method_number == M_PUT)) &&
-
-            (strcasecmp(apr_table_get(r->subprocess_env, "HTTPS"), "on") == 0))
-            return http_downgrade(r, conf);
-      
-        if ((r->method_number == M_PUT) && 
-            (conf->methods != NULL) &&
-            (strstr(conf->methods, " PUT "   ) != NULL))
-                                           return http_put_method(r, conf);
-
-        if ((r->method_number == M_DELETE) &&
-            (conf->methods != NULL) &&
-            (strstr(conf->methods, " DELETE ") != NULL)) 
-                                           return http_delete_method(r, conf);
-      }
-
-    /* *** check if a special ghost admin CGI *** */
-      
-    if (conf->adminfile && conf->adminuri &&
-        (strlen(r->filename) > strlen(conf->adminfile) + 1) &&
-        (strcmp(&(r->filename[strlen(r->filename) - strlen(conf->adminfile)]),
-                                                    conf->adminfile) == 0) &&
-        (r->filename[strlen(r->filename)-strlen(conf->adminfile)-1] == '/') &&
-        ((r->method_number == M_POST) ||
-         (r->method_number == M_GET))) 
-      {
-        ap_internal_redirect(conf->adminuri, r);
-        return OK;
-      }
-      
-    /* *** finally look for .html files that we should format *** */
-
-    if ((conf->format) &&  /* conf->format set by  GridSiteHtmlFormat on */ 
-        (strlen(r->filename) > 5) &&
-        (strcmp(&(r->filename[strlen(r->filename)-5]), ".html") == 0) &&
-        (r->method_number == M_GET)) return html_format(r, conf);
-     
-    return DECLINED; /* *** nothing to see here, move along *** */
-}
-
-static void recurse4dirlist(char *dirname, time_t *dirs_time,
-                             char *fulluri, int fullurilen,
-                             char *encfulluri, int enclen,
-                             apr_pool_t *pool, char **body,
-                             int recurse_level)
-/* try to find DN Lists in dir[] and its subdirs that match the fulluri[]
-   prefix. add blobs of HTML to body as they are found. */
-{
-   char          *unencname, modified[99], *oneline, *d_namepath;
-   DIR           *oneDIR;
-   struct dirent *onedirent;
-   struct tm      mtime_tm;
-   size_t         length;
-   struct stat    statbuf;
-
-   if ((stat(dirname, &statbuf) != 0) ||
-       (!S_ISDIR(statbuf.st_mode)) ||
-       ((oneDIR = opendir(dirname)) == NULL)) return;
-
-   if (statbuf.st_mtime > *dirs_time) *dirs_time = statbuf.st_mtime;
-
-   while ((onedirent = readdir(oneDIR)) != NULL)
-        {
-          if (onedirent->d_name[0] == '.') continue;
-        
-          d_namepath = apr_psprintf(pool, "%s/%s", dirname, onedirent->d_name);
-          if (stat(d_namepath, &statbuf) != 0) continue;
-
-          if (S_ISDIR(statbuf.st_mode) && (recurse_level < GRST_RECURS_LIMIT)) 
-                 recurse4dirlist(d_namepath, dirs_time, fulluri,
-                                 fullurilen, encfulluri, enclen, 
-                                 pool, body, recurse_level + 1);
-          else if ((strncmp(onedirent->d_name, encfulluri, enclen) == 0) &&
-                   (onedirent->d_name[strlen(onedirent->d_name) - 1] != '~'))
-            {
-              unencname = GRSThttpUrlDecode(onedirent->d_name);
-                    
-              if (strncmp(unencname, fulluri, fullurilen) == 0)
-                {
-
-                  if (statbuf.st_mtime > *dirs_time) 
-                                                *dirs_time = statbuf.st_mtime;
-
-                  localtime_r(&(statbuf.st_mtime), &mtime_tm);
-                  strftime(modified, sizeof(modified), 
-              "<td align=right>%R</td><td align=right>%e&nbsp;%b&nbsp;%y</td>",
-                       &mtime_tm);
-
-                  oneline = apr_psprintf(pool,
-                                     "<tr><td><a href=\"%s\" "
-                                     "content-length=\"%ld\" "
-                                     "last-modified=\"%ld\">"
-                                     "%s</a></td>"
-                                     "<td align=right>%ld</td>%s</tr>\n", 
-                                     &unencname[fullurilen], statbuf.st_size, 
-                                     statbuf.st_mtime, unencname, 
-                                     statbuf.st_size, modified);
-
-                  *body = apr_pstrcat(pool, *body, oneline, NULL);
-                }      
-                      
-              free(unencname); /* libgridsite doesnt use pools */    
-            }
-        }
-        
-   closedir(oneDIR);
-}
-
-static int mod_gridsite_dnlistsuri_dir_handler(request_rec *r, 
-                                               mod_gridsite_cfg *conf)
-/*
-    virtual DN-list file lister: make all DN lists on the dn-lists
-    path of this server appear to be in the dn-lists directory itself
-    (ie where they appear in the DN lists path doesnt matter, as long
-    as their name matches)
-*/
-{
-    int            enclen, fullurilen, fd;
-    char          *fulluri, *encfulluri, *dn_list_ptr, *dirname, *unencname,
-                  *body, *oneline, *p, *s,
-                  *head_formatted, *header_formatted, *footer_formatted,
-                  *permstr = NULL;
-    struct stat    statbuf;
-    size_t         length;
-    time_t         dirs_time = 0;
-    GRSTgaclPerm   perm = GRST_PERM_NONE;
-        
-    if (r->notes != NULL)
-           permstr = (char *) apr_table_get(r->notes, "GRST_PERM");
-
-    if (permstr != NULL) sscanf(permstr, "%d", &perm);
-
-    fulluri = apr_psprintf(r->pool, "https://%s%s",
-                                    ap_get_server_name(r), conf->dnlistsuri);
-    fullurilen = strlen(fulluri);
-
-    encfulluri = GRSThttpUrlEncode(fulluri);
-    enclen     = strlen(encfulluri);
-
-    if (conf->dnlists != NULL) p = conf->dnlists;
-    else p = getenv("GRST_DN_LISTS");
-
-    if (p == NULL) p = GRST_DN_LISTS;
-    dn_list_ptr = apr_pstrdup(r->pool, p);
-
-    head_formatted = apr_psprintf(r->pool, 
-      "<head><title>Directory listing %s</title></head>\n", r->uri);
-
-    if (conf->format)
-      {
-        /* **** try to find a header file in this or parent directories **** */
-
-        /* first make a buffer big enough to hold path names we want to try */
-        fd = -1;
-        s = malloc(strlen(r->filename) + strlen(conf->headfile) + 1);
-        strcpy(s, r->filename);
-    
-        for (;;)
-           {
-             p = rindex(s, '/');
-             if (p == NULL) break; /* failed to find one */
-             p[1] = '\0';
-             strcat(p, conf->headfile);
-    
-             fd = open(s, O_RDONLY);
-             if (fd != -1) break; /* found one */
-
-             *p = '\0';
-           }
-            
-        free(s);
-
-        if (fd == -1) /* not found, so set up to output sensible default */
-          {
-            header_formatted = apr_pstrdup(r->pool, "<body bgcolor=white>");
-          }
-        else /* found a header file, so set up head and body to surround it */
-          {
-            fstat(fd, &statbuf);
-            header_formatted = apr_palloc(r->pool, statbuf.st_size + 1);
-            read(fd, header_formatted, statbuf.st_size);
-            header_formatted[statbuf.st_size] = '\0';
-            close(fd);
-          }
-      }
-    else header_formatted = apr_pstrdup(r->pool, "<body bgcolor=white>");
-            
-    body = apr_psprintf(r->pool, 
-      "<h1>Directory listing %s</h1>\n<table>", r->uri);
-
-    if ((r->uri)[1] != '\0')
-     body = apr_pstrcat(r->pool, body, 
-       "<tr><td>[<a href=\"../\">Parent directory</a>]</td></tr>\n",
-       NULL);
-
-    while ((dirname = strsep(&dn_list_ptr, ":")) != NULL)
-        recurse4dirlist(dirname, &dirs_time, fulluri, fullurilen,
-                                 encfulluri, enclen, r->pool, &body, 0);
-
-    if ((stat(r->filename, &statbuf) == 0) &&
-        S_ISDIR(statbuf.st_mode) && 
-        GRSTgaclPermHasWrite(perm))
-      {
-        oneline = apr_psprintf(r->pool,
-           "<form action=\"%s%s\" method=post>\n"
-           "<input type=hidden name=cmd value=managedir>"
-           "<tr><td colspan=4 align=center><small><input type=submit "
-           "value=\"Manage directory\"></small></td></tr></form>\n",
-           r->uri, conf->adminfile);
-          
-        body = apr_pstrcat(r->pool, body, oneline, NULL);
-      } 
-
-    body = apr_pstrcat(r->pool, body, "</table>\n", NULL);
-
-    free(encfulluri); /* libgridsite doesnt use pools */
-
-    if (conf->format)
-      {
-        /* **** try to find a footer file in this or parent directories **** */
-
-        /* first make a buffer big enough to hold path names we want to try */
-        fd = -1;
-        s  = malloc(strlen(r->filename) + strlen(conf->footfile));
-        strcpy(s, r->filename);
-    
-        for (;;)
-           {
-             p = rindex(s, '/');
-             if (p == NULL) break; /* failed to find one */
-    
-             p[1] = '\0';
-             strcat(p, conf->footfile);
-    
-             fd = open(s, O_RDONLY);
-             if (fd != -1) break; /* found one */
-
-             *p = '\0';
-           }
-            
-        free(s);
-
-        if (fd == -1) /* failed to find a footer, so use standard default */
-          {
-            footer_formatted = apr_pstrdup(r->pool, "</body>");
-          }
-        else /* found a footer, so set up to use it */
-          {
-            fstat(fd, &statbuf);
-            footer_formatted = apr_palloc(r->pool, statbuf.st_size + 1);
-            read(fd, footer_formatted, statbuf.st_size);
-            footer_formatted[statbuf.st_size] = '\0';
-            close(fd);
-          }
-      }
-    else footer_formatted = apr_pstrdup(r->pool, "</body>");
-
-    /* **** can now calculate the Content-Length and output headers **** */
-      
-    length = strlen(head_formatted) + strlen(header_formatted) + 
-             strlen(body) + strlen(footer_formatted);
-
-    ap_set_content_length(r, length);
-    r->mtime = apr_time_from_sec(dirs_time);
-    ap_set_last_modified(r);
-    ap_set_content_type(r, "text/html");
-
-    /* ** output the HTTP body (HTML Head+Body) ** */
-    ap_rputs(head_formatted,   r);
-    ap_rputs(header_formatted, r);
-    ap_rputs(body,                r);
-    ap_rputs(footer_formatted, r);
-
-    return OK;
-}
-
-static char *recurse4file(char *dir, char *file, apr_pool_t *pool, 
-                          int recurse_level)
-/* try to find file[] in dir[]. try subdirs if not found.
-   return full path to first found version or NULL on failure */
-{
-    char          *fullfilename, *fulldirname;
-    struct stat    statbuf;
-    DIR           *dirDIR;
-    struct dirent *file_ent;
-
-    /* try to find in current directory */
-
-    fullfilename = apr_psprintf(pool, "%s/%s", dir, file);
-
-    if (stat(fullfilename, &statbuf) == 0) return fullfilename;
-
-    /* maybe search in subdirectories */
-
-    if (recurse_level >= GRST_RECURS_LIMIT) return NULL;
-
-    dirDIR = opendir(dir);
-
-    if (dirDIR == NULL) return NULL;
-
-    while ((file_ent = readdir(dirDIR)) != NULL)
-       {
-         if (file_ent->d_name[0] == '.') continue;
-
-         fulldirname = apr_psprintf(pool, "%s/%s", dir, file_ent->d_name);
-         if ((stat(fulldirname, &statbuf) == 0) &&
-             S_ISDIR(statbuf.st_mode) &&
-             ((fullfilename = recurse4file(fulldirname, file,
-                                           pool, recurse_level + 1)) != NULL))
-           {
-             closedir(dirDIR);
-             return fullfilename;
-           }
-       }
-
-    closedir(dirDIR);
-
-    return NULL;
-}
-
-static int mod_gridsite_dnlistsuri_handler(request_rec *r, 
-                                           mod_gridsite_cfg *conf)
-/*
-    virtual DN-list file generator
-*/
-{
-    int          fd;
-    char        *fulluri, *encfulluri, *dn_list_ptr, *filename, *dirname, *p,
-                *buf;
-    struct stat  statbuf;
-    
-    /* *** check if a special ghost admin CGI *** */
-      
-    if (conf->adminfile && conf->adminuri &&
-        (strlen(r->filename) > strlen(conf->adminfile) + 1) &&
-        (strcmp(&(r->filename[strlen(r->filename) - strlen(conf->adminfile)]),
-                                                    conf->adminfile) == 0) &&
-        (r->filename[strlen(r->filename)-strlen(conf->adminfile)-1] == '/') &&
-        ((r->method_number == M_POST) ||
-         (r->method_number == M_GET))) 
-      {
-        ap_internal_redirect(conf->adminuri, r);
-        return OK;
-      }
-
-    fulluri = apr_psprintf(r->pool, "https://%s%s", 
-                                    ap_get_server_name(r), r->uri);
-
-    encfulluri = GRSThttpUrlEncode(fulluri);
-    
-    if (conf->dnlists != NULL) p = conf->dnlists;
-    else p = getenv("GRST_DN_LISTS");
-    if (p == NULL) p = GRST_DN_LISTS;
-    dn_list_ptr = apr_pstrdup(r->pool, p);
-
-    while ((dirname = strsep(&dn_list_ptr, ":")) != NULL)
-       {
-         filename = recurse4file(dirname, encfulluri, r->pool, 0);
-
-         if (filename == NULL) continue;
-    
-         fd = open(filename, O_RDONLY);
-
-         if (fd == -1) continue;
-
-         fstat(fd, &statbuf);         
-         ap_set_content_length(r, (apr_off_t) statbuf.st_size);
-         r->mtime = apr_time_from_sec(statbuf.st_mtime);
-         ap_set_content_type(r, "text/plain");
-         ap_set_last_modified(r);
-
-         buf = apr_palloc(r->pool, statbuf.st_size + 1);
-         read(fd, buf, statbuf.st_size);
-         buf[statbuf.st_size] = '\0';
-            
-         ap_rputs(buf, r);
-
-         close(fd);
-
-         return OK;
-       }
-
-    return HTTP_NOT_FOUND;
-}
-
-static void *create_gridsite_dir_config(apr_pool_t *p, char *path)
-{
-    mod_gridsite_cfg *conf = apr_palloc(p, sizeof(*conf));
-
-    if (path == NULL) /* set up server defaults */
-      { 
-        conf->auth          = 0;     /* GridSiteAuth          on/off       */
-        conf->envs          = 1;     /* GridSiteEnvs          on/off       */
-        conf->format        = 0;     /* GridSiteHtmlFormat    on/off       */
-        conf->indexes       = 0;     /* GridSiteIndexes       on/off       */
-        conf->indexheader   = NULL;  /* GridSiteIndexHeader   File-value   */
-        conf->gridsitelink  = 1;     /* GridSiteLink          on/off       */
-        conf->adminfile     = apr_pstrdup(p, GRST_ADMIN_FILE);
-                                /* GridSiteAdminFile      File-value   */
-        conf->adminuri      = NULL;  /* GridSiteAdminURI      URI-value    */
-        conf->helpuri       = NULL;  /* GridSiteHelpURI       URI-value    */
-        conf->dnlists       = NULL;  /* GridSiteDNlists       Search-path  */
-        conf->dnlistsuri    = NULL;  /* GridSiteDNlistsURI    URI-value    */
-        conf->adminlist     = NULL;  /* GridSiteAdminList     URI-value    */
-        conf->gsiproxylimit = 1;     /* GridSiteGSIProxyLimit number       */
-        conf->unzip         = NULL;  /* GridSiteUnzip         file-path    */
-
-        conf->methods    = apr_pstrdup(p, " GET ");
-                                        /* GridSiteMethods      methods   */
-                            
-        conf->editable = apr_pstrdup(p, " txt shtml html htm css js php jsp ");
-                                        /* GridSiteEditable     types   */
-     
-        conf->headfile = apr_pstrdup(p, GRST_HEADFILE);
-        conf->footfile = apr_pstrdup(p, GRST_FOOTFILE); 
-               /* GridSiteHeadFile and GridSiteFootFile  file name */
-
-        conf->downgrade     = 0;     /* GridSiteDowngrade     on/off       */
-        conf->authcookiesdir = apr_pstrdup(p, "gridauthcookies");
-                                     /* GridSiteAuthCookiesDir dir-path     */
-        conf->soap2cgi      = 0;     /* GridSiteSoap2cgi      on/off       */
-      }
-    else
-      {
-        conf->auth          = UNSET; /* GridSiteAuth          on/off       */
-        conf->envs          = UNSET; /* GridSiteEnvs          on/off       */
-        conf->format        = UNSET; /* GridSiteHtmlFormat    on/off       */
-        conf->indexes       = UNSET; /* GridSiteIndexes       on/off       */
-        conf->indexheader   = NULL;  /* GridSiteIndexHeader   File-value   */
-        conf->gridsitelink  = UNSET; /* GridSiteLink          on/off       */
-        conf->adminfile     = NULL;  /* GridSiteAdminFile     File-value   */
-        conf->adminuri      = NULL;  /* GridSiteAdminURI      URI-value    */
-        conf->helpuri       = NULL;  /* GridSiteHelpURI       URI-value    */
-        conf->dnlists       = NULL;  /* GridSiteDNlists       Search-path  */
-        conf->dnlistsuri    = NULL;  /* GridSiteDNlistsURI    URI-value    */
-        conf->adminlist     = NULL;  /* GridSiteAdminList     URI-value    */
-        conf->gsiproxylimit = UNSET; /* GridSiteGSIProxyLimit number       */
-        conf->unzip         = NULL;  /* GridSiteUnzip         file-path    */
-        conf->methods       = NULL;  /* GridSiteMethods       methods      */
-        conf->editable      = NULL;  /* GridSiteEditable      types        */
-        conf->headfile      = NULL;  /* GridSiteHeadFile      file name    */
-        conf->footfile      = NULL;  /* GridSiteFootFile      file name    */
-        conf->downgrade     = UNSET; /* GridSiteDowngrade     on/off       */
-        conf->authcookiesdir= NULL;  /* GridSiteAuthCookiesDir dir-path    */
-        conf->soap2cgi      = UNSET; /* GridSiteSoap2cgi      on/off       */
-      }
-      
-    return conf;
-}
-
-static void *merge_gridsite_dir_config(apr_pool_t *p, void *vserver, 
-                                                      void *vdirect)
-/* merge directory with server-wide directory configs */
-{
-    mod_gridsite_cfg *conf, *server, *direct;
-   
-    server = (mod_gridsite_cfg *) vserver;
-    direct = (mod_gridsite_cfg *) vdirect;
-    conf = apr_palloc(p, sizeof(*conf));
-    
-    if (direct->auth != UNSET) conf->auth = direct->auth;
-    else                       conf->auth = server->auth;
-    
-    if (direct->envs != UNSET) conf->envs = direct->envs;
-    else                       conf->envs = server->envs;
-        
-    if (direct->format != UNSET) conf->format = direct->format;
-    else                         conf->format = server->format;
-        
-    if (direct->indexes != UNSET) conf->indexes = direct->indexes;
-    else                          conf->indexes = server->indexes;
-        
-    if (direct->gridsitelink != UNSET) conf->gridsitelink=direct->gridsitelink;
-    else                               conf->gridsitelink=server->gridsitelink;
-
-    if (direct->indexheader != NULL) conf->indexheader = direct->indexheader;
-    else                             conf->indexheader = server->indexheader;
-        
-    if (direct->adminfile != NULL) conf->adminfile = direct->adminfile;
-    else                           conf->adminfile = server->adminfile;
-        
-    if (direct->adminuri != NULL) conf->adminuri = direct->adminuri;
-    else                          conf->adminuri = server->adminuri;
-        
-    if (direct->helpuri != NULL) conf->helpuri = direct->helpuri;
-    else                         conf->helpuri = server->helpuri;
-        
-    if (direct->dnlists != NULL) conf->dnlists = direct->dnlists;
-    else                         conf->dnlists = server->dnlists;
-        
-    if (direct->dnlistsuri != NULL) conf->dnlistsuri = direct->dnlistsuri;
-    else                            conf->dnlistsuri = server->dnlistsuri;
-        
-    if (direct->adminlist != NULL) conf->adminlist = direct->adminlist;
-    else                           conf->adminlist = server->adminlist;
-        
-    if (direct->gsiproxylimit != UNSET) 
-                         conf->gsiproxylimit = direct->gsiproxylimit;
-    else                 conf->gsiproxylimit = server->gsiproxylimit;
-        
-    if (direct->unzip != NULL) conf->unzip = direct->unzip;
-    else                       conf->unzip = server->unzip;
-        
-    if (direct->methods != NULL) conf->methods = direct->methods;
-    else                         conf->methods = server->methods;
-        
-    if (direct->editable != NULL) conf->editable = direct->editable;
-    else                          conf->editable = server->editable;
-        
-    if (direct->headfile != NULL) conf->headfile = direct->headfile;
-    else                          conf->headfile = server->headfile;
-        
-    if (direct->footfile != NULL) conf->footfile = direct->footfile;
-    else                          conf->footfile = server->footfile;
-        
-    if (direct->downgrade != UNSET) conf->downgrade = direct->downgrade;
-    else                            conf->downgrade = server->downgrade;
-        
-    if (direct->authcookiesdir != NULL)
-                                conf->authcookiesdir = direct->authcookiesdir;
-    else                        conf->authcookiesdir = server->authcookiesdir;
-        
-    if (direct->soap2cgi != UNSET) conf->soap2cgi = direct->soap2cgi;
-    else                           conf->soap2cgi = server->soap2cgi;
-        
-    return conf;
-}
-
-static const char *mod_gridsite_take1_cmds(cmd_parms *a, void *cfg,
-                                           const char *parm)
-{
-    int   n;
-    char *p;
-  
-    if      (strcasecmp(a->cmd->name, "GridSiteAdminFile") == 0)
-    {
-      if (index(parm, '/') != NULL) 
-           return "/ not permitted in GridSiteAdminFile";
-     
-      ((mod_gridsite_cfg *) cfg)->adminfile =
-        apr_pstrdup(a->pool, parm);
-    }
-    else if (strcasecmp(a->cmd->name, "GridSiteAdminURI") == 0)
-    {
-      if (*parm != '/') return "GridSiteAdminURI must begin with /";
-     
-      ((mod_gridsite_cfg *) cfg)->adminuri =
-        apr_pstrdup(a->pool, parm);
-    }
-    else if (strcasecmp(a->cmd->name, "GridSiteHelpURI") == 0)
-    {
-      if (*parm != '/') return "GridSiteHelpURI must begin with /";
-
-      ((mod_gridsite_cfg *) cfg)->helpuri =
-        apr_pstrdup(a->pool, parm);
-    }
-    else if (strcasecmp(a->cmd->name, "GridSiteDNlists") == 0)
-    {
-      ((mod_gridsite_cfg *) cfg)->dnlists =
-        apr_pstrdup(a->pool, parm);
-    }
-    else if (strcasecmp(a->cmd->name, "GridSiteDNlistsURI") == 0)
-    {
-      if (*parm != '/') return "GridSiteDNlistsURI must begin with /";
-
-      if ((*parm != '\0') && (parm[strlen(parm) - 1] == '/'))
-       ((mod_gridsite_cfg *) cfg)->dnlistsuri =
-        apr_pstrdup(a->pool, parm);
-      else
-       ((mod_gridsite_cfg *) cfg)->dnlistsuri =
-        apr_pstrcat(a->pool, parm, "/", NULL);
-    }
-    else if (strcasecmp(a->cmd->name, "GridSiteAdminList") == 0)
-    {
-      ((mod_gridsite_cfg *) cfg)->adminlist =
-        apr_pstrdup(a->pool, parm);
-    }
-    else if (strcasecmp(a->cmd->name, "GridSiteGSIProxyLimit") == 0)
-    {
-      n = -1;
-    
-      if ((sscanf(parm, "%d", &n) == 1) && (n >= 0))
-                  ((mod_gridsite_cfg *) cfg)->gsiproxylimit = n;
-      else return "GridSiteGSIProxyLimit must be a number >= 0";     
-    }
-    else if (strcasecmp(a->cmd->name, "GridSiteUnzip") == 0)
-    {
-      if (*parm != '/') return "GridSiteUnzip must begin with /";
-     
-      ((mod_gridsite_cfg *) cfg)->unzip =
-        apr_pstrdup(a->pool, parm);
-    }
-    else if (strcasecmp(a->cmd->name, "GridSiteMethods") == 0)
-    {
-      ((mod_gridsite_cfg *) cfg)->methods =
-        apr_psprintf(a->pool, " %s ", parm);
-       
-      for (p = ((mod_gridsite_cfg *) cfg)->methods;
-           *p != '\0';
-           ++p) if (*p == '\t') *p = ' ';
-    }
-    else if (strcasecmp(a->cmd->name, "GridSiteEditable") == 0)
-    {
-      ((mod_gridsite_cfg *) cfg)->editable =
-        apr_psprintf(a->pool, " %s ", parm);
-     
-      for (p = ((mod_gridsite_cfg *) cfg)->editable;
-           *p != '\0';
-           ++p) if (*p == '\t') *p = ' ';
-    }
-    else if (strcasecmp(a->cmd->name, "GridSiteHeadFile") == 0)
-    {
-      ((mod_gridsite_cfg *) cfg)->headfile =
-        apr_pstrdup(a->pool, parm);
-    }
-    else if (strcasecmp(a->cmd->name, "GridSiteFootFile") == 0)
-    {
-      ((mod_gridsite_cfg *) cfg)->footfile =
-        apr_pstrdup(a->pool, parm);
-    }  
-    else if (strcasecmp(a->cmd->name, "GridSiteIndexHeader") == 0)
-    {
-      if (index(parm, '/') != NULL) 
-           return "/ not permitted in GridSiteIndexHeader";
-
-      ((mod_gridsite_cfg *) cfg)->indexheader =
-        apr_pstrdup(a->pool, parm);
-    }
-    else if (strcasecmp(a->cmd->name, "GridSiteAuthCookiesDir") == 0)
-    {
-      if (index(parm, '/') != NULL) 
-           return "/ not permitted in GridSiteAuthCookiesDir";
-
-      ((mod_gridsite_cfg *) cfg)->authcookiesdir =
-        apr_pstrdup(a->pool, parm);
-    }
-        
-    return NULL;
-}
-
-static const char *mod_gridsite_flag_cmds(cmd_parms *a, void *cfg,
-                                      int flag)
-{
-    if      (strcasecmp(a->cmd->name, "GridSiteAuth") == 0)
-    {
-      ((mod_gridsite_cfg *) cfg)->auth = flag;
-    }
-    else if (strcasecmp(a->cmd->name, "GridSiteEnvs") == 0)
-    {
-      ((mod_gridsite_cfg *) cfg)->envs = flag;
-    }
-    else if (strcasecmp(a->cmd->name, "GridSiteHtmlFormat") == 0)
-    {
-      ((mod_gridsite_cfg *) cfg)->format = flag;
-    }
-    else if (strcasecmp(a->cmd->name, "GridSiteIndexes") == 0)
-    {
-      ((mod_gridsite_cfg *) cfg)->indexes = flag;
-    }
-    else if (strcasecmp(a->cmd->name, "GridSiteLink") == 0)
-    {
-      ((mod_gridsite_cfg *) cfg)->gridsitelink = flag;
-    }
-    else if (strcasecmp(a->cmd->name, "GridSiteDowngrade") == 0)
-    {
-// TODO: return error if try this on non-HTTPS virtual server
-
-      ((mod_gridsite_cfg *) cfg)->downgrade = flag;
-    }
-    else if (strcasecmp(a->cmd->name, "GridSiteSoap2cgi") == 0)
-    {
-      ((mod_gridsite_cfg *) cfg)->soap2cgi = flag;
-    }
-
-    return NULL;
-}
-
-static const command_rec mod_gridsite_cmds[] =
-{
-// TODO: need to check and document valid contexts for each command!
-
-    AP_INIT_FLAG("GridSiteAuth", mod_gridsite_flag_cmds, 
-                 NULL, OR_FILEINFO, "on or off"),
-    AP_INIT_FLAG("GridSiteEnvs", mod_gridsite_flag_cmds, 
-                 NULL, OR_FILEINFO, "on or off"),
-    AP_INIT_FLAG("GridSiteHtmlFormat", mod_gridsite_flag_cmds, 
-                 NULL, OR_FILEINFO, "on or off"),
-    AP_INIT_FLAG("GridSiteIndexes", mod_gridsite_flag_cmds, 
-                 NULL, OR_FILEINFO, "on or off"),
-    AP_INIT_FLAG("GridSiteLink", mod_gridsite_flag_cmds, 
-                 NULL, OR_FILEINFO, "on or off"),
-                 
-    AP_INIT_TAKE1("GridSiteAdminFile", mod_gridsite_take1_cmds,
-                   NULL, OR_FILEINFO, "Ghost per-directory admin CGI"),
-    AP_INIT_TAKE1("GridSiteAdminURI", mod_gridsite_take1_cmds,
-                   NULL, OR_FILEINFO, "URI of real gridsite-admin.cgi"),
-    AP_INIT_TAKE1("GridSiteHelpURI", mod_gridsite_take1_cmds,
-                   NULL, OR_FILEINFO, "URI of Website Help pages"),
-    AP_INIT_TAKE1("GridSiteDNlists", mod_gridsite_take1_cmds,
-                   NULL, OR_FILEINFO, "DN Lists directories search path"),
-    AP_INIT_TAKE1("GridSiteDNlistsURI", mod_gridsite_take1_cmds,
-                   NULL, OR_FILEINFO, "URI of published DN lists"),
-    AP_INIT_TAKE1("GridSiteAdminList", mod_gridsite_take1_cmds,
-                   NULL, OR_FILEINFO, "URI of admin DN List"),
-    AP_INIT_TAKE1("GridSiteGSIProxyLimit", mod_gridsite_take1_cmds,
-                   NULL, OR_FILEINFO, "Max level of GSI proxy validity"),
-    AP_INIT_TAKE1("GridSiteUnzip", mod_gridsite_take1_cmds,
-                   NULL, OR_FILEINFO, "Absolute path to unzip command"),
-
-    AP_INIT_RAW_ARGS("GridSiteMethods", mod_gridsite_take1_cmds,
-                   NULL, OR_FILEINFO, "permitted HTTP methods"),
-    AP_INIT_RAW_ARGS("GridSiteEditable", mod_gridsite_take1_cmds,
-                   NULL, OR_FILEINFO, "editable file extensions"),
-    AP_INIT_TAKE1("GridSiteHeadFile", mod_gridsite_take1_cmds,
-                   NULL, OR_FILEINFO, "filename of HTML header"),
-    AP_INIT_TAKE1("GridSiteFootFile", mod_gridsite_take1_cmds,
-                   NULL, OR_FILEINFO, "filename of HTML footer"),
-    AP_INIT_TAKE1("GridSiteIndexHeader", mod_gridsite_take1_cmds,
-                   NULL, OR_FILEINFO, "filename of directory header"),
-    
-    AP_INIT_FLAG("GridSiteDowngrade", mod_gridsite_flag_cmds, 
-                 NULL, OR_FILEINFO, "on or off"),
-    AP_INIT_TAKE1("GridSiteAuthCookiesDir", mod_gridsite_take1_cmds,
-                 NULL, OR_FILEINFO, "directory with Grid Auth Cookies"),
-
-    AP_INIT_FLAG("GridSiteSoap2cgi", mod_gridsite_flag_cmds,
-                 NULL, OR_FILEINFO, "on or off"),
-    {NULL}
-};
-
-static int mod_gridsite_first_fixups(request_rec *r)
-{
-    mod_gridsite_cfg *conf;
-
-    if (r->finfo.filetype != APR_DIR) return DECLINED;
-
-    conf = (mod_gridsite_cfg *)
-                    ap_get_module_config(r->per_dir_config, &gridsite_module);
-
-    /* we handle DN Lists as regular files, even if they also match
-       directory names  */
-
-    if ((conf != NULL) &&
-        (conf->dnlistsuri != NULL) &&
-        (strncmp(r->uri, conf->dnlistsuri, strlen(conf->dnlistsuri)) == 0) &&
-        (strcmp(r->uri, conf->dnlistsuri) != 0))
-      {
-        r->finfo.filetype = APR_REG; 
-      }
-
-    return DECLINED;
-}  
-
-static int mod_gridsite_perm_handler(request_rec *r)
-/*
-    Do authentication/authorization here rather than in the normal module
-    auth functions since the results of mod_ssl are available.
-
-    We also publish environment variables here if requested by GridSiteEnv.
-*/
-{
-    int          retcode = DECLINED, i, n;
-    char        *dn, *p, envname[14], *grst_cred_0 = NULL, *dir_path, 
-                *remotehost, s[99], *grst_cred_i, *file, *cookies,
-                *gridauthonetime, *cookiefile, oneline[1025], *key_i;
-    const char  *content_type;
-    time_t       now, notbefore, notafter;
-    apr_table_t *env;
-    apr_finfo_t  cookiefile_info;
-    apr_file_t  *fp;
-    GRSTgaclCred    *cred = NULL, *cred_0 = NULL;
-    GRSTgaclUser    *user = NULL;
-    GRSTgaclPerm     perm = GRST_PERM_NONE;
-    GRSTgaclAcl     *acl = NULL;
-    mod_gridsite_cfg *cfg;
-
-    cfg = (mod_gridsite_cfg *)
-                    ap_get_module_config(r->per_dir_config, &gridsite_module);
-
-    if (cfg == NULL) return DECLINED;
-
-    if ((cfg->auth == 0) &&
-        (cfg->envs == 0))
-               return DECLINED; /* if not turned on, look invisible */
-
-    env = r->subprocess_env;
-
-    if ((p = (char *) apr_table_get(r->headers_in, "Cookie")) != NULL)
-      {
-        cookies = apr_pstrcat(r->pool, " ", p, NULL);
-        gridauthonetime = strstr(cookies, " GRID_AUTH_ONETIME=");
-                
-        if (gridauthonetime != NULL)
-          {
-            for (p = &gridauthonetime[19]; (*p != '\0') && (*p != ';'); ++p)
-                                                if (!isalnum(*p)) *p = '_';
-        
-            cookiefile = apr_psprintf(r->pool, "%s/%s",
-                                      ap_server_root_relative(r->pool, 
-                                                   cfg->authcookiesdir),
-                                      &gridauthonetime[19]);
-                                      
-            if ((apr_stat(&cookiefile_info , cookiefile, 
-                          APR_FINFO_TYPE, r->pool) == APR_SUCCESS) &&
-                (cookiefile_info.filetype == APR_REG) &&
-                (apr_file_open(&fp, cookiefile, APR_READ, 0, r->pool)
-                                                         == APR_SUCCESS))
-              {
-                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
-                             "Open Grid Auth Cookie file %s", cookiefile);
-              
-                while (apr_file_gets(oneline, 
-                                     sizeof(oneline), fp) == APR_SUCCESS)
-                     {
-                       p = index(oneline, '\n');
-                       if (p != NULL) *p = '\0';
-                       
-                       ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
-                                    "%s: %s", cookiefile, oneline);
-
-                       if ((strncmp(oneline, "expires=", 8) == 0) &&
-                           (apr_time_from_sec(atoll(&oneline[8])) < 
-                                                       apr_time_now()))
-                                  break;                
-                       else if ((strncmp(oneline, "domain=", 7) == 0) &&
-                                (strcmp(&oneline[7], r->hostname) != 0))
-                                  break; /* exact needed in the version */
-                       else if ((strncmp(oneline, "path=", 5) == 0) &&
-                                (strcmp(&oneline[5], r->uri) != 0))
-                                  break;
-                       else if  (strncmp(oneline, "onetime=yes", 11) == 0)
-                                  apr_file_remove(cookiefile, r->pool);
-                       else if  (strncmp(oneline, "GRST_CRED_", 10) == 0)
-                           {
-                             grst_cred_i = index(oneline, '=');
-                             if (grst_cred_i == NULL) continue;       
-                             *grst_cred_i = '\0';
-                             ++grst_cred_i;
-
-                             i = atoi(&oneline[10]);
-                             cred = GRSTx509CompactToCred(grst_cred_i);
-                             
-                             if (cred == NULL) continue;
-
-                             if ((i == 0) && (user == NULL))
-                               {           
-                                 if (GRSTgaclCredGetDelegation(cred) 
-                                   <= ((mod_gridsite_cfg *) cfg)->gsiproxylimit)
-                                   {
-                                     user = GRSTgaclUserNew(cred);
-                                   
-                                     ap_log_error(APLOG_MARK, APLOG_DEBUG, 
-                                                  0, r->server,
-                                                  "Using identity %s from "
-                                                  "GRID_AUTH_ONETIME", 
-                                                  grst_cred_i);
-
-                                     if (((mod_gridsite_cfg *) cfg)->envs)
-                                      apr_table_setn(env, oneline, grst_cred_i);
-                                   }
-                               }
-                             else if ((i > 0) && (user != NULL))
-                               {
-                                 GRSTgaclUserAddCred(user, cred);
-                                     
-                                 if (((mod_gridsite_cfg *) cfg)->envs)
-                                       apr_table_set(env,oneline,grst_cred_i);
-                               }                             
-                           }
-                     }
-
-                apr_file_close(fp);
-              }            
-          }
-      }
-    
-    /* do we need/have per-connection (SSL) cred variable(s)? */
-
-    if ((user == NULL) && 
-        (r->connection->notes != NULL) &&
-        ((grst_cred_0 = (char *) 
-            apr_table_get(r->connection->notes, "GRST_CRED_0")) != NULL))
-      {
-        if (((mod_gridsite_cfg *) cfg)->envs)
-                            apr_table_setn(env, "GRST_CRED_0", grst_cred_0);
-                                    
-        cred_0 = GRSTx509CompactToCred(grst_cred_0);
-        if ((cred_0 != NULL) &&
-            (GRSTgaclCredGetDelegation(cred_0) 
-                         <= ((mod_gridsite_cfg *) cfg)->gsiproxylimit))
-          {
-            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
-                         "Using identity %s from SSL/TLS", grst_cred_0);
-
-            user = GRSTgaclUserNew(cred_0);
-
-            /* check for VOMS GRST_CRED_i too */
-  
-            for (i=1; ; ++i)
-               {
-                 snprintf(envname, sizeof(envname), "GRST_CRED_%d", i);
-                 if (grst_cred_i = (char *) 
-                                   apr_table_get(r->connection->notes,envname))
-                   { 
-                     if (((mod_gridsite_cfg *) cfg)->envs)
-                              apr_table_setn(env,
-                                             apr_pstrdup(r->pool, envname),
-                                             grst_cred_i);
-                                    
-                     if (cred = GRSTx509CompactToCred(grst_cred_i))
-                                        GRSTgaclUserAddCred(user, cred);
-                   }
-                 else break; /* GRST_CRED_i are numbered consecutively */
-               }
-          }
-      }
-
-    if ((user != NULL) && ((mod_gridsite_cfg *) cfg)->dnlists)
-          GRSTgaclUserSetDNlists(user, ((mod_gridsite_cfg *) cfg)->dnlists);
-
-    /* this checks for NULL arguments itself */
-    if (GRSTgaclDNlistHasUser(((mod_gridsite_cfg *) cfg)->adminlist, user))
-                                                        perm = GRST_PERM_ALL;
-    else
-      {
-        remotehost = (char *) ap_get_remote_host(r->connection,
-                                  r->per_dir_config, REMOTE_DOUBLE_REV, NULL);
-        if ((remotehost != NULL) && (*remotehost != '\0'))
-          {            
-            cred = GRSTgaclCredNew("dns");
-            GRSTgaclCredAddValue(cred, "hostname", remotehost);
-
-            if (user == NULL) user = GRSTgaclUserNew(cred);
-            else              GRSTgaclUserAddCred(user, cred);
-          }
-
-        acl = GRSTgaclAclLoadforFile(r->filename);
-        if (acl != NULL) perm = GRSTgaclAclTestUser(acl, user);
-      }
-
-    apr_table_setn(r->notes, "GRST_PERM", apr_psprintf(r->pool, "%d", perm));
-
-    if (((mod_gridsite_cfg *) cfg)->envs)
-      {
-        apr_table_setn(env, "GRST_PERM", apr_psprintf(r->pool, "%d", perm));
-
-        if (((dir_path = apr_pstrdup(r->pool, r->filename)) != NULL) &&
-            ((p = rindex(dir_path, '/')) != NULL))
-          {
-            *p = '\0';
-            apr_table_setn(env, "GRST_DIR_PATH", dir_path);
-          }
-
-        if (((mod_gridsite_cfg *) cfg)->helpuri != NULL)
-                  apr_table_setn(env, "GRST_HELP_URI",
-                              ((mod_gridsite_cfg *) cfg)->helpuri);
-
-        if (((mod_gridsite_cfg *) cfg)->adminfile != NULL)
-                  apr_table_setn(env, "GRST_ADMIN_FILE",
-                              ((mod_gridsite_cfg *) cfg)->adminfile);
-
-        if (((mod_gridsite_cfg *) cfg)->editable != NULL)
-                 apr_table_setn(env, "GRST_EDITABLE",
-                              ((mod_gridsite_cfg *) cfg)->editable);
-
-        if (((mod_gridsite_cfg *) cfg)->headfile != NULL)
-                 apr_table_setn(env, "GRST_HEAD_FILE",
-                              ((mod_gridsite_cfg *) cfg)->headfile);
-
-        if (((mod_gridsite_cfg *) cfg)->footfile != NULL)
-                 apr_table_setn(env, "GRST_FOOT_FILE",
-                              ((mod_gridsite_cfg *) cfg)->footfile);
-
-        if (((mod_gridsite_cfg *) cfg)->dnlists != NULL)
-                 apr_table_setn(env, "GRST_DN_LISTS",
-                              ((mod_gridsite_cfg *) cfg)->dnlists);
-
-        if (((mod_gridsite_cfg *) cfg)->dnlistsuri != NULL)
-                 apr_table_setn(env, "GRST_DN_LISTS_URI",
-                              ((mod_gridsite_cfg *) cfg)->dnlistsuri);
-
-        if (((mod_gridsite_cfg *) cfg)->adminlist != NULL)
-                 apr_table_setn(env, "GRST_ADMIN_LIST",
-                              ((mod_gridsite_cfg *) cfg)->adminlist);
-
-       apr_table_setn(env, "GRST_GSIPROXY_LIMIT", 
-                            apr_psprintf(r->pool, "%d", 
-                                  ((mod_gridsite_cfg *)cfg)->gsiproxylimit));
-
-        if (((mod_gridsite_cfg *) cfg)->unzip != NULL)
-                 apr_table_setn(env, "GRST_UNZIP",
-                              ((mod_gridsite_cfg *) cfg)->unzip);
-
-        if (!(((mod_gridsite_cfg *) cfg)->gridsitelink))
-                  apr_table_setn(env, "GRST_NO_LINK", "1");
-      }
-     
-    if (((mod_gridsite_cfg *) cfg)->auth)
-      {
-        /* *** Check HTTP method to decide which perm bits to check *** */
-                                  
-        if (r->filename != NULL)
-          {
-            file = rindex(r->filename, '/');
-            if (file != NULL) ++file;
-            else file = r->filename;
-          }
-        else file = NULL;
-
-        content_type = r->content_type;
-        if ((content_type != NULL) && 
-            (strcmp(content_type, DIR_MAGIC_TYPE) == 0) &&
-            (((mod_gridsite_cfg *) cfg)->dnlistsuri != NULL) &&
-            (strncmp(r->uri,
-                     ((mod_gridsite_cfg *) cfg)->dnlistsuri,
-                     strlen(((mod_gridsite_cfg *) cfg)->dnlistsuri)) == 0) &&
-            (strlen(r->uri) > strlen(((mod_gridsite_cfg *) cfg)->dnlistsuri)))
-            content_type = "text/html";
-        
-        if ( GRSTgaclPermHasNone(perm) ||
-
-            /* first two M_GET conditions make the subtle distinction
-               between .../ that maps to .../index.html (governed by
-               Read perm) or to dir list (governed by List perm);
-               third M_GET condition deals with typeless CGI requests */
-
-            ((r->method_number == M_GET) && 
-             !GRSTgaclPermHasRead(perm)  &&
-             (content_type != NULL)   &&
-             (strcmp(content_type, DIR_MAGIC_TYPE) != 0)) ||
-
-            ((r->method_number == M_GET) && 
-             !GRSTgaclPermHasList(perm)  &&
-             (content_type != NULL)   &&
-             (strcmp(content_type, DIR_MAGIC_TYPE) == 0)) ||
-
-            ((r->method_number == M_GET) && 
-             !GRSTgaclPermHasRead(perm)  &&
-             (content_type == NULL))      ||
-                                                                           
-            ((r->method_number == M_POST) && !GRSTgaclPermHasRead(perm) ) ||
-
-            (((r->method_number == M_PUT) || (r->method_number == M_DELETE)) &&
-             !GRSTgaclPermHasWrite(perm) &&
-             ((file == NULL) || (strcmp(file, GRST_ACL_FILE) != 0)) ) ||
-
-            (((r->method_number == M_PUT) || (r->method_number == M_DELETE)) &&
-             !GRSTgaclPermHasAdmin(perm) &&
-             (file != NULL)              && 
-             (strcmp(file, GRST_ACL_FILE) == 0) ) ) retcode = HTTP_FORBIDDEN;
-      }
-
-    return retcode;
-}
-
-int GRST_X509_check_issued_wrapper(X509_STORE_CTX *ctx,X509 *x,X509 *issuer)
-/* We change the default callback to use our wrapper and discard errors
-   due to GSI proxy chains (ie where users certs act as CAs) */
-{
-    int ret;
-    ret = X509_check_issued(issuer, x);
-    if (ret == X509_V_OK)
-                return 1;
-         
-    /* Non self-signed certs without signing are ok if they passed
-           the other checks inside X509_check_issued. Is this enough? */
-    if ((ret == X509_V_ERR_KEYUSAGE_NO_CERTSIGN) &&
-        (X509_NAME_cmp(X509_get_subject_name(issuer),
-                           X509_get_subject_name(x)) != 0)) return 1;
-    /* If we haven't asked for issuer errors don't set ctx */
-    if (!(ctx->flags & X509_V_FLAG_CB_ISSUER_CHECK)) return 0;
-  
-    ctx->error = ret;
-    ctx->current_cert = x;
-    ctx->current_issuer = issuer;
-    return ctx->verify_cb(0, ctx);
-}
-
-/* Later OpenSSL versions add a second pointer ... */
-int GRST_verify_cert_wrapper(X509_STORE_CTX *ctx, void *p)
-
-/* Earlier ones have a single argument ... */
-// int GRST_verify_cert_wrapper(X509_STORE_CTX *ctx)
-
-/* Before 0.9.7 we cannot change the check_issued callback directly in
-   the X509_STORE, so we must insert it in another callback that gets
-   called early enough */
-{
-   ctx->check_issued = GRST_X509_check_issued_wrapper;
-
-   return X509_verify_cert(ctx);
-}
-
-int GRST_callback_SSLVerify_wrapper(int ok, X509_STORE_CTX *ctx)
-{
-   SSL *ssl            = (SSL *) X509_STORE_CTX_get_app_data(ctx);
-   conn_rec *conn      = (conn_rec *) SSL_get_app_data(ssl);
-   server_rec *s       = conn->base_server;
-   SSLConnRec *sslconn = 
-         (SSLConnRec *) ap_get_module_config(conn->conn_config, &ssl_module);
-   int errnum          = X509_STORE_CTX_get_error(ctx);
-   int errdepth        = X509_STORE_CTX_get_error_depth(ctx);
-   int returned_ok;
-   int first_non_ca;
-
-   /*
-    * GSI Proxy user-cert-as-CA handling:
-    * we skip Invalid CA errors at this stage, since we will check this
-    * again at errdepth=0 for the full chain using GRSTx509CheckChain
-    */
-   if (errnum == X509_V_ERR_INVALID_CA)
-     {
-        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
-                    "Skip Invalid CA error in case a GSI Proxy");
-
-        sslconn->verify_error = NULL;
-        ok = TRUE;
-        errnum = X509_V_OK;
-        X509_STORE_CTX_set_error(ctx, errnum);
-     }
-
-   /*
-    * New style GSI Proxy handling, with critical ProxyCertInfo
-    * extension: we use GRSTx509KnownCriticalExts() to check this
-    */
-#ifndef X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION
-#define X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION 34
-#endif
-   if (errnum == X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION)
-     {
-       if (GRSTx509KnownCriticalExts(X509_STORE_CTX_get_current_cert(ctx))
-                                                              == GRST_RET_OK)
-         {
-            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
-                     "GRSTx509KnownCriticalExts() accepts previously "
-                     "Unhandled Critical Extension (GSI Proxy?)");
-
-            sslconn->verify_error = NULL;
-            ok = TRUE;
-            errnum = X509_V_OK;
-            X509_STORE_CTX_set_error(ctx, errnum);
-         }
-     }
-
-   returned_ok = ssl_callback_SSLVerify(ok, ctx);
-
-   /* in case ssl_callback_SSLVerify changed it */
-   errnum = X509_STORE_CTX_get_error(ctx); 
-
-   if ((errdepth == 0) && (errnum == X509_V_OK))
-   /*
-    * We've now got the last certificate - the identity being used for
-    * this connection. At this point we check the whole chain for valid
-    * CAs or, failing that, GSI-proxy validity using GRSTx509CheckChain.
-    */
-     {
-        errnum = GRSTx509CheckChain(&first_non_ca, ctx);
-
-        if (errnum != X509_V_OK)
-          {
-            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
-                     "Invalid certificate chain reported by "
-                     "GRSTx509CheckChain()");
-
-            sslconn->verify_error = X509_verify_cert_error_string(errnum);
-            ok = FALSE;
-          }
-        else 
-          {
-            int i, lastcred;
-            STACK_OF(X509) *peer_certs;
-            const int maxcreds = 99;
-            const size_t credlen = 1024;
-            char creds[maxcreds][credlen+1], envname[14];
-
-            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "Valid certificate"
-                                   " chain reported by GRSTx509CheckChain()");
-
-            /*
-             * Always put result of GRSTx509CompactCreds() into environment
-             */
-            if (peer_certs = (STACK_OF(X509) *) X509_STORE_CTX_get_chain(ctx))
-              {    
-                if (GRSTx509CompactCreds(&lastcred, maxcreds, credlen,
-                    (char *) creds, peer_certs, GRST_VOMS_DIR) == GRST_RET_OK)
-                  {
-                    for (i=0; i <= lastcred; ++i)
-                       {
-                         apr_table_setn(conn->notes,
-                                 apr_psprintf(conn->pool, "GRST_CRED_%d", i),
-                                 apr_pstrdup(conn->pool, creds[i]));
-
-                         ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
-                                      "store GRST_CRED_%d=%s", i, creds[i]);
-                       }
-                  }
-            /* free remaining dup'd certs? */
-              }                                   
-          }
-     }
-
-   return returned_ok;
-}
-
-static int mod_gridsite_server_post_config(apr_pool_t *pPool,
-                  apr_pool_t *pLog, apr_pool_t *pTemp, server_rec *main_server)
-{
-   SSL_CTX         *ctx;
-   SSLSrvConfigRec *sc;
-   server_rec      *this_server;
-
-   ap_add_version_component(pPool,
-                            apr_psprintf(pPool, "mod_gridsite/%s", VERSION));
-
-   for (this_server = main_server; 
-        this_server != NULL; 
-        this_server = this_server->next)
-      {
-        sc = ap_get_module_config(this_server->module_config, &ssl_module);
-
-        if ((sc                  != NULL)  &&
-            (sc->enabled)                  &&
-            (sc->server          != NULL)  &&
-            (sc->server->ssl_ctx != NULL))
-          {
-            ctx = sc->server->ssl_ctx;
-
-            /* in 0.9.7 we could set the issuer-checking callback directly */
-//          ctx->cert_store->check_issued = GRST_X509_check_issued_wrapper;
-     
-            /* but in case 0.9.6 we do it indirectly with another wrapper */
-            SSL_CTX_set_cert_verify_callback(ctx, 
-                                             GRST_verify_cert_wrapper,
-                                             (void *) NULL);
-
-            /* whatever version, we can set the SSLVerify wrapper properly */
-            SSL_CTX_set_verify(ctx, ctx->verify_mode, 
-                               GRST_callback_SSLVerify_wrapper);
-
-            if (main_server->loglevel >= APLOG_DEBUG)
-                 ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, main_server,
-                      "Set mod_ssl verify callbacks to GridSite wrappers");
-          }
-      }
-      
-   return OK;
-}
-      
-static void mod_gridsite_child_init(apr_pool_t *pPool, server_rec *pServer)
-{
-   GRSTgaclInit();
-}
-
-static int mod_gridsite_handler(request_rec *r)
-{
-   mod_gridsite_cfg *conf;
-    
-   conf = (mod_gridsite_cfg *)
-                    ap_get_module_config(r->per_dir_config, &gridsite_module);
-
-   if ((conf->dnlistsuri != NULL) &&
-       (strncmp(r->uri, conf->dnlistsuri, strlen(conf->dnlistsuri)) == 0))
-     {
-       if (strcmp(r->uri, conf->dnlistsuri) == 0)
-              return mod_gridsite_dnlistsuri_dir_handler(r, conf);
-
-       return mod_gridsite_dnlistsuri_handler(r, conf);
-    }
-
-   if (strcmp(r->handler, DIR_MAGIC_TYPE) == 0)
-                   return mod_gridsite_dir_handler(r, conf);
-   
-   return mod_gridsite_nondir_handler(r, conf);
-}
-
-static void register_hooks(apr_pool_t *p)
-{
-    /* set up the Soap2cgi input and output filters */
-
-    ap_hook_insert_filter(mod_gridsite_soap2cgi_insert, NULL, NULL,
-                          APR_HOOK_MIDDLE);
-
-    ap_register_output_filter(Soap2cgiFilterName, mod_gridsite_soap2cgi_out,
-                              NULL, AP_FTYPE_RESOURCE);
-
-//    ap_register_input_filter(Soap2cgiFilterName, mod_gridsite_soap2cgi_in,
-//                              NULL, AP_FTYPE_RESOURCE);
-
-    /* config and handler stuff */
-
-    ap_hook_post_config(mod_gridsite_server_post_config, NULL, NULL, 
-                                                              APR_HOOK_LAST);
-    ap_hook_child_init(mod_gridsite_child_init, NULL, NULL, APR_HOOK_MIDDLE);
-
-    ap_hook_fixups(mod_gridsite_first_fixups,NULL,NULL,APR_HOOK_FIRST);
-    
-    ap_hook_fixups(mod_gridsite_perm_handler,NULL,NULL,APR_HOOK_REALLY_LAST);
-    
-    ap_hook_handler(mod_gridsite_handler, NULL, NULL, APR_HOOK_FIRST);    
-}
-
-module AP_MODULE_DECLARE_DATA gridsite_module =
-{
-    STANDARD20_MODULE_STUFF,
-    create_gridsite_dir_config, /* dir config creater */
-    merge_gridsite_dir_config,  /* dir merger */
-    NULL,                       /* server config */
-    NULL,                       /* merge server config */
-    mod_gridsite_cmds,          /* command apr_table_t */
-    register_hooks              /* register hooks */
-};
diff --git a/org.gridsite.core/src/mod_ssl-private.h b/org.gridsite.core/src/mod_ssl-private.h
deleted file mode 100644 (file)
index 7b0b784..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
-   Copyright (c) 2003-4, Andrew McNab, University of Manchester
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or
-   without modification, are permitted provided that the following
-   conditions are met:
-
-     o Redistributions of source code must retain the above
-       copyright notice, this list of conditions and the following
-       disclaimer. 
-     o Redistributions in binary form must reproduce the above
-       copyright notice, this list of conditions and the following
-       disclaimer in the documentation and/or other materials
-       provided with the distribution. 
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-   CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-   BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-   TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-   ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-   POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
-
- Portions of this code are derived from Apache mod_ssl, and are covered
- by the Apache Software License:
-
- * Copyright 2001-2004 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*------------------------------------------------------------------*
- * This program is part of GridSite: http://www.gridsite.org/       *
- *------------------------------------------------------------------*/
-
-
-/*
- * After 2.0.49, Apache mod_ssl has most of the mod_ssl structures defined
- * in ssl_private.h, which is not installed along with httpd-devel (eg in
- * the FC2 RPM.) This include file provides SIMPLIFIED structures for use
- * by mod_gridsite: for example, pointers to unused structures are replaced
- * by  void *  and some of the structures are truncated when only the early
- * members are used.
- *
- * CLEARLY, THIS WILL BREAK IF THERE ARE MAJOR CHANGES TO ssl_private.h!!!
- */
-
-#include <openssl/ssl.h>
-
-typedef enum {
-    SSL_SHUTDOWN_TYPE_UNSET,
-    SSL_SHUTDOWN_TYPE_STANDARD,
-    SSL_SHUTDOWN_TYPE_UNCLEAN,
-    SSL_SHUTDOWN_TYPE_ACCURATE
-} ssl_shutdown_type_e;
-
-typedef struct {
-  SSL *ssl;
-  const char *client_dn;
-  X509 *client_cert;
-  ssl_shutdown_type_e shutdown_type;
-  const char *verify_info;
-  const char *verify_error;
-  int verify_depth;
-  int is_proxy;
-  int disabled;
-  int non_ssl_request;
-} SSLConnRec;
-
-typedef struct {
-  void    *sc; /* pointer back to server config */
-  SSL_CTX *ssl_ctx;
-} modssl_ctx_t;
-
-typedef struct {
-  void            *mc;
-  unsigned int     enabled;
-  unsigned int     proxy_enabled;
-  const char      *vhost_id;
-  int              vhost_id_len;
-  int              session_cache_timeout;
-  modssl_ctx_t    *server;
-  modssl_ctx_t    *proxy;
-} SSLSrvConfigRec;
-
-extern module AP_MODULE_DECLARE_DATA ssl_module;
diff --git a/org.gridsite.core/src/proxyput-example.c b/org.gridsite.core/src/proxyput-example.c
deleted file mode 100644 (file)
index f0fe834..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
-   Copyright (c) 2002-4, Andrew McNab, University of Manchester
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or
-   without modification, are permitted provided that the following
-   conditions are met:
-
-     o Redistributions of source code must retain the above
-       copyright notice, this list of conditions and the following
-       disclaimer. 
-     o Redistributions in binary form must reproduce the above
-       copyright notice, this list of conditions and the following
-       disclaimer in the documentation and/or other materials
-       provided with the distribution. 
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-   CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-   BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-   TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-   ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-   POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/* 
-    Change the hard-coded defaults below to your set up. 
-*/
-
-#define LOCALPROXY     "/tmp/x509up"
-#define DELEGATIONURL  "https://testing.hep.man.ac.uk/gridsite-delegation.cgi"
-#define CAPATH         "/etc/grid-security/certificates"
-#define DELEGATIONID    "1234567890"
-#define EXPIREMINUTES  60 
-  
-#ifndef VERSION
-#define VERSION "0.0.0"
-#endif
-
-#define _GNU_SOURCE
-
-#include <stdio.h>
-#include <string.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-#include <openssl/x509.h>
-#include <openssl/x509v3.h>
-#include <openssl/err.h>
-#include <openssl/pem.h>
-
-#include "gridsite.h"
-
-#include "soapH.h"
-#include "delegation.nsmap"
-
-int main(int argc, char *argv[])
-{
-  char *reqtxt, *certtxt;
-  struct ns__putProxyResponse *unused;
-  struct soap soap_get, soap_put;
-  ERR_load_crypto_strings ();
-  OpenSSL_add_all_algorithms();
-
-  soap_init(&soap_get);
-  
-  if (soap_ssl_client_context(&soap_get,
-                                  SOAP_SSL_DEFAULT,
-                                  LOCALPROXY, 
-                                  "",
-                                  NULL,
-                                  CAPATH,
-                                  NULL))
-        {
-          soap_print_fault(&soap_get, stderr);
-          return 1;
-        } 
-
-  soap_call_ns__getProxyReq(&soap_get, 
-                                DELEGATIONURL, /* HTTPS url of service */
-                                "",            /* no password on proxy */
-                                DELEGATIONID, 
-                                &reqtxt);
-      
-  if (soap_get.error)
-    {
-          soap_print_fault(&soap_get, stderr);
-          return 1;        
-    }
-        
-  if (GRSTx509MakeProxyCert(&certtxt, stderr, reqtxt, 
-                            LOCALPROXY, LOCALPROXY, EXPIREMINUTES) 
-          != GRST_RET_OK)
-    {
-          return 1;
-    }
-
-  soap_init(&soap_put);
-  
-  if (soap_ssl_client_context(&soap_put,
-                                  SOAP_SSL_DEFAULT,
-                                  LOCALPROXY, 
-                                  "",
-                                  NULL,
-                                  CAPATH,
-                                  NULL))
-        {
-          soap_print_fault(&soap_put, stderr);
-          return 1;
-        } 
-
-  soap_call_ns__putProxy(&soap_put, DELEGATIONURL, "", DELEGATIONID, 
-                             certtxt, unused);      
-  if (soap_put.error)
-    {
-          soap_print_fault(&soap_put, stderr);
-          return 1;        
-    }
-
-  return 0;
-}
-
diff --git a/org.gridsite.core/src/real-gridsite-admin.cgi b/org.gridsite.core/src/real-gridsite-admin.cgi
deleted file mode 100644 (file)
index 74a0010..0000000
Binary files a/org.gridsite.core/src/real-gridsite-admin.cgi and /dev/null differ
diff --git a/org.gridsite.core/src/roffit b/org.gridsite.core/src/roffit
deleted file mode 100755 (executable)
index d1c7263..0000000
+++ /dev/null
@@ -1,370 +0,0 @@
-#!/usr/bin/env perl 
-#
-# roffit: convert man page source files to HTML
-#
-# Read an nroff file. Output a HTML file.
-#
-# This is a very simple script, but I use it on very simple man pages and I've
-# found no other script that makes beautiful web pages.
-#
-my $version = "0.3"; # (14 November 2003)
-# Author:  Daniel Stenberg <daniel@haxx.se>
-# Please email me improvements.
-#
-# You're free to do whatever you want with this script.
-#
-# Changes:
-#
-# 0.3 - Daniel Fandrich brought:
-#     o deal with .lp lines
-#     o .TH needs no section portion anymore
-#     o added generator meta tag in the header
-#
-# 0.2 - fixed the <a name> name for the SH section
-#     - added <a href> links from all words within \fIthis\fP or \fBthis\fP
-#       that has the same text as a .SH or .IP.
-#
-
-use strict;
-#use warnings;
-
-my $InFH = \*STDIN;
-my $OutFH = \*STDOUT;
-my $debugFH = \*STDERR;
-
-my %manpage;
-my @out;
-
-my $indentlevel=0; # logical levels, not columns
-my @p;
-my $within_tp;
-my $standalone=1; # by default we make stand-alone HTML pages
-my $pre;
-my %anchor; # hash with all anchors
-
-while($ARGV[0]) {
-    if($ARGV[0] eq "--bare") {
-        # don't include headers and stuff
-        $standalone=0;
-        shift @ARGV;
-    }
-    else {
-        printf $debugFH "unknown option: %s\n", $ARGV[0] if($ARGV[0] ne "-h");
-        print $debugFH "Usage: roffit [options] < infile > outfile\n",
-        "Options:\n",
-        "  --bare   Do not put in HTML, HEAD, BODY tags\n";
-        exit;
-    }
-}
-
-sub showp {
-    my @p = @_;
-    push @out, "\n<p class=\"level$indentlevel\">", @p;
-}
-
-sub defaultcss {
-    print $OutFH <<ENDOFCSS
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-ENDOFCSS
-    ;
-}
-
-sub text2name {
-    my ($text) = @_;
-    $text =~ s/^ *([^ ]*).*/$1/g;
-    $text =~ s/[^a-zA-Z0-9-]//g;
-    return $text;
-}
-
-# scan through the file and check for <span> sections we should convert
-# to proper links
-sub linkfile {
-    my @new;
-    for(@out) {
-        my $line=$_;
-        my $l;
-        while($line =~ s/<span class=\"(emphasis|bold)\">([^<]*)<\/span>/[]/) {
-            my ($style, $name)=($1, $2);
-            
-            $l = text2name($name);
-
-            #printf $debugFH "$style - $name - %s - %d\n",
-            #$l, $anchor{$l};
-
-            my $link;
-            if($anchor{$l}) {
-                $link="<a class=\"$style\" href=\"#$l\">$name</a>";
-            }
-            else {
-                $link="<span Class=\"$style\">$name</span>";
-            }
-            $line =~ s/\[\]/$link/;
-        }
-        push @new, $line;
-    }
-    return @new;
-}
-
-sub parsefile {
-
-    while(<$InFH>) {
-        my $in = $_;
-        my $out;
-  #     print $debugFH "DEBUG IN: $_";
-
-        $in =~ s/[\r\n]//g if(!$pre); # tear off newlines
-
-        if($in =~ /^\.([^ \n]*)(.*)/) {
-            # this is a line starting with a dot, that means it is special
-            my ($keyword, $rest) = ($1, $2);
-            $out = "";
-            
-            # cut off initial spaces
-            $rest =~ s/^ +//g;
-            
-            if($keyword eq "\\\"") {
-                # this is a comment, skip this line
-            }
-            elsif($keyword =~ /^TH$/i) {
-                # man page header:
-                # curl 1 "22 Oct 2003" "Curl 7.10.8" "Curl Manual"
-                # NAME SECTION DATE VERSION MANUAL
-                if($rest =~ /([^ ]*) (\d+) \"([^\"]*)\" \"([^\"]*)\"(\"([^\"]*)\")?/) {
-                    # strict matching only so far
-                    $manpage{'name'} = $1;
-                    $manpage{'section'} = $2;
-                    $manpage{'date'} = $3;
-                    $manpage{'version'} = $4;
-                    $manpage{'manual'} = $6;
-                }
-            }
-            elsif($keyword =~ /^SH$/i) {
-                # Section Header
-                showp(@p);
-                @p="";
-                if($pre) {
-                    push @out, "</pre>\n";
-                    $pre = 0;
-                }
-
-                my $name = text2name($rest);
-                $anchor{$name}=1;
-
-                $rest =~ s/\"//g; # cut off quotes
-                $rest =~ s/</&lt;/g;
-                $rest =~ s/>/&gt;/g;
-                $out = "<a name=\"$name\"></a><h2 class=\"nroffsh\">$rest</h2>";
-                $indentlevel=0;
-                $within_tp=0;
-            }
-            elsif(($keyword =~ /^B$/i) || ($keyword =~ /^BI$/i)) {
-                # Make B and BI the same for simplicity
-                $rest =~ s/\"//g; # cut off quotes
-                $rest =~ s/</&lt;/g;
-                $rest =~ s/>/&gt;/g;
-                push @p, "<span class=\"bold\">$rest</span> ";
-            }
-            elsif($keyword =~ /^I$/i) {
-                $rest =~ s/\"//g; # cut off quotes
-                $rest =~ s/</&lt;/g;
-                $rest =~ s/>/&gt;/g;
-                push @p, "<span class=\"emphasis\">$rest</span> ";
-            }
-            elsif($keyword =~ /^RS$/i) {
-                # the start of another indent-level. for inlined tables
-                # within an "IP"
-                showp(@p);
-                @p="";
-                $indentlevel++;
-            }
-            elsif($keyword =~ /^RE$/i) {
-                # end of the RS section
-                showp(@p);
-                @p="";
-                $indentlevel--;
-            }
-            elsif($keyword =~ /^NF$/i) {
-                # We let nf start a <pre> section
-                showp(@p);
-                @p="";
-                push @out, "<pre>\n";
-                $pre=1
-            }
-            elsif($keyword =~ /^TP$/i) {
-                # Used within an "RS" section to make a new line. The first
-                # TP as a column indicator, but we decide to do that
-                # controlling in the CSS instead.
-                $within_tp=1;
-                showp(@p);
-                @p="";                
-            }
-            elsif($keyword =~ /^IP$/i) {
-                # start of a new paragraph coming up
-                showp(@p);
-                @p="";
-
-                my $name= text2name($rest);
-                $anchor{$name}=1;
-
-                $rest =~ s/\"//g; # cut off quotes
-                $rest =~ s/</&lt;/g;
-                $rest =~ s/>/&gt;/g;
-                
-                $indentlevel-- if ($indentlevel);
-                push @p, "<a name=\"$name\"></a><span class=\"nroffip\">$rest</span> ";
-                # make this a single-line title
-                showp(@p);
-                @p="";
-                $indentlevel++;
-                $within_tp=0;
-            }
-            elsif($keyword =~ /^ad$/i) {
-                showp(@p);
-                @p="";
-            }
-            elsif($keyword =~ /^sp$/i) {
-                showp(@p);
-                @p="";
-            }
-            elsif($keyword =~ /^lp$/i) {
-                # marks end of a paragraph
-                showp(@p);
-                @p="";
-            }
-            elsif($keyword =~ /^pp$/i) {
-                # PP ends a TP section, but some TP sections don't use it
-                $within_tp=0;
-            }
-            elsif($keyword =~ /^so$/i) {
-                # This keyword refers to a different man page, named in the
-                # $rest.
-                # We don't support this
-                push @out, "See the $rest man page.\n";
-            }
-            elsif($keyword =~ /^BR$/i) {
-                # I'm not sure what this does exactly, but this is commonly
-                # used to include pointers to other man pages. Let's assume
-                # it only does that for now.
-                # blabla (3)
-                # or "blabla (3)"
-                # or strcmp "(3), " strcasecmp "(3)"
-                # etc
-                
-                $rest =~ s/\"//g; # cut off quotes
-                my @all = split /,/, $rest;
-                for(@all) {
-                    if(/([^ ]*) *\((\d+)\)/) {
-                        # TODO: this looks like a man page, check if there's a
-                        # HTML file for it and if so make a link to it
-                    }
-
-                    push @p, "<span class=\"manpage\">$_</span> ";
-                }
-            }
-            else {
-                showp(@p);
-                print $debugFH "ALERT: unknown keyword \"$keyword\"\n";
-            }
-        }
-        else {
-            # text line, decode \-stuff
-            my $txt = $in;
-
-            $txt =~ s/</&lt;/g;
-            $txt =~ s/>/&gt;/g;
-            $txt =~ s/\\&//g; # cut off \&
-            $txt =~ s/\\fI/<span class=\"emphasis\">/g;
-            $txt =~ s/\\fB/<span class=\"bold\">/g;
-            $txt =~ s/\\fP/<\/span>/g;
-            $txt =~ s/\\//g;
-
-            if($txt =~ /^[ \t\r\n]*$/) {
-                # no contents, marks end of a paragraph
-                showp(@p);
-                @p="";
-            }
-            else {
-                $txt =~ s/^ /\&nbsp\;/g;
-                push @p, "$txt ";
-            }
-            $out ="";
-        }
-
-        if($out) {
-            push @out, $out;
-   #         print $debugFH "DEBUG OUT: $out\n";
-        }
-        else {
-   #         print $debugFH "DEBUG OUT: [withheld]\n";
-        }
-    }
-    showp(@p);
-}
-
-parsefile();
-
-my @conv = linkfile();
-
-my $title=sprintf("%s man page",
-                  $manpage{'name'}?$manpage{'name'}:"secret");
-
-if($standalone) {
-    print $OutFH <<MOO
-<html><head>
-<title>$title</title>
-<meta name="generator" content="roffit $version">
-MOO
-    ;
-    defaultcss();
-    print "</head><body>\n";
-}
-
-print $OutFH @conv;
-print $OutFH <<ROFFIT
-<p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-ROFFIT
-    ;
-
-if($standalone) {
-    print "</body></html>\n";
-}
diff --git a/org.gridsite.core/src/urlencode.c b/org.gridsite.core/src/urlencode.c
deleted file mode 100644 (file)
index bea36a9..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-   Copyright (c) 2002-3, Andrew McNab, University of Manchester
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or
-   without modification, are permitted provided that the following
-   conditions are met:
-
-     o Redistributions of source code must retain the above
-       copyright notice, this list of conditions and the following
-       disclaimer. 
-     o Redistributions in binary form must reproduce the above
-       copyright notice, this list of conditions and the following
-       disclaimer in the documentation and/or other materials
-       provided with the distribution. 
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-   CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-   BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-   TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-   ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-   POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*---------------------------------------------------------------*
- * For more about GridSite: http://www.gridsite.org/             *
- *---------------------------------------------------------------*/
-
-#include <stdio.h>
-#include <string.h>
-
-#include "gridsite.h"
-
-int main(int argn, char *argv[])
-{
-  int    i;
-
-  if (argn == 1)
-    {
-      puts("urlencode [-m|-d] string-to-encode-or-decode");
-      return 0;
-    }
-
-  if      (strcmp(argv[1], "-d") == 0) /* decode */
-   for (i = 2; i < argn; ++i) 
-      {
-        if (i > 2) fputs(" ", stdout);
-        fputs(GRSThttpUrlDecode(argv[i]), stdout);
-      }
-  else if (strcmp(argv[1], "-m") == 0) /* mild encode */
-   for (i = 2; i < argn; ++i) 
-      {
-        if (i > 2) fputs("%20", stdout);
-        fputs(GRSThttpUrlMildencode(argv[i]), stdout);
-      }
-  else /* standard encode */
-   for (i = 1; i < argn; ++i) 
-      {
-        if (i > 1) fputs("%20", stdout);
-        fputs(GRSThttpUrlEncode(argv[i]), stdout);
-      }
-
-  puts("");
-
-  return 0;
-}