Merge lp:~lynxman/ubuntu/quantal/rabbitmq-server/rabbitmqserver282merge into lp:ubuntu/quantal/rabbitmq-server
- Quantal (12.10)
- rabbitmqserver282merge
- Merge into quantal
Proposed by
Marc Cluet
Status: | Merged | ||||
---|---|---|---|---|---|
Merge reported by: | Clint Byrum | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp:~lynxman/ubuntu/quantal/rabbitmq-server/rabbitmqserver282merge | ||||
Merge into: | lp:ubuntu/quantal/rabbitmq-server | ||||
Diff against target: |
30611 lines (+11536/-9238) 394 files modified
.pc/.version (+0/-1) .pc/applied-patches (+0/-1) .pc/inets-plugins.patch/plugins-src/erlang-rfc4627-wrapper/erlang-rfc4627-git/src/rfc4627_jsonrpc_inets.erl (+0/-167) LICENSE (+12/-12) LICENSE-MPL-RabbitMQ (+1/-1) Makefile (+15/-14) codegen.py (+2/-2) codegen/LICENSE-MPL-RabbitMQ (+1/-1) codegen/amqp-rabbitmq-0.8.json (+1/-1) codegen/amqp-rabbitmq-0.9.1.json (+1/-1) codegen/amqp_codegen.py (+1/-1) codegen/demo_extension.json (+1/-1) codegen/license_info (+1/-1) debian/LICENSE.head (+5/-0) debian/LICENSE.tail (+516/-0) debian/changelog (+45/-0) debian/copyright (+73/-15) debian/rabbitmq-script-wrapper (+2/-2) debian/rabbitmq-server.default (+9/-0) debian/rabbitmq-server.ocf (+1/-1) docs/html-to-website-xml.xsl (+19/-27) docs/rabbitmq-echopid.xml (+71/-0) docs/rabbitmqctl.1.xml (+41/-13) ebin/rabbit_app.in (+5/-1) include/gm_specs.hrl (+1/-1) include/rabbit.hrl (+5/-12) include/rabbit_auth_backend_spec.hrl (+0/-31) include/rabbit_auth_mechanism_spec.hrl (+0/-28) include/rabbit_backing_queue_spec.hrl (+0/-66) include/rabbit_exchange_type_spec.hrl (+0/-38) include/rabbit_msg_store.hrl (+1/-1) include/rabbit_msg_store_index.hrl (+0/-45) plugins-src/Makefile (+3/-2) plugins-src/do-package.mk (+4/-4) plugins-src/eldap-wrapper/eldap-git/doc/draft-ietf-asid-ldap-c-api-00.txt (+0/-3030) plugins-src/eldap-wrapper/package.mk (+1/-1) plugins-src/eldap-wrapper/remove-ietf-doc.patch (+3036/-0) plugins-src/erlando/README.md (+5/-3) plugins-src/erlando/package.mk (+0/-1) plugins-src/erlando/src/monad.erl (+8/-6) plugins-src/erlando/test/erlando_test.erl (+1/-1) plugins-src/erlando/test/src/test_do.erl (+1/-1) plugins-src/erlang-rfc4627-wrapper/erlang-rfc4627-git/src/rfc4627_jsonrpc_inets.erl (+8/-1) plugins-src/erlang-rfc4627-wrapper/erlang-rfc4627-git/src/rfc4627_jsonrpc_registry.erl (+1/-1) plugins-src/erlang-rfc4627-wrapper/fix-ets-leak.patch (+13/-0) plugins-src/erlang-rfc4627-wrapper/package.mk (+2/-0) plugins-src/licensing/LICENSE-MPL-RabbitMQ (+1/-1) plugins-src/mochiweb-wrapper/mochiweb-git/src/mochiweb_request.erl.orig (+0/-715) plugins-src/rabbitmq-auth-backend-ldap/README (+43/-12) plugins-src/rabbitmq-auth-backend-ldap/package.mk (+1/-1) plugins-src/rabbitmq-auth-backend-ldap/src/rabbit_auth_backend_ldap.erl (+75/-54) plugins-src/rabbitmq-auth-backend-ldap/src/rabbit_auth_backend_ldap_app.erl (+14/-29) plugins-src/rabbitmq-auth-backend-ldap/src/rabbit_auth_backend_ldap_sup.erl (+14/-29) plugins-src/rabbitmq-auth-backend-ldap/src/rabbit_auth_backend_ldap_util.erl (+14/-29) plugins-src/rabbitmq-auth-backend-ldap/src/rabbitmq_auth_backend_ldap.app.src (+4/-2) plugins-src/rabbitmq-auth-backend-ldap/test/src/rabbit_auth_backend_ldap_test.erl (+1/-1) plugins-src/rabbitmq-auth-mechanism-ssl/README (+20/-2) plugins-src/rabbitmq-auth-mechanism-ssl/src/rabbit_auth_mechanism_ssl.erl (+20/-53) plugins-src/rabbitmq-auth-mechanism-ssl/src/rabbit_auth_mechanism_ssl_app.erl (+14/-29) plugins-src/rabbitmq-auth-mechanism-ssl/src/rabbitmq_auth_mechanism_ssl.app.src (+1/-1) plugins-src/rabbitmq-consistent-hash-exchange/LICENSE-MPL-RabbitMQ (+1/-1) plugins-src/rabbitmq-consistent-hash-exchange/src/rabbit_exchange_type_consistent_hash.erl (+1/-2) plugins-src/rabbitmq-consistent-hash-exchange/test/src/rabbit_exchange_type_consistent_hash_test.erl (+1/-1) plugins-src/rabbitmq-erlang-client/Makefile (+7/-4) plugins-src/rabbitmq-erlang-client/Makefile.in (+1/-1) plugins-src/rabbitmq-erlang-client/README (+0/-181) plugins-src/rabbitmq-erlang-client/README.in (+11/-0) plugins-src/rabbitmq-erlang-client/common.mk (+1/-2) plugins-src/rabbitmq-erlang-client/include/amqp_client.hrl (+1/-1) plugins-src/rabbitmq-erlang-client/include/amqp_gen_consumer_spec.hrl (+3/-1) plugins-src/rabbitmq-erlang-client/rabbit_common.app.in (+2/-0) plugins-src/rabbitmq-erlang-client/src/amqp_auth_mechanisms.erl (+1/-1) plugins-src/rabbitmq-erlang-client/src/amqp_channel.erl (+119/-61) plugins-src/rabbitmq-erlang-client/src/amqp_channel_sup.erl (+4/-3) plugins-src/rabbitmq-erlang-client/src/amqp_channel_sup_sup.erl (+1/-1) plugins-src/rabbitmq-erlang-client/src/amqp_channels_manager.erl (+19/-5) plugins-src/rabbitmq-erlang-client/src/amqp_client.erl (+1/-1) plugins-src/rabbitmq-erlang-client/src/amqp_connection.erl (+1/-1) plugins-src/rabbitmq-erlang-client/src/amqp_connection_sup.erl (+1/-1) plugins-src/rabbitmq-erlang-client/src/amqp_connection_type_sup.erl (+1/-1) plugins-src/rabbitmq-erlang-client/src/amqp_direct_connection.erl (+15/-5) plugins-src/rabbitmq-erlang-client/src/amqp_direct_consumer.erl (+1/-1) plugins-src/rabbitmq-erlang-client/src/amqp_gen_connection.erl (+13/-8) plugins-src/rabbitmq-erlang-client/src/amqp_gen_consumer.erl (+1/-1) plugins-src/rabbitmq-erlang-client/src/amqp_main_reader.erl (+37/-35) plugins-src/rabbitmq-erlang-client/src/amqp_network_connection.erl (+3/-3) plugins-src/rabbitmq-erlang-client/src/amqp_rpc_client.erl (+1/-1) plugins-src/rabbitmq-erlang-client/src/amqp_rpc_server.erl (+1/-1) plugins-src/rabbitmq-erlang-client/src/amqp_selective_consumer.erl (+1/-1) plugins-src/rabbitmq-erlang-client/src/amqp_sup.erl (+1/-1) plugins-src/rabbitmq-erlang-client/src/amqp_uri.erl (+1/-1) plugins-src/rabbitmq-erlang-client/src/overview.edoc.in (+1/-1) plugins-src/rabbitmq-erlang-client/src/uri_parser.erl (+1/-1) plugins-src/rabbitmq-erlang-client/test.mk (+1/-1) plugins-src/rabbitmq-erlang-client/test/Makefile (+1/-1) plugins-src/rabbitmq-erlang-client/test/amqp_client_SUITE.erl (+8/-3) plugins-src/rabbitmq-erlang-client/test/amqp_dbg.erl (+1/-1) plugins-src/rabbitmq-erlang-client/test/negative_test_util.erl (+3/-3) plugins-src/rabbitmq-erlang-client/test/test_util.erl (+30/-2) plugins-src/rabbitmq-federation-management/Makefile (+1/-0) plugins-src/rabbitmq-federation-management/README (+8/-0) plugins-src/rabbitmq-federation-management/package.mk (+7/-0) plugins-src/rabbitmq-federation-management/priv/www/js/federation.js (+11/-0) plugins-src/rabbitmq-federation-management/priv/www/js/tmpl/federation-links.ejs (+64/-0) plugins-src/rabbitmq-federation-management/src/rabbit_federation_mgmt.erl (+100/-0) plugins-src/rabbitmq-federation-management/src/rabbitmq_federation_management.app.src (+8/-0) plugins-src/rabbitmq-federation/Makefile (+2/-0) plugins-src/rabbitmq-federation/README (+4/-273) plugins-src/rabbitmq-federation/etc/hare-no-federation.config (+1/-0) plugins-src/rabbitmq-federation/etc/no_plugins (+1/-0) plugins-src/rabbitmq-federation/include/rabbit_federation.hrl (+4/-2) plugins-src/rabbitmq-federation/src/rabbit_federation_app.erl (+1/-1) plugins-src/rabbitmq-federation/src/rabbit_federation_db.erl (+1/-1) plugins-src/rabbitmq-federation/src/rabbit_federation_exchange.erl (+9/-19) plugins-src/rabbitmq-federation/src/rabbit_federation_link.erl (+122/-74) plugins-src/rabbitmq-federation/src/rabbit_federation_link_sup.erl (+1/-1) plugins-src/rabbitmq-federation/src/rabbit_federation_link_sup_sup.erl (+50/-0) plugins-src/rabbitmq-federation/src/rabbit_federation_status.erl (+91/-0) plugins-src/rabbitmq-federation/src/rabbit_federation_sup.erl (+13/-20) plugins-src/rabbitmq-federation/src/rabbit_federation_upstream.erl (+2/-1) plugins-src/rabbitmq-federation/src/rabbit_federation_upstream_exchange.erl (+62/-0) plugins-src/rabbitmq-federation/src/rabbit_federation_util.erl (+20/-2) plugins-src/rabbitmq-federation/test/src/rabbit_federation_test.erl (+62/-4) plugins-src/rabbitmq-federation/test/src/rabbit_federation_unit_test.erl (+1/-24) plugins-src/rabbitmq-jsonrpc-channel-examples/src/rabbit_jsonrpc_channel_test_app.erl (+16/-0) plugins-src/rabbitmq-jsonrpc-channel/README (+10/-4) plugins-src/rabbitmq-jsonrpc-channel/priv/www/jsonrpc.js (+14/-29) plugins-src/rabbitmq-jsonrpc-channel/priv/www/rabbitmq-jquery.js (+14/-30) plugins-src/rabbitmq-jsonrpc-channel/priv/www/rabbitmq-prototype.js (+14/-30) plugins-src/rabbitmq-jsonrpc-channel/priv/www/rabbitmq.js (+14/-30) plugins-src/rabbitmq-jsonrpc-channel/src/rabbit_jsonrpc_channel.erl (+16/-30) plugins-src/rabbitmq-jsonrpc-channel/src/rabbit_jsonrpc_channel_app.erl (+16/-0) plugins-src/rabbitmq-jsonrpc-channel/src/rabbit_jsonrpc_channel_app_sup.erl (+16/-30) plugins-src/rabbitmq-jsonrpc-channel/src/rabbit_jsonrpc_channel_factory.erl (+16/-30) plugins-src/rabbitmq-jsonrpc-channel/src/rabbit_jsonrpc_channel_sup.erl (+16/-30) plugins-src/rabbitmq-jsonrpc/src/rabbit_jsonrpc.erl (+16/-0) plugins-src/rabbitmq-management-agent/src/rabbit_mgmt_agent_app.erl (+1/-1) plugins-src/rabbitmq-management-agent/src/rabbit_mgmt_agent_sup.erl (+1/-1) plugins-src/rabbitmq-management-agent/src/rabbit_mgmt_db_handler.erl (+1/-1) plugins-src/rabbitmq-management-agent/src/rabbit_mgmt_external_stats.erl (+52/-27) plugins-src/rabbitmq-management-visualiser/LICENSE-MPL-RabbitMQ (+1/-1) plugins-src/rabbitmq-management-visualiser/priv/www/visualiser/js/model.js (+0/-1) plugins-src/rabbitmq-management-visualiser/src/rabbit_mgmt_wm_all.erl (+1/-1) plugins-src/rabbitmq-management-visualiser/src/rabbit_visualiser_mgmt.erl (+1/-1) plugins-src/rabbitmq-management/LICENSE-MPL-RabbitMQ (+1/-1) plugins-src/rabbitmq-management/Makefile (+22/-19) plugins-src/rabbitmq-management/bin/rabbitmqadmin (+217/-71) plugins-src/rabbitmq-management/etc/bunny.config (+1/-0) plugins-src/rabbitmq-management/include/rabbit_mgmt.hrl (+1/-1) plugins-src/rabbitmq-management/package.mk (+1/-0) plugins-src/rabbitmq-management/priv/www/api/index.html (+8/-3) plugins-src/rabbitmq-management/priv/www/css/main.css (+3/-0) plugins-src/rabbitmq-management/priv/www/js/dispatcher.js (+6/-1) plugins-src/rabbitmq-management/priv/www/js/formatters.js (+86/-23) plugins-src/rabbitmq-management/priv/www/js/global.js (+11/-5) plugins-src/rabbitmq-management/priv/www/js/help.js (+12/-1) plugins-src/rabbitmq-management/priv/www/js/main.js (+4/-1) plugins-src/rabbitmq-management/priv/www/js/tmpl/channels-list.ejs (+2/-3) plugins-src/rabbitmq-management/priv/www/js/tmpl/connection.ejs (+6/-2) plugins-src/rabbitmq-management/priv/www/js/tmpl/connections.ejs (+6/-4) plugins-src/rabbitmq-management/priv/www/js/tmpl/exchange.ejs (+2/-53) plugins-src/rabbitmq-management/priv/www/js/tmpl/exchanges.ejs (+8/-2) plugins-src/rabbitmq-management/priv/www/js/tmpl/node.ejs (+25/-3) plugins-src/rabbitmq-management/priv/www/js/tmpl/overview.ejs (+76/-10) plugins-src/rabbitmq-management/priv/www/js/tmpl/permissions.ejs (+8/-9) plugins-src/rabbitmq-management/priv/www/js/tmpl/publish.ejs (+63/-0) plugins-src/rabbitmq-management/priv/www/js/tmpl/queue.ejs (+2/-0) plugins-src/rabbitmq-management/priv/www/js/tmpl/queues.ejs (+11/-3) plugins-src/rabbitmq-management/priv/www/js/tmpl/user.ejs (+48/-0) plugins-src/rabbitmq-management/priv/www/js/tmpl/users.ejs (+9/-7) plugins-src/rabbitmq-management/src/rabbit_mgmt_app.erl (+1/-1) plugins-src/rabbitmq-management/src/rabbit_mgmt_db.erl (+4/-11) plugins-src/rabbitmq-management/src/rabbit_mgmt_dispatcher.erl (+1/-1) plugins-src/rabbitmq-management/src/rabbit_mgmt_extension.erl (+1/-1) plugins-src/rabbitmq-management/src/rabbit_mgmt_format.erl (+3/-11) plugins-src/rabbitmq-management/src/rabbit_mgmt_load_definitions.erl (+48/-0) plugins-src/rabbitmq-management/src/rabbit_mgmt_sup.erl (+1/-1) plugins-src/rabbitmq-management/src/rabbit_mgmt_util.erl (+4/-3) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_aliveness_test.erl (+1/-1) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_binding.erl (+1/-1) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_bindings.erl (+1/-1) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_channel.erl (+1/-1) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_channels.erl (+1/-1) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_connection.erl (+2/-2) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_connection_channels.erl (+1/-1) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_connections.erl (+1/-1) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_definitions.erl (+24/-18) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_exchange.erl (+1/-1) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_exchange_publish.erl (+5/-1) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_exchanges.erl (+1/-1) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_extensions.erl (+1/-1) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_node.erl (+1/-1) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_nodes.erl (+1/-1) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_overview.erl (+6/-5) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_permission.erl (+1/-1) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_permissions.erl (+1/-1) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_permissions_user.erl (+1/-1) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_permissions_vhost.erl (+1/-1) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_queue.erl (+1/-1) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_queue_get.erl (+1/-1) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_queue_purge.erl (+1/-1) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_queues.erl (+1/-1) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_user.erl (+13/-10) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_users.erl (+1/-1) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_vhost.erl (+1/-1) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_vhosts.erl (+1/-1) plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_whoami.erl (+1/-1) plugins-src/rabbitmq-management/src/rabbitmq_management.app.src (+3/-2) plugins-src/rabbitmq-management/test/src/rabbit_mgmt_test_all.erl (+1/-1) plugins-src/rabbitmq-management/test/src/rabbit_mgmt_test_clustering.erl (+26/-6) plugins-src/rabbitmq-management/test/src/rabbit_mgmt_test_db.erl (+6/-3) plugins-src/rabbitmq-management/test/src/rabbit_mgmt_test_http.erl (+18/-4) plugins-src/rabbitmq-management/test/src/rabbit_mgmt_test_unit.erl (+1/-1) plugins-src/rabbitmq-management/test/src/rabbitmqadmin-test.py (+188/-0) plugins-src/rabbitmq-mochiweb/src/rabbit_mochiweb.erl (+16/-0) plugins-src/rabbitmq-mochiweb/src/rabbit_mochiweb_app.erl (+16/-0) plugins-src/rabbitmq-mochiweb/src/rabbit_mochiweb_registry.erl (+16/-0) plugins-src/rabbitmq-mochiweb/src/rabbit_mochiweb_sup.erl (+16/-0) plugins-src/rabbitmq-mochiweb/src/rabbit_mochiweb_util.erl (+14/-19) plugins-src/rabbitmq-mochiweb/src/rabbit_mochiweb_web.erl (+16/-0) plugins-src/rabbitmq-mochiweb/src/rabbit_webmachine.erl (+1/-1) plugins-src/rabbitmq-mochiweb/test/src/rabbit_mochiweb_test.erl (+16/-0) plugins-src/rabbitmq-mochiweb/test/src/rabbit_mochiweb_test_unit.erl (+14/-19) plugins-src/rabbitmq-shovel-management/README (+1/-2) plugins-src/rabbitmq-shovel-management/src/rabbit_shovel_mgmt.erl (+1/-1) plugins-src/rabbitmq-shovel/README (+4/-292) plugins-src/rabbitmq-shovel/include/rabbit_shovel.hrl (+1/-1) plugins-src/rabbitmq-shovel/src/rabbit_shovel.erl (+1/-1) plugins-src/rabbitmq-shovel/src/rabbit_shovel_status.erl (+1/-1) plugins-src/rabbitmq-shovel/src/rabbit_shovel_sup.erl (+1/-1) plugins-src/rabbitmq-shovel/src/rabbit_shovel_worker.erl (+1/-1) plugins-src/rabbitmq-shovel/test/src/rabbit_shovel_test.erl (+1/-1) plugins-src/rabbitmq-stomp/debian/compat (+0/-1) plugins-src/rabbitmq-stomp/debian/control (+0/-13) plugins-src/rabbitmq-stomp/debian/copyright (+0/-39) plugins-src/rabbitmq-stomp/debian/rabbitmq-stomp.docs (+0/-2) plugins-src/rabbitmq-stomp/debian/rabbitmq-stomp.install (+0/-1) plugins-src/rabbitmq-stomp/debian/rules (+0/-40) plugins-src/rabbitmq-stomp/include/rabbit_stomp.hrl (+4/-2) plugins-src/rabbitmq-stomp/include/rabbit_stomp_frame.hrl (+16/-30) plugins-src/rabbitmq-stomp/include/rabbit_stomp_headers.hrl (+4/-2) plugins-src/rabbitmq-stomp/include/rabbit_stomp_prefixes.hrl (+3/-1) plugins-src/rabbitmq-stomp/package.mk (+5/-3) plugins-src/rabbitmq-stomp/src/rabbit_stomp.erl (+43/-67) plugins-src/rabbitmq-stomp/src/rabbit_stomp_client_sup.erl (+34/-43) plugins-src/rabbitmq-stomp/src/rabbit_stomp_frame.erl (+14/-29) plugins-src/rabbitmq-stomp/src/rabbit_stomp_processor.erl (+180/-183) plugins-src/rabbitmq-stomp/src/rabbit_stomp_reader.erl (+174/-79) plugins-src/rabbitmq-stomp/src/rabbit_stomp_sup.erl (+39/-66) plugins-src/rabbitmq-stomp/src/rabbit_stomp_util.erl (+77/-41) plugins-src/rabbitmq-stomp/src/rabbitmq_stomp.app.src (+2/-0) plugins-src/rabbitmq-stomp/test/src/connect_options.py (+12/-4) plugins-src/rabbitmq-stomp/test/src/destinations.py (+4/-1) plugins-src/rabbitmq-stomp/test/src/non_ssl.config (+5/-6) plugins-src/rabbitmq-stomp/test/src/parsing.py (+11/-7) plugins-src/rabbitmq-stomp/test/src/rabbit_stomp_amqqueue_test.erl (+46/-75) plugins-src/rabbitmq-stomp/test/src/rabbit_stomp_client.erl (+75/-0) plugins-src/rabbitmq-stomp/test/src/rabbit_stomp_publish_test.erl (+88/-0) plugins-src/rabbitmq-stomp/test/src/rabbit_stomp_test.erl (+41/-0) plugins-src/rabbitmq-stomp/test/src/rabbit_stomp_test_frame.erl (+17/-21) plugins-src/rabbitmq-stomp/test/src/rabbit_stomp_test_util.erl (+26/-26) plugins-src/rabbitmq-stomp/test/src/ssl.config (+11/-15) plugins-src/rabbitmq-stomp/test/src/ssl_lifecycle.py (+24/-5) plugins-src/rabbitmq-stomp/test/src/test_ssl.py (+2/-0) plugins-src/rabbitmq-stomp/test/src/test_util.py (+42/-0) plugins-src/rabbitmq-tracing/src/rabbit_tracing_app.erl (+1/-1) plugins-src/rabbitmq-tracing/src/rabbit_tracing_consumer.erl (+1/-1) plugins-src/rabbitmq-tracing/src/rabbit_tracing_consumer_sup.erl (+1/-1) plugins-src/rabbitmq-tracing/src/rabbit_tracing_files.erl (+1/-1) plugins-src/rabbitmq-tracing/src/rabbit_tracing_mgmt.erl (+1/-1) plugins-src/rabbitmq-tracing/src/rabbit_tracing_sup.erl (+1/-1) plugins-src/rabbitmq-tracing/src/rabbit_tracing_traces.erl (+1/-1) plugins-src/rabbitmq-tracing/src/rabbit_tracing_wm_files.erl (+1/-1) plugins-src/rabbitmq-tracing/src/rabbit_tracing_wm_traces.erl (+1/-1) plugins-src/rabbitmq-tracing/test/src/rabbit_tracing_test.erl (+1/-1) scripts/rabbitmq-defaults (+30/-0) scripts/rabbitmq-echopid.bat (+49/-0) scripts/rabbitmq-env (+16/-6) scripts/rabbitmq-plugins (+6/-3) scripts/rabbitmq-plugins.bat (+1/-1) scripts/rabbitmq-server (+18/-23) scripts/rabbitmq-server.bat (+2/-2) scripts/rabbitmq-service.bat (+2/-2) scripts/rabbitmqctl (+7/-1) scripts/rabbitmqctl.bat (+1/-1) src/credit_flow.erl (+128/-0) src/delegate.erl (+1/-1) src/delegate_sup.erl (+1/-1) src/dtree.erl (+163/-0) src/file_handle_cache.erl (+17/-9) src/gatherer.erl (+1/-1) src/gen_server2.erl (+53/-14) src/gm.erl (+57/-48) src/gm_soak_test.erl (+1/-1) src/gm_speed_test.erl (+1/-1) src/gm_tests.erl (+1/-1) src/lqueue.erl (+1/-1) src/mirrored_supervisor.erl (+25/-68) src/mirrored_supervisor_tests.erl (+2/-2) src/mnesia_sync.erl (+77/-0) src/pg_local.erl (+1/-1) src/pmon.erl (+64/-0) src/priority_queue.erl (+1/-1) src/rabbit.erl (+71/-34) src/rabbit_access_control.erl (+1/-2) src/rabbit_alarm.erl (+64/-38) src/rabbit_amqqueue.erl (+190/-63) src/rabbit_amqqueue_process.erl (+411/-191) src/rabbit_amqqueue_sup.erl (+1/-1) src/rabbit_auth_backend.erl (+50/-35) src/rabbit_auth_backend_internal.erl (+1/-3) src/rabbit_auth_mechanism.erl (+34/-24) src/rabbit_auth_mechanism_amqplain.erl (+1/-3) src/rabbit_auth_mechanism_cr_demo.erl (+1/-3) src/rabbit_auth_mechanism_plain.erl (+1/-3) src/rabbit_backing_queue.erl (+196/-149) src/rabbit_backing_queue_qc.erl (+5/-4) src/rabbit_basic.erl (+43/-9) src/rabbit_binary_generator.erl (+1/-1) src/rabbit_binary_parser.erl (+1/-1) src/rabbit_binding.erl (+3/-3) src/rabbit_channel.erl (+209/-257) src/rabbit_channel_sup.erl (+11/-11) src/rabbit_channel_sup_sup.erl (+1/-1) src/rabbit_client_sup.erl (+4/-3) src/rabbit_command_assembler.erl (+1/-1) src/rabbit_connection_sup.erl (+1/-1) src/rabbit_control.erl (+26/-34) src/rabbit_direct.erl (+10/-10) src/rabbit_disk_monitor.erl (+196/-0) src/rabbit_error_logger.erl (+1/-1) src/rabbit_error_logger_file_h.erl (+1/-1) src/rabbit_event.erl (+1/-1) src/rabbit_exchange.erl (+20/-5) src/rabbit_exchange_type.erl (+50/-32) src/rabbit_exchange_type_direct.erl (+1/-2) src/rabbit_exchange_type_fanout.erl (+1/-2) src/rabbit_exchange_type_headers.erl (+1/-2) src/rabbit_exchange_type_invalid.erl (+46/-0) src/rabbit_exchange_type_topic.erl (+56/-70) src/rabbit_file.erl (+1/-1) src/rabbit_framing.erl (+1/-1) src/rabbit_guid.erl (+72/-21) src/rabbit_heartbeat.erl (+1/-1) src/rabbit_limiter.erl (+1/-1) src/rabbit_log.erl (+45/-71) src/rabbit_memory_monitor.erl (+17/-25) src/rabbit_mirror_queue_coordinator.erl (+16/-18) src/rabbit_mirror_queue_master.erl (+25/-21) src/rabbit_mirror_queue_misc.erl (+12/-9) src/rabbit_mirror_queue_slave.erl (+111/-104) src/rabbit_mirror_queue_slave_sup.erl (+1/-1) src/rabbit_misc.erl (+91/-45) src/rabbit_mnesia.erl (+45/-40) src/rabbit_msg_file.erl (+1/-1) src/rabbit_msg_store.erl (+45/-25) src/rabbit_msg_store_ets_index.erl (+3/-3) src/rabbit_msg_store_gc.erl (+1/-1) src/rabbit_msg_store_index.erl (+28/-1) src/rabbit_net.erl (+39/-6) src/rabbit_networking.erl (+101/-81) src/rabbit_node_monitor.erl (+14/-11) src/rabbit_nodes.erl (+101/-0) src/rabbit_plugins.erl (+24/-9) src/rabbit_prelaunch.erl (+5/-19) src/rabbit_queue_collector.erl (+18/-20) src/rabbit_queue_index.erl (+55/-38) src/rabbit_reader.erl (+150/-135) src/rabbit_registry.erl (+1/-1) src/rabbit_restartable_sup.erl (+3/-2) src/rabbit_router.erl (+3/-59) src/rabbit_sasl_report_file_h.erl (+1/-1) src/rabbit_ssl.erl (+59/-16) src/rabbit_sup.erl (+15/-11) src/rabbit_tests.erl (+98/-38) src/rabbit_tests_event_receiver.erl (+1/-1) src/rabbit_trace.erl (+1/-1) src/rabbit_types.erl (+9/-7) src/rabbit_upgrade.erl (+11/-3) src/rabbit_upgrade_functions.erl (+9/-1) src/rabbit_variable_queue.erl (+80/-53) src/rabbit_version.erl (+5/-2) src/rabbit_vhost.erl (+1/-1) src/rabbit_writer.erl (+63/-52) src/supervisor2.erl (+183/-25) src/tcp_acceptor.erl (+8/-25) src/tcp_acceptor_sup.erl (+6/-2) src/tcp_listener.erl (+11/-5) src/tcp_listener_sup.erl (+9/-5) src/test_sup.erl (+1/-1) src/vm_memory_monitor.erl (+3/-3) src/worker_pool.erl (+5/-4) src/worker_pool_sup.erl (+1/-1) src/worker_pool_worker.erl (+6/-6) |
||||
To merge this branch: | bzr merge lp:~lynxman/ubuntu/quantal/rabbitmq-server/rabbitmqserver282merge | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu branches | Pending | ||
Review via email: mp+111265@code.launchpad.net |
Commit message
Description of the change
rabbitmq-server (2.8.2-2ubuntu1) quantal; urgency=low
* Merge from debian unstable, remaining changes (LP: #1004373)
- Plugin packages rabbitmq-common rabbitmq-stomp
rabbitmq-
- debian/conf: Added config files for plugin packages
- debian/control: Added definitions for plugins
- debian/rules: Added support for deb multipackage source
- debian/
dependent plugins
- debian/
additional changes
-- Marc Cluet <email address hidden> Wed, 20 Jun 2012 18:32:08 +0100
To post a comment you must log in.
Revision history for this message
Clint Byrum (clint-fewbar) wrote : | # |
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === removed directory '.pc' |
2 | === removed file '.pc/.version' |
3 | --- .pc/.version 2012-03-12 08:58:42 +0000 |
4 | +++ .pc/.version 1970-01-01 00:00:00 +0000 |
5 | @@ -1,1 +0,0 @@ |
6 | -2 |
7 | |
8 | === removed file '.pc/applied-patches' |
9 | --- .pc/applied-patches 2012-03-12 08:58:42 +0000 |
10 | +++ .pc/applied-patches 1970-01-01 00:00:00 +0000 |
11 | @@ -1,1 +0,0 @@ |
12 | -inets-plugins.patch |
13 | |
14 | === removed directory '.pc/inets-plugins.patch' |
15 | === removed directory '.pc/inets-plugins.patch/plugins-src' |
16 | === removed directory '.pc/inets-plugins.patch/plugins-src/erlang-rfc4627-wrapper' |
17 | === removed directory '.pc/inets-plugins.patch/plugins-src/erlang-rfc4627-wrapper/erlang-rfc4627-git' |
18 | === removed directory '.pc/inets-plugins.patch/plugins-src/erlang-rfc4627-wrapper/erlang-rfc4627-git/src' |
19 | === removed file '.pc/inets-plugins.patch/plugins-src/erlang-rfc4627-wrapper/erlang-rfc4627-git/src/rfc4627_jsonrpc_inets.erl' |
20 | --- .pc/inets-plugins.patch/plugins-src/erlang-rfc4627-wrapper/erlang-rfc4627-git/src/rfc4627_jsonrpc_inets.erl 2012-03-12 08:58:42 +0000 |
21 | +++ .pc/inets-plugins.patch/plugins-src/erlang-rfc4627-wrapper/erlang-rfc4627-git/src/rfc4627_jsonrpc_inets.erl 1970-01-01 00:00:00 +0000 |
22 | @@ -1,167 +0,0 @@ |
23 | -%% JSON-RPC for Erlang's inets httpd |
24 | -%%--------------------------------------------------------------------------- |
25 | -%% @author Tony Garnock-Jones <tonygarnockjones@gmail.com> |
26 | -%% @author LShift Ltd. <query@lshift.net> |
27 | -%% @copyright 2007-2010 Tony Garnock-Jones and 2007-2010 LShift Ltd. |
28 | -%% @license |
29 | -%% |
30 | -%% Permission is hereby granted, free of charge, to any person |
31 | -%% obtaining a copy of this software and associated documentation |
32 | -%% files (the "Software"), to deal in the Software without |
33 | -%% restriction, including without limitation the rights to use, copy, |
34 | -%% modify, merge, publish, distribute, sublicense, and/or sell copies |
35 | -%% of the Software, and to permit persons to whom the Software is |
36 | -%% furnished to do so, subject to the following conditions: |
37 | -%% |
38 | -%% The above copyright notice and this permission notice shall be |
39 | -%% included in all copies or substantial portions of the Software. |
40 | -%% |
41 | -%% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
42 | -%% EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
43 | -%% MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
44 | -%% NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS |
45 | -%% BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
46 | -%% ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
47 | -%% CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
48 | -%% SOFTWARE. |
49 | -%%--------------------------------------------------------------------------- |
50 | -%% @since 1.2.0 |
51 | -%% |
52 | -%% @doc An extension module for the Inets HTTP server, providing HTTP access to JSON-RPC services. |
53 | -%% |
54 | -%% == Configuring HTTP access to registered JSON-RPC services == |
55 | -%% |
56 | -%% The inets httpd uses an `httpd.conf' file to configure itself. To |
57 | -%% enable HTTP access to registered JSON-RPC services, two things need |
58 | -%% to be added to the httpd configuration file: |
59 | -%% |
60 | -%% <ul> |
61 | -%% <li>an entry for `rfc4627_jsonrpc_inets' in the `Modules' configuration directive (just after `mod_alias' and `mod_auth' will do)</li> |
62 | -%% <li>a `JsonRpcAlias' directive, specifying a subspace of the URLs served by the httpd that will be mapped to JSON-RPC service requests (the value used as `AliasPrefix' in calls to {@link rfc4627_jsonrpc_http:invoke_service_method/4})</li> |
63 | -%% </ul> |
64 | -%% |
65 | -%% Here's a complete `httpd.conf': |
66 | -%% |
67 | -%% ``` |
68 | -%% ServerName localhost |
69 | -%% ServerRoot test/server_root |
70 | -%% DocumentRoot test/server_root/htdocs |
71 | -%% Port 5671 |
72 | -%% Modules mod_alias mod_auth rfc4627_jsonrpc_inets mod_actions mod_cgi mod_responsecontrol mod_trace mod_range mod_head mod_include mod_dir mod_get mod_log mod_disk_log |
73 | -%% DirectoryIndex index.html |
74 | -%% JsonRpcAlias /rpc |
75 | -%% ErrorLog logs/error_log |
76 | -%% TransferLog logs/access_log |
77 | -%% SecurityLog logs/security_log</pre> |
78 | -%% ''' |
79 | -%% |
80 | -%% If an httpd server is started from this configuration, it will |
81 | -%% |
82 | -%% <ul> |
83 | -%% <li>listen on port 5671</li> |
84 | -%% <li>permit JSON-RPC access via URLs starting with `/rpc'</li> |
85 | -%% </ul> |
86 | -%% |
87 | -%% The URL structure for JSON-RPC requests will be |
88 | -%% |
89 | -%% <pre>http://localhost:5671/rpc/<i>ServiceName</i></pre> |
90 | -%% |
91 | -%% where ServiceName is the {@link |
92 | -%% rfc4627_jsonrpc:register_service/2}'d name of the service. For |
93 | -%% instance, the example "hello world" service defined in |
94 | -%% `test_jsonrpc_inets.erl' would be accessible at |
95 | -%% |
96 | -%% ``http://localhost:5671/rpc/test'' |
97 | -%% |
98 | -%% The built-in service description method, `system.describe', is |
99 | -%% accessible via a POST to that URL, or a GET to |
100 | -%% |
101 | -%% ``http://localhost:5671/rpc/test/system.describe'' |
102 | -%% |
103 | -%% Similarly, any idempotent methods provided by a service may be |
104 | -%% accessed via POST to the base URL for the service, or via GET to a |
105 | -%% URL of the form |
106 | -%% |
107 | -%% <pre>http://localhost:5671/rpc/<i>ServiceName</i>/<i>MethodName</i>?<i>arg</i>=<i>value</i>&<i>...</i></pre> |
108 | -%% |
109 | - |
110 | --module(rfc4627_jsonrpc_inets). |
111 | --include("rfc4627_jsonrpc.hrl"). |
112 | - |
113 | -%% The path to httpd.hrl has changed in OTP R14A and newer. Our |
114 | -%% Makefile detects the change for us, and supplies a compile-time |
115 | -%% macro definition to allow us to adapt to the new path. |
116 | --ifdef(new_inets). |
117 | --include_lib("inets/src/http_server/httpd.hrl"). |
118 | --else. |
119 | --include_lib("inets/src/httpd.hrl"). |
120 | --endif. |
121 | - |
122 | --export([do/1, load/2]). |
123 | - |
124 | -%% @spec (#mod{}) -> {proceed, term()} |
125 | -%% @doc Implements the inets httpd main callback interface. |
126 | -%% |
127 | -%% Calls out to {@link rfc4627_jsonrpc_http:invoke_service_method/4}. |
128 | -do(ModData = #mod{data = OldData}) -> |
129 | - case {proplists:get_value(status, OldData), |
130 | - proplists:get_value(response, OldData)} of |
131 | - {undefined, undefined} -> |
132 | - do_rpc(ModData); |
133 | - _ -> |
134 | - {proceed, OldData} |
135 | - end. |
136 | - |
137 | -%% @spec (Line::string(), AccIn::term()) -> {ok, AccOut::term(), {atom(), term()}} |
138 | -%% @doc Parses the `"JsonRpcAlias"' configuration entry from the inets `httpd.conf' file. |
139 | -load("JsonRpcAlias " ++ Alias, []) -> |
140 | - {ok, [], {json_rpc_alias, Alias}}. |
141 | - |
142 | -do_rpc(#mod{init_data = #init_data{peername = {PeerPort, PeerName}}, |
143 | - config_db = ConfigDb, |
144 | - socket_type = SocketType, |
145 | - method = HttpMethod, |
146 | - request_uri = PathAndQuery, |
147 | - parsed_header = InetsHeaders, |
148 | - entity_body = Body, |
149 | - data = OldData}) -> |
150 | - AliasPrefix = httpd_util:lookup(ConfigDb, json_rpc_alias, default), |
151 | - {Path, QueryObj} = case string:tokens(PathAndQuery, "?") of |
152 | - [] -> {"", {obj, []}}; |
153 | - [P] -> {P, {obj, []}}; |
154 | - [P, Q] -> {P, {obj, case httpd:parse_query(Q) of |
155 | - [{"",""}] -> []; %% is this a bug in httpd? |
156 | - KV -> [{K, list_to_binary(V)} || {K,V} <- KV] |
157 | - end}} |
158 | - end, |
159 | - HeaderObj = {obj, [{K, list_to_binary(V)} || {K,V} <- InetsHeaders]}, |
160 | - SchemeFields = case SocketType of |
161 | - ip_comm -> [{"scheme", <<"http">>}]; |
162 | - ssl -> [{"scheme", <<"https">>}]; |
163 | - _ -> [] |
164 | - end, |
165 | - |
166 | - RequestInfo = {obj, ([{"http_method", list_to_binary(HttpMethod)}, |
167 | - {"http_query_parameters", QueryObj}, |
168 | - {"http_headers", HeaderObj}, |
169 | - {"remote_port", PeerPort}, |
170 | - {"remote_peername", list_to_binary(PeerName)}] |
171 | - ++ SchemeFields)}, |
172 | - |
173 | - case rfc4627_jsonrpc_http:invoke_service_method(AliasPrefix, |
174 | - Path, |
175 | - RequestInfo, |
176 | - Body) of |
177 | - no_match -> |
178 | - {proceed, OldData}; |
179 | - {ok, ResultEnc, ResponseInfo} -> |
180 | - {obj, ResponseHeaderFields} = |
181 | - rfc4627:get_field(ResponseInfo, "http_headers", {obj, []}), |
182 | - Headers = [{K, binary_to_list(V)} || {K,V} <- ResponseHeaderFields], |
183 | - {proceed, [{response, {response, |
184 | - [{code, 200}, |
185 | - {content_length, integer_to_list(length(ResultEnc))}, |
186 | - {content_type, "text/plain"}%rfc4627:mime_type()} |
187 | - | Headers], |
188 | - ResultEnc}} | OldData]} |
189 | - end. |
190 | |
191 | === modified file 'LICENSE' |
192 | --- LICENSE 2012-02-28 09:55:49 +0000 |
193 | +++ LICENSE 2012-06-20 17:39:44 +0000 |
194 | @@ -4,12 +4,15 @@ |
195 | info@rabbitmq.com. |
196 | |
197 | The files amqp-rabbitmq-0.8.json and amqp-rabbitmq-0.9.1.json are |
198 | -"Copyright (C) 2008-2011 VMware", Inc. and are covered by the MIT |
199 | +"Copyright (C) 2008-2012 VMware", Inc. and are covered by the MIT |
200 | license. |
201 | |
202 | -Mochiweb is "Copyright (c) 2007 Mochi Media, Inc." and is covered by |
203 | -the MIT license. It was downloaded from |
204 | -http://github.com/mochi/mochiweb/ |
205 | +Webmachine is Copyright (c) Basho Technologies and is covered by the |
206 | +Apache License 2.0. It was downloaded from http://webmachine.basho.com/ |
207 | + |
208 | +glMatrix is "Copyright (c) 2011, Brandon Jones" and is covered by the |
209 | +BSD 2-Clause license. It was downloaded from |
210 | +http://code.google.com/p/glmatrix/ |
211 | |
212 | Eldap is "Copyright (c) 2010, Torbjorn Tornkvist" and is covered by |
213 | the MIT license. It was downloaded from https://github.com/etnt/eldap |
214 | @@ -24,12 +27,9 @@ |
215 | covered by the MIT license. It was downloaded from |
216 | http://code.quirkey.com/sammy/ |
217 | |
218 | -glMatrix is "Copyright (c) 2011, Brandon Jones" and is covered by the |
219 | -BSD 2-Clause license. It was downloaded from |
220 | -http://code.google.com/p/glmatrix/ |
221 | - |
222 | -Webmachine is Copyright (c) Basho Technologies and is covered by the |
223 | -Apache License 2.0. It was downloaded from http://webmachine.basho.com/ |
224 | +Mochiweb is "Copyright (c) 2007 Mochi Media, Inc." and is covered by |
225 | +the MIT license. It was downloaded from |
226 | +http://github.com/mochi/mochiweb/ |
227 | |
228 | |
229 | The MIT license is as follows: |
230 | @@ -89,7 +89,7 @@ |
231 | Authors and Copyright are as described below: |
232 | |
233 | The Initial Developer of the Original Code is VMware, Inc. |
234 | - Copyright (c) 2007-2011 VMware, Inc. All rights reserved. |
235 | + Copyright (c) 2007-2012 VMware, Inc. All rights reserved. |
236 | |
237 | |
238 | MOZILLA PUBLIC LICENSE |
239 | @@ -541,7 +541,7 @@ |
240 | The Original Code is RabbitMQ. |
241 | |
242 | The Initial Developer of the Original Code is VMware, Inc. |
243 | - Copyright (c) 2007-2011 VMware, Inc. All rights reserved.'' |
244 | + Copyright (c) 2007-2012 VMware, Inc. All rights reserved.'' |
245 | |
246 | [NOTE: The text of this Exhibit A may differ slightly from the text of |
247 | the notices in the Source Code files of the Original Code. You should |
248 | |
249 | === modified file 'LICENSE-MPL-RabbitMQ' |
250 | --- LICENSE-MPL-RabbitMQ 2012-02-28 09:55:49 +0000 |
251 | +++ LICENSE-MPL-RabbitMQ 2012-06-20 17:39:44 +0000 |
252 | @@ -447,7 +447,7 @@ |
253 | The Original Code is RabbitMQ Visualiser. |
254 | |
255 | The Initial Developer of the Original Code is VMware, Inc. |
256 | - Copyright (c) 2011-2011 VMware, Inc. All rights reserved.'' |
257 | + Copyright (c) 2011-2012 VMware, Inc. All rights reserved.'' |
258 | |
259 | [NOTE: The text of this Exhibit A may differ slightly from the text of |
260 | the notices in the Source Code files of the Original Code. You should |
261 | |
262 | === modified file 'Makefile' |
263 | --- Makefile 2012-02-28 09:55:49 +0000 |
264 | +++ Makefile 2012-06-20 17:39:44 +0000 |
265 | @@ -17,7 +17,7 @@ |
266 | TARGETS=$(EBIN_DIR)/rabbit.app $(INCLUDE_DIR)/rabbit_framing.hrl $(BEAM_TARGETS) plugins |
267 | WEB_URL=http://www.rabbitmq.com/ |
268 | MANPAGES=$(patsubst %.xml, %.gz, $(wildcard $(DOCS_DIR)/*.[0-9].xml)) |
269 | -WEB_MANPAGES=$(patsubst %.xml, %.man.xml, $(wildcard $(DOCS_DIR)/*.[0-9].xml) $(DOCS_DIR)/rabbitmq-service.xml) |
270 | +WEB_MANPAGES=$(patsubst %.xml, %.man.xml, $(wildcard $(DOCS_DIR)/*.[0-9].xml) $(DOCS_DIR)/rabbitmq-service.xml $(DOCS_DIR)/rabbitmq-echopid.xml) |
271 | USAGES_XML=$(DOCS_DIR)/rabbitmqctl.1.xml $(DOCS_DIR)/rabbitmq-plugins.1.xml |
272 | USAGES_ERL=$(foreach XML, $(USAGES_XML), $(call usage_xml_to_erl, $(XML))) |
273 | QC_MODULES := rabbit_backing_queue_qc |
274 | @@ -42,9 +42,9 @@ |
275 | RABBIT_PLT=rabbit.plt |
276 | |
277 | ifndef USE_SPECS |
278 | -# our type specs rely on features and bug fixes in dialyzer that are |
279 | -# only available in R14B03 upwards (R14B03 is erts 5.8.4) |
280 | -USE_SPECS:=$(shell erl -noshell -eval 'io:format([list_to_integer(X) || X <- string:tokens(erlang:system_info(version), ".")] >= [5,8,4]), halt().') |
281 | +# our type specs rely on callback specs, which are available in R15B |
282 | +# upwards. |
283 | +USE_SPECS:=$(shell erl -noshell -eval 'io:format([list_to_integer(X) || X <- string:tokens(erlang:system_info(version), ".")] >= [5,9]), halt().') |
284 | endif |
285 | |
286 | ifndef USE_PROPER_QC |
287 | @@ -56,7 +56,7 @@ |
288 | #other args: +native +"{hipe,[o3,verbose]}" -Ddebug=true +debug_info +no_strict_record_tests |
289 | ERLC_OPTS=-I $(INCLUDE_DIR) -o $(EBIN_DIR) -Wall -v +debug_info $(call boolean_macro,$(USE_SPECS),use_specs) $(call boolean_macro,$(USE_PROPER_QC),use_proper_qc) |
290 | |
291 | -VERSION=0.0.0 |
292 | +VERSION?=0.0.0 |
293 | PLUGINS_SRC_DIR?=$(shell [ -d "plugins-src" ] && echo "plugins-src" || echo ) |
294 | PLUGINS_DIR=plugins |
295 | TARBALL_NAME=rabbitmq-server-$(VERSION) |
296 | @@ -207,7 +207,7 @@ |
297 | -rm -f $(RABBITMQ_MNESIA_DIR).pid |
298 | mkdir -p $(RABBITMQ_MNESIA_DIR) |
299 | setsid sh -c "$(MAKE) run-background-node > $(RABBITMQ_MNESIA_DIR)/startup_log 2> $(RABBITMQ_MNESIA_DIR)/startup_err" & |
300 | - sleep 1 |
301 | + ./scripts/rabbitmqctl -n $(RABBITMQ_NODENAME) wait $(RABBITMQ_MNESIA_DIR).pid kernel |
302 | |
303 | start-rabbit-on-node: all |
304 | echo "rabbit:start()." | $(ERL_CALL) |
305 | @@ -216,12 +216,12 @@ |
306 | stop-rabbit-on-node: all |
307 | echo "rabbit:stop()." | $(ERL_CALL) |
308 | |
309 | -set-memory-alarm: all |
310 | - echo "alarm_handler:set_alarm({{vm_memory_high_watermark, node()}, []})." | \ |
311 | +set-resource-alarm: all |
312 | + echo "alarm_handler:set_alarm({{resource_limit, $(SOURCE), node()}, []})." | \ |
313 | $(ERL_CALL) |
314 | |
315 | -clear-memory-alarm: all |
316 | - echo "alarm_handler:clear_alarm({vm_memory_high_watermark, node()})." | \ |
317 | +clear-resource-alarm: all |
318 | + echo "alarm_handler:clear_alarm({resource_limit, $(SOURCE), node()})." | \ |
319 | $(ERL_CALL) |
320 | |
321 | stop-node: |
322 | @@ -246,7 +246,8 @@ |
323 | srcdist: distclean |
324 | mkdir -p $(TARGET_SRC_DIR)/codegen |
325 | cp -r ebin src include LICENSE LICENSE-MPL-RabbitMQ INSTALL README $(TARGET_SRC_DIR) |
326 | - sed -i.save 's/%%VSN%%/$(VERSION)/' $(TARGET_SRC_DIR)/ebin/rabbit_app.in && rm -f $(TARGET_SRC_DIR)/ebin/rabbit_app.in.save |
327 | + sed 's/%%VSN%%/$(VERSION)/' $(TARGET_SRC_DIR)/ebin/rabbit_app.in > $(TARGET_SRC_DIR)/ebin/rabbit_app.in.tmp && \ |
328 | + mv $(TARGET_SRC_DIR)/ebin/rabbit_app.in.tmp $(TARGET_SRC_DIR)/ebin/rabbit_app.in |
329 | |
330 | cp -r $(AMQP_CODEGEN_DIR)/* $(TARGET_SRC_DIR)/codegen/ |
331 | cp codegen.py Makefile generate_app generate_deps calculate-relative $(TARGET_SRC_DIR) |
332 | @@ -315,7 +316,7 @@ |
333 | cp -r ebin include LICENSE* INSTALL $(TARGET_DIR) |
334 | |
335 | chmod 0755 scripts/* |
336 | - for script in rabbitmq-env rabbitmq-server rabbitmqctl rabbitmq-plugins; do \ |
337 | + for script in rabbitmq-env rabbitmq-server rabbitmqctl rabbitmq-plugins rabbitmq-defaults; do \ |
338 | cp scripts/$$script $(TARGET_DIR)/sbin; \ |
339 | [ -e $(SBIN_DIR)/$$script ] || ln -s $(SCRIPTS_REL_PATH)/$$script $(SBIN_DIR)/$$script; \ |
340 | done |
341 | @@ -346,10 +347,10 @@ |
342 | # Note that all targets which depend on clean must have clean in their |
343 | # name. Also any target that doesn't depend on clean should not have |
344 | # clean in its name, unless you know that you don't need any of the |
345 | -# automatic dependency generation for that target (eg cleandb). |
346 | +# automatic dependency generation for that target (e.g. cleandb). |
347 | |
348 | # We want to load the dep file if *any* target *doesn't* contain |
349 | -# "clean" - i.e. if removing all clean-like targets leaves something |
350 | +# "clean" - i.e. if removing all clean-like targets leaves something. |
351 | |
352 | ifeq "$(MAKECMDGOALS)" "" |
353 | TESTABLEGOALS:=$(.DEFAULT_GOAL) |
354 | |
355 | === modified file 'codegen.py' |
356 | --- codegen.py 2012-02-28 09:55:49 +0000 |
357 | +++ codegen.py 2012-06-20 17:39:44 +0000 |
358 | @@ -11,7 +11,7 @@ |
359 | ## The Original Code is RabbitMQ. |
360 | ## |
361 | ## The Initial Developer of the Original Code is VMware, Inc. |
362 | -## Copyright (c) 2007-2011 VMware, Inc. All rights reserved. |
363 | +## Copyright (c) 2007-2012 VMware, Inc. All rights reserved. |
364 | ## |
365 | |
366 | from __future__ import nested_scopes |
367 | @@ -118,7 +118,7 @@ |
368 | %% The Original Code is RabbitMQ. |
369 | %% |
370 | %% The Initial Developer of the Original Code is VMware, Inc. |
371 | -%% Copyright (c) 2007-2011 VMware, Inc. All rights reserved. |
372 | +%% Copyright (c) 2007-2012 VMware, Inc. All rights reserved. |
373 | %%""" |
374 | |
375 | def genErl(spec): |
376 | |
377 | === modified file 'codegen/LICENSE-MPL-RabbitMQ' |
378 | --- codegen/LICENSE-MPL-RabbitMQ 2011-02-05 10:21:16 +0000 |
379 | +++ codegen/LICENSE-MPL-RabbitMQ 2012-06-20 17:39:44 +0000 |
380 | @@ -447,7 +447,7 @@ |
381 | The Original Code is RabbitMQ. |
382 | |
383 | The Initial Developer of the Original Code is VMware, Inc. |
384 | - Copyright (c) 2007-2011 VMware, Inc. All rights reserved.'' |
385 | + Copyright (c) 2007-2012 VMware, Inc. All rights reserved.'' |
386 | |
387 | [NOTE: The text of this Exhibit A may differ slightly from the text of |
388 | the notices in the Source Code files of the Original Code. You should |
389 | |
390 | === modified file 'codegen/amqp-rabbitmq-0.8.json' |
391 | --- codegen/amqp-rabbitmq-0.8.json 2011-03-23 21:11:17 +0000 |
392 | +++ codegen/amqp-rabbitmq-0.8.json 2012-06-20 17:39:44 +0000 |
393 | @@ -4,7 +4,7 @@ |
394 | "minor-version": 0, |
395 | "port": 5672, |
396 | "copyright": [ |
397 | - "Copyright (C) 2008-2011 VMware, Inc.\n", |
398 | + "Copyright (C) 2008-2012 VMware, Inc.\n", |
399 | "\n", |
400 | "Permission is hereby granted, free of charge, to any person\n", |
401 | "obtaining a copy of this file (the \"Software\"), to deal in the\n", |
402 | |
403 | === modified file 'codegen/amqp-rabbitmq-0.9.1.json' |
404 | --- codegen/amqp-rabbitmq-0.9.1.json 2011-03-23 21:11:17 +0000 |
405 | +++ codegen/amqp-rabbitmq-0.9.1.json 2012-06-20 17:39:44 +0000 |
406 | @@ -5,7 +5,7 @@ |
407 | "revision": 1, |
408 | "port": 5672, |
409 | "copyright": [ |
410 | - "Copyright (C) 2008-2011 VMware, Inc.\n", |
411 | + "Copyright (C) 2008-2012 VMware, Inc.\n", |
412 | "\n", |
413 | "Permission is hereby granted, free of charge, to any person\n", |
414 | "obtaining a copy of this file (the \"Software\"), to deal in the\n", |
415 | |
416 | === modified file 'codegen/amqp_codegen.py' |
417 | --- codegen/amqp_codegen.py 2011-02-05 10:21:16 +0000 |
418 | +++ codegen/amqp_codegen.py 2012-06-20 17:39:44 +0000 |
419 | @@ -11,7 +11,7 @@ |
420 | ## The Original Code is RabbitMQ. |
421 | ## |
422 | ## The Initial Developer of the Original Code is VMware, Inc. |
423 | -## Copyright (c) 2007-2011 VMware, Inc. All rights reserved. |
424 | +## Copyright (c) 2007-2012 VMware, Inc. All rights reserved. |
425 | ## |
426 | |
427 | from __future__ import nested_scopes |
428 | |
429 | === modified file 'codegen/demo_extension.json' |
430 | --- codegen/demo_extension.json 2011-02-05 10:21:16 +0000 |
431 | +++ codegen/demo_extension.json 2012-06-20 17:39:44 +0000 |
432 | @@ -2,7 +2,7 @@ |
433 | "extension": { |
434 | "name": "demo", |
435 | "version": "1.0", |
436 | - "copyright": "Copyright (C) 2009-2011 VMware, Inc." |
437 | + "copyright": "Copyright (C) 2009-2012 VMware, Inc." |
438 | }, |
439 | "domains": [ |
440 | ["foo-domain", "shortstr"] |
441 | |
442 | === modified file 'codegen/license_info' |
443 | --- codegen/license_info 2012-02-28 09:55:49 +0000 |
444 | +++ codegen/license_info 2012-06-20 17:39:44 +0000 |
445 | @@ -1,4 +1,4 @@ |
446 | The files amqp-rabbitmq-0.8.json and amqp-rabbitmq-0.9.1.json are |
447 | -"Copyright (C) 2008-2011 VMware", Inc. and are covered by the MIT |
448 | +"Copyright (C) 2008-2012 VMware", Inc. and are covered by the MIT |
449 | license. |
450 | |
451 | |
452 | === added file 'debian/LICENSE.head' |
453 | --- debian/LICENSE.head 1970-01-01 00:00:00 +0000 |
454 | +++ debian/LICENSE.head 2012-06-20 17:39:44 +0000 |
455 | @@ -0,0 +1,5 @@ |
456 | +This package, the RabbitMQ server is licensed under the MPL. |
457 | + |
458 | +If you have any questions regarding licensing, please contact us at |
459 | +info@rabbitmq.com. |
460 | + |
461 | |
462 | === added file 'debian/LICENSE.tail' |
463 | --- debian/LICENSE.tail 1970-01-01 00:00:00 +0000 |
464 | +++ debian/LICENSE.tail 2012-06-20 17:39:44 +0000 |
465 | @@ -0,0 +1,516 @@ |
466 | + |
467 | +The MIT license is as follows: |
468 | + |
469 | + "Permission is hereby granted, free of charge, to any person |
470 | + obtaining a copy of this file (the Software), to deal in the |
471 | + Software without restriction, including without limitation the |
472 | + rights to use, copy, modify, merge, publish, distribute, |
473 | + sublicense, and/or sell copies of the Software, and to permit |
474 | + persons to whom the Software is furnished to do so, subject to |
475 | + the following conditions: |
476 | + |
477 | + The above copyright notice and this permission notice shall be |
478 | + included in all copies or substantial portions of the Software. |
479 | + |
480 | + THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
481 | + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
482 | + OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
483 | + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
484 | + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
485 | + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
486 | + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
487 | + OTHER DEALINGS IN THE SOFTWARE." |
488 | + |
489 | + |
490 | +The BSD 2-Clause license is as follows: |
491 | + |
492 | + "Redistribution and use in source and binary forms, with or |
493 | + without modification, are permitted provided that the |
494 | + following conditions are met: |
495 | + |
496 | + 1. Redistributions of source code must retain the above |
497 | + copyright notice, this list of conditions and the following |
498 | + disclaimer. |
499 | + |
500 | + 2. Redistributions in binary form must reproduce the above |
501 | + copyright notice, this list of conditions and the following |
502 | + disclaimer in the documentation and/or other materials |
503 | + provided with the distribution. |
504 | + |
505 | + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND |
506 | + CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, |
507 | + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
508 | + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
509 | + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR |
510 | + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
511 | + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
512 | + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
513 | + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
514 | + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
515 | + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
516 | + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
517 | + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." |
518 | + |
519 | + |
520 | +The rest of this package is licensed under the Mozilla Public License 1.1 |
521 | +Authors and Copyright are as described below: |
522 | + |
523 | + The Initial Developer of the Original Code is VMware, Inc. |
524 | + Copyright (c) 2007-2012 VMware, Inc. All rights reserved. |
525 | + |
526 | + |
527 | + MOZILLA PUBLIC LICENSE |
528 | + Version 1.1 |
529 | + |
530 | + --------------- |
531 | + |
532 | +1. Definitions. |
533 | + |
534 | + 1.0.1. "Commercial Use" means distribution or otherwise making the |
535 | + Covered Code available to a third party. |
536 | + |
537 | + 1.1. "Contributor" means each entity that creates or contributes to |
538 | + the creation of Modifications. |
539 | + |
540 | + 1.2. "Contributor Version" means the combination of the Original |
541 | + Code, prior Modifications used by a Contributor, and the Modifications |
542 | + made by that particular Contributor. |
543 | + |
544 | + 1.3. "Covered Code" means the Original Code or Modifications or the |
545 | + combination of the Original Code and Modifications, in each case |
546 | + including portions thereof. |
547 | + |
548 | + 1.4. "Electronic Distribution Mechanism" means a mechanism generally |
549 | + accepted in the software development community for the electronic |
550 | + transfer of data. |
551 | + |
552 | + 1.5. "Executable" means Covered Code in any form other than Source |
553 | + Code. |
554 | + |
555 | + 1.6. "Initial Developer" means the individual or entity identified |
556 | + as the Initial Developer in the Source Code notice required by Exhibit |
557 | + A. |
558 | + |
559 | + 1.7. "Larger Work" means a work which combines Covered Code or |
560 | + portions thereof with code not governed by the terms of this License. |
561 | + |
562 | + 1.8. "License" means this document. |
563 | + |
564 | + 1.8.1. "Licensable" means having the right to grant, to the maximum |
565 | + extent possible, whether at the time of the initial grant or |
566 | + subsequently acquired, any and all of the rights conveyed herein. |
567 | + |
568 | + 1.9. "Modifications" means any addition to or deletion from the |
569 | + substance or structure of either the Original Code or any previous |
570 | + Modifications. When Covered Code is released as a series of files, a |
571 | + Modification is: |
572 | + A. Any addition to or deletion from the contents of a file |
573 | + containing Original Code or previous Modifications. |
574 | + |
575 | + B. Any new file that contains any part of the Original Code or |
576 | + previous Modifications. |
577 | + |
578 | + 1.10. "Original Code" means Source Code of computer software code |
579 | + which is described in the Source Code notice required by Exhibit A as |
580 | + Original Code, and which, at the time of its release under this |
581 | + License is not already Covered Code governed by this License. |
582 | + |
583 | + 1.10.1. "Patent Claims" means any patent claim(s), now owned or |
584 | + hereafter acquired, including without limitation, method, process, |
585 | + and apparatus claims, in any patent Licensable by grantor. |
586 | + |
587 | + 1.11. "Source Code" means the preferred form of the Covered Code for |
588 | + making modifications to it, including all modules it contains, plus |
589 | + any associated interface definition files, scripts used to control |
590 | + compilation and installation of an Executable, or source code |
591 | + differential comparisons against either the Original Code or another |
592 | + well known, available Covered Code of the Contributor's choice. The |
593 | + Source Code can be in a compressed or archival form, provided the |
594 | + appropriate decompression or de-archiving software is widely available |
595 | + for no charge. |
596 | + |
597 | + 1.12. "You" (or "Your") means an individual or a legal entity |
598 | + exercising rights under, and complying with all of the terms of, this |
599 | + License or a future version of this License issued under Section 6.1. |
600 | + For legal entities, "You" includes any entity which controls, is |
601 | + controlled by, or is under common control with You. For purposes of |
602 | + this definition, "control" means (a) the power, direct or indirect, |
603 | + to cause the direction or management of such entity, whether by |
604 | + contract or otherwise, or (b) ownership of more than fifty percent |
605 | + (50%) of the outstanding shares or beneficial ownership of such |
606 | + entity. |
607 | + |
608 | +2. Source Code License. |
609 | + |
610 | + 2.1. The Initial Developer Grant. |
611 | + The Initial Developer hereby grants You a world-wide, royalty-free, |
612 | + non-exclusive license, subject to third party intellectual property |
613 | + claims: |
614 | + (a) under intellectual property rights (other than patent or |
615 | + trademark) Licensable by Initial Developer to use, reproduce, |
616 | + modify, display, perform, sublicense and distribute the Original |
617 | + Code (or portions thereof) with or without Modifications, and/or |
618 | + as part of a Larger Work; and |
619 | + |
620 | + (b) under Patents Claims infringed by the making, using or |
621 | + selling of Original Code, to make, have made, use, practice, |
622 | + sell, and offer for sale, and/or otherwise dispose of the |
623 | + Original Code (or portions thereof). |
624 | + |
625 | + (c) the licenses granted in this Section 2.1(a) and (b) are |
626 | + effective on the date Initial Developer first distributes |
627 | + Original Code under the terms of this License. |
628 | + |
629 | + (d) Notwithstanding Section 2.1(b) above, no patent license is |
630 | + granted: 1) for code that You delete from the Original Code; 2) |
631 | + separate from the Original Code; or 3) for infringements caused |
632 | + by: i) the modification of the Original Code or ii) the |
633 | + combination of the Original Code with other software or devices. |
634 | + |
635 | + 2.2. Contributor Grant. |
636 | + Subject to third party intellectual property claims, each Contributor |
637 | + hereby grants You a world-wide, royalty-free, non-exclusive license |
638 | + |
639 | + (a) under intellectual property rights (other than patent or |
640 | + trademark) Licensable by Contributor, to use, reproduce, modify, |
641 | + display, perform, sublicense and distribute the Modifications |
642 | + created by such Contributor (or portions thereof) either on an |
643 | + unmodified basis, with other Modifications, as Covered Code |
644 | + and/or as part of a Larger Work; and |
645 | + |
646 | + (b) under Patent Claims infringed by the making, using, or |
647 | + selling of Modifications made by that Contributor either alone |
648 | + and/or in combination with its Contributor Version (or portions |
649 | + of such combination), to make, use, sell, offer for sale, have |
650 | + made, and/or otherwise dispose of: 1) Modifications made by that |
651 | + Contributor (or portions thereof); and 2) the combination of |
652 | + Modifications made by that Contributor with its Contributor |
653 | + Version (or portions of such combination). |
654 | + |
655 | + (c) the licenses granted in Sections 2.2(a) and 2.2(b) are |
656 | + effective on the date Contributor first makes Commercial Use of |
657 | + the Covered Code. |
658 | + |
659 | + (d) Notwithstanding Section 2.2(b) above, no patent license is |
660 | + granted: 1) for any code that Contributor has deleted from the |
661 | + Contributor Version; 2) separate from the Contributor Version; |
662 | + 3) for infringements caused by: i) third party modifications of |
663 | + Contributor Version or ii) the combination of Modifications made |
664 | + by that Contributor with other software (except as part of the |
665 | + Contributor Version) or other devices; or 4) under Patent Claims |
666 | + infringed by Covered Code in the absence of Modifications made by |
667 | + that Contributor. |
668 | + |
669 | +3. Distribution Obligations. |
670 | + |
671 | + 3.1. Application of License. |
672 | + The Modifications which You create or to which You contribute are |
673 | + governed by the terms of this License, including without limitation |
674 | + Section 2.2. The Source Code version of Covered Code may be |
675 | + distributed only under the terms of this License or a future version |
676 | + of this License released under Section 6.1, and You must include a |
677 | + copy of this License with every copy of the Source Code You |
678 | + distribute. You may not offer or impose any terms on any Source Code |
679 | + version that alters or restricts the applicable version of this |
680 | + License or the recipients' rights hereunder. However, You may include |
681 | + an additional document offering the additional rights described in |
682 | + Section 3.5. |
683 | + |
684 | + 3.2. Availability of Source Code. |
685 | + Any Modification which You create or to which You contribute must be |
686 | + made available in Source Code form under the terms of this License |
687 | + either on the same media as an Executable version or via an accepted |
688 | + Electronic Distribution Mechanism to anyone to whom you made an |
689 | + Executable version available; and if made available via Electronic |
690 | + Distribution Mechanism, must remain available for at least twelve (12) |
691 | + months after the date it initially became available, or at least six |
692 | + (6) months after a subsequent version of that particular Modification |
693 | + has been made available to such recipients. You are responsible for |
694 | + ensuring that the Source Code version remains available even if the |
695 | + Electronic Distribution Mechanism is maintained by a third party. |
696 | + |
697 | + 3.3. Description of Modifications. |
698 | + You must cause all Covered Code to which You contribute to contain a |
699 | + file documenting the changes You made to create that Covered Code and |
700 | + the date of any change. You must include a prominent statement that |
701 | + the Modification is derived, directly or indirectly, from Original |
702 | + Code provided by the Initial Developer and including the name of the |
703 | + Initial Developer in (a) the Source Code, and (b) in any notice in an |
704 | + Executable version or related documentation in which You describe the |
705 | + origin or ownership of the Covered Code. |
706 | + |
707 | + 3.4. Intellectual Property Matters |
708 | + (a) Third Party Claims. |
709 | + If Contributor has knowledge that a license under a third party's |
710 | + intellectual property rights is required to exercise the rights |
711 | + granted by such Contributor under Sections 2.1 or 2.2, |
712 | + Contributor must include a text file with the Source Code |
713 | + distribution titled "LEGAL" which describes the claim and the |
714 | + party making the claim in sufficient detail that a recipient will |
715 | + know whom to contact. If Contributor obtains such knowledge after |
716 | + the Modification is made available as described in Section 3.2, |
717 | + Contributor shall promptly modify the LEGAL file in all copies |
718 | + Contributor makes available thereafter and shall take other steps |
719 | + (such as notifying appropriate mailing lists or newsgroups) |
720 | + reasonably calculated to inform those who received the Covered |
721 | + Code that new knowledge has been obtained. |
722 | + |
723 | + (b) Contributor APIs. |
724 | + If Contributor's Modifications include an application programming |
725 | + interface and Contributor has knowledge of patent licenses which |
726 | + are reasonably necessary to implement that API, Contributor must |
727 | + also include this information in the LEGAL file. |
728 | + |
729 | + (c) Representations. |
730 | + Contributor represents that, except as disclosed pursuant to |
731 | + Section 3.4(a) above, Contributor believes that Contributor's |
732 | + Modifications are Contributor's original creation(s) and/or |
733 | + Contributor has sufficient rights to grant the rights conveyed by |
734 | + this License. |
735 | + |
736 | + 3.5. Required Notices. |
737 | + You must duplicate the notice in Exhibit A in each file of the Source |
738 | + Code. If it is not possible to put such notice in a particular Source |
739 | + Code file due to its structure, then You must include such notice in a |
740 | + location (such as a relevant directory) where a user would be likely |
741 | + to look for such a notice. If You created one or more Modification(s) |
742 | + You may add your name as a Contributor to the notice described in |
743 | + Exhibit A. You must also duplicate this License in any documentation |
744 | + for the Source Code where You describe recipients' rights or ownership |
745 | + rights relating to Covered Code. You may choose to offer, and to |
746 | + charge a fee for, warranty, support, indemnity or liability |
747 | + obligations to one or more recipients of Covered Code. However, You |
748 | + may do so only on Your own behalf, and not on behalf of the Initial |
749 | + Developer or any Contributor. You must make it absolutely clear than |
750 | + any such warranty, support, indemnity or liability obligation is |
751 | + offered by You alone, and You hereby agree to indemnify the Initial |
752 | + Developer and every Contributor for any liability incurred by the |
753 | + Initial Developer or such Contributor as a result of warranty, |
754 | + support, indemnity or liability terms You offer. |
755 | + |
756 | + 3.6. Distribution of Executable Versions. |
757 | + You may distribute Covered Code in Executable form only if the |
758 | + requirements of Section 3.1-3.5 have been met for that Covered Code, |
759 | + and if You include a notice stating that the Source Code version of |
760 | + the Covered Code is available under the terms of this License, |
761 | + including a description of how and where You have fulfilled the |
762 | + obligations of Section 3.2. The notice must be conspicuously included |
763 | + in any notice in an Executable version, related documentation or |
764 | + collateral in which You describe recipients' rights relating to the |
765 | + Covered Code. You may distribute the Executable version of Covered |
766 | + Code or ownership rights under a license of Your choice, which may |
767 | + contain terms different from this License, provided that You are in |
768 | + compliance with the terms of this License and that the license for the |
769 | + Executable version does not attempt to limit or alter the recipient's |
770 | + rights in the Source Code version from the rights set forth in this |
771 | + License. If You distribute the Executable version under a different |
772 | + license You must make it absolutely clear that any terms which differ |
773 | + from this License are offered by You alone, not by the Initial |
774 | + Developer or any Contributor. You hereby agree to indemnify the |
775 | + Initial Developer and every Contributor for any liability incurred by |
776 | + the Initial Developer or such Contributor as a result of any such |
777 | + terms You offer. |
778 | + |
779 | + 3.7. Larger Works. |
780 | + You may create a Larger Work by combining Covered Code with other code |
781 | + not governed by the terms of this License and distribute the Larger |
782 | + Work as a single product. In such a case, You must make sure the |
783 | + requirements of this License are fulfilled for the Covered Code. |
784 | + |
785 | +4. Inability to Comply Due to Statute or Regulation. |
786 | + |
787 | + If it is impossible for You to comply with any of the terms of this |
788 | + License with respect to some or all of the Covered Code due to |
789 | + statute, judicial order, or regulation then You must: (a) comply with |
790 | + the terms of this License to the maximum extent possible; and (b) |
791 | + describe the limitations and the code they affect. Such description |
792 | + must be included in the LEGAL file described in Section 3.4 and must |
793 | + be included with all distributions of the Source Code. Except to the |
794 | + extent prohibited by statute or regulation, such description must be |
795 | + sufficiently detailed for a recipient of ordinary skill to be able to |
796 | + understand it. |
797 | + |
798 | +5. Application of this License. |
799 | + |
800 | + This License applies to code to which the Initial Developer has |
801 | + attached the notice in Exhibit A and to related Covered Code. |
802 | + |
803 | +6. Versions of the License. |
804 | + |
805 | + 6.1. New Versions. |
806 | + Netscape Communications Corporation ("Netscape") may publish revised |
807 | + and/or new versions of the License from time to time. Each version |
808 | + will be given a distinguishing version number. |
809 | + |
810 | + 6.2. Effect of New Versions. |
811 | + Once Covered Code has been published under a particular version of the |
812 | + License, You may always continue to use it under the terms of that |
813 | + version. You may also choose to use such Covered Code under the terms |
814 | + of any subsequent version of the License published by Netscape. No one |
815 | + other than Netscape has the right to modify the terms applicable to |
816 | + Covered Code created under this License. |
817 | + |
818 | + 6.3. Derivative Works. |
819 | + If You create or use a modified version of this License (which you may |
820 | + only do in order to apply it to code which is not already Covered Code |
821 | + governed by this License), You must (a) rename Your license so that |
822 | + the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", |
823 | + "MPL", "NPL" or any confusingly similar phrase do not appear in your |
824 | + license (except to note that your license differs from this License) |
825 | + and (b) otherwise make it clear that Your version of the license |
826 | + contains terms which differ from the Mozilla Public License and |
827 | + Netscape Public License. (Filling in the name of the Initial |
828 | + Developer, Original Code or Contributor in the notice described in |
829 | + Exhibit A shall not of themselves be deemed to be modifications of |
830 | + this License.) |
831 | + |
832 | +7. DISCLAIMER OF WARRANTY. |
833 | + |
834 | + COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, |
835 | + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, |
836 | + WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF |
837 | + DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. |
838 | + THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE |
839 | + IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, |
840 | + YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE |
841 | + COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER |
842 | + OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF |
843 | + ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. |
844 | + |
845 | +8. TERMINATION. |
846 | + |
847 | + 8.1. This License and the rights granted hereunder will terminate |
848 | + automatically if You fail to comply with terms herein and fail to cure |
849 | + such breach within 30 days of becoming aware of the breach. All |
850 | + sublicenses to the Covered Code which are properly granted shall |
851 | + survive any termination of this License. Provisions which, by their |
852 | + nature, must remain in effect beyond the termination of this License |
853 | + shall survive. |
854 | + |
855 | + 8.2. If You initiate litigation by asserting a patent infringement |
856 | + claim (excluding declatory judgment actions) against Initial Developer |
857 | + or a Contributor (the Initial Developer or Contributor against whom |
858 | + You file such action is referred to as "Participant") alleging that: |
859 | + |
860 | + (a) such Participant's Contributor Version directly or indirectly |
861 | + infringes any patent, then any and all rights granted by such |
862 | + Participant to You under Sections 2.1 and/or 2.2 of this License |
863 | + shall, upon 60 days notice from Participant terminate prospectively, |
864 | + unless if within 60 days after receipt of notice You either: (i) |
865 | + agree in writing to pay Participant a mutually agreeable reasonable |
866 | + royalty for Your past and future use of Modifications made by such |
867 | + Participant, or (ii) withdraw Your litigation claim with respect to |
868 | + the Contributor Version against such Participant. If within 60 days |
869 | + of notice, a reasonable royalty and payment arrangement are not |
870 | + mutually agreed upon in writing by the parties or the litigation claim |
871 | + is not withdrawn, the rights granted by Participant to You under |
872 | + Sections 2.1 and/or 2.2 automatically terminate at the expiration of |
873 | + the 60 day notice period specified above. |
874 | + |
875 | + (b) any software, hardware, or device, other than such Participant's |
876 | + Contributor Version, directly or indirectly infringes any patent, then |
877 | + any rights granted to You by such Participant under Sections 2.1(b) |
878 | + and 2.2(b) are revoked effective as of the date You first made, used, |
879 | + sold, distributed, or had made, Modifications made by that |
880 | + Participant. |
881 | + |
882 | + 8.3. If You assert a patent infringement claim against Participant |
883 | + alleging that such Participant's Contributor Version directly or |
884 | + indirectly infringes any patent where such claim is resolved (such as |
885 | + by license or settlement) prior to the initiation of patent |
886 | + infringement litigation, then the reasonable value of the licenses |
887 | + granted by such Participant under Sections 2.1 or 2.2 shall be taken |
888 | + into account in determining the amount or value of any payment or |
889 | + license. |
890 | + |
891 | + 8.4. In the event of termination under Sections 8.1 or 8.2 above, |
892 | + all end user license agreements (excluding distributors and resellers) |
893 | + which have been validly granted by You or any distributor hereunder |
894 | + prior to termination shall survive termination. |
895 | + |
896 | +9. LIMITATION OF LIABILITY. |
897 | + |
898 | + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT |
899 | + (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL |
900 | + DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, |
901 | + OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR |
902 | + ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY |
903 | + CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, |
904 | + WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER |
905 | + COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN |
906 | + INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF |
907 | + LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY |
908 | + RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW |
909 | + PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE |
910 | + EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO |
911 | + THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. |
912 | + |
913 | +10. U.S. GOVERNMENT END USERS. |
914 | + |
915 | + The Covered Code is a "commercial item," as that term is defined in |
916 | + 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer |
917 | + software" and "commercial computer software documentation," as such |
918 | + terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 |
919 | + C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), |
920 | + all U.S. Government End Users acquire Covered Code with only those |
921 | + rights set forth herein. |
922 | + |
923 | +11. MISCELLANEOUS. |
924 | + |
925 | + This License represents the complete agreement concerning subject |
926 | + matter hereof. If any provision of this License is held to be |
927 | + unenforceable, such provision shall be reformed only to the extent |
928 | + necessary to make it enforceable. This License shall be governed by |
929 | + California law provisions (except to the extent applicable law, if |
930 | + any, provides otherwise), excluding its conflict-of-law provisions. |
931 | + With respect to disputes in which at least one party is a citizen of, |
932 | + or an entity chartered or registered to do business in the United |
933 | + States of America, any litigation relating to this License shall be |
934 | + subject to the jurisdiction of the Federal Courts of the Northern |
935 | + District of California, with venue lying in Santa Clara County, |
936 | + California, with the losing party responsible for costs, including |
937 | + without limitation, court costs and reasonable attorneys' fees and |
938 | + expenses. The application of the United Nations Convention on |
939 | + Contracts for the International Sale of Goods is expressly excluded. |
940 | + Any law or regulation which provides that the language of a contract |
941 | + shall be construed against the drafter shall not apply to this |
942 | + License. |
943 | + |
944 | +12. RESPONSIBILITY FOR CLAIMS. |
945 | + |
946 | + As between Initial Developer and the Contributors, each party is |
947 | + responsible for claims and damages arising, directly or indirectly, |
948 | + out of its utilization of rights under this License and You agree to |
949 | + work with Initial Developer and Contributors to distribute such |
950 | + responsibility on an equitable basis. Nothing herein is intended or |
951 | + shall be deemed to constitute any admission of liability. |
952 | + |
953 | +13. MULTIPLE-LICENSED CODE. |
954 | + |
955 | + Initial Developer may designate portions of the Covered Code as |
956 | + "Multiple-Licensed". "Multiple-Licensed" means that the Initial |
957 | + Developer permits you to utilize portions of the Covered Code under |
958 | + Your choice of the NPL or the alternative licenses, if any, specified |
959 | + by the Initial Developer in the file described in Exhibit A. |
960 | + |
961 | +EXHIBIT A -Mozilla Public License. |
962 | + |
963 | + ``The contents of this file are subject to the Mozilla Public License |
964 | + Version 1.1 (the "License"); you may not use this file except in |
965 | + compliance with the License. You may obtain a copy of the License at |
966 | + http://www.mozilla.org/MPL/ |
967 | + |
968 | + Software distributed under the License is distributed on an "AS IS" |
969 | + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the |
970 | + License for the specific language governing rights and limitations |
971 | + under the License. |
972 | + |
973 | + The Original Code is RabbitMQ. |
974 | + |
975 | + The Initial Developer of the Original Code is VMware, Inc. |
976 | + Copyright (c) 2007-2012 VMware, Inc. All rights reserved.'' |
977 | + |
978 | + [NOTE: The text of this Exhibit A may differ slightly from the text of |
979 | + the notices in the Source Code files of the Original Code. You should |
980 | + use the text of this Exhibit A rather than the text found in the |
981 | + Original Code Source Code for Your Modifications.] |
982 | |
983 | === modified file 'debian/changelog' |
984 | --- debian/changelog 2012-03-29 10:46:26 +0000 |
985 | +++ debian/changelog 2012-06-20 17:39:44 +0000 |
986 | @@ -1,3 +1,42 @@ |
987 | +rabbitmq-server (2.8.2-2ubuntu1) quantal; urgency=low |
988 | + |
989 | + * Merge from debian unstable, remaining changes (LP: #1004373) |
990 | + - Plugin packages rabbitmq-common rabbitmq-stomp |
991 | + rabbitmq-erlang-client |
992 | + - debian/conf: Added config files for plugin packages |
993 | + - debian/control: Added definitions for plugins |
994 | + - debian/rules: Added support for deb multipackage source |
995 | + - debian/patches/inets-plugins.patch: Added patch for inet |
996 | + dependent plugins |
997 | + - debian/rabbitmq-server.init: Used our own init script with |
998 | + additional changes |
999 | + |
1000 | + -- Marc Cluet <marc.cluet@ubuntu.com> Wed, 20 Jun 2012 18:32:08 +0100 |
1001 | + |
1002 | +rabbitmq-server (2.8.2-2) unstable; urgency=low |
1003 | + |
1004 | + * Add version numbers to plugins |
1005 | + |
1006 | + -- Emile Joubert <emile@rabbitmq.com> Tue, 01 May 2012 10:48:57 +0100 |
1007 | + |
1008 | +rabbitmq-server (2.8.2-1) unstable; urgency=low |
1009 | + |
1010 | + * New upstream release |
1011 | + |
1012 | + -- Emile Joubert <emile@rabbitmq.com> Mon, 30 Apr 2012 14:07:32 +0100 |
1013 | + |
1014 | +rabbitmq-server (2.8.1-1) unstable; urgency=low |
1015 | + |
1016 | + * New upstream release |
1017 | + |
1018 | + -- Emile Joubert <emile@rabbitmq.com> Fri, 23 Mar 2012 10:05:24 +0000 |
1019 | + |
1020 | +rabbitmq-server (2.8.0-1) unstable; urgency=low |
1021 | + |
1022 | + * New upstream release |
1023 | + |
1024 | + -- Emile Joubert <emile@rabbitmq.com> Tue, 20 Mar 2012 11:55:10 +0000 |
1025 | + |
1026 | rabbitmq-server (2.7.1-0ubuntu4) precise; urgency=low |
1027 | |
1028 | [ Dave Walker ] |
1029 | @@ -53,6 +92,12 @@ |
1030 | |
1031 | -- Clint Byrum <clint@ubuntu.com> Tue, 28 Feb 2012 09:55:49 -0800 |
1032 | |
1033 | +rabbitmq-server (2.6.1-2) unstable; urgency=low |
1034 | + |
1035 | + * Add DM-Upload-Allowed flag to control file to allow Maintainer uploads |
1036 | + |
1037 | + -- John Leuner <jewel@debian.org> Mon, 19 Mar 2012 21:13:54 +0200 |
1038 | + |
1039 | rabbitmq-server (2.6.1-1ubuntu4) precise; urgency=low |
1040 | |
1041 | * Use start-stop-daemon in the init script, removing usage of su |
1042 | |
1043 | === modified file 'debian/copyright' |
1044 | --- debian/copyright 2011-02-05 10:21:16 +0000 |
1045 | +++ debian/copyright 2012-06-20 17:39:44 +0000 |
1046 | @@ -3,12 +3,44 @@ |
1047 | |
1048 | It was downloaded from http://www.rabbitmq.com/ |
1049 | |
1050 | -The files codegen/amqp-rabbitmq-0.8.json and |
1051 | -codegen/amqp-rabbitmq-0.9.1.json are covered by the following terms: |
1052 | - |
1053 | - "Copyright (C) 2008-2011 VMware, Inc. |
1054 | - |
1055 | - Permission is hereby granted, free of charge, to any person |
1056 | + |
1057 | +This package, the RabbitMQ server is licensed under the MPL. |
1058 | + |
1059 | +If you have any questions regarding licensing, please contact us at |
1060 | +info@rabbitmq.com. |
1061 | + |
1062 | +The files amqp-rabbitmq-0.8.json and amqp-rabbitmq-0.9.1.json are |
1063 | +"Copyright (C) 2008-2012 VMware", Inc. and are covered by the MIT |
1064 | +license. |
1065 | + |
1066 | +Webmachine is Copyright (c) Basho Technologies and is covered by the |
1067 | +Apache License 2.0. It was downloaded from http://webmachine.basho.com/ |
1068 | + |
1069 | +glMatrix is "Copyright (c) 2011, Brandon Jones" and is covered by the |
1070 | +BSD 2-Clause license. It was downloaded from |
1071 | +http://code.google.com/p/glmatrix/ |
1072 | + |
1073 | +Eldap is "Copyright (c) 2010, Torbjorn Tornkvist" and is covered by |
1074 | +the MIT license. It was downloaded from https://github.com/etnt/eldap |
1075 | + |
1076 | +jQuery is "Copyright (c) 2010 John Resig" and is covered by the MIT |
1077 | +license. It was downloaded from http://jquery.com/ |
1078 | + |
1079 | +EJS is "Copyright (c) 2007 Edward Benson" and is covered by the MIT |
1080 | +license. It was downloaded from http://embeddedjs.com/ |
1081 | + |
1082 | +Sammy is "Copyright (c) 2008 Aaron Quint, Quirkey NYC, LLC" and is |
1083 | +covered by the MIT license. It was downloaded from |
1084 | +http://code.quirkey.com/sammy/ |
1085 | + |
1086 | +Mochiweb is "Copyright (c) 2007 Mochi Media, Inc." and is covered by |
1087 | +the MIT license. It was downloaded from |
1088 | +http://github.com/mochi/mochiweb/ |
1089 | + |
1090 | + |
1091 | +The MIT license is as follows: |
1092 | + |
1093 | + "Permission is hereby granted, free of charge, to any person |
1094 | obtaining a copy of this file (the Software), to deal in the |
1095 | Software without restriction, including without limitation the |
1096 | rights to use, copy, modify, merge, publish, distribute, |
1097 | @@ -28,11 +60,42 @@ |
1098 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
1099 | OTHER DEALINGS IN THE SOFTWARE." |
1100 | |
1101 | + |
1102 | +The BSD 2-Clause license is as follows: |
1103 | + |
1104 | + "Redistribution and use in source and binary forms, with or |
1105 | + without modification, are permitted provided that the |
1106 | + following conditions are met: |
1107 | + |
1108 | + 1. Redistributions of source code must retain the above |
1109 | + copyright notice, this list of conditions and the following |
1110 | + disclaimer. |
1111 | + |
1112 | + 2. Redistributions in binary form must reproduce the above |
1113 | + copyright notice, this list of conditions and the following |
1114 | + disclaimer in the documentation and/or other materials |
1115 | + provided with the distribution. |
1116 | + |
1117 | + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND |
1118 | + CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, |
1119 | + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
1120 | + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
1121 | + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR |
1122 | + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
1123 | + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
1124 | + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
1125 | + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
1126 | + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
1127 | + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
1128 | + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
1129 | + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." |
1130 | + |
1131 | + |
1132 | The rest of this package is licensed under the Mozilla Public License 1.1 |
1133 | Authors and Copyright are as described below: |
1134 | |
1135 | The Initial Developer of the Original Code is VMware, Inc. |
1136 | - Copyright (c) 2007-2011 VMware, Inc. All rights reserved. |
1137 | + Copyright (c) 2007-2012 VMware, Inc. All rights reserved. |
1138 | |
1139 | |
1140 | MOZILLA PUBLIC LICENSE |
1141 | @@ -484,7 +547,7 @@ |
1142 | The Original Code is RabbitMQ. |
1143 | |
1144 | The Initial Developer of the Original Code is VMware, Inc. |
1145 | - Copyright (c) 2007-2011 VMware, Inc. All rights reserved.'' |
1146 | + Copyright (c) 2007-2012 VMware, Inc. All rights reserved.'' |
1147 | |
1148 | [NOTE: The text of this Exhibit A may differ slightly from the text of |
1149 | the notices in the Source Code files of the Original Code. You should |
1150 | @@ -492,11 +555,6 @@ |
1151 | Original Code Source Code for Your Modifications.] |
1152 | |
1153 | |
1154 | - |
1155 | - |
1156 | - |
1157 | -If you have any questions regarding licensing, please contact us at |
1158 | -info@rabbitmq.com. |
1159 | - |
1160 | -The Debian packaging is (C) 2007-2011, VMware, Inc. and is licensed |
1161 | +The Debian packaging is (C) 2007-2012, VMware, Inc. and is licensed |
1162 | under the MPL 1.1, see above. |
1163 | + |
1164 | |
1165 | === modified file 'debian/rabbitmq-script-wrapper' |
1166 | --- debian/rabbitmq-script-wrapper 2012-03-29 10:46:26 +0000 |
1167 | +++ debian/rabbitmq-script-wrapper 2012-06-20 17:39:44 +0000 |
1168 | @@ -12,7 +12,7 @@ |
1169 | ## The Original Code is RabbitMQ. |
1170 | ## |
1171 | ## The Initial Developer of the Original Code is VMware, Inc. |
1172 | -## Copyright (c) 2007-2011 VMware, Inc. All rights reserved. |
1173 | +## Copyright (c) 2007-2012 VMware, Inc. All rights reserved. |
1174 | ## |
1175 | |
1176 | # Escape spaces and quotes, because shell is revolting. |
1177 | @@ -31,7 +31,7 @@ |
1178 | |
1179 | if [ `id -u` = 0 ] ; then |
1180 | start-stop-daemon --start --pidfile /dev/null --startas "/usr/lib/rabbitmq/bin/${SCRIPT}" --chuid rabbitmq -- "$@" |
1181 | -elif [ `id -u` = `id -u rabbitmq` ] ; then |
1182 | +elif [ `id -u` = `id -u rabbitmq` -o "$SCRIPT" = "rabbitmq-plugins" ] ; then |
1183 | /usr/lib/rabbitmq/bin/${SCRIPT} "$@" |
1184 | else |
1185 | /usr/lib/rabbitmq/bin/${SCRIPT} |
1186 | |
1187 | === added file 'debian/rabbitmq-server.default' |
1188 | --- debian/rabbitmq-server.default 1970-01-01 00:00:00 +0000 |
1189 | +++ debian/rabbitmq-server.default 2012-06-20 17:39:44 +0000 |
1190 | @@ -0,0 +1,9 @@ |
1191 | +# This file is sourced by /etc/init.d/rabbitmq-server. Its primary |
1192 | +# reason for existing is to allow adjustment of system limits for the |
1193 | +# rabbitmq-server process. |
1194 | +# |
1195 | +# Maximum number of open file handles. This will need to be increased |
1196 | +# to handle many simultaneous connections. Refer to the system |
1197 | +# documentation for ulimit (in man bash) for more information. |
1198 | +# |
1199 | +#ulimit -n 1024 |
1200 | |
1201 | === modified file 'debian/rabbitmq-server.ocf' |
1202 | --- debian/rabbitmq-server.ocf 2011-09-27 17:53:57 +0000 |
1203 | +++ debian/rabbitmq-server.ocf 2012-06-20 17:39:44 +0000 |
1204 | @@ -12,7 +12,7 @@ |
1205 | ## The Original Code is RabbitMQ. |
1206 | ## |
1207 | ## The Initial Developer of the Original Code is VMware, Inc. |
1208 | -## Copyright (c) 2007-2011 VMware, Inc. All rights reserved. |
1209 | +## Copyright (c) 2007-2012 VMware, Inc. All rights reserved. |
1210 | ## |
1211 | |
1212 | ## |
1213 | |
1214 | === modified file 'docs/html-to-website-xml.xsl' |
1215 | --- docs/html-to-website-xml.xsl 2012-02-28 09:55:49 +0000 |
1216 | +++ docs/html-to-website-xml.xsl 2012-06-20 17:39:44 +0000 |
1217 | @@ -8,8 +8,6 @@ |
1218 | |
1219 | <xsl:output method="xml" /> |
1220 | |
1221 | -<xsl:template match="*"/> |
1222 | - |
1223 | <!-- Copy every element through --> |
1224 | <xsl:template match="*"> |
1225 | <xsl:element name="{name()}" namespace="http://www.w3.org/1999/xhtml"> |
1226 | @@ -28,36 +26,30 @@ |
1227 | <head> |
1228 | <title><xsl:value-of select="document($original)/refentry/refnamediv/refname"/><xsl:if test="document($original)/refentry/refmeta/manvolnum">(<xsl:value-of select="document($original)/refentry/refmeta/manvolnum"/>)</xsl:if> manual page</title> |
1229 | </head> |
1230 | - <body> |
1231 | - <doc:div> |
1232 | - <xsl:choose> |
1233 | + <body show-in-this-page="true"> |
1234 | + <xsl:choose> |
1235 | <xsl:when test="document($original)/refentry/refmeta/manvolnum"> |
1236 | - <p> |
1237 | - This is the manual page for |
1238 | - <code><xsl:value-of select="document($original)/refentry/refnamediv/refname"/>(<xsl:value-of select="document($original)/refentry/refmeta/manvolnum"/>)</code>. |
1239 | - </p> |
1240 | - <p> |
1241 | - <a href="../manpages.html">See a list of all manual pages</a>. |
1242 | - </p> |
1243 | + <p> |
1244 | + This is the manual page for |
1245 | + <code><xsl:value-of select="document($original)/refentry/refnamediv/refname"/>(<xsl:value-of select="document($original)/refentry/refmeta/manvolnum"/>)</code>. |
1246 | + </p> |
1247 | + <p> |
1248 | + <a href="../manpages.html">See a list of all manual pages</a>. |
1249 | + </p> |
1250 | </xsl:when> |
1251 | <xsl:otherwise> |
1252 | - <p> |
1253 | - This is the documentation for |
1254 | - <code><xsl:value-of select="document($original)/refentry/refnamediv/refname"/></code>. |
1255 | - </p> |
1256 | + <p> |
1257 | + This is the documentation for |
1258 | + <code><xsl:value-of select="document($original)/refentry/refnamediv/refname"/></code>. |
1259 | + </p> |
1260 | </xsl:otherwise> |
1261 | - </xsl:choose> |
1262 | - <p> |
1263 | + </xsl:choose> |
1264 | + <p> |
1265 | For more general documentation, please see the |
1266 | - <a href="../admin-guide.html">administrator's guide</a>. |
1267 | - </p> |
1268 | - |
1269 | - <doc:toc class="compact"> |
1270 | - <doc:heading>Table of Contents</doc:heading> |
1271 | - </doc:toc> |
1272 | - |
1273 | - <xsl:apply-templates select="body/div[@class='refentry']"/> |
1274 | - </doc:div> |
1275 | + <a href="../admin-guide.html">administrator's guide</a>. |
1276 | + </p> |
1277 | + |
1278 | + <xsl:apply-templates select="body/div[@class='refentry']"/> |
1279 | </body> |
1280 | </html> |
1281 | </xsl:template> |
1282 | |
1283 | === added file 'docs/rabbitmq-echopid.xml' |
1284 | --- docs/rabbitmq-echopid.xml 1970-01-01 00:00:00 +0000 |
1285 | +++ docs/rabbitmq-echopid.xml 2012-06-20 17:39:44 +0000 |
1286 | @@ -0,0 +1,71 @@ |
1287 | +<?xml version="1.0" encoding="UTF-8"?> |
1288 | +<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.docbook.org/xml/4.5/docbookx.dtd"> |
1289 | +<refentry lang="en"> |
1290 | + <refentryinfo> |
1291 | + <productname>RabbitMQ Server</productname> |
1292 | + <authorgroup> |
1293 | + <corpauthor>The RabbitMQ Team <<ulink url="mailto:info@rabbitmq.com"><email>info@rabbitmq.com</email></ulink>></corpauthor> |
1294 | + </authorgroup> |
1295 | + </refentryinfo> |
1296 | + |
1297 | + <refmeta> |
1298 | + <refentrytitle>rabbitmq-echopid.bat</refentrytitle> |
1299 | + <refmiscinfo class="manual">RabbitMQ Server</refmiscinfo> |
1300 | + </refmeta> |
1301 | + |
1302 | + <refnamediv> |
1303 | + <refname>rabbitmq-echopid.bat</refname> |
1304 | + <refpurpose>return the process id of the Erlang runtime hosting RabbitMQ</refpurpose> |
1305 | + </refnamediv> |
1306 | + |
1307 | + <refsynopsisdiv> |
1308 | + <cmdsynopsis> |
1309 | + <command>rabbitmq-echopid.bat</command> |
1310 | + <arg choice="req">sname</arg> |
1311 | + </cmdsynopsis> |
1312 | + </refsynopsisdiv> |
1313 | + |
1314 | + <refsect1> |
1315 | + <title>Description</title> |
1316 | + <para> |
1317 | + RabbitMQ is an implementation of AMQP, the emerging |
1318 | + standard for high performance enterprise messaging. The |
1319 | + RabbitMQ server is a robust and scalable implementation of |
1320 | + an AMQP broker. |
1321 | + </para> |
1322 | + <para> |
1323 | + Running <command>rabbitmq-echopid</command> will attempt to |
1324 | + discover and echo the process id (PID) of the Erlang runtime |
1325 | + process (erl.exe) that is hosting RabbitMQ. To allow erl.exe |
1326 | + time to start up and load RabbitMQ, the script will wait for |
1327 | + ten seconds before timing out if a suitable PID cannot be |
1328 | + found. |
1329 | + </para> |
1330 | + <para> |
1331 | + If a PID is discovered, the script will echo it to stdout |
1332 | + before exiting with a ERRORLEVEL of 0. If no PID is |
1333 | + discovered before the timeout, nothing is written to stdout |
1334 | + and the script exits setting ERRORLEVEL to 1. |
1335 | + </para> |
1336 | + <para> |
1337 | + Note that this script only exists on Windows due to the need |
1338 | + to wait for erl.exe and possibly time-out. To obtain the PID |
1339 | + on Unix set RABBITMQ_PID_FILE before starting |
1340 | + rabbitmq-server and do not use "-detached". |
1341 | + </para> |
1342 | + </refsect1> |
1343 | + |
1344 | + <refsect1> |
1345 | + <title>Options</title> |
1346 | + <variablelist> |
1347 | + <varlistentry> |
1348 | + <term><cmdsynopsis><arg choice="req">sname</arg></cmdsynopsis></term> |
1349 | + <listitem> |
1350 | + <para role="usage"> |
1351 | +The short-name form of the RabbitMQ node name. |
1352 | + </para> |
1353 | + </listitem> |
1354 | + </varlistentry> |
1355 | + </variablelist> |
1356 | + </refsect1> |
1357 | +</refentry> |
1358 | |
1359 | === modified file 'docs/rabbitmqctl.1.xml' |
1360 | --- docs/rabbitmqctl.1.xml 2012-02-28 09:55:49 +0000 |
1361 | +++ docs/rabbitmqctl.1.xml 2012-06-20 17:39:44 +0000 |
1362 | @@ -266,10 +266,9 @@ |
1363 | </para> |
1364 | <para> |
1365 | When the target files do not exist they are created. |
1366 | - target files do not already exist. When |
1367 | - no <option>suffix</option> is specified, the empty log |
1368 | - files are simply created at the original location; no |
1369 | - rotation takes place. |
1370 | + When no <option>suffix</option> is specified, the empty |
1371 | + log files are simply created at the original location; |
1372 | + no rotation takes place. |
1373 | </para> |
1374 | <para role="example-prefix">For example:</para> |
1375 | <screen role="example">rabbitmqctl rotate_logs .1</screen> |
1376 | @@ -949,7 +948,7 @@ |
1377 | <term>source_kind</term> |
1378 | <listitem><para>The kind of the source of messages to |
1379 | which the binding is attached. Currently always |
1380 | - queue. With non-ASCII characters escaped as in |
1381 | + exchange. With non-ASCII characters escaped as in |
1382 | C.</para></listitem> |
1383 | </varlistentry> |
1384 | <varlistentry> |
1385 | @@ -1012,6 +1011,10 @@ |
1386 | <listitem><para>Id of the Erlang process associated with the connection.</para></listitem> |
1387 | </varlistentry> |
1388 | <varlistentry> |
1389 | + <term>name</term> |
1390 | + <listitem><para>Readable name for the connection.</para></listitem> |
1391 | + </varlistentry> |
1392 | + <varlistentry> |
1393 | <term>address</term> |
1394 | <listitem><para>Server IP address.</para></listitem> |
1395 | </varlistentry> |
1396 | @@ -1067,10 +1070,26 @@ |
1397 | <listitem><para>The period for which the peer's SSL |
1398 | certificate is valid.</para></listitem> |
1399 | </varlistentry> |
1400 | + |
1401 | + <varlistentry> |
1402 | + <term>last_blocked_by</term> |
1403 | + <listitem><para>The reason for which this connection |
1404 | + was last blocked. One of 'resource' - due to a memory |
1405 | + or disk alarm, 'flow' - due to internal flow control, or |
1406 | + 'none' if the connection was never |
1407 | + blocked.</para></listitem> |
1408 | + </varlistentry> |
1409 | + <varlistentry> |
1410 | + <term>last_blocked_age</term> |
1411 | + <listitem><para>Time, in seconds, since this |
1412 | + connection was last blocked, or |
1413 | + 'infinity'.</para></listitem> |
1414 | + </varlistentry> |
1415 | + |
1416 | <varlistentry> |
1417 | <term>state</term> |
1418 | <listitem><para>Connection state (one of [<command>starting</command>, <command>tuning</command>, |
1419 | - <command>opening</command>, <command>running</command>, <command>closing</command>, <command>closed</command>]).</para></listitem> |
1420 | + <command>opening</command>, <command>running</command>, <command>blocking</command>, <command>blocked</command>, <command>closing</command>, <command>closed</command>]).</para></listitem> |
1421 | </varlistentry> |
1422 | <varlistentry> |
1423 | <term>channels</term> |
1424 | @@ -1127,8 +1146,9 @@ |
1425 | </varlistentry> |
1426 | </variablelist> |
1427 | <para> |
1428 | - If no <command>connectioninfoitem</command>s are specified then user, peer |
1429 | - address, peer port and connection state are displayed. |
1430 | + If no <command>connectioninfoitem</command>s are |
1431 | + specified then user, peer address, peer port, time since |
1432 | + flow control and memory block state are displayed. |
1433 | </para> |
1434 | |
1435 | <para role="example-prefix"> |
1436 | @@ -1171,6 +1191,10 @@ |
1437 | to which the channel belongs.</para></listitem> |
1438 | </varlistentry> |
1439 | <varlistentry> |
1440 | + <term>name</term> |
1441 | + <listitem><para>Readable name for the channel.</para></listitem> |
1442 | + </varlistentry> |
1443 | + <varlistentry> |
1444 | <term>number</term> |
1445 | <listitem><para>The number of the channel, which uniquely identifies it within |
1446 | a connection.</para></listitem> |
1447 | @@ -1273,9 +1297,10 @@ |
1448 | <para> |
1449 | Displays broker status information such as the running |
1450 | applications on the current Erlang node, RabbitMQ and |
1451 | - Erlang versions, OS name and memory statistics. (See |
1452 | - the <command>cluster_status</command> command to find |
1453 | - out which nodes are clustered and running.) |
1454 | + Erlang versions, OS name, memory and file descriptor |
1455 | + statistics. (See the <command>cluster_status</command> |
1456 | + command to find out which nodes are clustered and |
1457 | + running.) |
1458 | </para> |
1459 | <para role="example-prefix">For example:</para> |
1460 | <screen role="example">rabbitmqctl status</screen> |
1461 | @@ -1403,8 +1428,11 @@ |
1462 | <variablelist> |
1463 | <varlistentry> |
1464 | <term>fraction</term> |
1465 | - <listitem><para>The new memory threshhold fraction at which flow control is triggered, as a |
1466 | - floating point number between 0.0 and 1.0 with a mandatory fractional part.</para></listitem> |
1467 | + <listitem><para> |
1468 | + The new memory threshold fraction at which flow |
1469 | + control is triggered, as a floating point number |
1470 | + greater than or equal to 0. |
1471 | + </para></listitem> |
1472 | </varlistentry> |
1473 | </variablelist> |
1474 | </listitem> |
1475 | |
1476 | === modified file 'ebin/rabbit_app.in' |
1477 | --- ebin/rabbit_app.in 2012-02-28 09:55:49 +0000 |
1478 | +++ ebin/rabbit_app.in 2012-06-20 17:39:44 +0000 |
1479 | @@ -1,7 +1,7 @@ |
1480 | {application, rabbit, %% -*- erlang -*- |
1481 | [{description, "RabbitMQ"}, |
1482 | {id, "RabbitMQ"}, |
1483 | - {vsn, "2.7.1"}, |
1484 | + {vsn, "2.8.2"}, |
1485 | {modules, []}, |
1486 | {registered, [rabbit_amqqueue_sup, |
1487 | rabbit_log, |
1488 | @@ -19,6 +19,7 @@ |
1489 | {ssl_listeners, []}, |
1490 | {ssl_options, []}, |
1491 | {vm_memory_high_watermark, 0.4}, |
1492 | + {disk_free_limit, {mem_relative, 1.0}}, |
1493 | {msg_store_index_module, rabbit_msg_store_ets_index}, |
1494 | {backing_queue_module, rabbit_variable_queue}, |
1495 | {frame_max, 131072}, |
1496 | @@ -37,10 +38,13 @@ |
1497 | {auth_backends, [rabbit_auth_backend_internal]}, |
1498 | {delegate_count, 16}, |
1499 | {trace_vhosts, []}, |
1500 | + {log_levels, [{connection, info}]}, |
1501 | + {ssl_cert_login_from, distinguished_name}, |
1502 | {tcp_listen_options, [binary, |
1503 | {packet, raw}, |
1504 | {reuseaddr, true}, |
1505 | {backlog, 128}, |
1506 | {nodelay, true}, |
1507 | + {linger, {true, 0}}, |
1508 | {exit_on_close, false}]} |
1509 | ]}]}. |
1510 | |
1511 | === modified file 'include/gm_specs.hrl' |
1512 | --- include/gm_specs.hrl 2011-03-23 21:11:17 +0000 |
1513 | +++ include/gm_specs.hrl 2012-06-20 17:39:44 +0000 |
1514 | @@ -11,7 +11,7 @@ |
1515 | %% The Original Code is RabbitMQ. |
1516 | %% |
1517 | %% The Initial Developer of the Original Code is VMware, Inc. |
1518 | -%% Copyright (c) 2007-2011 VMware, Inc. All rights reserved. |
1519 | +%% Copyright (c) 2007-2012 VMware, Inc. All rights reserved. |
1520 | %% |
1521 | |
1522 | -ifdef(use_specs). |
1523 | |
1524 | === modified file 'include/rabbit.hrl' |
1525 | --- include/rabbit.hrl 2012-02-28 09:55:49 +0000 |
1526 | +++ include/rabbit.hrl 2012-06-20 17:39:44 +0000 |
1527 | @@ -11,7 +11,7 @@ |
1528 | %% The Original Code is RabbitMQ. |
1529 | %% |
1530 | %% The Initial Developer of the Original Code is VMware, Inc. |
1531 | -%% Copyright (c) 2007-2011 VMware, Inc. All rights reserved. |
1532 | +%% Copyright (c) 2007-2012 VMware, Inc. All rights reserved. |
1533 | %% |
1534 | |
1535 | -record(user, {username, |
1536 | @@ -56,9 +56,11 @@ |
1537 | -record(binding, {source, key, destination, args = []}). |
1538 | -record(reverse_binding, {destination, key, source, args = []}). |
1539 | |
1540 | +-record(topic_trie_node, {trie_node, edge_count, binding_count}). |
1541 | -record(topic_trie_edge, {trie_edge, node_id}). |
1542 | -record(topic_trie_binding, {trie_binding, value = const}). |
1543 | |
1544 | +-record(trie_node, {exchange_name, node_id}). |
1545 | -record(trie_edge, {exchange_name, node_id, word}). |
1546 | -record(trie_binding, {exchange_name, node_id, destination}). |
1547 | |
1548 | @@ -84,7 +86,7 @@ |
1549 | |
1550 | %%---------------------------------------------------------------------------- |
1551 | |
1552 | --define(COPYRIGHT_MESSAGE, "Copyright (C) 2007-2011 VMware, Inc."). |
1553 | +-define(COPYRIGHT_MESSAGE, "Copyright (C) 2007-2012 VMware, Inc."). |
1554 | -define(INFORMATION_MESSAGE, "Licensed under the MPL. See http://www.rabbitmq.com/"). |
1555 | -define(PROTOCOL_VERSION, "AMQP 0-9-1 / 0-9 / 0-8"). |
1556 | -define(ERTS_MINIMUM, "5.6.3"). |
1557 | @@ -93,16 +95,7 @@ |
1558 | |
1559 | -define(HIBERNATE_AFTER_MIN, 1000). |
1560 | -define(DESIRED_HIBERNATE, 10000). |
1561 | +-define(CREDIT_DISC_BOUND, {2000, 500}). |
1562 | |
1563 | -define(ROUTING_HEADERS, [<<"CC">>, <<"BCC">>]). |
1564 | -define(DELETED_HEADER, <<"BCC">>). |
1565 | - |
1566 | --ifdef(debug). |
1567 | --define(LOGDEBUG0(F), rabbit_log:debug(F)). |
1568 | --define(LOGDEBUG(F,A), rabbit_log:debug(F,A)). |
1569 | --define(LOGMESSAGE(D,C,M,Co), rabbit_log:message(D,C,M,Co)). |
1570 | --else. |
1571 | --define(LOGDEBUG0(F), ok). |
1572 | --define(LOGDEBUG(F,A), ok). |
1573 | --define(LOGMESSAGE(D,C,M,Co), ok). |
1574 | --endif. |
1575 | |
1576 | === removed file 'include/rabbit_auth_backend_spec.hrl' |
1577 | --- include/rabbit_auth_backend_spec.hrl 2011-09-27 17:53:57 +0000 |
1578 | +++ include/rabbit_auth_backend_spec.hrl 1970-01-01 00:00:00 +0000 |
1579 | @@ -1,31 +0,0 @@ |
1580 | -%% The contents of this file are subject to the Mozilla Public License |
1581 | -%% Version 1.1 (the "License"); you may not use this file except in |
1582 | -%% compliance with the License. You may obtain a copy of the License |
1583 | -%% at http://www.mozilla.org/MPL/ |
1584 | -%% |
1585 | -%% Software distributed under the License is distributed on an "AS IS" |
1586 | -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See |
1587 | -%% the License for the specific language governing rights and |
1588 | -%% limitations under the License. |
1589 | -%% |
1590 | -%% The Original Code is RabbitMQ. |
1591 | -%% |
1592 | -%% The Initial Developer of the Original Code is VMware, Inc. |
1593 | -%% Copyright (c) 2007-2011 VMware, Inc. All rights reserved. |
1594 | -%% |
1595 | - |
1596 | --ifdef(use_specs). |
1597 | - |
1598 | --spec(description/0 :: () -> [{atom(), any()}]). |
1599 | - |
1600 | --spec(check_user_login/2 :: (rabbit_types:username(), [term()]) -> |
1601 | - {'ok', rabbit_types:user()} | |
1602 | - {'refused', string(), [any()]} | |
1603 | - {'error', any()}). |
1604 | --spec(check_vhost_access/2 :: (rabbit_types:user(), rabbit_types:vhost()) -> |
1605 | - boolean() | {'error', any()}). |
1606 | --spec(check_resource_access/3 :: (rabbit_types:user(), |
1607 | - rabbit_types:r(atom()), |
1608 | - rabbit_access_control:permission_atom()) -> |
1609 | - boolean() | {'error', any()}). |
1610 | --endif. |
1611 | |
1612 | === removed file 'include/rabbit_auth_mechanism_spec.hrl' |
1613 | --- include/rabbit_auth_mechanism_spec.hrl 2011-03-23 21:11:17 +0000 |
1614 | +++ include/rabbit_auth_mechanism_spec.hrl 1970-01-01 00:00:00 +0000 |
1615 | @@ -1,28 +0,0 @@ |
1616 | -%% The contents of this file are subject to the Mozilla Public License |
1617 | -%% Version 1.1 (the "License"); you may not use this file except in |
1618 | -%% compliance with the License. You may obtain a copy of the License |
1619 | -%% at http://www.mozilla.org/MPL/ |
1620 | -%% |
1621 | -%% Software distributed under the License is distributed on an "AS IS" |
1622 | -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See |
1623 | -%% the License for the specific language governing rights and |
1624 | -%% limitations under the License. |
1625 | -%% |
1626 | -%% The Original Code is RabbitMQ. |
1627 | -%% |
1628 | -%% The Initial Developer of the Original Code is VMware, Inc. |
1629 | -%% Copyright (c) 2007-2011 VMware, Inc. All rights reserved. |
1630 | -%% |
1631 | - |
1632 | --ifdef(use_specs). |
1633 | - |
1634 | --spec(description/0 :: () -> [{atom(), any()}]). |
1635 | --spec(should_offer/1 :: (rabbit_net:socket()) -> boolean()). |
1636 | --spec(init/1 :: (rabbit_net:socket()) -> any()). |
1637 | --spec(handle_response/2 :: (binary(), any()) -> |
1638 | - {'ok', rabbit_types:user()} | |
1639 | - {'challenge', binary(), any()} | |
1640 | - {'protocol_error', string(), [any()]} | |
1641 | - {'refused', string(), [any()]}). |
1642 | - |
1643 | --endif. |
1644 | |
1645 | === removed file 'include/rabbit_backing_queue_spec.hrl' |
1646 | --- include/rabbit_backing_queue_spec.hrl 2012-02-28 09:55:49 +0000 |
1647 | +++ include/rabbit_backing_queue_spec.hrl 1970-01-01 00:00:00 +0000 |
1648 | @@ -1,66 +0,0 @@ |
1649 | -%% The contents of this file are subject to the Mozilla Public License |
1650 | -%% Version 1.1 (the "License"); you may not use this file except in |
1651 | -%% compliance with the License. You may obtain a copy of the License |
1652 | -%% at http://www.mozilla.org/MPL/ |
1653 | -%% |
1654 | -%% Software distributed under the License is distributed on an "AS IS" |
1655 | -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See |
1656 | -%% the License for the specific language governing rights and |
1657 | -%% limitations under the License. |
1658 | -%% |
1659 | -%% The Original Code is RabbitMQ. |
1660 | -%% |
1661 | -%% The Initial Developer of the Original Code is VMware, Inc. |
1662 | -%% Copyright (c) 2007-2011 VMware, Inc. All rights reserved. |
1663 | -%% |
1664 | - |
1665 | --type(fetch_result(Ack) :: |
1666 | - ('empty' | |
1667 | - %% Message, IsDelivered, AckTag, Remaining_Len |
1668 | - {rabbit_types:basic_message(), boolean(), Ack, non_neg_integer()})). |
1669 | --type(is_durable() :: boolean()). |
1670 | --type(attempt_recovery() :: boolean()). |
1671 | --type(purged_msg_count() :: non_neg_integer()). |
1672 | --type(confirm_required() :: boolean()). |
1673 | --type(async_callback() :: fun ((atom(), fun ((atom(), state()) -> state())) -> 'ok')). |
1674 | --type(duration() :: ('undefined' | 'infinity' | number())). |
1675 | - |
1676 | --spec(start/1 :: ([rabbit_amqqueue:name()]) -> 'ok'). |
1677 | --spec(stop/0 :: () -> 'ok'). |
1678 | --spec(init/3 :: (rabbit_types:amqqueue(), attempt_recovery(), |
1679 | - async_callback()) -> state()). |
1680 | --spec(terminate/2 :: (any(), state()) -> state()). |
1681 | --spec(delete_and_terminate/2 :: (any(), state()) -> state()). |
1682 | --spec(purge/1 :: (state()) -> {purged_msg_count(), state()}). |
1683 | --spec(publish/4 :: (rabbit_types:basic_message(), |
1684 | - rabbit_types:message_properties(), pid(), state()) -> |
1685 | - state()). |
1686 | --spec(publish_delivered/5 :: (true, rabbit_types:basic_message(), |
1687 | - rabbit_types:message_properties(), pid(), state()) |
1688 | - -> {ack(), state()}; |
1689 | - (false, rabbit_types:basic_message(), |
1690 | - rabbit_types:message_properties(), pid(), state()) |
1691 | - -> {undefined, state()}). |
1692 | --spec(drain_confirmed/1 :: (state()) -> {[rabbit_guid:guid()], state()}). |
1693 | --spec(dropwhile/2 :: |
1694 | - (fun ((rabbit_types:message_properties()) -> boolean()), state()) |
1695 | - -> state()). |
1696 | --spec(fetch/2 :: (true, state()) -> {fetch_result(ack()), state()}; |
1697 | - (false, state()) -> {fetch_result(undefined), state()}). |
1698 | --spec(ack/2 :: ([ack()], state()) -> {[rabbit_guid:guid()], state()}). |
1699 | --spec(requeue/2 :: ([ack()], state()) |
1700 | - -> {[rabbit_guid:guid()], state()}). |
1701 | --spec(len/1 :: (state()) -> non_neg_integer()). |
1702 | --spec(is_empty/1 :: (state()) -> boolean()). |
1703 | --spec(set_ram_duration_target/2 :: |
1704 | - (duration(), state()) -> state()). |
1705 | --spec(ram_duration/1 :: (state()) -> {duration(), state()}). |
1706 | --spec(needs_timeout/1 :: (state()) -> 'false' | 'timed' | 'idle'). |
1707 | --spec(timeout/1 :: (state()) -> state()). |
1708 | --spec(handle_pre_hibernate/1 :: (state()) -> state()). |
1709 | --spec(status/1 :: (state()) -> [{atom(), any()}]). |
1710 | --spec(invoke/3 :: (atom(), fun ((atom(), A) -> A), state()) -> state()). |
1711 | --spec(is_duplicate/2 :: |
1712 | - (rabbit_types:basic_message(), state()) -> |
1713 | - {'false'|'published'|'discarded', state()}). |
1714 | --spec(discard/3 :: (rabbit_types:basic_message(), pid(), state()) -> state()). |
1715 | |
1716 | === removed file 'include/rabbit_exchange_type_spec.hrl' |
1717 | --- include/rabbit_exchange_type_spec.hrl 2011-06-16 09:55:40 +0000 |
1718 | +++ include/rabbit_exchange_type_spec.hrl 1970-01-01 00:00:00 +0000 |
1719 | @@ -1,38 +0,0 @@ |
1720 | -%% The contents of this file are subject to the Mozilla Public License |
1721 | -%% Version 1.1 (the "License"); you may not use this file except in |
1722 | -%% compliance with the License. You may obtain a copy of the License |
1723 | -%% at http://www.mozilla.org/MPL/ |
1724 | -%% |
1725 | -%% Software distributed under the License is distributed on an "AS IS" |
1726 | -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See |
1727 | -%% the License for the specific language governing rights and |
1728 | -%% limitations under the License. |
1729 | -%% |
1730 | -%% The Original Code is RabbitMQ. |
1731 | -%% |
1732 | -%% The Initial Developer of the Original Code is VMware, Inc. |
1733 | -%% Copyright (c) 2007-2011 VMware, Inc. All rights reserved. |
1734 | -%% |
1735 | - |
1736 | --ifdef(use_specs). |
1737 | - |
1738 | --type(tx() :: 'transaction' | 'none'). |
1739 | --type(serial() :: pos_integer() | tx()). |
1740 | - |
1741 | --spec(description/0 :: () -> [{atom(), any()}]). |
1742 | --spec(serialise_events/0 :: () -> boolean()). |
1743 | --spec(route/2 :: (rabbit_types:exchange(), rabbit_types:delivery()) |
1744 | - -> rabbit_router:match_result()). |
1745 | --spec(validate/1 :: (rabbit_types:exchange()) -> 'ok'). |
1746 | --spec(create/2 :: (tx(), rabbit_types:exchange()) -> 'ok'). |
1747 | --spec(delete/3 :: (tx(), rabbit_types:exchange(), |
1748 | - [rabbit_types:binding()]) -> 'ok'). |
1749 | --spec(add_binding/3 :: (serial(), rabbit_types:exchange(), |
1750 | - rabbit_types:binding()) -> 'ok'). |
1751 | --spec(remove_bindings/3 :: (serial(), rabbit_types:exchange(), |
1752 | - [rabbit_types:binding()]) -> 'ok'). |
1753 | --spec(assert_args_equivalence/2 :: |
1754 | - (rabbit_types:exchange(), rabbit_framing:amqp_table()) |
1755 | - -> 'ok' | rabbit_types:connection_exit()). |
1756 | - |
1757 | --endif. |
1758 | |
1759 | === modified file 'include/rabbit_msg_store.hrl' |
1760 | --- include/rabbit_msg_store.hrl 2011-03-23 21:11:17 +0000 |
1761 | +++ include/rabbit_msg_store.hrl 2012-06-20 17:39:44 +0000 |
1762 | @@ -11,7 +11,7 @@ |
1763 | %% The Original Code is RabbitMQ. |
1764 | %% |
1765 | %% The Initial Developer of the Original Code is VMware, Inc. |
1766 | -%% Copyright (c) 2007-2011 VMware, Inc. All rights reserved. |
1767 | +%% Copyright (c) 2007-2012 VMware, Inc. All rights reserved. |
1768 | %% |
1769 | |
1770 | -include("rabbit.hrl"). |
1771 | |
1772 | === removed file 'include/rabbit_msg_store_index.hrl' |
1773 | --- include/rabbit_msg_store_index.hrl 2011-03-23 21:11:17 +0000 |
1774 | +++ include/rabbit_msg_store_index.hrl 1970-01-01 00:00:00 +0000 |
1775 | @@ -1,45 +0,0 @@ |
1776 | -%% The contents of this file are subject to the Mozilla Public License |
1777 | -%% Version 1.1 (the "License"); you may not use this file except in |
1778 | -%% compliance with the License. You may obtain a copy of the License |
1779 | -%% at http://www.mozilla.org/MPL/ |
1780 | -%% |
1781 | -%% Software distributed under the License is distributed on an "AS IS" |
1782 | -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See |
1783 | -%% the License for the specific language governing rights and |
1784 | -%% limitations under the License. |
1785 | -%% |
1786 | -%% The Original Code is RabbitMQ. |
1787 | -%% |
1788 | -%% The Initial Developer of the Original Code is VMware, Inc. |
1789 | -%% Copyright (c) 2007-2011 VMware, Inc. All rights reserved. |
1790 | -%% |
1791 | - |
1792 | --include("rabbit_msg_store.hrl"). |
1793 | - |
1794 | -%%---------------------------------------------------------------------------- |
1795 | - |
1796 | --ifdef(use_specs). |
1797 | - |
1798 | --type(dir() :: any()). |
1799 | --type(index_state() :: any()). |
1800 | --type(keyvalue() :: any()). |
1801 | --type(fieldpos() :: non_neg_integer()). |
1802 | --type(fieldvalue() :: any()). |
1803 | - |
1804 | --spec(new/1 :: (dir()) -> index_state()). |
1805 | --spec(recover/1 :: (dir()) -> rabbit_types:ok_or_error2(index_state(), any())). |
1806 | --spec(lookup/2 :: |
1807 | - (rabbit_types:msg_id(), index_state()) -> ('not_found' | keyvalue())). |
1808 | --spec(insert/2 :: (keyvalue(), index_state()) -> 'ok'). |
1809 | --spec(update/2 :: (keyvalue(), index_state()) -> 'ok'). |
1810 | --spec(update_fields/3 :: (rabbit_types:msg_id(), ({fieldpos(), fieldvalue()} | |
1811 | - [{fieldpos(), fieldvalue()}]), |
1812 | - index_state()) -> 'ok'). |
1813 | --spec(delete/2 :: (rabbit_types:msg_id(), index_state()) -> 'ok'). |
1814 | --spec(delete_object/2 :: (keyvalue(), index_state()) -> 'ok'). |
1815 | --spec(delete_by_file/2 :: (fieldvalue(), index_state()) -> 'ok'). |
1816 | --spec(terminate/1 :: (index_state()) -> any()). |
1817 | - |
1818 | --endif. |
1819 | - |
1820 | -%%---------------------------------------------------------------------------- |
1821 | |
1822 | === modified file 'plugins-src/Makefile' |
1823 | --- plugins-src/Makefile 2012-02-28 09:55:49 +0000 |
1824 | +++ plugins-src/Makefile 2012-06-20 17:39:44 +0000 |
1825 | @@ -14,6 +14,7 @@ |
1826 | rabbitmq-erlang-client \ |
1827 | rabbitmq-external-exchange \ |
1828 | rabbitmq-federation \ |
1829 | + rabbitmq-federation-management \ |
1830 | rabbitmq-ha-test \ |
1831 | rabbitmq-jsonrpc \ |
1832 | rabbitmq-jsonrpc-channel \ |
1833 | @@ -62,7 +63,7 @@ |
1834 | plugins-dist: release |
1835 | rm -rf $(PLUGINS_DIST_DIR) |
1836 | mkdir -p $(PLUGINS_DIST_DIR) |
1837 | - $(MAKE) -f all-packages.mk copy-releasable VERSION=$(VERSION) $(PLUGINS_DIST_DIR)=$(PLUGINS_DIST_DIR) |
1838 | + $(MAKE) -f all-packages.mk copy-releasable VERSION=$(VERSION) PLUGINS_DIST_DIR=$(PLUGINS_DIST_DIR) |
1839 | |
1840 | plugins-srcdist: |
1841 | rm -rf $(PLUGINS_SRC_DIST_DIR) |
1842 | @@ -74,7 +75,7 @@ |
1843 | rsync -a --exclude '.hg*' rabbitmq-server $(PLUGINS_SRC_DIST_DIR)/ |
1844 | touch $(PLUGINS_SRC_DIST_DIR)/rabbitmq-server/.srcdist_done |
1845 | |
1846 | - $(MAKE) -f all-packages.mk copy-srcdist VERSION=$(VERSION) $(PLUGINS_SRC_DIST_DIR)=$(PLUGINS_SRC_DIST_DIR) |
1847 | + $(MAKE) -f all-packages.mk copy-srcdist VERSION=$(VERSION) PLUGINS_SRC_DIST_DIR=$(PLUGINS_SRC_DIST_DIR) |
1848 | cp Makefile *.mk generate* $(PLUGINS_SRC_DIST_DIR)/ |
1849 | echo "This is the released version of rabbitmq-public-umbrella. \ |
1850 | You can clone the full version with: hg clone http://hg.rabbitmq.com/rabbitmq-public-umbrella" > $(PLUGINS_SRC_DIST_DIR)/README |
1851 | |
1852 | === modified file 'plugins-src/do-package.mk' |
1853 | --- plugins-src/do-package.mk 2012-02-28 09:55:49 +0000 |
1854 | +++ plugins-src/do-package.mk 2012-06-20 17:39:44 +0000 |
1855 | @@ -286,7 +286,7 @@ |
1856 | define run_broker |
1857 | rm -rf $(TEST_TMPDIR) |
1858 | mkdir -p $(foreach D,log plugins $(NODENAME),$(TEST_TMPDIR)/$(D)) |
1859 | - cp -a $(PACKAGE_DIR)/dist/*.ez $(TEST_TMPDIR)/plugins |
1860 | + cp -p $(PACKAGE_DIR)/dist/*.ez $(TEST_TMPDIR)/plugins |
1861 | $(call copy,$(3),$(TEST_TMPDIR)/plugins) |
1862 | rm -f $(TEST_TMPDIR)/plugins/rabbit_common*.ez |
1863 | for plugin in \ |
1864 | @@ -375,7 +375,7 @@ |
1865 | mkdir -p $(APP_DIR)/ebin $(APP_DIR)/include |
1866 | @echo [elided] copy beams to ebin |
1867 | @$(call copy,$(EBIN_BEAMS),$(APP_DIR)/ebin) |
1868 | - cp -a $(APP_FILE) $(APP_DIR)/ebin/$(APP_NAME).app |
1869 | + cp -p $(APP_FILE) $(APP_DIR)/ebin/$(APP_NAME).app |
1870 | $(call copy,$(INCLUDE_HRLS),$(APP_DIR)/include) |
1871 | $(construct_app_commands) |
1872 | touch $$@ |
1873 | @@ -414,8 +414,8 @@ |
1874 | @echo [elided] generate deps |
1875 | @$$(if $$^,echo $$(subst : ,:,$$(foreach F,$$^,$$(abspath $$(F)):)) | escript $(abspath $(UMBRELLA_BASE_DIR)/generate_deps) $$@ '$$$$(EBIN_DIR)',echo >$$@) |
1876 | @echo [elided] fix test deps |
1877 | - @$$(foreach F,$(TEST_EBIN_BEAMS),sed -i -e 's|^$$$$(EBIN_DIR)/$$(notdir $$(F)):|$$$$(TEST_EBIN_DIR)/$$(notdir $$(F)):|' $$@ && ) : |
1878 | - sed -i -e 's|$$@|$$$$(DEPS_FILE)|' $$@ |
1879 | + @$$(foreach F,$(TEST_EBIN_BEAMS),sed -e 's|^$$$$(EBIN_DIR)/$$(notdir $$(F)):|$$$$(TEST_EBIN_DIR)/$$(notdir $$(F)):|' $$@ > $$@.tmp && mv $$@.tmp $$@ && ) : |
1880 | + sed -e 's|$$@|$$$$(DEPS_FILE)|' $$@ > $$@.tmp && mv $$@.tmp $$@ |
1881 | |
1882 | $(eval $(call safe_include,$(DEPS_FILE))) |
1883 | |
1884 | |
1885 | === removed file 'plugins-src/eldap-wrapper/eldap-git/doc/draft-ietf-asid-ldap-c-api-00.txt' |
1886 | --- plugins-src/eldap-wrapper/eldap-git/doc/draft-ietf-asid-ldap-c-api-00.txt 2012-02-28 09:55:49 +0000 |
1887 | +++ plugins-src/eldap-wrapper/eldap-git/doc/draft-ietf-asid-ldap-c-api-00.txt 1970-01-01 00:00:00 +0000 |
1888 | @@ -1,3030 +0,0 @@ |
1889 | - |
1890 | - |
1891 | - |
1892 | - |
1893 | - |
1894 | - |
1895 | -Network Working Group T. Howes |
1896 | -INTERNET-DRAFT Netscape Communications Corp. |
1897 | -Intended Category: Standards Track M. Smith |
1898 | -Obsoletes: RFC 1823 Netscape Communications Corp. |
1899 | -Expires: January 1998 A. Herron |
1900 | - Microsoft Corp. |
1901 | - C. Weider |
1902 | - Microsoft Corp. |
1903 | - M. Wahl |
1904 | - Critical Angle, Inc. |
1905 | - |
1906 | - 29 July 1997 |
1907 | - |
1908 | - |
1909 | - The C LDAP Application Program Interface |
1910 | - <draft-ietf-asid-ldap-c-api-00.txt> |
1911 | - |
1912 | - |
1913 | - |
1914 | -1. Status of this Memo |
1915 | - |
1916 | -This draft document will be submitted to the RFC Editor as a Standards |
1917 | -Track document. Distribution of this memo is unlimited. Please send com- |
1918 | -ments to the authors. |
1919 | - |
1920 | -This document is an Internet-Draft. Internet-Drafts are working docu- |
1921 | -ments of the Internet Engineering Task Force (IETF), its areas, and its |
1922 | -working groups. Note that other groups may also distribute working |
1923 | -documents as Internet-Drafts. |
1924 | - |
1925 | -Internet-Drafts are draft documents valid for a maximum of six months |
1926 | -and may be updated, replaced, or obsoleted by other documents at any |
1927 | -time. It is inappropriate to use Internet-Drafts as reference material |
1928 | -or to cite them other than as ``work in progress.'' |
1929 | - |
1930 | -To learn the current status of any Internet-Draft, please check the |
1931 | -``1id-abstracts.txt'' listing contained in the Internet-Drafts Shadow |
1932 | -Directories on ds.internic.net (US East Coast), nic.nordu.net (Europe), |
1933 | -ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific Rim). |
1934 | - |
1935 | -2. Introduction |
1936 | - |
1937 | -This document defines a C language application program interface to the |
1938 | -lightweight directory access protocol (LDAP). This document replaces the |
1939 | -previous definition of this API, defined in RFC 1823, updating it to |
1940 | -include support for features found in version 3 of the LDAP protocol. |
1941 | -New extended operation functions were added to support LDAPv3 features |
1942 | -such as controls. In addition, other LDAP API changes were made to |
1943 | - |
1944 | - |
1945 | - |
1946 | -Expires: January 1998 [Page 1] |
1947 | - |
1948 | |
1949 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
1950 | - |
1951 | - |
1952 | -support information hiding and thread safety. |
1953 | - |
1954 | -The C LDAP API is designed to be powerful, yet simple to use. It defines |
1955 | -compatible synchronous and asynchronous interfaces to LDAP to suit a |
1956 | -wide variety of applications. This document gives a brief overview of |
1957 | -the LDAP model, then an overview of how the API is used by an applica- |
1958 | -tion program to obtain LDAP information. The API calls are described in |
1959 | -detail, followed by an appendix that provides some example code demon- |
1960 | -strating the use of the API. This document provides information to the |
1961 | -Internet community. It does not specify any standard. |
1962 | - |
1963 | -3. Overview of the LDAP Model |
1964 | - |
1965 | -LDAP is the lightweight directory access protocol, described in [2] and |
1966 | -[6]. It can provide a lightweight frontend to the X.500 directory [1], |
1967 | -or a stand-alone service. In either mode, LDAP is based on a client- |
1968 | -server model in which a client makes a TCP connection to an LDAP server, |
1969 | -over which it sends requests and receives responses. |
1970 | - |
1971 | -The LDAP information model is based on the entry, which contains infor- |
1972 | -mation about some object (e.g., a person). Entries are composed of |
1973 | -attributes, which have a type and one or more values. Each attribute has |
1974 | -a syntax that determines what kinds of values are allowed in the attri- |
1975 | -bute (e.g., ASCII characters, a jpeg photograph, etc.) and how those |
1976 | -values behave during directory operations (e.g., is case significant |
1977 | -during comparisons). |
1978 | - |
1979 | -Entries may be organized in a tree structure, usually based on politi- |
1980 | -cal, geographical, and organizational boundaries. Each entry is uniquely |
1981 | -named relative to its sibling entries by its relative distinguished name |
1982 | -(RDN) consisting of one or more distinguished attribute values from the |
1983 | -entry. At most one value from each attribute may be used in the RDN. |
1984 | -For example, the entry for the person Babs Jensen might be named with |
1985 | -the "Barbara Jensen" value from the commonName attribute. |
1986 | - |
1987 | -A globally unique name for an entry, called a distinguished name or DN, |
1988 | -is constructed by concatenating the sequence of RDNs from the entry up |
1989 | -to the root of the tree. For example, if Babs worked for the University |
1990 | -of Michigan, the DN of her U-M entry might be "cn=Barbara Jensen, |
1991 | -o=University of Michigan, c=US". The DN format used by LDAP is defined |
1992 | -in [4]. |
1993 | - |
1994 | -Operations are provided to authenticate, search for and retrieve infor- |
1995 | -mation, modify information, and add and delete entries from the tree. |
1996 | -The next sections give an overview of how the API is used and detailed |
1997 | -descriptions of the LDAP API calls that implement all of these func- |
1998 | -tions. |
1999 | - |
2000 | - |
2001 | - |
2002 | - |
2003 | -Expires: January 1998 [Page 2] |
2004 | - |
2005 | |
2006 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
2007 | - |
2008 | - |
2009 | -4. Overview of LDAP API Use |
2010 | - |
2011 | -An application generally uses the C LDAP API in four simple steps. |
2012 | - |
2013 | -- Initialize an LDAP session with a default LDAP server. The |
2014 | - ldap_init() function returns a handle to the session, allowing mul- |
2015 | - tiple connections to be open at once. |
2016 | - |
2017 | -- Authenticate to the LDAP server. The ldap_bind() function and |
2018 | - friends support a variety of authentication methods. |
2019 | - |
2020 | -- Perform some LDAP operations and obtain some results. ldap_search() |
2021 | - and friends return results which can be parsed by |
2022 | - ldap_result2error(), ldap_first_entry(), ldap_next_entry(), etc. |
2023 | - |
2024 | -- Close the session. The ldap_unbind() function closes the connec- |
2025 | - tion. |
2026 | - |
2027 | -Operations can be performed either synchronously or asynchronously. The |
2028 | -names of the synchronous functions end in _s. For example, a synchronous |
2029 | -search can be completed by calling ldap_search_s(). An asynchronous |
2030 | -search can be initiated by calling ldap_search(). All synchronous rou- |
2031 | -tines return an indication of the outcome of the operation (e.g, the |
2032 | -constant LDAP_SUCCESS or some other error code). The asynchronous rou- |
2033 | -tines return the message id of the operation initiated. This id can be |
2034 | -used in subsequent calls to ldap_result() to obtain the result(s) of the |
2035 | -operation. An asynchronous operation can be abandoned by calling |
2036 | -ldap_abandon(). |
2037 | - |
2038 | -Results and errors are returned in an opaque structure called LDAPMes- |
2039 | -sage. Routines are provided to parse this structure, step through |
2040 | -entries and attributes returned, etc. Routines are also provided to |
2041 | -interpret errors. Later sections of this document describe these rou- |
2042 | -tines in more detail. |
2043 | - |
2044 | -LDAP version 3 servers may return referrals to other servers. By |
2045 | -default, implementations of this API will attempt to follow referrals |
2046 | -automatically for the application. This behavior can be disabled glo- |
2047 | -bally (using the ldap_set_option() call) or on a per-request basis |
2048 | -through the use of a client control. |
2049 | - |
2050 | -As in the LDAPv3 protocol itself, all DNs and string values that are |
2051 | -passed into or produced by the C LDAP API are represented as UTF-8[10] |
2052 | -characters. |
2053 | - |
2054 | -For compatibility with existing applications, implementations of this |
2055 | -API will by default use version 2 of the LDAP protocol. Applications |
2056 | -that intend to take advantage of LDAP version 3 features will need to |
2057 | - |
2058 | - |
2059 | - |
2060 | -Expires: January 1998 [Page 3] |
2061 | - |
2062 | |
2063 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
2064 | - |
2065 | - |
2066 | -use the ldap_set_option() call with a LDAP_OPT_PROTOCOL_VERSION to |
2067 | -switch to version 3. |
2068 | - |
2069 | - |
2070 | -5. Common Data Structures |
2071 | - |
2072 | -Some data structures that are common to several LDAP API functions are |
2073 | -defined here: |
2074 | - |
2075 | - typedef struct ldap LDAP; |
2076 | - |
2077 | - typedef struct ldapmsg LDAPMessage; |
2078 | - |
2079 | - struct berval { |
2080 | - unsigned long bv_len; |
2081 | - char *bv_val; |
2082 | - }; |
2083 | - |
2084 | - struct timeval { |
2085 | - long tv_sec; |
2086 | - long tv_usec; |
2087 | - }; |
2088 | - |
2089 | -The LDAP structure is an opaque data type that represents an LDAP ses- |
2090 | -sion Typically this corresponds to a connection to a single server, but |
2091 | -it may encompass several server connections in the face of LDAPv3 refer- |
2092 | -rals. |
2093 | - |
2094 | -The LDAPMessage structure is an opaque data type that is used to return |
2095 | -results and error information. |
2096 | - |
2097 | -The berval structure is used to represent arbitrary binary data and its |
2098 | -fields have the following meanings: |
2099 | - |
2100 | -bv_len Length of data in bytes. |
2101 | - |
2102 | -bv_val A pointer to the data itself. |
2103 | - |
2104 | - |
2105 | -The timeval structure is used to represent an interval of time and its |
2106 | -fields have the following meanings: |
2107 | - |
2108 | -tv_sec Seconds component of time interval. |
2109 | - |
2110 | -tv_usec Microseconds component of time interval. |
2111 | - |
2112 | - |
2113 | - |
2114 | - |
2115 | - |
2116 | - |
2117 | -Expires: January 1998 [Page 4] |
2118 | - |
2119 | |
2120 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
2121 | - |
2122 | - |
2123 | -6. LDAP Error Codes |
2124 | - |
2125 | -Many of the LDAP API routines return LDAP error codes, some of which |
2126 | -indicate local errors and some of which may be returned by servers. |
2127 | -Supported error codes are (hexadecimal values are given in parentheses |
2128 | -after the constant): |
2129 | - |
2130 | - LDAP_SUCCESS (0x00) |
2131 | - LDAP_OPERATIONS_ERROR( 0x01) |
2132 | - LDAP_PROTOCOL_ERROR (0x02) |
2133 | - LDAP_TIMELIMIT_EXCEEDED (0x03) |
2134 | - LDAP_SIZELIMIT_EXCEEDED (0x04) |
2135 | - LDAP_COMPARE_FALSE (0x05) |
2136 | - LDAP_COMPARE_TRUE (0x06) |
2137 | - LDAP_STRONG_AUTH_NOT_SUPPORTED (0x07) |
2138 | - LDAP_STRONG_AUTH_REQUIRED (0x08) |
2139 | - LDAP_REFERRAL (0x0a) -- new in LDAPv3 |
2140 | - LDAP_ADMINLIMIT_EXCEEDED (0x0b) -- new in LDAPv3 |
2141 | - LDAP_UNAVAILABLE_CRITICAL_EXTENSION (0x0c) -- new in LDAPv3 |
2142 | - LDAP_CONFIDENTIALITY_REQUIRED (0x0d) -- new in LDAPv3 |
2143 | - LDAP_NO_SUCH_ATTRIBUTE (0x10) |
2144 | - LDAP_UNDEFINED_TYPE (0x11) |
2145 | - LDAP_INAPPROPRIATE_MATCHING (0x12) |
2146 | - LDAP_CONSTRAINT_VIOLATION (0x13) |
2147 | - LDAP_TYPE_OR_VALUE_EXISTS (0x14) |
2148 | - LDAP_INVALID_SYNTAX (0x15) |
2149 | - LDAP_NO_SUCH_OBJECT (0x20) |
2150 | - LDAP_ALIAS_PROBLEM (0x21) |
2151 | - LDAP_INVALID_DN_SYNTAX (0x22) |
2152 | - LDAP_IS_LEAF (0x23) -- not used in LDAPv3 |
2153 | - LDAP_ALIAS_DEREF_PROBLEM (0x24) |
2154 | - LDAP_INAPPROPRIATE_AUTH (0x30) |
2155 | - LDAP_INVALID_CREDENTIALS (0x31) |
2156 | - LDAP_INSUFFICIENT_ACCESS (0x32) |
2157 | - LDAP_BUSY (0x33) |
2158 | - LDAP_UNAVAILABLE (0x34) |
2159 | - LDAP_UNWILLING_TO_PERFORM (0x35) |
2160 | - LDAP_LOOP_DETECT (0x36) |
2161 | - LDAP_NAMING_VIOLATION (0x40) |
2162 | - LDAP_OBJECT_CLASS_VIOLATION (0x41) |
2163 | - LDAP_NOT_ALLOWED_ON_NONLEAF (0x42) |
2164 | - LDAP_NOT_ALLOWED_ON_RDN (0x43) |
2165 | - LDAP_ALREADY_EXISTS (0x44) |
2166 | - LDAP_NO_OBJECT_CLASS_MODS (0x45) |
2167 | - LDAP_RESULTS_TOO_LARGE (0x46) |
2168 | - LDAP_AFFECTS_MULTIPLE_DSAS (0x47) -- new in LDAPv3 |
2169 | - LDAP_OTHER (0x50) |
2170 | - LDAP_SERVER_DOWN (0x51) |
2171 | - |
2172 | - |
2173 | - |
2174 | -Expires: January 1998 [Page 5] |
2175 | - |
2176 | |
2177 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
2178 | - |
2179 | - |
2180 | - LDAP_LOCAL_ERROR (0x52) |
2181 | - LDAP_ENCODING_ERROR (0x53) |
2182 | - LDAP_DECODING_ERROR (0x54) |
2183 | - LDAP_TIMEOUT (0x55) |
2184 | - LDAP_AUTH_UNKNOWN (0x56) |
2185 | - LDAP_FILTER_ERROR (0x57) |
2186 | - LDAP_USER_CANCELLED (0x58) |
2187 | - LDAP_PARAM_ERROR (0x59) |
2188 | - LDAP_NO_MEMORY (0x5a) |
2189 | - LDAP_CONNECT_ERROR (0x5b) |
2190 | - LDAP_NOT_SUPPORTED (0x5c) |
2191 | - LDAP_CONTROL_NOT_FOUND (0x5d) |
2192 | - LDAP_NO_RESULTS_RETURNED (0x5e) |
2193 | - LDAP_MORE_RESULTS_TO_RETURN (0x5f) |
2194 | - LDAP_CLIENT_LOOP (0x60) |
2195 | - LDAP_REFERRAL_LIMIT_EXCEEDED (0x61) |
2196 | - |
2197 | - |
2198 | -7. Performing LDAP Operations |
2199 | - |
2200 | -This section describes each LDAP operation API call in detail. All func- |
2201 | -tions take a "session handle," a pointer to an LDAP structure containing |
2202 | -per-connection information. Many routines return results in an LDAPMes- |
2203 | -sage structure. These structures and others are described as needed |
2204 | -below. |
2205 | - |
2206 | - |
2207 | -7.1. Initializing an LDAP Session |
2208 | - |
2209 | -ldap_init() initializes a session with an LDAP server. The server is not |
2210 | -actually contacted until an operation is performed that requires it, |
2211 | -allowing various options to be set after initialization. |
2212 | - |
2213 | - LDAP *ldap_init( |
2214 | - char *hostname, |
2215 | - int portno |
2216 | - ); |
2217 | - |
2218 | -Use of the following routine is deprecated. |
2219 | - |
2220 | - LDAP *ldap_open( |
2221 | - char *hostname, |
2222 | - int portno |
2223 | - ); |
2224 | - |
2225 | -Parameters are: |
2226 | - |
2227 | -hostname Contains a space-separated list of hostnames or dotted strings |
2228 | - |
2229 | - |
2230 | - |
2231 | -Expires: January 1998 [Page 6] |
2232 | - |
2233 | |
2234 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
2235 | - |
2236 | - |
2237 | - representing the IP address of hosts running an LDAP server to |
2238 | - connect to. Each hostname in the list can include an optional |
2239 | - port number which is separated from the host itself with a |
2240 | - colon (:) character. The hosts are tried in the order listed, |
2241 | - stopping with the first one to which a successful connection is |
2242 | - made. Note that only ldap_open() attempts to make the connec- |
2243 | - tion before returning to the caller. ldap_init() does not con- |
2244 | - nect to the LDAP server. |
2245 | - |
2246 | -portno Contains the TCP port number to connect to. The default LDAP |
2247 | - port of 389 can be obtained by supplying the constant |
2248 | - LDAP_PORT. If a host includes a port number then this parame- |
2249 | - ter is ignored. |
2250 | - |
2251 | -ldap_init() and ldap_open() both return a "session handle," a pointer to |
2252 | -an opaque structure that should be passed to subsequent calls pertaining |
2253 | -to the session. These routines return NULL if the session cannot be ini- |
2254 | -tialized in which case the operating system error reporting mechanism |
2255 | -can be checked to see why the call failed. |
2256 | - |
2257 | -Note that if you connect to an LDAPv2 server, one of the ldap_bind() |
2258 | -calls described below must be completed before other operations can be |
2259 | -performed on the session. LDAPv3 does not require that a bind operation |
2260 | -be completed before other operations can be performed. |
2261 | - |
2262 | -The calling program can set various attributes of the session by calling |
2263 | -the routines described in the next section. |
2264 | - |
2265 | - |
2266 | -7.2. LDAP Session Handle Options |
2267 | - |
2268 | -The LDAP session handle returned by ldap_init() is a pointer to an |
2269 | -opaque data type representing an LDAP session. Formerly, this data type |
2270 | -was a structure exposed to the caller, and various fields in the struc- |
2271 | -ture could be set to control aspects of the session, such as size and |
2272 | -time limits on searches. |
2273 | - |
2274 | -In the interest of insulating callers from inevitable changes to this |
2275 | -structure, these aspects of the session are now accessed through a pair |
2276 | -of accessor functions, described below. |
2277 | - |
2278 | -ldap_get_option() is used to access the current value of various |
2279 | -session-wide parameters. ldap_set_option() is used to set the value of |
2280 | -these parameters. |
2281 | - |
2282 | - int ldap_get_option( |
2283 | - LDAP *ld, |
2284 | - int option, |
2285 | - |
2286 | - |
2287 | - |
2288 | -Expires: January 1998 [Page 7] |
2289 | - |
2290 | |
2291 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
2292 | - |
2293 | - |
2294 | - void *outvalue |
2295 | - ); |
2296 | - |
2297 | - int ldap_set_option( |
2298 | - LDAP *ld, |
2299 | - int option, |
2300 | - void *invalue |
2301 | - ); |
2302 | - |
2303 | -Parameters are: |
2304 | - |
2305 | -ld The session handle. |
2306 | - |
2307 | -option The name of the option being accessed or set. This parameter |
2308 | - should be one of the following constants, which have the indi- |
2309 | - cated meanings. After the constant the actual value of the con- |
2310 | - stant is listed in hexadecimal in parentheses followed by the |
2311 | - type of the corresponding outvalue or invalue parameter. |
2312 | - |
2313 | - LDAP_OPT_DESC (0x01) int * |
2314 | - The underlying socket descriptor corresponding to the default |
2315 | - LDAP connection. |
2316 | - |
2317 | - LDAP_OPT_DEREF (0x02) int * |
2318 | - Controls how aliases are handled during search. It can have |
2319 | - one of the following values: LDAP_DEREF_NEVER (0x00), |
2320 | - LDAP_DEREF_SEARCHING (0x01), LDAP_DEREF_FINDING (0x02), or |
2321 | - LDAP_DEREF_ALWAYS (0x03). The LDAP_DEREF_SEARCHING value |
2322 | - means aliases should be dereferenced during the search but not |
2323 | - when locating the base object of the search. The |
2324 | - LDAP_DEREF_FINDING value means aliases should be dereferenced |
2325 | - when locating the base object but not during the search. |
2326 | - |
2327 | - LDAP_OPT_SIZELIMIT (0x03) int * |
2328 | - A limit on the number of entries to return from a search. A |
2329 | - value of zero means no limit. |
2330 | - |
2331 | - LDAP_OPT_TIMELIMIT (0x04) int * |
2332 | - A limit on the number of seconds to spend on a search. A value |
2333 | - of zero means no limit |
2334 | - |
2335 | - LDAP_OPT_REBIND_FN (0x06) function pointer |
2336 | - See the discussion of ldap_bind() and friends below. |
2337 | - |
2338 | - LDAP_OPT_REBIND_ARG (0x07) void * |
2339 | - See the discussion of ldap_bind() and friends below. |
2340 | - |
2341 | - LDAP_OPT_REFERRALS (0x08) void * |
2342 | - |
2343 | - |
2344 | - |
2345 | -Expires: January 1998 [Page 8] |
2346 | - |
2347 | |
2348 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
2349 | - |
2350 | - |
2351 | - This option controls whether the LDAP library automatically |
2352 | - follows referrals returned by LDAP servers or not. It can be |
2353 | - set to one of the constants LDAP_OPT_ON or LDAP_OPT_OFF. |
2354 | - |
2355 | - LDAP_OPT_RESTART (0x09) void * |
2356 | - This option controls whether LDAP I/O operations should |
2357 | - automatically be restarted if they abort prematurely. It |
2358 | - should be set to one of the constants LDAP_OPT_ON or |
2359 | - LDAP_OPT_OFF. This option is useful if an LDAP I/O operation |
2360 | - may be interrupted prematurely, for example by a timer going |
2361 | - off, or other interrrupt. |
2362 | - |
2363 | - LDAP_OPT_PROTOCOL_VERSION (0x11) int * |
2364 | - This option indicates the version of the default LDAP server. |
2365 | - It can be one of the constants LDAP_VERSION2 or LDAP_VERSION3. |
2366 | - If no version is set the default is LDAP_VERSION2. |
2367 | - |
2368 | - LDAP_OPT_SERVER_CONTROLS (0x12) LDAPControl ** |
2369 | - A default list of LDAP server controls to be sent with each |
2370 | - request. See the Using Controls section below. |
2371 | - |
2372 | - LDAP_OPT_CLIENT_CONTROLS (0x13) LDAPControl ** |
2373 | - A default list of client controls that affect the LDAP ses- |
2374 | - sion. See the Using Controls section below. |
2375 | - |
2376 | - LDAP_OPT_HOST_NAME (0x30) char ** |
2377 | - The host name of the default LDAP server. |
2378 | - |
2379 | - LDAP_OPT_ERROR_NUMBER (0x31) int * |
2380 | - The code of the most recent LDAP error that occurred for this |
2381 | - session. |
2382 | - |
2383 | - LDAP_OPT_ERROR_STRING (0x32) char ** |
2384 | - The message returned with the most recent LDAP error that |
2385 | - occurred for this session. |
2386 | - |
2387 | - |
2388 | -outvalue The address of a place to put the value of the option. The |
2389 | - actual type of this parameter depends on the setting of the |
2390 | - option parameter. |
2391 | - |
2392 | -invalue A pointer to the value the option is to be given. The actual |
2393 | - type of this parameter depends on the setting of the option |
2394 | - parameter. The constants LDAP_OPT_ON and LDAP_OPT_OFF can be |
2395 | - given for options that have on or off settings. |
2396 | - |
2397 | - |
2398 | - |
2399 | - |
2400 | - |
2401 | - |
2402 | -Expires: January 1998 [Page 9] |
2403 | - |
2404 | |
2405 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
2406 | - |
2407 | - |
2408 | -7.3. Working with controls |
2409 | - |
2410 | -LDAPv3 operations can be extended through the use of controls. Controls |
2411 | -may be sent to a server or returned to the client with any LDAP message. |
2412 | -These controls are referred to as server controls. |
2413 | - |
2414 | -The LDAP API also supports a client-side extension mechanism through the |
2415 | -use of client controls. These controls affect the behavior of the LDAP |
2416 | -API only and are never sent to a server. A common data structure is |
2417 | -used to represent both types of controls: |
2418 | - |
2419 | - typedef struct ldapcontrol { |
2420 | - char *ldctl_oid; |
2421 | - struct berval ldctl_value; |
2422 | - char ldctl_iscritical; |
2423 | - } LDAPControl, *PLDAPControl; |
2424 | - |
2425 | -The fields in the ldapcontrol structure have the following meanings: |
2426 | - |
2427 | -ldctl_oid The control type, represented as a string. |
2428 | - |
2429 | -ldctl_value The data associated with the control (if any). |
2430 | - |
2431 | -ldctl_iscritical Indicates whether the control is critical of not. If |
2432 | - this field is non-zero, the operation will only be car- |
2433 | - ried out if the control is recognized by the server |
2434 | - and/or client. |
2435 | - |
2436 | -Some LDAP API calls allocate an ldapcontrol structure or a NULL- |
2437 | -terminated array of ldapcontrol structures. The following routines can |
2438 | -be used to dispose of a single control or an array of controls: |
2439 | - |
2440 | - void ldap_control_free( LDAPControl *ctrl ); |
2441 | - void ldap_controls_free( LDAPControl **ctrls ); |
2442 | - |
2443 | -A set of controls that affect the entire session can be set using the |
2444 | -ldap_set_option() function (see above). A list of controls can also be |
2445 | -passed directly to some LDAP API calls such as ldap_search_ext(), in |
2446 | -which case any controls set for the session through the use of |
2447 | -ldap_set_option() are ignored. Control lists are represented as a NULL- |
2448 | -terminated array of pointers to ldapcontrol structures. |
2449 | - |
2450 | -Server controls are defined by LDAPv3 protocol extension documents; for |
2451 | -example, a control has been proposed to support server-side sorting of |
2452 | -search results [7]. |
2453 | - |
2454 | -No client controls are defined by this document but they may be defined |
2455 | -in future revisions or in any document that extends this API. |
2456 | - |
2457 | - |
2458 | - |
2459 | -Expires: January 1998 [Page 10] |
2460 | - |
2461 | |
2462 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
2463 | - |
2464 | - |
2465 | -7.4. Authenticating to the directory |
2466 | - |
2467 | -The following functions are used to authenticate an LDAP client to an |
2468 | -LDAP directory server. |
2469 | - |
2470 | -The ldap_sasl_bind() and ldap_sasl_bind_s() functions can be used to do |
2471 | -general and extensible authentication over LDAP through the use of the |
2472 | -Simple Authentication Security Layer [8]. The routines both take the dn |
2473 | -to bind as, the method to use, as a dotted-string representation of an |
2474 | -OID identifying the method, and a struct berval holding the credentials. |
2475 | -The special constant value LDAP_SASL_SIMPLE ("") can be passed to |
2476 | -request simple authentication, or the simplified routines |
2477 | -ldap_simple_bind() or ldap_simple_bind_s() can be used. |
2478 | - |
2479 | - int ldap_sasl_bind( |
2480 | - LDAP *ld, |
2481 | - char *dn, |
2482 | - char *mechanism, |
2483 | - struct berval *cred, |
2484 | - LDAPControl **serverctrls, |
2485 | - LDAPControl **clientctrls, |
2486 | - int *msgidp |
2487 | - ); |
2488 | - |
2489 | - int ldap_sasl_bind_s( |
2490 | - LDAP *ld, |
2491 | - char *dn, |
2492 | - char *mechanism, |
2493 | - struct berval *cred, |
2494 | - LDAPControl **serverctrls, |
2495 | - LDAPControl **clientctrls, |
2496 | - struct berval **servercredp |
2497 | - ); |
2498 | - |
2499 | - int ldap_simple_bind( |
2500 | - LDAP *ld, |
2501 | - char *dn, |
2502 | - char *passwd |
2503 | - ); |
2504 | - |
2505 | - int ldap_simple_bind_s( |
2506 | - LDAP *ld, |
2507 | - char *dn, |
2508 | - char *passwd |
2509 | - ); |
2510 | - |
2511 | - The use of the following routines is deprecated: |
2512 | - |
2513 | - |
2514 | - |
2515 | - |
2516 | -Expires: January 1998 [Page 11] |
2517 | - |
2518 | |
2519 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
2520 | - |
2521 | - |
2522 | - int ldap_bind( LDAP *ld, char *dn, char *cred, int method ); |
2523 | - |
2524 | - int ldap_bind_s( LDAP *ld, char *dn, char *cred, int method ); |
2525 | - |
2526 | - int ldap_kerberos_bind( LDAP *ld, char *dn ); |
2527 | - |
2528 | - int ldap_kerberos_bind_s( LDAP *ld, char *dn ); |
2529 | - |
2530 | -Parameters are: |
2531 | - |
2532 | -ld The session handle. |
2533 | - |
2534 | -dn The name of the entry to bind as. |
2535 | - |
2536 | -mechanism Either LDAP_AUTH_SIMPLE_OID to get simple authentication, |
2537 | - or a dotted text string representing an OID identifying the |
2538 | - SASL method. |
2539 | - |
2540 | -cred The credentials with which to authenticate. Arbitrary |
2541 | - credentials can be passed using this parameter. The format |
2542 | - and content of the credentials depends on the setting of |
2543 | - the mechanism parameter. |
2544 | - |
2545 | -passwd For ldap_simple_bind(), the password to compare to the |
2546 | - entry's userPassword attribute. |
2547 | - |
2548 | -serverctrls List of LDAP server controls. |
2549 | - |
2550 | -clientctrls List of client controls. |
2551 | - |
2552 | -msgidp This result parameter will be set to the message id of the |
2553 | - request if the ldap_sasl_bind() call succeeds. |
2554 | - |
2555 | -servercredp This result parameter will be set to the credentials |
2556 | - returned by the server. This should be freed by calling |
2557 | - ldap_If no credentials are returned it will be set to NULL. |
2558 | - |
2559 | -Additional parameters for the deprecated routines are not described. |
2560 | -Interested readers are referred to RFC 1823. |
2561 | - |
2562 | -The ldap_sasl_bind() function initiates an asynchronous bind operation |
2563 | -and returns the constant LDAP_SUCCESS if the request was successfully |
2564 | -sent, or another LDAP error code if not. See the section below on error |
2565 | -handling for more information about possible errors and how to interpret |
2566 | -them. If successful, ldap_sasl_bind() places the message id of the |
2567 | -request in *msgidp. A subsequent call to ldap_result(), described below, |
2568 | -can be used to obtain the result of the bind. |
2569 | - |
2570 | - |
2571 | - |
2572 | - |
2573 | -Expires: January 1998 [Page 12] |
2574 | - |
2575 | |
2576 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
2577 | - |
2578 | - |
2579 | -The ldap_simple_bind() function initiates a simple asynchronous bind |
2580 | -operation and returns the message id of the operation initiated. A sub- |
2581 | -sequent call to ldap_result(), described below, can be used to obtain |
2582 | -the result of the bind. In case of error, ldap_simple_bind() will return |
2583 | --1, setting the session error parameters in the LDAP structure appropri- |
2584 | -ately. |
2585 | - |
2586 | -The synchronous ldap_sasl_bind_s() and ldap_simple_bind_s() functions |
2587 | -both return the result of the operation, either the constant |
2588 | -LDAP_SUCCESS if the operation was successful, or another LDAP error code |
2589 | -if it was not. See the section below on error handling for more informa- |
2590 | -tion about possible errors and how to interpret them. |
2591 | - |
2592 | -Note that if an LDAPv2 server is contacted, no other operations over the |
2593 | -connection should be attempted before a bind call has successfully com- |
2594 | -pleted. |
2595 | - |
2596 | -Subsequent bind calls can be used to re-authenticate over the same con- |
2597 | -nection, and multistep SASL sequences can be accomplished through a |
2598 | -sequence of calls to ldap_sasl_bind() or ldap_sasl_bind_s(). |
2599 | - |
2600 | - |
2601 | -7.5. Closing the session |
2602 | - |
2603 | -The following functions are used to unbind from the directory, close the |
2604 | -connection, and dispose of the session handle. |
2605 | - |
2606 | - int ldap_unbind( LDAP *ld ); |
2607 | - |
2608 | - int ldap_unbind_s( LDAP *ld ); |
2609 | - |
2610 | -Parameters are: |
2611 | - |
2612 | -ld The session handle. |
2613 | - |
2614 | -ldap_unbind() and ldap_unbind_s() both work synchronously, unbinding |
2615 | -from the directory, closing the connection, and freeing up the ld struc- |
2616 | -ture before returning. There is no server response to an unbind opera- |
2617 | -tion. ldap_unbind() returns LDAP_SUCCESS (or another LDAP error code if |
2618 | -the request cannot be sent to the LDAP server). After a call to |
2619 | -ldap_unbind() or ldap_unbind_s(), the session handle ld is invalid. |
2620 | - |
2621 | - |
2622 | -7.6. Searching |
2623 | - |
2624 | -The following functions are used to search the LDAP directory, returning |
2625 | -a requested set of attributes for each entry matched. There are five |
2626 | -variations. |
2627 | - |
2628 | - |
2629 | - |
2630 | -Expires: January 1998 [Page 13] |
2631 | - |
2632 | |
2633 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
2634 | - |
2635 | - |
2636 | - int ldap_search_ext( |
2637 | - LDAP *ld, |
2638 | - char *base, |
2639 | - int scope, |
2640 | - char *filter, |
2641 | - char **attrs, |
2642 | - int attrsonly, |
2643 | - LDAPControl **serverctrls, |
2644 | - LDAPControl **clientctrls, |
2645 | - struct timeval *timeoutp, |
2646 | - int sizelimit, |
2647 | - int *msgidp |
2648 | - ); |
2649 | - |
2650 | - int ldap_search_ext_s( |
2651 | - LDAP *ld, |
2652 | - char *base, |
2653 | - int scope, |
2654 | - char *filter, |
2655 | - char **attrs, |
2656 | - int attrsonly, |
2657 | - LDAPControl **serverctrls, |
2658 | - LDAPControl **clientctrls, |
2659 | - struct timeval *timeoutp, |
2660 | - int sizelimit, |
2661 | - LDAPMessage **res |
2662 | - ); |
2663 | - |
2664 | - int ldap_search( |
2665 | - LDAP *ld, |
2666 | - char *base, |
2667 | - int scope, |
2668 | - char *filter, |
2669 | - char **attrs, |
2670 | - int attrsonly |
2671 | - ); |
2672 | - |
2673 | - int ldap_search_s( |
2674 | - LDAP *ld, |
2675 | - char *base, |
2676 | - int scope, |
2677 | - char *filter, |
2678 | - char **attrs, |
2679 | - int attrsonly, |
2680 | - LDAPMessage **res |
2681 | - ); |
2682 | - |
2683 | - int ldap_search_st( |
2684 | - |
2685 | - |
2686 | - |
2687 | -Expires: January 1998 [Page 14] |
2688 | - |
2689 | |
2690 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
2691 | - |
2692 | - |
2693 | - LDAP *ld, |
2694 | - char *base, |
2695 | - int scope, |
2696 | - char *filter, |
2697 | - char **attrs, |
2698 | - int attrsonly, |
2699 | - struct timeval *timeout, |
2700 | - LDAPMessage **res |
2701 | - ); |
2702 | - |
2703 | -Parameters are: |
2704 | - |
2705 | -ld The session handle. |
2706 | - |
2707 | -base The dn of the entry at which to start the search. |
2708 | - |
2709 | -scope One of LDAP_SCOPE_BASE (0x00), LDAP_SCOPE_ONELEVEL (0x01), |
2710 | - or LDAP_SCOPE_SUBTREE (0x02), indicating the scope of the |
2711 | - search. |
2712 | - |
2713 | -filter A character string as described in [3], representing the |
2714 | - search filter. |
2715 | - |
2716 | -attrs A NULL-terminated array of strings indicating which attri- |
2717 | - butes to return for each matching entry. Passing NULL for |
2718 | - this parameter causes all available attributes to be |
2719 | - retrieved. |
2720 | - |
2721 | -attrsonly A boolean value that should be zero if both attribute types |
2722 | - and values are to be returned, non-zero if only types are |
2723 | - wanted. |
2724 | - |
2725 | -timeout For the ldap_search_st() function, this specifies the local |
2726 | - search timeout value. For the ldap_search_ext() and |
2727 | - ldap_search_ext_s() functions, this specifies both the |
2728 | - local search timeout value and the operation time limit |
2729 | - that is sent to the server within the search request. |
2730 | - |
2731 | -res For the synchronous calls, this is a result parameter which |
2732 | - will contain the results of the search upon completion of |
2733 | - the call. |
2734 | - |
2735 | -serverctrls List of LDAP server controls. |
2736 | - |
2737 | -clientctrls List of client controls. |
2738 | - |
2739 | -msgidp This result parameter will be set to the message id of the |
2740 | - request if the ldap_search_ext() call succeeds. |
2741 | - |
2742 | - |
2743 | - |
2744 | -Expires: January 1998 [Page 15] |
2745 | - |
2746 | |
2747 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
2748 | - |
2749 | - |
2750 | -There are three options in the session handle ld which potentially |
2751 | -affect how the search is performed. They are: |
2752 | - |
2753 | -LDAP_OPT_SIZELIMIT |
2754 | - A limit on the number of entries to return from the search. |
2755 | - A value of zero means no limit. Note that the value from |
2756 | - the session handle is ignored when using the |
2757 | - ldap_search_ext() or ldap_search_ext_s() functions. |
2758 | - |
2759 | -LDAP_OPT_TIMELIMIT |
2760 | - A limit on the number of seconds to spend on the search. A |
2761 | - value of zero means no limit. Note that the value from the |
2762 | - session handle is ignored when using the ldap_search_ext() |
2763 | - or ldap_search_ext_s() functions. |
2764 | - |
2765 | -LDAP_OPT_DEREF |
2766 | - One of LDAP_DEREF_NEVER (0x00), LDAP_DEREF_SEARCHING |
2767 | - (0x01), LDAP_DEREF_FINDING (0x02), or LDAP_DEREF_ALWAYS |
2768 | - (0x03), specifying how aliases should be handled during the |
2769 | - search. The LDAP_DEREF_SEARCHING value means aliases should |
2770 | - be dereferenced during the search but not when locating the |
2771 | - base object of the search. The LDAP_DEREF_FINDING value |
2772 | - means aliases should be dereferenced when locating the base |
2773 | - object but not during the search. |
2774 | - |
2775 | -The ldap_search_ext() function initiates an asynchronous search opera- |
2776 | -tion and returns the constant LDAP_SUCCESS if the request was success- |
2777 | -fully sent, or another LDAP error code if not. See the section below on |
2778 | -error handling for more information about possible errors and how to |
2779 | -interpret them. If successful, ldap_search_ext() places the message id |
2780 | -of the request in *msgidp. A subsequent call to ldap_result(), described |
2781 | -below, can be used to obtain the results from the search. These results |
2782 | -can be parsed using the result parsing routines described in detail |
2783 | -later. |
2784 | - |
2785 | -Similar to ldap_search_ext(), the ldap_search() function initiates an |
2786 | -asynchronous search operation and returns the message id of the opera- |
2787 | -tion initiated. As for ldap_search_ext(), a subsequent call to |
2788 | -ldap_result(), described below, can be used to obtain the result of the |
2789 | -bind. In case of error, ldap_search() will return -1, setting the ses- |
2790 | -sion error parameters in the LDAP structure appropriately. |
2791 | - |
2792 | -The synchronous ldap_search_ext_s(), ldap_search_s(), and |
2793 | -ldap_search_st() functions all return the result of the operation, |
2794 | -either the constant LDAP_SUCCESS if the operation was successful, or |
2795 | -another LDAP error code if it was not. See the section below on error |
2796 | -handling for more information about possible errors and how to interpret |
2797 | -them. Entries returned from the search (if any) are contained in the |
2798 | - |
2799 | - |
2800 | - |
2801 | -Expires: January 1998 [Page 16] |
2802 | - |
2803 | |
2804 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
2805 | - |
2806 | - |
2807 | -res parameter. This parameter is opaque to the caller. Entries, attri- |
2808 | -butes, values, etc., should be extracted by calling the parsing routines |
2809 | -described below. The results contained in res should be freed when no |
2810 | -longer in use by calling ldap_msgfree(), described later. |
2811 | - |
2812 | -The ldap_search_ext() and ldap_search_ext_s() functions support LDAPv3 |
2813 | -server controls, client controls, and allow varying size and time limits |
2814 | -to be easily specified for each search operation. The ldap_search_st() |
2815 | -function is identical to ldap_search_s() except that it takes an addi- |
2816 | -tional parameter specifying a local timeout for the search. |
2817 | - |
2818 | -7.7. Reading an Entry |
2819 | - |
2820 | -LDAP does not support a read operation directly. Instead, this operation |
2821 | -is emulated by a search with base set to the DN of the entry to read, |
2822 | -scope set to LDAP_SCOPE_BASE, and filter set to "(objectclass=*)". attrs |
2823 | -contains the list of attributes to return. |
2824 | - |
2825 | - |
2826 | -7.8. Listing the Children of an Entry |
2827 | - |
2828 | -LDAP does not support a list operation directly. Instead, this operation |
2829 | -is emulated by a search with base set to the DN of the entry to list, |
2830 | -scope set to LDAP_SCOPE_ONELEVEL, and filter set to "(objectclass=*)". |
2831 | -attrs contains the list of attributes to return for each child entry. |
2832 | - |
2833 | -7.9. Comparing a Value Against an Entry |
2834 | - |
2835 | -The following routines are used to compare a given attribute value |
2836 | -assertion against an LDAP entry. There are four variations: |
2837 | - |
2838 | - int ldap_compare_ext( |
2839 | - LDAP *ld, |
2840 | - char *dn, |
2841 | - char *attr, |
2842 | - struct berval *bvalue |
2843 | - LDAPControl **serverctrls, |
2844 | - LDAPControl **clientctrls, |
2845 | - int *msgidp |
2846 | - ); |
2847 | - |
2848 | - int ldap_compare_ext_s( |
2849 | - LDAP *ld, |
2850 | - char *dn, |
2851 | - char *attr, |
2852 | - struct berval *bvalue, |
2853 | - LDAPControl **serverctrls, |
2854 | - LDAPControl **clientctrls |
2855 | - |
2856 | - |
2857 | - |
2858 | -Expires: January 1998 [Page 17] |
2859 | - |
2860 | |
2861 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
2862 | - |
2863 | - |
2864 | - ); |
2865 | - |
2866 | - int ldap_compare( |
2867 | - LDAP *ld, |
2868 | - char *dn, |
2869 | - char *attr, |
2870 | - char *value |
2871 | - ); |
2872 | - |
2873 | - int ldap_compare_s( |
2874 | - LDAP *ld, |
2875 | - char *dn, |
2876 | - char *attr, |
2877 | - char *value |
2878 | - ); |
2879 | - |
2880 | -Parameters are: |
2881 | - |
2882 | -ld The session handle. |
2883 | - |
2884 | -dn The name of the entry to compare against. |
2885 | - |
2886 | -attr The attribute to compare against. |
2887 | - |
2888 | -bvalue The attribute value to compare against those found in the |
2889 | - given entry. This parameter is used in the extended rou- |
2890 | - tines and is a pointer to a struct berval so it is possible |
2891 | - to compare binary values. |
2892 | - |
2893 | -value A string attribute value to compare against, used by the |
2894 | - ldap_compare() and ldap_compare_s() functions. Use |
2895 | - ldap_compare_ext() or ldap_compare_ext_s() if you need to |
2896 | - compare binary values. |
2897 | - |
2898 | -serverctrls List of LDAP server controls. |
2899 | - |
2900 | -clientctrls List of client controls. |
2901 | - |
2902 | -msgidp This result parameter will be set to the message id of the |
2903 | - request if the ldap_compare_ext() call succeeds. |
2904 | - |
2905 | -The ldap_compare_ext() function initiates an asynchronous compare opera- |
2906 | -tion and returns the constant LDAP_SUCCESS if the request was success- |
2907 | -fully sent, or another LDAP error code if not. See the section below on |
2908 | -error handling for more information about possible errors and how to |
2909 | -interpret them. If successful, ldap_compare_ext() places the message id |
2910 | -of the request in *msgidp. A subsequent call to ldap_result(), described |
2911 | -below, can be used to obtain the result of the compare. |
2912 | - |
2913 | - |
2914 | - |
2915 | -Expires: January 1998 [Page 18] |
2916 | - |
2917 | |
2918 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
2919 | - |
2920 | - |
2921 | -Similar to ldap_compare_ext(), the ldap_compare() function initiates an |
2922 | -asynchronous compare operation and returns the message id of the opera- |
2923 | -tion initiated. As for ldap_compare_ext(), a subsequent call to |
2924 | -ldap_result(), described below, can be used to obtain the result of the |
2925 | -bind. In case of error, ldap_compare() will return -1, setting the ses- |
2926 | -sion error parameters in the LDAP structure appropriately. |
2927 | - |
2928 | -The synchronous ldap_compare_ext_s() and ldap_compare_s() functions both |
2929 | -return the result of the operation, either the constant LDAP_SUCCESS if |
2930 | -the operation was successful, or another LDAP error code if it was not. |
2931 | -See the section below on error handling for more information about pos- |
2932 | -sible errors and how to interpret them. |
2933 | - |
2934 | -The ldap_compare_ext() and ldap_compare_ext_s() functions support LDAPv3 |
2935 | -server controls and client controls. |
2936 | - |
2937 | - |
2938 | -7.10. Modifying an entry |
2939 | - |
2940 | -The following routines are used to modify an existing LDAP entry. There |
2941 | -are four variations: |
2942 | - |
2943 | - typedef struct ldapmod { |
2944 | - int mod_op; |
2945 | - char *mod_type; |
2946 | - union { |
2947 | - char **modv_strvals; |
2948 | - struct berval **modv_bvals; |
2949 | - } mod_vals; |
2950 | - } LDAPMod; |
2951 | - #define mod_values mod_vals.modv_strvals |
2952 | - #define mod_bvalues mod_vals.modv_bvals |
2953 | - |
2954 | - int ldap_modify_ext( |
2955 | - LDAP *ld, |
2956 | - char *dn, |
2957 | - LDAPMod **mods, |
2958 | - LDAPControl **serverctrls, |
2959 | - LDAPControl **clientctrls, |
2960 | - int *msgidp |
2961 | - ); |
2962 | - |
2963 | - int ldap_modify_ext_s( |
2964 | - LDAP *ld, |
2965 | - char *dn, |
2966 | - LDAPMod **mods, |
2967 | - LDAPControl **serverctrls, |
2968 | - LDAPControl **clientctrls |
2969 | - |
2970 | - |
2971 | - |
2972 | -Expires: January 1998 [Page 19] |
2973 | - |
2974 | |
2975 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
2976 | - |
2977 | - |
2978 | - ); |
2979 | - |
2980 | - int ldap_modify( |
2981 | - LDAP *ld, |
2982 | - char *dn, |
2983 | - LDAPMod **mods |
2984 | - ); |
2985 | - |
2986 | - int ldap_modify_s( |
2987 | - LDAP *ld, |
2988 | - char *dn, |
2989 | - LDAPMod **mods |
2990 | - ); |
2991 | - |
2992 | -Parameters are: |
2993 | - |
2994 | -ld The session handle. |
2995 | - |
2996 | -dn The name of the entry to modify. |
2997 | - |
2998 | -mods A NULL-terminated array of modifications to make to the |
2999 | - entry. |
3000 | - |
3001 | -serverctrls List of LDAP server controls. |
3002 | - |
3003 | -clientctrls List of client controls. |
3004 | - |
3005 | -msgidp This result parameter will be set to the message id of the |
3006 | - request if the ldap_modify_ext() call succeeds. |
3007 | - |
3008 | -The fields in the LDAPMod structure have the following meanings: |
3009 | - |
3010 | -mod_op The modification operation to perform. It should be one of |
3011 | - LDAP_MOD_ADD (0x00), LDAP_MOD_DELETE (0x01), or |
3012 | - LDAP_MOD_REPLACE (0x02). This field also indicates the |
3013 | - type of values included in the mod_vals union. It is logi- |
3014 | - cally ORed with LDAP_MOD_BVALUES (0x80) to select the |
3015 | - mod_bvalues form. Otherwise, the mod_values form is used. |
3016 | - |
3017 | -mod_type The type of the attribute to modify. |
3018 | - |
3019 | -mod_vals The values (if any) to add, delete, or replace. Only one of |
3020 | - the mod_values or mod_bvalues variants should be used, |
3021 | - selected by ORing the mod_op field with the constant |
3022 | - LDAP_MOD_BVALUES. mod_values is a NULL-terminated array of |
3023 | - zero-terminated strings and mod_bvalues is a NULL- |
3024 | - terminated array of berval structures that can be used to |
3025 | - pass binary values such as images. |
3026 | - |
3027 | - |
3028 | - |
3029 | -Expires: January 1998 [Page 20] |
3030 | - |
3031 | |
3032 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
3033 | - |
3034 | - |
3035 | -For LDAP_MOD_ADD modifications, the given values are added to the |
3036 | -entry, creating the attribute if necessary. |
3037 | - |
3038 | -For LDAP_MOD_DELETE modifications, the given values are deleted from the |
3039 | -entry, removing the attribute if no values remain. If the entire attri- |
3040 | -bute is to be deleted, the mod_vals field should be set to NULL. |
3041 | - |
3042 | -For LDAP_MOD_REPLACE modifications, the attribute will have the listed |
3043 | -values after the modification, having been created if necessary, or |
3044 | -removed if the mod_vals field is NULL. All modifications are performed |
3045 | -in the order in which they are listed. |
3046 | - |
3047 | -The ldap_modify_ext() function initiates an asynchronous modify opera- |
3048 | -tion and returns the constant LDAP_SUCCESS if the request was success- |
3049 | -fully sent, or another LDAP error code if not. See the section below on |
3050 | -error handling for more information about possible errors and how to |
3051 | -interpret them. If successful, ldap_modify_ext() places the message id |
3052 | -of the request in *msgidp. A subsequent call to ldap_result(), described |
3053 | -below, can be used to obtain the result of the modify. |
3054 | - |
3055 | -Similar to ldap_modify_ext(), the ldap_modify() function initiates an |
3056 | -asynchronous modify operation and returns the message id of the opera- |
3057 | -tion initiated. As for ldap_modify_ext(), a subsequent call to |
3058 | -ldap_result(), described below, can be used to obtain the result of the |
3059 | -modify. In case of error, ldap_modify() will return -1, setting the ses- |
3060 | -sion error parameters in the LDAP structure appropriately. |
3061 | - |
3062 | -The synchronous ldap_modify_ext_s() and ldap_modify_s() functions both |
3063 | -return the result of the operation, either the constant LDAP_SUCCESS if |
3064 | -the operation was successful, or another LDAP error code if it was not. |
3065 | -See the section below on error handling for more information about pos- |
3066 | -sible errors and how to interpret them. |
3067 | - |
3068 | -The ldap_modify_ext() and ldap_modify_ext_s() functions support LDAPv3 |
3069 | -server controls and client controls. |
3070 | - |
3071 | - |
3072 | -7.11. Modifying the Name of an Entry |
3073 | - |
3074 | -In LDAPv2, the ldap_modrdn() and ldap_modrdn_s() routines were used to |
3075 | -change the name of an LDAP entry. They could only be used to change the |
3076 | -least significant component of a name (the RDN or relative distinguished |
3077 | -name). LDAPv3 provides the Modify DN protocol operation that allows more |
3078 | -general name change access. The ldap_rename() and ldap_rename_s() rou- |
3079 | -tines are used to change the name of an entry, and the use of the |
3080 | -ldap_modrdn() and ldap_modrdn_s() routines is deprecated. |
3081 | - |
3082 | - int ldap_rename( |
3083 | - |
3084 | - |
3085 | - |
3086 | -Expires: January 1998 [Page 21] |
3087 | - |
3088 | |
3089 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
3090 | - |
3091 | - |
3092 | - LDAP *ld, |
3093 | - char *dn, |
3094 | - char *newrdn, |
3095 | - char *newparent, |
3096 | - int deleteoldrdn, |
3097 | - LDAPControl **serverctrls, |
3098 | - LDAPControl **clientctrls, |
3099 | - int *msgidp |
3100 | - |
3101 | - ); |
3102 | - int ldap_rename_s( |
3103 | - LDAP *ld, |
3104 | - char *dn, |
3105 | - char *newrdn, |
3106 | - char *newparent, |
3107 | - int deleteoldrdn, |
3108 | - LDAPControl **serverctrls, |
3109 | - LDAPControl **clientctrls |
3110 | - ); |
3111 | - |
3112 | - Use of the following routines is deprecated. |
3113 | - |
3114 | - int ldap_modrdn( |
3115 | - LDAP *ld, |
3116 | - char *dn, |
3117 | - char *newrdn, |
3118 | - int deleteoldrdn |
3119 | - ); |
3120 | - int ldap_modrdn_s( |
3121 | - LDAP *ld, |
3122 | - char *dn, |
3123 | - char *newrdn, |
3124 | - int deleteoldrdn |
3125 | - ); |
3126 | - |
3127 | -Parameters are: |
3128 | - |
3129 | -ld The session handle. |
3130 | - |
3131 | -dn The name of the entry whose DN is to be changed. |
3132 | - |
3133 | -newrdn The new RDN to give the entry. |
3134 | - |
3135 | -newparent The new parent, or superior entry. If this parameter is |
3136 | - NULL, only the RDN of the entry is changed. The root DN |
3137 | - may be specified by passing a zero length string, "". The |
3138 | - newparent parameter should always be NULL when using ver- |
3139 | - sion 2 of the LDAP protocol; otherwise the server's |
3140 | - |
3141 | - |
3142 | - |
3143 | -Expires: January 1998 [Page 22] |
3144 | - |
3145 | |
3146 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
3147 | - |
3148 | - |
3149 | - behavior is undefined. |
3150 | - |
3151 | -deleteoldrdn This parameter only has meaning on the rename routines if |
3152 | - newrdn is different than the old RDN. It is a boolean |
3153 | - value, if non-zero indicating that the old RDN value(s) |
3154 | - should be removed, if zero indicating that the old RDN |
3155 | - value(s) should be retained as non-distinguished values of |
3156 | - the entry. |
3157 | - |
3158 | -serverctrls List of LDAP server controls. |
3159 | - |
3160 | -clientctrls List of client controls. |
3161 | - |
3162 | -msgidp This result parameter will be set to the message id of the |
3163 | - request if the ldap_rename() call succeeds. |
3164 | - |
3165 | -The ldap_rename() function initiates an asynchronous modify DN operation |
3166 | -and returns the constant LDAP_SUCCESS if the request was successfully |
3167 | -sent, or another LDAP error code if not. See the section below on error |
3168 | -handling for more information about possible errors and how to interpret |
3169 | -them. If successful, ldap_rename() places the DN message id of the |
3170 | -request in *msgidp. A subsequent call to ldap_result(), described below, |
3171 | -can be used to obtain the result of the rename. |
3172 | - |
3173 | -The synchronous ldap_rename_s() returns the result of the operation, |
3174 | -either the constant LDAP_SUCCESS if the operation was successful, or |
3175 | -another LDAP error code if it was not. See the section below on error |
3176 | -handling for more information about possible errors and how to interpret |
3177 | -them. |
3178 | - |
3179 | -The ldap_rename() and ldap_rename_s() functions both support LDAPv3 |
3180 | -server controls and client controls. |
3181 | - |
3182 | - |
3183 | -7.12. Adding an entry |
3184 | - |
3185 | -The following functions are used to add entries to the LDAP directory. |
3186 | -There are four variations: |
3187 | - |
3188 | - int ldap_add_ext( |
3189 | - LDAP *ld, |
3190 | - char *dn, |
3191 | - LDAPMod **attrs, |
3192 | - LDAPControl **serverctrls, |
3193 | - LDAPControl **clientctrls, |
3194 | - int *msgidp |
3195 | - ); |
3196 | - |
3197 | - |
3198 | - |
3199 | - |
3200 | -Expires: January 1998 [Page 23] |
3201 | - |
3202 | |
3203 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
3204 | - |
3205 | - |
3206 | - int ldap_add_ext_s( |
3207 | - LDAP *ld, |
3208 | - char *dn, |
3209 | - LDAPMod **attrs, |
3210 | - LDAPControl **serverctrls, |
3211 | - LDAPControl **clientctrls |
3212 | - ); |
3213 | - |
3214 | - int ldap_add( |
3215 | - LDAP *ld, |
3216 | - char *dn, |
3217 | - LDAPMod **attrs |
3218 | - ); |
3219 | - |
3220 | - int ldap_add_s( |
3221 | - LDAP *ld, |
3222 | - char *dn, |
3223 | - LDAPMod **attrs |
3224 | - ); |
3225 | - |
3226 | -Parameters are: |
3227 | - |
3228 | -ld The session handle. |
3229 | - |
3230 | -dn The name of the entry to add. |
3231 | - |
3232 | -attrs The entry's attributes, specified using the LDAPMod struc- |
3233 | - ture defined for ldap_modify(). The mod_type and mod_vals |
3234 | - fields should be filled in. The mod_op field is ignored |
3235 | - unless ORed with the constant LDAP_MOD_BVALUES, used to |
3236 | - select the mod_bvalues case of the mod_vals union. |
3237 | - |
3238 | -serverctrls List of LDAP server controls. |
3239 | - |
3240 | -clientctrls List of client controls. |
3241 | - |
3242 | -msgidp This result parameter will be set to the message id of the |
3243 | - request if the ldap_add_ext() call succeeds. |
3244 | - |
3245 | -Note that the parent of the entry being added must already exist or the |
3246 | -parent must be empty (i.e., equal to the root DN) for an add to succeed. |
3247 | - |
3248 | -The ldap_add_ext() function initiates an asynchronous add operation and |
3249 | -returns the constant LDAP_SUCCESS if the request was successfully sent, |
3250 | -or another LDAP error code if not. See the section below on error han- |
3251 | -dling for more information about possible errors and how to interpret |
3252 | -them. If successful, ldap_add_ext() places the message id of the |
3253 | -request in *msgidp. A subsequent call to ldap_result(), described below, |
3254 | - |
3255 | - |
3256 | - |
3257 | -Expires: January 1998 [Page 24] |
3258 | - |
3259 | |
3260 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
3261 | - |
3262 | - |
3263 | -can be used to obtain the result of the add. |
3264 | - |
3265 | -Similar to ldap_add_ext(), the ldap_add() function initiates an asyn- |
3266 | -chronous add operation and returns the message id of the operation ini- |
3267 | -tiated. As for ldap_add_ext(), a subsequent call to ldap_result(), |
3268 | -described below, can be used to obtain the result of the add. In case of |
3269 | -error, ldap_add() will return -1, setting the session error parameters |
3270 | -in the LDAP structure appropriately. |
3271 | - |
3272 | -The synchronous ldap_add_ext_s() and ldap_add_s() functions both return |
3273 | -the result of the operation, either the constant LDAP_SUCCESS if the |
3274 | -operation was successful, or another LDAP error code if it was not. See |
3275 | -the section below on error handling for more information about possible |
3276 | -errors and how to interpret them. |
3277 | - |
3278 | -The ldap_add_ext() and ldap_add_ext_s() functions support LDAPv3 server |
3279 | -controls and client controls. |
3280 | - |
3281 | - |
3282 | - |
3283 | -7.13. Deleting an entry |
3284 | - |
3285 | -The following functions are used to delete a leaf entry from the LDAP |
3286 | -directory. There are four variations: |
3287 | - |
3288 | - int ldap_delete_ext( |
3289 | - LDAP *ld, |
3290 | - char *dn, |
3291 | - LDAPControl **serverctrls, |
3292 | - LDAPControl **clientctrls, |
3293 | - int *msgidp |
3294 | - ); |
3295 | - |
3296 | - int ldap_delete_ext_s( |
3297 | - LDAP *ld, |
3298 | - char *dn, |
3299 | - LDAPControl **serverctrls, |
3300 | - LDAPControl **clientctrls |
3301 | - ); |
3302 | - |
3303 | - int ldap_delete( |
3304 | - LDAP *ld, |
3305 | - char *dn |
3306 | - ); |
3307 | - |
3308 | - int ldap_delete_s( |
3309 | - LDAP *ld, |
3310 | - char *dn |
3311 | - |
3312 | - |
3313 | - |
3314 | -Expires: January 1998 [Page 25] |
3315 | - |
3316 | |
3317 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
3318 | - |
3319 | - |
3320 | - ); |
3321 | - |
3322 | -Parameters are: |
3323 | - |
3324 | -ld The session handle. |
3325 | - |
3326 | -dn The name of the entry to delete. |
3327 | - |
3328 | -serverctrls List of LDAP server controls. |
3329 | - |
3330 | -clientctrls List of client controls. |
3331 | - |
3332 | -msgidp This result parameter will be set to the message id of the |
3333 | - request if the ldap_delete_ext() call succeeds. |
3334 | - |
3335 | -Note that the entry to delete must be a leaf entry (i.e., it must have |
3336 | -no children). Deletion of entire subtrees in a single operation is not |
3337 | -supported by LDAP. |
3338 | - |
3339 | -The ldap_delete_ext() function initiates an asynchronous delete opera- |
3340 | -tion and returns the constant LDAP_SUCCESS if the request was success- |
3341 | -fully sent, or another LDAP error code if not. See the section below on |
3342 | -error handling for more information about possible errors and how to |
3343 | -interpret them. If successful, ldap_delete_ext() places the message id |
3344 | -of the request in *msgidp. A subsequent call to ldap_result(), described |
3345 | -below, can be used to obtain the result of the delete. |
3346 | - |
3347 | -Similar to ldap_delete_ext(), the ldap_delete() function initiates an |
3348 | -asynchronous delete operation and returns the message id of the opera- |
3349 | -tion initiated. As for ldap_delete_ext(), a subsequent call to |
3350 | -ldap_result(), described below, can be used to obtain the result of the |
3351 | -delete. In case of error, ldap_delete() will return -1, setting the ses- |
3352 | -sion error parameters in the LDAP structure appropriately. |
3353 | - |
3354 | -The synchronous ldap_delete_ext_s() and ldap_delete_s() functions both |
3355 | -return the result of the operation, either the constant LDAP_SUCCESS if |
3356 | -the operation was successful, or another LDAP error code if it was not. |
3357 | -See the section below on error handling for more information about pos- |
3358 | -sible errors and how to interpret them. |
3359 | - |
3360 | -The ldap_delete_ext() and ldap_delete_ext_s() functions support LDAPv3 |
3361 | -server controls and client controls. |
3362 | - |
3363 | - |
3364 | -7.14. Extended Operations |
3365 | - |
3366 | -The ldap_extended_operation() and ldap_extended_operation_s() routines |
3367 | -allow extended LDAP operations to be passed to the server, providing a |
3368 | - |
3369 | - |
3370 | - |
3371 | -Expires: January 1998 [Page 26] |
3372 | - |
3373 | |
3374 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
3375 | - |
3376 | - |
3377 | -general protocol extensibility mechanism. |
3378 | - |
3379 | - int ldap_extended_operation( |
3380 | - LDAP *ld, |
3381 | - char *exoid, |
3382 | - struct berval *exdata, |
3383 | - LDAPControl **serverctrls, |
3384 | - LDAPControl **clientctrls, |
3385 | - int *msgidp |
3386 | - ); |
3387 | - |
3388 | - int ldap_extended_operation_s( |
3389 | - LDAP *ld, |
3390 | - char *exoid, |
3391 | - struct berval *exdata, |
3392 | - LDAPControl **serverctrls, |
3393 | - LDAPControl **clientctrls, |
3394 | - char **retoidp, |
3395 | - struct berval **retdatap |
3396 | - ); |
3397 | - |
3398 | -Parameters are: |
3399 | - |
3400 | -ld The session handle. |
3401 | - |
3402 | -requestoid The dotted-OID text string naming the request. |
3403 | - |
3404 | -requestdata The arbitrary data required by the operation (if NULL, no |
3405 | - data is sent to the server). |
3406 | - |
3407 | -serverctrls List of LDAP server controls. |
3408 | - |
3409 | -clientctrls List of client controls. |
3410 | - |
3411 | -msgidp This result parameter will be set to the message id of the |
3412 | - request if the ldap_extended_operation() call succeeds. |
3413 | - |
3414 | -retoidp Pointer to a character string that will be set to an allo- |
3415 | - cated, dotted-OID text string returned by the server. This |
3416 | - string should be disposed of using the ldap_memfree() func- |
3417 | - tion. If no OID was returned, *retoidp is set to NULL. |
3418 | - |
3419 | -retdatap Pointer to a berval structure pointer that will be set an |
3420 | - allocated copy of the data returned by the server. This |
3421 | - struct berval should be disposed of using ber_bvfree(). If |
3422 | - no data is returned, *retdatap is set to NULL. |
3423 | - |
3424 | -The ldap_extended_operation() function initiates an asynchronous |
3425 | - |
3426 | - |
3427 | - |
3428 | -Expires: January 1998 [Page 27] |
3429 | - |
3430 | |
3431 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
3432 | - |
3433 | - |
3434 | -extended operation and returns the constant LDAP_SUCCESS if the request |
3435 | -was successfully sent, or another LDAP error code if not. See the sec- |
3436 | -tion below on error handling for more information about possible errors |
3437 | -and how to interpret them. If successful, ldap_extended_operation() |
3438 | -places the message id of the request in *msgidp. A subsequent call to |
3439 | -ldap_result(), described below, can be used to obtain the result of the |
3440 | -extended operation which can be passed to ldap_parse_extended_result() |
3441 | -to obtain the OID and data contained in the response. |
3442 | - |
3443 | -The synchronous ldap_extended_operation_s() function returns the result |
3444 | -of the operation, either the constant LDAP_SUCCESS if the operation was |
3445 | -successful, or another LDAP error code if it was not. See the section |
3446 | -below on error handling for more information about possible errors and |
3447 | -how to interpret them. The retoid and retdata parameters are filled in |
3448 | -with the OID and data from the response. If no OID or data was |
3449 | -returned, these parameters are set to NULL. |
3450 | - |
3451 | -The ldap_extended_operation() and ldap_extended_operation_s() functions |
3452 | -both support LDAPv3 server controls and client controls. |
3453 | - |
3454 | - |
3455 | -8. Abandoning An Operation |
3456 | - |
3457 | -The following calls are used to abandon an operation in progress: |
3458 | - |
3459 | - int ldap_abandon_ext( |
3460 | - LDAP *ld, |
3461 | - int msgid, |
3462 | - LDAPControl **serverctrls, |
3463 | - LDAPControl **clientctrls |
3464 | - ); |
3465 | - |
3466 | - int ldap_abandon( |
3467 | - LDAP *ld, |
3468 | - int msgid |
3469 | - ); |
3470 | - |
3471 | - |
3472 | -ld The session handle. |
3473 | - |
3474 | -msgid The message id of the request to be abandoned. |
3475 | - |
3476 | -serverctrls List of LDAP server controls. |
3477 | - |
3478 | -clientctrls List of client controls. |
3479 | - |
3480 | -ldap_abandon_ext() abandons the operation with message id msgid and |
3481 | -returns the constant LDAP_SUCCESS if the abandon was successful or |
3482 | - |
3483 | - |
3484 | - |
3485 | -Expires: January 1998 [Page 28] |
3486 | - |
3487 | |
3488 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
3489 | - |
3490 | - |
3491 | -another LDAP error code if not. See the section below on error handling |
3492 | -for more information about possible errors and how to interpret them. |
3493 | - |
3494 | -ldap_abandon() is identical to ldap_abandon_ext() except that it returns |
3495 | -zero if the abandon was successful, -1 otherwise and does not support |
3496 | -LDAPv3 server controls or client controls. |
3497 | - |
3498 | -After a successful call to ldap_abandon() or ldap_abandon_ext(), results |
3499 | -with the given message id are never returned from a subsequent call to |
3500 | -ldap_result(). There is no server response to LDAP abandon operations. |
3501 | - |
3502 | - |
3503 | -9. Obtaining Results and Peeking Inside LDAP Messages |
3504 | - |
3505 | -ldap_result() is used to obtain the result of a previous asynchronously |
3506 | -initiated operation. Note that depending on how it is called, |
3507 | -ldap_result() may actually return a list or "chain" of messages. |
3508 | - |
3509 | -ldap_msgfree() frees the results obtained from a previous call to |
3510 | -ldap_result(), or a synchronous search routine. |
3511 | - |
3512 | -ldap_msgtype() returns the type of an LDAP message. ldap_msgid() |
3513 | -returns the message ID of an LDAP message. |
3514 | - |
3515 | - int ldap_result( |
3516 | - LDAP *ld, |
3517 | - int msgid, |
3518 | - int all, |
3519 | - struct timeval *timeout, |
3520 | - LDAPMessage **res |
3521 | - ); |
3522 | - |
3523 | - int ldap_msgfree( LDAPMessage *res ); |
3524 | - |
3525 | - int ldap_msgtype( LDAPMessage *res ); |
3526 | - |
3527 | - int ldap_msgid( LDAPMessage *res ); |
3528 | - |
3529 | -Parameters are: |
3530 | - |
3531 | -ld The session handle. |
3532 | - |
3533 | -msgid The message id of the operation whose results are to be |
3534 | - returned, or the constant LDAP_RES_ANY (-1) if any result is |
3535 | - desired. |
3536 | - |
3537 | -all Specifies how many messages will be retrieved in a single call |
3538 | - to ldap_result(). This parameter only has meaning for search |
3539 | - |
3540 | - |
3541 | - |
3542 | -Expires: January 1998 [Page 29] |
3543 | - |
3544 | |
3545 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
3546 | - |
3547 | - |
3548 | - results. Pass the constant LDAP_MSG_ONE (0x00) to retrieve one |
3549 | - message at a time. Pass LDAP_MSG_ALL (0x01) to request that |
3550 | - all results of a search be received before returning all |
3551 | - results in a single chain. Pass LDAP_MSG_RECEIVED (0x02) to |
3552 | - indicate that all results retrieved so far should be returned |
3553 | - in the result chain. |
3554 | - |
3555 | -timeout A timeout specifying how long to wait for results to be |
3556 | - returned. A NULL value causes ldap_result() to block until |
3557 | - results are available. A timeout value of zero seconds speci- |
3558 | - fies a polling behavior. |
3559 | - |
3560 | -res For ldap_result(), a result parameter that will contain the |
3561 | - result(s) of the operation. For ldap_msgfree(), the result |
3562 | - chain to be freed, obtained from a previous call to |
3563 | - ldap_result(), ldap_search_s(), or ldap_search_st(). |
3564 | - |
3565 | -Upon successful completion, ldap_result() returns the type of the first |
3566 | -result returned in the res parameter. This will be one of the following |
3567 | -constants. |
3568 | - |
3569 | - LDAP_RES_BIND (0x61) |
3570 | - LDAP_RES_SEARCH_ENTRY (0x64) |
3571 | - LDAP_RES_SEARCH_REFERENCE (0x73) -- new in LDAPv3 |
3572 | - LDAP_RES_SEARCH_RESULT (0x65) |
3573 | - LDAP_RES_MODIFY (0x67) |
3574 | - LDAP_RES_ADD (0x69) |
3575 | - LDAP_RES_DELETE (0x6B) |
3576 | - LDAP_RES_MODDN (0x6D) |
3577 | - LDAP_RES_COMPARE (0x6F) |
3578 | - LDAP_RES_EXTENDED (0x78) -- new in LDAPv3 |
3579 | - |
3580 | -ldap_result() returns 0 if the timeout expired and -1 if an error |
3581 | -occurs, in which case the error parameters of the LDAP session handle |
3582 | -will be set accordingly. |
3583 | - |
3584 | -ldap_msgfree() frees the result structure pointed to by res and returns |
3585 | -the type of the message it freed. |
3586 | - |
3587 | -ldap_msgtype() returns the type of the LDAP message it is passed as a |
3588 | -parameter. The type will be one of the types listed above, or -1 on |
3589 | -error. |
3590 | - |
3591 | -ldap_msgid() returns the message ID associated with the LDAP message |
3592 | -passed as a parameter. |
3593 | - |
3594 | - |
3595 | - |
3596 | - |
3597 | - |
3598 | - |
3599 | -Expires: January 1998 [Page 30] |
3600 | - |
3601 | |
3602 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
3603 | - |
3604 | - |
3605 | -10. Handling Errors and Parsing Results |
3606 | - |
3607 | -The following calls are used to extract information from results and |
3608 | -handle errors returned by other LDAP API routines. |
3609 | - |
3610 | - int ldap_parse_result( |
3611 | - LDAP *ld, |
3612 | - LDAPMessage *res, |
3613 | - int *errcodep, |
3614 | - char **matcheddnp, |
3615 | - char **errmsgp, |
3616 | - char ***referralsp, |
3617 | - LDAPControl ***serverctrlsp, |
3618 | - int freeit |
3619 | - ); |
3620 | - |
3621 | - int ldap_parse_sasl_bind_result( |
3622 | - LDAP *ld, |
3623 | - LDAPMessage *res, |
3624 | - struct berval **servercredp, |
3625 | - int freeit |
3626 | - ); |
3627 | - |
3628 | - int ldap_parse_extended_result( |
3629 | - LDAP *ld, |
3630 | - LDAPMessage *res, |
3631 | - char **resultoidp, |
3632 | - struct berval **resultdata, |
3633 | - int freeit |
3634 | - ); |
3635 | - |
3636 | - char *ldap_err2string( int err ); |
3637 | - |
3638 | - The use of the following routines is deprecated. |
3639 | - |
3640 | - int ldap_result2error( |
3641 | - LDAP *ld, |
3642 | - LDAPMessage *res, |
3643 | - int freeit |
3644 | - ); |
3645 | - |
3646 | - void ldap_perror( LDAP *ld, char *msg ); |
3647 | - |
3648 | -Parameters are: |
3649 | - |
3650 | -ld The session handle. |
3651 | - |
3652 | -res The result of an LDAP operation as returned by |
3653 | - |
3654 | - |
3655 | - |
3656 | -Expires: January 1998 [Page 31] |
3657 | - |
3658 | |
3659 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
3660 | - |
3661 | - |
3662 | - ldap_result() or one of the synchronous API operation |
3663 | - calls. |
3664 | - |
3665 | -errcodep This result parameter will be filled in with the LDAP error |
3666 | - code field from the LDAPResult message. This is the indi- |
3667 | - cation from the server of the outcome of the operation. |
3668 | - NULL may be passed to ignore this field. |
3669 | - |
3670 | -matcheddnp In the case of a return of LDAP_NO_SUCH_OBJECT, this result |
3671 | - parameter will be filled in with a DN indicating how much |
3672 | - of the name in the request was recognized. NULL may be |
3673 | - passed to ignore this field. The matched DN string should |
3674 | - be freed by calling ldap_memfree() which is described later |
3675 | - in this document. |
3676 | - |
3677 | -errmsgp This result parameter will be filled in with the contents |
3678 | - of the error message field from the LDAPResult message. |
3679 | - The error message string should be freed by calling |
3680 | - ldap_memfree() which is described later in this document. |
3681 | - NULL may be passed to ignore this field. |
3682 | - |
3683 | -referralsp This result parameter will be filled in with the contents |
3684 | - of the referrals field from the LDAPResult message, indi- |
3685 | - cating zero or more alternate LDAP servers where the |
3686 | - request should be retried. The referrals array should be |
3687 | - freed by calling ldap_value_free() which is described later |
3688 | - in this document. NULL may be passed to ignore this field. |
3689 | - |
3690 | -serverctrlsp This result parameter will be filled in with an allocated |
3691 | - array of controls copied out of the LDAPResult message. |
3692 | - The control array should be freed by calling |
3693 | - ldap_controls_free() which was described earlier. |
3694 | - |
3695 | -freeit A boolean that determines whether the res parameter is |
3696 | - disposed of or not. Pass any non-zero value to have these |
3697 | - routines free res after extracting the requested informa- |
3698 | - tion. This is provided as a convenience; you can also use |
3699 | - ldap_msgfree() to free the result later. |
3700 | - |
3701 | -servercredp For SASL bind results, this result parameter will be filled |
3702 | - in with the credentials passed back by the server for |
3703 | - mutual authentication, if given. An allocated berval struc- |
3704 | - ture is returned that should be disposed of by calling |
3705 | - ldap_ber_free(). NULL may be passed to ignore this field. |
3706 | - |
3707 | -resultoidp For extended results, this result parameter will be filled |
3708 | - in with the dotted-OID text representation of the name of |
3709 | - the extended operation response. This string should be |
3710 | - |
3711 | - |
3712 | - |
3713 | -Expires: January 1998 [Page 32] |
3714 | - |
3715 | |
3716 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
3717 | - |
3718 | - |
3719 | - disposed of by calling ldap_memfree(). NULL may be passed |
3720 | - to ignore this field. |
3721 | - |
3722 | -resultdatap For extended results, this result parameter will be filled |
3723 | - in with a pointer to a struct berval containing the data in |
3724 | - the extended operation response. It should be disposed of |
3725 | - by calling ldap_ber_free(). NULL may be passed to ignore |
3726 | - this field. |
3727 | - |
3728 | -err For ldap_err2string(), an LDAP error code, as returned by |
3729 | - ldap_result2error() or another LDAP API call. |
3730 | - |
3731 | -Additional parameters for the deprecated routines are not described. |
3732 | -Interested readers are referred to RFC 1823. |
3733 | - |
3734 | -All of the ldap_parse_*_result() routines skip over messages of type |
3735 | -LDAP_RES_SEARCH_ENTRY and LDAP_RES_SEARCH_REFERENCE when looking for a |
3736 | -result message to parse. They return the constant LDAP_SUCCESS if the |
3737 | -result was successfully parsed and another LDAP error code if not. Note |
3738 | -that the LDAP error code that indicates the outcome of the operation |
3739 | -performed by the server is placed in the errcodep ldap_parse_result() |
3740 | -parameter. |
3741 | - |
3742 | -ldap_err2string() is used to convert a numeric LDAP error code, as |
3743 | -returned by one of the ldap_parse_*_result() routines, or one of the |
3744 | -synchronous API operation calls, into an informative NULL-terminated |
3745 | -character string message describing the error. It returns a pointer to |
3746 | -static data. |
3747 | - |
3748 | - |
3749 | -11. Stepping Through a List of Results |
3750 | - |
3751 | -The ldap_first_message() and ldap_next_message() routines are used to |
3752 | -step through the list of messages in a result chain returned by |
3753 | -ldap_result(). For search operations, the result chain may actually |
3754 | -include referral messages, entry messages, and result messages. |
3755 | -ldap_count_messages() is used to count the number of messages returned. |
3756 | -The ldap_msgtype() function, described above, can be used to distinguish |
3757 | -between the different message types. |
3758 | - |
3759 | - LDAPMessage *ldap_first_message( LDAP *ld, LDAPMessage *res ); |
3760 | - |
3761 | - LDAPMessage *ldap_next_message( LDAP *ld, LDAPMessage *msg ); |
3762 | - |
3763 | - int ldap_count_messages( LDAP *ld, LDAPMessage *res ); |
3764 | - |
3765 | -Parameters are: |
3766 | - |
3767 | - |
3768 | - |
3769 | - |
3770 | -Expires: January 1998 [Page 33] |
3771 | - |
3772 | |
3773 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
3774 | - |
3775 | - |
3776 | -ld The session handle. |
3777 | - |
3778 | -res The result chain, as obtained by a call to one of the synchronous |
3779 | - search routines or ldap_result(). |
3780 | - |
3781 | -msg The message returned by a previous call to ldap_first_message() |
3782 | - or ldap_next_message(). |
3783 | - |
3784 | -ldap_first_message() and ldap_next_message() will return NULL when no |
3785 | -more messages exist in the result set to be returned. NULL is also |
3786 | -returned if an error occurs while stepping through the entries, in which |
3787 | -case the error parameters in the session handle ld will be set to indi- |
3788 | -cate the error. |
3789 | - |
3790 | -ldap_count_messages() returns the number of messages contained in a |
3791 | -chain of results. It can also be used to count the number of messages |
3792 | -that remain in a chain if called with a message, entry, or reference |
3793 | -returned by ldap_first_message(), ldap_next_message(), |
3794 | -ldap_first_entry(), ldap_next_entry(), ldap_first_reference(), |
3795 | -ldap_next_reference(). |
3796 | - |
3797 | - |
3798 | -12. Parsing Search Results |
3799 | - |
3800 | -The following calls are used to parse the entries and references |
3801 | -returned by ldap_search() and friends. These results are returned in an |
3802 | -opaque structure that should only be accessed by calling the routines |
3803 | -described below. Routines are provided to step through the entries and |
3804 | -references returned, step through the attributes of an entry, retrieve |
3805 | -the name of an entry, and retrieve the values associated with a given |
3806 | -attribute in an entry. |
3807 | - |
3808 | - |
3809 | -12.1. Stepping Through a List of Entries |
3810 | - |
3811 | -The ldap_first_entry() and ldap_next_entry() routines are used to step |
3812 | -through and retrieve the list of entries from a search result chain. |
3813 | -The ldap_first_reference() and ldap_next_reference() routines are used |
3814 | -to step through and retrieve the list of continuation references from a |
3815 | -search result chain. ldap_count_entries() is used to count the number |
3816 | -of entries returned. ldap_count_references() is used to count the number |
3817 | -of references returned. |
3818 | - |
3819 | - LDAPMessage *ldap_first_entry( LDAP *ld, LDAPMessage *res ); |
3820 | - |
3821 | - LDAPMessage *ldap_next_entry( LDAP *ld, LDAPMessage *entry ); |
3822 | - |
3823 | - LDAPMessage *ldap_first_reference( LDAP *ld, LDAPMessage *res ); |
3824 | - |
3825 | - |
3826 | - |
3827 | -Expires: January 1998 [Page 34] |
3828 | - |
3829 | |
3830 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
3831 | - |
3832 | - |
3833 | - LDAPMessage *ldap_next_reference( LDAP *ld, LDAPMessage *ref ); |
3834 | - |
3835 | - int ldap_count_entries( LDAP *ld, LDAPMessage *res ); |
3836 | - |
3837 | - int ldap_count_references( LDAP *ld, LDAPMessage *res ); |
3838 | - |
3839 | -Parameters are: |
3840 | - |
3841 | -ld The session handle. |
3842 | - |
3843 | -res The search result, as obtained by a call to one of the synchro- |
3844 | - nous search routines or ldap_result(). |
3845 | - |
3846 | -entry The entry returned by a previous call to ldap_first_entry() or |
3847 | - ldap_next_entry(). |
3848 | - |
3849 | -ldap_first_entry() and ldap_next_entry() will return NULL when no more |
3850 | -entries or references exist in the result set to be returned. NULL is |
3851 | -also returned if an error occurs while stepping through the entries, in |
3852 | -which case the error parameters in the session handle ld will be set to |
3853 | -indicate the error. |
3854 | - |
3855 | -ldap_count_entries() returns the number of entries contained in a chain |
3856 | -of entries. It can also be used to count the number of entries that |
3857 | -remain in a chain if called with a message, entry or reference returned |
3858 | -by ldap_first_message(), ldap_next_message(), ldap_first_entry(), |
3859 | -ldap_next_entry(), ldap_first_reference(), ldap_next_reference(). |
3860 | - |
3861 | -ldap_count_references() returns the number of references contained in a |
3862 | -chain of search results. It can also be used to count the number of |
3863 | -references that remain in a chain. |
3864 | - |
3865 | - |
3866 | -12.2. Stepping Through the Attributes of an Entry |
3867 | - |
3868 | -The ldap_first_attribute() and ldap_next_attribute() calls are used to |
3869 | -step through the list of attribute types returned with an entry. |
3870 | - |
3871 | - char *ldap_first_attribute( |
3872 | - LDAP *ld, |
3873 | - LDAPMessage *entry, |
3874 | - BerElement **ptr |
3875 | - ); |
3876 | - |
3877 | - char *ldap_next_attribute( |
3878 | - LDAP *ld, |
3879 | - LDAPMessage *entry, |
3880 | - BerElement *ptr |
3881 | - |
3882 | - |
3883 | - |
3884 | -Expires: January 1998 [Page 35] |
3885 | - |
3886 | |
3887 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
3888 | - |
3889 | - |
3890 | - ); |
3891 | - |
3892 | - void ldap_memfree( char *mem ); |
3893 | - |
3894 | -Parameters are: |
3895 | - |
3896 | -ld The session handle. |
3897 | - |
3898 | -entry The entry whose attributes are to be stepped through, as returned |
3899 | - by ldap_first_entry() or ldap_next_entry(). |
3900 | - |
3901 | -ptr In ldap_first_attribute(), the address of a pointer used inter- |
3902 | - nally to keep track of the current position in the entry. In |
3903 | - ldap_next_attribute(), the pointer returned by a previous call to |
3904 | - ldap_first_attribute(). |
3905 | - |
3906 | -mem A pointer to memory allocated by the LDAP library, such as the |
3907 | - attribute names returned by ldap_first_attribute() and |
3908 | - ldap_next_attribute, or the DN returned by ldap_get_dn(). |
3909 | - |
3910 | -ldap_first_attribute() and ldap_next_attribute() will return NULL when |
3911 | -the end of the attributes is reached, or if there is an error, in which |
3912 | -case the error parameters in the session handle ld will be set to indi- |
3913 | -cate the error. |
3914 | - |
3915 | -Both routines return a pointer to an allocated buffer containing the |
3916 | -current attribute name. This should be freed when no longer in use by |
3917 | -calling ldap_memfree(). |
3918 | - |
3919 | -ldap_first_attribute() will allocate and return in ptr a pointer to a |
3920 | -BerElement used to keep track of the current position. This pointer |
3921 | -should be passed in subsequent calls to ldap_next_attribute() to step |
3922 | -through the entry's attributes. After a set of calls to |
3923 | -ldap_first_attribute() and ldap_next_attibute(), if ptr is non-NULL, it |
3924 | -should be freed by calling ldap_ber_free( ptr, 0 ). Note that it is very |
3925 | -important to pass the second parameter as 0 (zero) in this call. |
3926 | - |
3927 | -The attribute names returned are suitable for passing in a call to |
3928 | -ldap_get_values() and friends to retrieve the associated values. |
3929 | - |
3930 | - |
3931 | -12.3. Retrieving the Values of an Attribute |
3932 | - |
3933 | -ldap_get_values() and ldap_get_values_len() are used to retrieve the |
3934 | -values of a given attribute from an entry. ldap_count_values() and |
3935 | -ldap_count_values_len() are used to count the returned values. |
3936 | -ldap_value_free() and ldap_value_free_len() are used to free the values. |
3937 | - |
3938 | - |
3939 | - |
3940 | - |
3941 | -Expires: January 1998 [Page 36] |
3942 | - |
3943 | |
3944 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
3945 | - |
3946 | - |
3947 | - char **ldap_get_values( |
3948 | - LDAP *ld, |
3949 | - LDAPMessage *entry, |
3950 | - char *attr |
3951 | - ); |
3952 | - |
3953 | - struct berval **ldap_get_values_len( |
3954 | - LDAP *ld, |
3955 | - LDAPMessage *entry, |
3956 | - char *attr |
3957 | - ); |
3958 | - |
3959 | - int ldap_count_values( char **vals ); |
3960 | - |
3961 | - int ldap_count_values_len( struct berval **vals ); |
3962 | - |
3963 | - int ldap_value_free( char **vals ); |
3964 | - |
3965 | - int ldap_value_free_len( struct berval **vals ); |
3966 | - |
3967 | -Parameters are: |
3968 | - |
3969 | -ld The session handle. |
3970 | - |
3971 | -entry The entry from which to retrieve values, as returned by |
3972 | - ldap_first_entry() or ldap_next_entry(). |
3973 | - |
3974 | -attr The attribute whose values are to be retrieved, as returned by |
3975 | - ldap_first_attribute() or ldap_next_attribute(), or a caller- |
3976 | - supplied string (e.g., "mail"). |
3977 | - |
3978 | -vals The values returned by a previous call to ldap_get_values() or |
3979 | - ldap_get_values_len(). |
3980 | - |
3981 | -Two forms of the various calls are provided. The first form is only |
3982 | -suitable for use with non-binary character string data. The second _len |
3983 | -form is used with any kind of data. |
3984 | - |
3985 | -Note that the values returned are dynamically allocated and should be |
3986 | -freed by calling either ldap_value_free() or ldap_value_free_len() when |
3987 | -no longer in use. |
3988 | - |
3989 | - |
3990 | -12.4. Retrieving the name of an entry |
3991 | - |
3992 | -ldap_get_dn() is used to retrieve the name of an entry. |
3993 | -ldap_explode_dn() and ldap_explode_rdn() are used to break up a name |
3994 | -into its component parts. ldap_dn2ufn() is used to convert the name into |
3995 | - |
3996 | - |
3997 | - |
3998 | -Expires: January 1998 [Page 37] |
3999 | - |
4000 | |
4001 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
4002 | - |
4003 | - |
4004 | -a more "user friendly" format. |
4005 | - |
4006 | - char *ldap_get_dn( LDAP *ld, LDAPMessage *entry ); |
4007 | - |
4008 | - char **ldap_explode_dn( char *dn, int notypes ); |
4009 | - |
4010 | - char **ldap_explode_rdn( char *rdn, int notypes ); |
4011 | - |
4012 | - char *ldap_dn2ufn( char *dn ); |
4013 | - |
4014 | -Parameters are: |
4015 | - |
4016 | -ld The session handle. |
4017 | - |
4018 | -entry The entry whose name is to be retrieved, as returned by |
4019 | - ldap_first_entry() or ldap_next_entry(). |
4020 | - |
4021 | -dn The dn to explode, such as returned by ldap_get_dn(). |
4022 | - |
4023 | -rdn The rdn to explode, such as returned in the components of the |
4024 | - array returned by ldap_explode_dn(). |
4025 | - |
4026 | -notypes A boolean parameter, if non-zero indicating that the dn or rdn |
4027 | - components should have their type information stripped off |
4028 | - (i.e., "cn=Babs" would become "Babs"). |
4029 | - |
4030 | -ldap_get_dn() will return NULL if there is some error parsing the dn, |
4031 | -setting error parameters in the session handle ld to indicate the error. |
4032 | -It returns a pointer to malloc'ed space that the caller should free by |
4033 | -calling ldap_memfree() when it is no longer in use. Note the format of |
4034 | -the DNs returned is given by [4]. |
4035 | - |
4036 | -ldap_explode_dn() returns a NULL-terminated char * array containing the |
4037 | -RDN components of the DN supplied, with or without types as indicated by |
4038 | -the notypes parameter. The array returned should be freed when it is no |
4039 | -longer in use by calling ldap_value_free(). |
4040 | - |
4041 | -ldap_explode_rdn() returns a NULL-terminated char * array containing the |
4042 | -components of the RDN supplied, with or without types as indicated by |
4043 | -the notypes parameter. The array returned should be freed when it is no |
4044 | -longer in use by calling ldap_value_free(). |
4045 | - |
4046 | -ldap_dn2ufn() converts the DN into the user friendly format described in |
4047 | -[5]. The UFN returned is malloc'ed space that should be freed by a call |
4048 | -to ldap_memfree() when no longer in use. |
4049 | - |
4050 | - |
4051 | - |
4052 | - |
4053 | - |
4054 | - |
4055 | -Expires: January 1998 [Page 38] |
4056 | - |
4057 | |
4058 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
4059 | - |
4060 | - |
4061 | -13. Encoded ASN.1 Value Manipulation |
4062 | - |
4063 | -This section describes routines which may be used to encode and decode |
4064 | -BER-encoded ASN.1 values, which are often used inside of control and |
4065 | -extension values. |
4066 | - |
4067 | -With the exceptions of two new functions ber_flatten() and ber_init(), |
4068 | -these functions are compatible with the University of Michigan LDAP 3.3 |
4069 | -implementation of BER. |
4070 | - |
4071 | - |
4072 | -13.1. General |
4073 | - |
4074 | - struct berval { |
4075 | - unsigned long bv_len; |
4076 | - char *bv_val; |
4077 | - }; |
4078 | - |
4079 | -A struct berval contains a sequence of bytes and an indication of its |
4080 | -length. The bv_val is not null terminated. bv_len must always be a |
4081 | -nonnegative number. Applications may allocate their own berval struc- |
4082 | -tures. |
4083 | - |
4084 | - typedef struct berelement { |
4085 | - /* opaque */ |
4086 | - } BerElement; |
4087 | - |
4088 | -The BerElement structure contains not only a copy of the encoded value, |
4089 | -but also state information used in encoding or decoding. Applications |
4090 | -cannot allocate their own BerElement structures. The internal state is |
4091 | -neither thread-specific nor locked, so two threads should not manipulate |
4092 | -the same BerElement value simultaneously. |
4093 | - |
4094 | -A single BerElement value cannot be used for both encoding and decoding. |
4095 | - |
4096 | - void ber_bvfree ( struct berval *bv); |
4097 | - |
4098 | -ber_bvfree() frees a berval returned from this API. Both the bv->bv_val |
4099 | -string and the berval itself are freed. Applications should not use |
4100 | -ber_bvfree() with bervals which the application has allocated. |
4101 | - |
4102 | - void ber_bvecfree ( struct berval **bv ); |
4103 | - |
4104 | -ber_bvecfree() frees an array of bervals returned from this API. Each |
4105 | -of the bervals in the array are freed using ber_bvfree(), then the array |
4106 | -itself is freed. |
4107 | - |
4108 | - struct berval *ber_bvdup (struct berval *bv ); |
4109 | - |
4110 | - |
4111 | - |
4112 | -Expires: January 1998 [Page 39] |
4113 | - |
4114 | |
4115 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
4116 | - |
4117 | - |
4118 | -ber_bvdup() returns a copy of a berval. The bv_val field in the |
4119 | -returned berval points to a different area of memory as the bv_val field |
4120 | -in the argument berval. The null pointer is returned on error (e.g. out |
4121 | -of memory). |
4122 | - |
4123 | - void ber_free ( BerElement *ber, int fbuf ); |
4124 | - |
4125 | -ber_free() frees a BerElement which is returned from the API calls |
4126 | -ber_alloc_t() or ber_init(). Each BerElement must be freed by the |
4127 | -caller. The second argument fbuf should always be set to 1. |
4128 | - |
4129 | - |
4130 | -13.2. Encoding |
4131 | - |
4132 | - BerElement *ber_alloc_t(int options); |
4133 | - |
4134 | -ber_alloc_t() constructs and returns BerElement. The null pointer is |
4135 | -returned on error. The options field contains a bitwise-or of options |
4136 | -which are to be used when generating the encoding of this BerElement. |
4137 | -One option is defined and must always be supplied: |
4138 | - |
4139 | - #define LBER_USE_DER 0x01 |
4140 | - |
4141 | -When this option is present, lengths will always be encoded in the |
4142 | -minimum number of octets. Note that this option does not cause values |
4143 | -of sets and sequences to be rearranged in tag and byte order, so these |
4144 | -functions are not suitable for generating DER output as defined in X.509 |
4145 | -and X.680. |
4146 | - |
4147 | -Unrecognized option bits are ignored. |
4148 | - |
4149 | -The BerElement returned by ber_alloc_t() is initially empty. Calls to |
4150 | -ber_printf() will append bytes to the end of the ber_alloc_t(). |
4151 | - |
4152 | - int ber_printf(BerElement *ber, char *fmt, ... ) |
4153 | - |
4154 | -The ber_printf() routine is used to encode a BER element in much the |
4155 | -same way that sprintf() works. One important difference, though, is |
4156 | -that state information is kept in the ber argument so that multiple |
4157 | -calls can be made to ber_printf() to append to the end of the BER ele- |
4158 | -ment. ber must be a pointer to a BerElement returned by ber_alloc_t(). |
4159 | -ber_printf() interprets and formats its arguments according to the for- |
4160 | -mat string fmt. ber_printf() returns -1 if there is an error during |
4161 | -encoding. As with sprintf(), each character in fmt refers to an argu- |
4162 | -ment to ber_printf(). |
4163 | - |
4164 | -The format string can contain the following format characters: |
4165 | - |
4166 | - |
4167 | - |
4168 | - |
4169 | -Expires: January 1998 [Page 40] |
4170 | - |
4171 | |
4172 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
4173 | - |
4174 | - |
4175 | -'t' Tag. The next argument is an int specifying the tag to override |
4176 | - the next element to be written to the ber. This works across |
4177 | - calls. The int value must contain the tag class, constructed |
4178 | - bit, and tag value. The tag value must fit in a single octet |
4179 | - (tag value is less than 32). For example, a tag of "[3]" for a |
4180 | - constructed type is 0xA3. |
4181 | - |
4182 | -'b' Boolean. The next argument is an int, containing either 0 for |
4183 | - FALSE or 0xff for TRUE. A boolean element is output. If this |
4184 | - format character is not preceded by the 't' format modifier, the |
4185 | - tag 0x01 is used for the element. |
4186 | - |
4187 | -'i' Integer. The next argument is an int, containing the integer in |
4188 | - the host's byte order. An integer element is output. If this |
4189 | - format character is not preceded by the 't' format modifier, the |
4190 | - tag 0x02 is used for the element. |
4191 | - |
4192 | -'X' Bitstring. The next two arguments are a char * pointer to the |
4193 | - start of the bitstring, followed by an int containing the number |
4194 | - of bits in the bitstring. A bitstring element is output, in |
4195 | - primitive form. If this format character is not preceded by the |
4196 | - 't' format modifier, the tag 0x03 is used for the element. |
4197 | - |
4198 | -'n' Null. No argument is required. An ASN.1 NULL element is out- |
4199 | - put. If this format character is not preceded by the 't' format |
4200 | - modifier, the tag 0x05 is used for the element. |
4201 | - |
4202 | -'o' Octet string. The next two arguments are a char *, followed by |
4203 | - an int with the length of the string. The string may contain |
4204 | - null bytes and need not by null-terminated. An octet string |
4205 | - element is output, in primitive form. If this format character |
4206 | - is not preceded by the 't' format modifier, the tag 0x04 is used |
4207 | - for the element. |
4208 | - |
4209 | -'s' Octet string. The next argument is a char * pointing to a |
4210 | - null-terminated string. An octet string element in primitive |
4211 | - form is output, which does not include the trailing ' ' byte. If |
4212 | - this format character is not preceded by the 't' format modif- |
4213 | - ier, the tag 0x04 is used for the element. |
4214 | - |
4215 | -'v' Several octet strings. The next argument is a char **, an array |
4216 | - of char * pointers to null-terminated strings. The last element |
4217 | - in the array must be a null pointer. The octet strings do not |
4218 | - include the trailing SEQUENCE OF octet strings. The 't' format |
4219 | - modifier cannot be used with this format character. |
4220 | - |
4221 | -'V' Several octet strings. A null-terminated array of berval *'s is |
4222 | - supplied. Note that a construct like '{V}' is required to get an |
4223 | - |
4224 | - |
4225 | - |
4226 | -Expires: January 1998 [Page 41] |
4227 | - |
4228 | |
4229 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
4230 | - |
4231 | - |
4232 | - actual SEQUENCE OF octet strings. The 't' format modifier cannot |
4233 | - be used with this format character. |
4234 | - |
4235 | -'{' Begin sequence. No argument is required. If this format char- |
4236 | - acter is not preceded by the 't' format modifier, the tag 0x30 |
4237 | - is used. |
4238 | - |
4239 | -'}' End sequence. No argument is required. The 't' format modifier |
4240 | - cannot be used with this format character. |
4241 | - |
4242 | -'[' Begin set. No argument is required. If this format character |
4243 | - is not preceded by the 't' format modifier, the tag 0x31 is |
4244 | - used. |
4245 | - |
4246 | -']' End set. No argument is required. The 't' format modifier can- |
4247 | - not be used with this format character. |
4248 | - |
4249 | -Each use of a '{' format character must be matched by a '}' character, |
4250 | -either later in the format string, or in the format string of a subse- |
4251 | -quent call to ber_printf() for that BerElement. The same applies to the |
4252 | -'[' and |
4253 | - |
4254 | -Sequences and sets nest, and implementations of this API must maintain |
4255 | -internal state to be able to properly calculate the lengths. |
4256 | - |
4257 | - int ber_flatten (BerElement *ber, struct berval **bvPtr); |
4258 | - |
4259 | -The ber_flatten routine allocates a struct berval whose contents are a |
4260 | -BER encoding taken from the ber argument. The bvPtr pointer points to |
4261 | -the returned berval, which must be freed using ber_bvfree(). This rou- |
4262 | -tine returns 0 on success and -1 on error. |
4263 | - |
4264 | -The ber_flatten API call is not present in U-M LDAP 3.3. |
4265 | - |
4266 | -The use of ber_flatten on a BerElement in which all '{' and '}' format |
4267 | -modifiers have not been properly matched can result in a berval whose |
4268 | -contents are not a valid BER encoding. |
4269 | - |
4270 | - |
4271 | -13.3. Encoding Example |
4272 | - |
4273 | -The following is an example of encoding the following ASN.1 data type: |
4274 | - |
4275 | - Example1Request ::= SEQUENCE { |
4276 | - s OCTET STRING, -- must be printable |
4277 | - val1 INTEGER, |
4278 | - val2 [0] INTEGER DEFAULT 0 |
4279 | - } |
4280 | - |
4281 | - |
4282 | - |
4283 | -Expires: January 1998 [Page 42] |
4284 | - |
4285 | |
4286 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
4287 | - |
4288 | - |
4289 | - int encode_example1(char *s,int val1,int val2,struct berval **bvPtr) |
4290 | - { |
4291 | - BerElement *ber; |
4292 | - int rc; |
4293 | - |
4294 | - ber = ber_alloc_t(LBER_USE_DER); |
4295 | - |
4296 | - if (ber == NULL) return -1; |
4297 | - |
4298 | - if (ber_printf(ber,"{si",s,val1) == -1) { |
4299 | - ber_free(ber,1); |
4300 | - return -1; |
4301 | - } |
4302 | - |
4303 | - if (val2 != 0) { |
4304 | - if (ber_printf(ber,"ti",0x80,val2) == -1) { |
4305 | - ber_free(ber,1); |
4306 | - return -1; |
4307 | - } |
4308 | - } |
4309 | - |
4310 | - if (ber_printf(ber,"}") == -1) { |
4311 | - ber_free(ber,1); |
4312 | - return -1; |
4313 | - } |
4314 | - |
4315 | - rc = ber_flatten(ber,bvPtr); |
4316 | - ber_free(ber,1); |
4317 | - return -1; |
4318 | - } |
4319 | - |
4320 | - |
4321 | -13.4. Decoding |
4322 | - |
4323 | -The following two symbols are available to applications. |
4324 | - |
4325 | - #define LBER_ERROR 0xffffffffL |
4326 | - #define LBER_DEFAULT 0xffffffffL |
4327 | - |
4328 | - BerElement *ber_init (struct berval *bv); |
4329 | - |
4330 | -The ber_init functions construct BerElement and returns a new BerElement |
4331 | -containing a copy of the data in the bv argument. ber_init returns the |
4332 | -null pointer on error. |
4333 | - |
4334 | - unsigned long ber_scanf (BerElement *ber, char *fmt, ... ); |
4335 | - |
4336 | -The ber_scanf() routine is used to decode a BER element in much the same |
4337 | - |
4338 | - |
4339 | - |
4340 | -Expires: January 1998 [Page 43] |
4341 | - |
4342 | |
4343 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
4344 | - |
4345 | - |
4346 | -way that sscanf() works. One important difference, though, is that some |
4347 | -state information is kept with the ber argument so that multiple calls |
4348 | -can be made to ber_scanf() to sequentially read from the BER element. |
4349 | -The ber argument must be a pointer to a BerElement returned by |
4350 | -ber_init(). ber_scanf interprets the bytes according to the format |
4351 | -string fmt, and stores the results in its additional arguments. |
4352 | -ber_scanf() returns LBER_ERROR on error, and a nonnegative number on |
4353 | -success. |
4354 | - |
4355 | -The format string contains conversion specifications which are used to |
4356 | -direct the interpretation of the BER element. The format string can |
4357 | -contain the following characters: |
4358 | - |
4359 | -'a' Octet string. A char ** argument should be supplied. Memory is |
4360 | - allocated, filled with the contents of the octet string, null- |
4361 | - terminated, and the pointer to the string is stored in the argu- |
4362 | - ment. The returned value must be freed using ldap_memfree. The |
4363 | - tag of the element must indicate the primitive form (constructed |
4364 | - strings are not supported) but is otherwise ignored and dis- |
4365 | - carded during the decoding. This format cannot be used with |
4366 | - octet strings which could contain null bytes. |
4367 | - |
4368 | -'O' Octet string. A struct berval ** argument should be supplied, |
4369 | - which upon return points to a allocated struct berval containing |
4370 | - the octet string and its length. ber_bvfree() must be called to |
4371 | - free the allocated memory. The tag of the element must indicate |
4372 | - the primitive form (constructed strings are not supported) but |
4373 | - is otherwise ignored during the decoding. |
4374 | - |
4375 | -'b' Boolean. A pointer to an int should be supplied. The int value |
4376 | - stored will be 0 for FALSE or nonzero for TRUE. The tag of the |
4377 | - element must indicate the primitive form but is otherwise |
4378 | - ignored during the decoding. |
4379 | - |
4380 | -'i' Integer. A pointer to an int should be supplied. The int value |
4381 | - stored will be in host byte order. The tag of the element must |
4382 | - indicate the primitive form but is otherwise ignored during the |
4383 | - decoding. ber_scanf() will return an error if the integer can- |
4384 | - not be stored in an int. |
4385 | - |
4386 | -'B' Bitstring. A char ** argument should be supplied which will |
4387 | - point to the allocated bits, followed by an unsigned long * |
4388 | - argument, which will point to the length (in bits) of the bit- |
4389 | - string returned. ldap_memfree must be called to free the bit- |
4390 | - string. The tag of the element must indicate the primitive form |
4391 | - (constructed bitstrings are not supported) but is otherwise |
4392 | - ignored during the decoding. |
4393 | - |
4394 | - |
4395 | - |
4396 | - |
4397 | -Expires: January 1998 [Page 44] |
4398 | - |
4399 | |
4400 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
4401 | - |
4402 | - |
4403 | -'n' Null. No argument is required. The element is simply skipped |
4404 | - if it is recognized as a zero-length element. The tag is |
4405 | - ignored. |
4406 | - |
4407 | -'v' Several octet strings. A char *** argument should be supplied, |
4408 | - which upon return points to a allocated null-terminated array of |
4409 | - char *'s containing the octet strings. NULL is stored if the |
4410 | - sequence is empty. ldap_memfree must be called to free each |
4411 | - element of the array and the array itself. The tag of the |
4412 | - sequence and of the octet strings are ignored. |
4413 | - |
4414 | -'V' Several octet strings (which could contain null bytes). A |
4415 | - struct berval *** should be supplied, which upon return points |
4416 | - to a allocated null-terminated array of struct berval *'s con- |
4417 | - taining the octet strings and their lengths. NULL is stored if |
4418 | - the sequence is empty. ber_bvecfree() can be called to free the |
4419 | - allocated memory. The tag of the sequence and of the octet |
4420 | - strings are ignored. |
4421 | - |
4422 | -'x' Skip element. The next element is skipped. No argument is |
4423 | - required. |
4424 | - |
4425 | -'{' Begin sequence. No argument is required. The initial sequence |
4426 | - tag and length are skipped. |
4427 | - |
4428 | -'}' End sequence. No argument is required. |
4429 | - |
4430 | -'[' Begin set. No argument is required. The initial set tag and |
4431 | - length are skipped. |
4432 | - |
4433 | -']' End set. No argument is required. |
4434 | - |
4435 | - unsigned long ber_peek_tag (BerElement *ber, unsigned long *lenPtr); |
4436 | - |
4437 | -ber_peek_tag() returns the tag of the next element to be parsed in the |
4438 | -BerElement argument. The length of this element is stored in the |
4439 | -*lenPtr argument. LBER_DEFAULT is returned if there is no further data |
4440 | -to be read. The ber argument is not modified. |
4441 | - |
4442 | - unsigned long ber_skip_tag (BerElement *ber, unsigned long *lenPtr); |
4443 | - |
4444 | -ber_skip_tag() is similar to ber_peek_tag(), except that the state |
4445 | -pointer in the BerElement argument is advanced past the first tag and |
4446 | -length, and is pointed to the value part of the next element. This rou- |
4447 | -tine should only be used with constructed types and situations when a |
4448 | -BER encoding is used as the value of an OCTET STRING. The length of the |
4449 | -value is stored in *lenPtr. |
4450 | - |
4451 | - |
4452 | - |
4453 | - |
4454 | -Expires: January 1998 [Page 45] |
4455 | - |
4456 | |
4457 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
4458 | - |
4459 | - |
4460 | - unsigned long ber_first_element(BerElement *ber, |
4461 | - unsigned long *lenPtr, char **opaquePtr); |
4462 | - |
4463 | - unsigned long ber_next_element (BerElement *ber, |
4464 | - unsigned long *lenPtr, char *opaque); |
4465 | - |
4466 | -ber_first_element() and ber_next_element() are used to traverse a SET, |
4467 | -SET OF, SEQUENCE or SEQUENCE OF data value. ber_first_element() calls |
4468 | -ber_skip_tag(), stores internal information in *lenPtr and *opaquePtr, |
4469 | -and calls ber_peek_tag() for the first element inside the constructed |
4470 | -value. LBER_DEFAULT is returned if the constructed value is empty. |
4471 | -ber_next_element() positions the state at the start of the next element |
4472 | -in the constructed type. LBER_DEFAULT is returned if there are no |
4473 | -further values. |
4474 | - |
4475 | -The len and opaque values should not be used by applications other than |
4476 | -as arguments to ber_next_element(), as shown in the example below. |
4477 | - |
4478 | - |
4479 | -13.5. Decoding Example |
4480 | - |
4481 | -The following is an example of decoding an ASN.1 data type: |
4482 | - |
4483 | - Example2Request ::= SEQUENCE { |
4484 | - dn OCTET STRING, -- must be printable |
4485 | - scope ENUMERATED { b (0), s (1), w (2) }, |
4486 | - ali ENUMERATED { n (0), s (1), f (2), a (3) }, |
4487 | - size INTEGER, |
4488 | - time INTEGER, |
4489 | - tonly BOOLEAN, |
4490 | - attrs SEQUENCE OF OCTET STRING, -- must be printable |
4491 | - [0] SEQUENCE OF SEQUENCE { |
4492 | - type OCTET STRING -- must be printable, |
4493 | - crit BOOLEAN DEFAULT FALSE, |
4494 | - value OCTET STRING |
4495 | - } OPTIONAL } |
4496 | - |
4497 | - #define LDAP_TAG_CONTROL_LIST 0xA0L /* context specific cons 0 */ |
4498 | - |
4499 | - int decode_example2(struct berval *bv) |
4500 | - { |
4501 | - BerElement *ber; |
4502 | - unsigned long len; |
4503 | - int scope, ali, size, time, tonly; |
4504 | - char *dn = NULL, **attrs = NULL; |
4505 | - int res,i,rc = 0; |
4506 | - |
4507 | - ber = ber_init(bv); |
4508 | - |
4509 | - |
4510 | - |
4511 | -Expires: January 1998 [Page 46] |
4512 | - |
4513 | |
4514 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
4515 | - |
4516 | - |
4517 | - if (ber == NULL) { |
4518 | - printf("ERROR ber_init failed0); |
4519 | - return -1; |
4520 | - } |
4521 | - |
4522 | - res = ber_scanf(ber,"{aiiiiib{v}",&dn,&scope,&ali, |
4523 | - &size,&time,&tonly,&attrs); |
4524 | - |
4525 | - if (res == -1) { |
4526 | - printf("ERROR ber_scanf failed0); |
4527 | - ber_free(ber,1); |
4528 | - return -1; |
4529 | - } |
4530 | - |
4531 | - /* *** use dn */ |
4532 | - ldap_memfree(dn); |
4533 | - |
4534 | - for (i = 0; attrs != NULL && attrs[i] != NULL; i++) { |
4535 | - /* *** use attrs[i] */ |
4536 | - ldap_memfree(attrs[i]); |
4537 | - } |
4538 | - ldap_memfree(attrs); |
4539 | - |
4540 | - if (ber_peek_tag(ber,&len) == LDAP_TAG_CONTROL_LIST) { |
4541 | - char *opaque; |
4542 | - unsigned long tag; |
4543 | - |
4544 | - for (tag = ber_first_element(ber,&len,&opaque); |
4545 | - tag != LBER_DEFAULT; |
4546 | - tag = ber_next_element (ber,&len,opaque)) { |
4547 | - |
4548 | - unsigned long ttag, tlen; |
4549 | - char *type; |
4550 | - int crit; |
4551 | - struct berval *value; |
4552 | - |
4553 | - if (ber_scanf(ber,"{a",&type) == LBER_ERROR) { |
4554 | - printf("ERROR cannot parse type0); |
4555 | - break; |
4556 | - } |
4557 | - /* *** use type */ |
4558 | - ldap_memfree(type); |
4559 | - |
4560 | - ttag = ber_peek_tag(ber,&tlen); |
4561 | - if (ttag == 0x01) { /* boolean */ |
4562 | - if (ber_scanf(ber,"b", |
4563 | - &crit) == LBER_ERROR) { |
4564 | - printf("ERROR cannot parse crit0); |
4565 | - |
4566 | - |
4567 | - |
4568 | -Expires: January 1998 [Page 47] |
4569 | - |
4570 | |
4571 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
4572 | - |
4573 | - |
4574 | - rc = -1; |
4575 | - break; |
4576 | - } |
4577 | - } else if (ttag == 0x04) { /* octet string */ |
4578 | - crit = 0; |
4579 | - } else { |
4580 | - printf("ERROR extra field in controls0); |
4581 | - break; |
4582 | - } |
4583 | - |
4584 | - if (ber_scanf(ber,"O}",&value) == LBER_ERROR) { |
4585 | - printf("ERROR cannot parse value0); |
4586 | - rc = -1; |
4587 | - break; |
4588 | - } |
4589 | - /* *** use value */ |
4590 | - ldap_bvfree(value); |
4591 | - } |
4592 | - } |
4593 | - |
4594 | - ber_scanf(ber,"}"); |
4595 | - |
4596 | - ber_free(ber,1); |
4597 | - |
4598 | - return rc; |
4599 | - } |
4600 | - |
4601 | - |
4602 | - |
4603 | -14. Security Considerations |
4604 | - |
4605 | -LDAPv2 supports security through protocol-level authentication using |
4606 | -clear-text passwords. LDAPv3 adds support for SASL [8] (Simple Authen- |
4607 | -tication Security Layer) methods. LDAPv3 also supports operation over a |
4608 | -secure transport layer using Transport Layer Security TLS [8]. Readers |
4609 | -are referred to the protocol documents for discussion of related secu- |
4610 | -rity considerations. |
4611 | - |
4612 | -Implementations of this API should be cautious when handling authentica- |
4613 | -tion credentials. In particular, keeping long-lived copies of creden- |
4614 | -tials without the application's knowledge is discouraged. |
4615 | - |
4616 | - |
4617 | -15. Acknowledgements |
4618 | - |
4619 | -Many members of the IETF ASID working group as well as members of the |
4620 | -Internet at large have provided useful comments and suggestions that |
4621 | -have been incorporated into this revision. |
4622 | - |
4623 | - |
4624 | - |
4625 | -Expires: January 1998 [Page 48] |
4626 | - |
4627 | |
4628 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
4629 | - |
4630 | - |
4631 | -This original material upon which this revision is based was based upon |
4632 | -work supported by the National Science Foundation under Grant No. NCR- |
4633 | -9416667. |
4634 | - |
4635 | - |
4636 | -16. Bibliography |
4637 | - |
4638 | -[1] The Directory: Selected Attribute Syntaxes. CCITT, Recommendation |
4639 | - X.520. |
4640 | - |
4641 | -[2] M. Wahl, A. Coulbeck, T. Howes, S. Kille, W. Yeong, C. Robbins, |
4642 | - "Lightweight Directory Access Protocol Attribute Syntax Defini- |
4643 | - tions", INTERNET-DRAFT <draft-ietf-asid-ldapv3-attributes-06.txt>, |
4644 | - 11 July 1997. |
4645 | - |
4646 | -[3] T. Howes, "A String Representation of LDAP Search Filters," |
4647 | - INTERNET-DRAFT <draft-ietf-asid-ldapv3-filter-02.txt>, May 1997. |
4648 | - |
4649 | -[4] S. Kille, M. Wahl, "A UTF-8 String Representation of Distinguished |
4650 | - Names", INTERNET-DRAFT <draft-ietf-asid-ldapv3-dn-03.txt>, 29 April |
4651 | - 1997. |
4652 | - |
4653 | -[5] S. Kille, "Using the OSI Directory to Achieve User Friendly Nam- |
4654 | - ing," RFC 1781, March 1995. |
4655 | - |
4656 | -[6] M. Wahl, T. Howes, S. Kille, "Lightweight Directory Access Protocol |
4657 | - (v3)", INTERNET-DRAFT <draft-ietf-asid-ldapv3-protocol-06.txt>, 11 |
4658 | - July 1997. |
4659 | - |
4660 | -[7] A. Herron, T. Howes, M. Wahl, "LDAP Control Extension for Server |
4661 | - Side Sorting of Search Result," INTERNET-DRAFT <draft-ietf-asid- |
4662 | - ldapv3-sorting-00.txt>, 16 April 1997. |
4663 | - |
4664 | -[8] J. Meyers, "Simple Authentication and Security Layer", INTERNET- |
4665 | - DRAFT <draft-myers-auth-sasl-11.txt>, April 1997. |
4666 | - |
4667 | -[9] "Lightweight Directory Access Protocol (v3) Extension for Transport |
4668 | - Layer Security", INTERNET-DRAFT <draft-ietf-asid-ldapv3-tls- |
4669 | - 01.txt>, June 1997. |
4670 | - |
4671 | -[10] "UTF-8, a transformation format of Unicode and ISO 10646", RFC |
4672 | - 2044, October 1996. |
4673 | - |
4674 | -[11] "IP Version 6 Addressing Architecture,", RFC 1884, December 1995. |
4675 | - |
4676 | - |
4677 | - |
4678 | - |
4679 | - |
4680 | - |
4681 | - |
4682 | -Expires: January 1998 [Page 49] |
4683 | - |
4684 | |
4685 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
4686 | - |
4687 | - |
4688 | -17. Author's Addresses |
4689 | - |
4690 | - Tim Howes |
4691 | - Netscape Communications Corp. |
4692 | - 501 E. Middlefield Rd., Mailstop MV068 |
4693 | - Mountain View, CA 94043 |
4694 | - USA |
4695 | - +1 415 937-3419 |
4696 | - howes@netscape.com |
4697 | - |
4698 | - |
4699 | - Mark Smith |
4700 | - Netscape Communications Corp. |
4701 | - 501 E. Middlefield Rd., Mailstop MV068 |
4702 | - Mountain View, CA 94043 |
4703 | - USA |
4704 | - +1 415 937-3477 |
4705 | - mcs@netscape.com |
4706 | - |
4707 | - Andy Herron |
4708 | - Microsoft Corp. |
4709 | - 1 Microsoft Way |
4710 | - Redmond, WA 98052 |
4711 | - USA |
4712 | - +1 425 882-8080 |
4713 | - andyhe@microsoft.com |
4714 | - |
4715 | - Chris Weider |
4716 | - Microsoft Corp. |
4717 | - 1 Microsoft Way |
4718 | - Redmond, WA 98052 |
4719 | - USA |
4720 | - +1 425 882-8080 |
4721 | - cweider@microsoft.com |
4722 | - |
4723 | - Mark Wahl |
4724 | - Critical Angle Inc. |
4725 | - 4815 W Braker Lane #502-385 |
4726 | - Austin, TX 78759 |
4727 | - USA |
4728 | - M.Wahl@critical-angle.com |
4729 | - |
4730 | - |
4731 | -18. Appendix A - Sample LDAP API Code |
4732 | - |
4733 | - #include <ldap.h> |
4734 | - |
4735 | - main() |
4736 | - |
4737 | - |
4738 | - |
4739 | -Expires: January 1998 [Page 50] |
4740 | - |
4741 | |
4742 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
4743 | - |
4744 | - |
4745 | - { |
4746 | - LDAP *ld; |
4747 | - LDAPMessage *res, *e; |
4748 | - int i; |
4749 | - char *a, *dn; |
4750 | - BerElement *ptr; |
4751 | - char **vals; |
4752 | - |
4753 | - /* open an LDAP session */ |
4754 | - if ( (ld = ldap_init( "dotted.host.name", LDAP_PORT )) == NULL ) |
4755 | - exit( 1 ); |
4756 | - |
4757 | - /* authenticate as nobody */ |
4758 | - if ( ldap_simple_bind_s( ld, NULL, NULL ) != LDAP_SUCCESS ) { |
4759 | - ldap_perror( ld, "ldap_simple_bind_s" ); |
4760 | - exit( 1 ); |
4761 | - } |
4762 | - |
4763 | - /* search for entries with cn of "Babs Jensen", return all attrs */ |
4764 | - if ( ldap_search_s( ld, "o=University of Michigan, c=US", |
4765 | - LDAP_SCOPE_SUBTREE, "(cn=Babs Jensen)", NULL, 0, &res ) |
4766 | - != LDAP_SUCCESS ) { |
4767 | - ldap_perror( ld, "ldap_search_s" ); |
4768 | - exit( 1 ); |
4769 | - } |
4770 | - |
4771 | - /* step through each entry returned */ |
4772 | - for ( e = ldap_first_entry( ld, res ); e != NULL; |
4773 | - e = ldap_next_entry( ld, e ) ) { |
4774 | - /* print its name */ |
4775 | - dn = ldap_get_dn( ld, e ); |
4776 | - printf( "dn: %s\n", dn ); |
4777 | - ldap_memfree( dn ); |
4778 | - |
4779 | - /* print each attribute */ |
4780 | - for ( a = ldap_first_attribute( ld, e, &ptr ); a != NULL; |
4781 | - a = ldap_next_attribute( ld, e, ptr ) ) { |
4782 | - printf( "attribute: %s\n", a ); |
4783 | - |
4784 | - /* print each value */ |
4785 | - vals = ldap_get_values( ld, e, a ); |
4786 | - for ( i = 0; vals[i] != NULL; i++ ) { |
4787 | - printf( "value: %s\n", vals[i] ); |
4788 | - } |
4789 | - ldap_value_free( vals ); |
4790 | - } |
4791 | - if ( ptr != NULL ) { |
4792 | - ldap_ber_free( ptr, 0 ); |
4793 | - |
4794 | - |
4795 | - |
4796 | -Expires: January 1998 [Page 51] |
4797 | - |
4798 | |
4799 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
4800 | - |
4801 | - |
4802 | - } |
4803 | - } |
4804 | - /* free the search results */ |
4805 | - ldap_msgfree( res ); |
4806 | - |
4807 | - /* close and free connection resources */ |
4808 | - ldap_unbind( ld ); |
4809 | - } |
4810 | - |
4811 | - |
4812 | - |
4813 | -19. Appendix B - Outstanding Issues |
4814 | - |
4815 | - |
4816 | -19.1. Support for multithreaded applications |
4817 | - |
4818 | -In order to support multithreaded applications in a platform-independent |
4819 | -way, some additions to the LDAP API are needed. Different implementors |
4820 | -have taken different paths to solve this problem in the past. A common |
4821 | -set of thread-related API calls must be defined so that application |
4822 | -developers are not unduly burdened. These will be added to a future |
4823 | -revision of this specification. |
4824 | - |
4825 | - |
4826 | -19.2. Using Transport Layer Security (TLS) |
4827 | - |
4828 | -The API calls used to support TLS must be specified. They will be added |
4829 | -to a future revision of this specification. |
4830 | - |
4831 | - |
4832 | -19.3. Client control for chasing referrals |
4833 | - |
4834 | -A client control has been defined that can be used to specify on a per- |
4835 | -operation basis whether references and external referrals are automati- |
4836 | -cally chased by the client library. This will be added to a future |
4837 | -revision of this specification. |
4838 | - |
4839 | - |
4840 | -19.4. Potential confusion between hostname:port and IPv6 addresses |
4841 | - |
4842 | -String representations of IPv6 network addresses [11] can contain colon |
4843 | -characters. The ldap_init() call is specified to take strings of the |
4844 | -form "hostname:port" or "ipaddress:port". If IPv6 addresses are used, |
4845 | -the latter could be ambiguous. A future revision of this specification |
4846 | -will resolve this issue. |
4847 | - |
4848 | - |
4849 | - |
4850 | - |
4851 | - |
4852 | - |
4853 | -Expires: January 1998 [Page 52] |
4854 | - |
4855 | |
4856 | -C LDAP API The C LDAP Application Program Interface 29 July 1997 |
4857 | - |
4858 | - |
4859 | -19.5. Need to track SASL API standardization efforts |
4860 | - |
4861 | -If a standard Simple Authentication and Security Layer API is defined, |
4862 | -it may be necessary to modify the LDAP API to accommodate it. |
4863 | - |
4864 | - |
4865 | -19.6. Support for character sets other than UTF-8? |
4866 | - |
4867 | -Some application developers would prefer to pass string data using a |
4868 | -character set other than UTF-8. This could be accommodated by adding a |
4869 | -new option to ldap_set_option() that supports choosing a character set. |
4870 | -If this feature is added, the number of different character sets sup- |
4871 | -ported should definitely be minimized. |
4872 | - |
4873 | - |
4874 | -19.7. Use of UTF-8 with LDAPv2 servers |
4875 | - |
4876 | -Strings are always passed as UTF-8 in this API but LDAP version 2 |
4877 | -servers do not support the full range of UTF-8 characters. The expected |
4878 | -behavior of this API when using LDAP version 2 with unsupported charac- |
4879 | -ters should be specified. |
4880 | - |
4881 | - |
4882 | - |
4883 | - |
4884 | - |
4885 | - |
4886 | - |
4887 | - |
4888 | - |
4889 | - |
4890 | - |
4891 | - |
4892 | - |
4893 | - |
4894 | - |
4895 | - |
4896 | - |
4897 | - |
4898 | - |
4899 | - |
4900 | - |
4901 | - |
4902 | - |
4903 | - |
4904 | - |
4905 | - |
4906 | - |
4907 | - |
4908 | - |
4909 | - |
4910 | -Expires: January 1998 [Page 53] |
4911 | - |
4912 | |
4913 | - |
4914 | - |
4915 | -1. Status of this Memo............................................1 |
4916 | -2. Introduction...................................................1 |
4917 | -3. Overview of the LDAP Model.....................................2 |
4918 | -4. Overview of LDAP API Use.......................................3 |
4919 | -5. Common Data Structures.........................................4 |
4920 | -6. LDAP Error Codes...............................................5 |
4921 | -7. Performing LDAP Operations.....................................6 |
4922 | -7.1. Initializing an LDAP Session................................6 |
4923 | -7.2. LDAP Session Handle Options.................................7 |
4924 | -7.3. Working with controls.......................................10 |
4925 | -7.4. Authenticating to the directory.............................11 |
4926 | -7.5. Closing the session.........................................13 |
4927 | -7.6. Searching...................................................13 |
4928 | -7.7. Reading an Entry............................................17 |
4929 | -7.8. Listing the Children of an Entry............................17 |
4930 | -7.9. Comparing a Value Against an Entry..........................17 |
4931 | -7.10. Modifying an entry..........................................19 |
4932 | -7.11. Modifying the Name of an Entry..............................21 |
4933 | -7.12. Adding an entry.............................................23 |
4934 | -7.13. Deleting an entry...........................................25 |
4935 | -7.14. Extended Operations.........................................26 |
4936 | -8. Abandoning An Operation........................................28 |
4937 | -9. Obtaining Results and Peeking Inside LDAP Messages.............29 |
4938 | -10. Handling Errors and Parsing Results............................31 |
4939 | -11. Stepping Through a List of Results.............................33 |
4940 | -12. Parsing Search Results.........................................34 |
4941 | -12.1. Stepping Through a List of Entries..........................34 |
4942 | -12.2. Stepping Through the Attributes of an Entry.................35 |
4943 | -12.3. Retrieving the Values of an Attribute.......................36 |
4944 | -12.4. Retrieving the name of an entry.............................37 |
4945 | -13. Encoded ASN.1 Value Manipulation...............................39 |
4946 | -13.1. General.....................................................39 |
4947 | -13.2. Encoding....................................................40 |
4948 | -13.3. Encoding Example............................................42 |
4949 | -13.4. Decoding....................................................43 |
4950 | -13.5. Decoding Example............................................46 |
4951 | -14. Security Considerations........................................48 |
4952 | -15. Acknowledgements...............................................48 |
4953 | -16. Bibliography...................................................49 |
4954 | -17. Author's Addresses.............................................50 |
4955 | -18. Appendix A - Sample LDAP API Code..............................50 |
4956 | -19. Appendix B - Outstanding Issues................................52 |
4957 | -19.1. Support for multithreaded applications......................52 |
4958 | -19.2. Using Transport Layer Security (TLS)........................52 |
4959 | -19.3. Client control for chasing referrals........................52 |
4960 | -19.4. Potential confusion between hostname:port and IPv6 addresses52 |
4961 | -19.5. Need to track SASL API standardization efforts..............53 |
4962 | -19.6. Support for character sets other than UTF-8?................53 |
4963 | -19.7. Use of UTF-8 with LDAPv2 servers............................53 |
4964 | - |
4965 | - |
4966 | - |
4967 | - |
4968 | - |
4969 | - |
4970 | - |
4971 | - |
4972 | |
4973 | === modified file 'plugins-src/eldap-wrapper/package.mk' |
4974 | --- plugins-src/eldap-wrapper/package.mk 2012-02-28 09:55:49 +0000 |
4975 | +++ plugins-src/eldap-wrapper/package.mk 2012-06-20 17:39:44 +0000 |
4976 | @@ -2,7 +2,7 @@ |
4977 | |
4978 | UPSTREAM_GIT:=https://github.com/etnt/eldap.git |
4979 | UPSTREAM_REVISION:=e309de4db4b78d67d623 |
4980 | -WRAPPER_PATCHES:=eldap-appify.patch remove-eldap-fsm.patch eldap-no-ssl-seed.patch |
4981 | +WRAPPER_PATCHES:=eldap-appify.patch remove-eldap-fsm.patch eldap-no-ssl-seed.patch remove-ietf-doc.patch |
4982 | |
4983 | ORIGINAL_APP_FILE:=$(CLONE_DIR)/ebin/$(APP_NAME).app |
4984 | DO_NOT_GENERATE_APP_FILE=true |
4985 | |
4986 | === added file 'plugins-src/eldap-wrapper/remove-ietf-doc.patch' |
4987 | --- plugins-src/eldap-wrapper/remove-ietf-doc.patch 1970-01-01 00:00:00 +0000 |
4988 | +++ plugins-src/eldap-wrapper/remove-ietf-doc.patch 2012-06-20 17:39:44 +0000 |
4989 | @@ -0,0 +1,3036 @@ |
4990 | +diff --git a/doc/draft-ietf-asid-ldap-c-api-00.txt b/doc/draft-ietf-asid-ldap-c-api-00.txt |
4991 | +deleted file mode 100755 |
4992 | +index 5f2e856..0000000 |
4993 | +--- a/doc/draft-ietf-asid-ldap-c-api-00.txt |
4994 | ++++ /dev/null |
4995 | +@@ -1,3030 +0,0 @@ |
4996 | +- |
4997 | +- |
4998 | +- |
4999 | +- |
5000 | +- |
The diff has been truncated for viewing.
Nicely done Marc, uploaded!