OpenChange public core branch released.
authorJulien Kerihuel <j.kerihuel@openchange.org>
Sun, 29 Oct 2006 13:04:32 +0000 (13:04 +0000)
committerJulien Kerihuel <j.kerihuel@openchange.org>
Sun, 29 Oct 2006 13:04:32 +0000 (13:04 +0000)
Many parts of the code are currently broken and have
to be fixed soon.

For the moment the current code should be used
to build libmapi.so needed by ndrdump in KBPortal.

jkerihuel

78 files changed:
ChangeLog [new file with mode: 0644]
Makefile.in [new file with mode: 0644]
aclocal.m4 [new file with mode: 0644]
autogen.sh [new file with mode: 0755]
config.h [new file with mode: 0644]
config.h.in [new file with mode: 0644]
configure [new file with mode: 0755]
configure.ac [new file with mode: 0644]
doc/howto.txt [new file with mode: 0644]
doc/smb.conf.example [new file with mode: 0644]
eplugins/oc-plugin/openchange-plugin.c [new file with mode: 0644]
eplugins/oc-plugin/org-openchange-plugin.eplug.in [new file with mode: 0644]
eplugins/sample-plugin/org-openchange-sample-plugin.eplug.in [new file with mode: 0644]
eplugins/sample-plugin/sample-plugin.c [new file with mode: 0644]
exchange.idl [new file with mode: 0644]
idl_types.h [new file with mode: 0644]
install-sh [new file with mode: 0644]
ldif/AD_schema_kerihu_j_exchange [new file with mode: 0644]
ldif/AD_schema_nspiusertest [new file with mode: 0644]
ldif/AD_schema_nspiusertest_exchange [new file with mode: 0644]
libmapi/IMAPISession.idl [new file with mode: 0644]
libmapi/conf/build.sh [new file with mode: 0755]
libmapi/conf/mapi-codes [new file with mode: 0644]
libmapi/conf/mapi-properties [new file with mode: 0644]
libmapi/conf/mparse.pl [new file with mode: 0755]
libmapi/conf/tag2ad.pm [new file with mode: 0755]
libmapi/conf/tagsconfgen.pl [new file with mode: 0755]
libmapi/container.c [new file with mode: 0644]
libmapi/emsmdb.c [new file with mode: 0644]
libmapi/include/emsmdb.h [new file with mode: 0644]
libmapi/include/mapi.h [new file with mode: 0644]
libmapi/include/mapidefs.h [new file with mode: 0644]
libmapi/include/mapitables.h [new file with mode: 0644]
libmapi/include/nspi.h [new file with mode: 0644]
libmapi/include/property.h [new file with mode: 0644]
libmapi/mapi.c [new file with mode: 0644]
libmapi/mapitables.c [new file with mode: 0644]
libmapi/nspi.c [new file with mode: 0644]
libmapi/property.c [new file with mode: 0644]
libmapi/storedb/storedb.c [new file with mode: 0644]
libmapi/tag_to_ad_name.c [new file with mode: 0644]
libmapi/tests/locale.c [new file with mode: 0644]
libmapi/tests/locale_codepage.c [new file with mode: 0644]
libmapi/tests/store.c [new file with mode: 0644]
libmapi/util/codepage.c [new file with mode: 0644]
libmapi/util/locale.c [new file with mode: 0644]
libmapi/util/mapidump.c [new file with mode: 0644]
libmapi/util/mapidump.h [new file with mode: 0644]
libmapi/utils.c [new file with mode: 0644]
libmapi/x500.c [new file with mode: 0644]
ndr_mapi.c [new file with mode: 0644]
ndr_mapi.h [new file with mode: 0644]
openchange.h [new file with mode: 0644]
providers/emsabp.c [new file with mode: 0644]
providers/emsabp.h [new file with mode: 0644]
script/installoc.sh [new file with mode: 0755]
script/mkproto.pl [new file with mode: 0755]
scripting/libjs/oc_provision.js [new file with mode: 0644]
server/dcesrv_exchange.c [new file with mode: 0644]
server/dcesrv_exchange.h [new file with mode: 0644]
setup/oc_newuser [new file with mode: 0755]
setup/oc_provision [new file with mode: 0755]
setup/oc_provision.ldif [new file with mode: 0644]
setup/oc_provision_configuration.ldif [new file with mode: 0644]
setup/oc_provision_containers.ldif [new file with mode: 0644]
setup/oc_provision_init.ldif [new file with mode: 0644]
setup/oc_provision_schema.ldif [new file with mode: 0644]
setup/oc_provision_schema_modify.ldif [new file with mode: 0644]
torture/emsmdb.c [new file with mode: 0644]
torture/exchange.c [new file with mode: 0644]
torture/nspi.c [new file with mode: 0644]
torture/nspi_profile.c [new file with mode: 0644]
torture/nspi_scantags.c [new file with mode: 0644]
torture/openchange.c [new file with mode: 0644]
torture/scantags/nspi_scantags.conf [new file with mode: 0644]
torture/scantags/proptags.conf [new file with mode: 0644]
torture/testjoin_exchange.c [new file with mode: 0644]
utils/schemaIDGUID.c [new file with mode: 0644]

diff --git a/ChangeLog b/ChangeLog
new file mode 100644 (file)
index 0000000..0bfdc6e
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,488 @@
+2006-05-02     Jelmer Vernooij <jelmer@samba.org>
+
+       * ChangeLog: Simplify build system code a bit.
+
+2006-05-01    Julien Kerihuel <j.kerihuel@openchange.org>
+
+       * ChangeLog: Evolution plugin option enabled
+
+2006-03-21     Jelmer Vernooij <jelmer@samba.org>
+
+       * ChangeLog: Builds and runs now!
+
+2006-03-17     Jelmer Vernooij <jelmer@samba.org>
+       
+       * ChangeLog: All files build now. Also worked on improving 
+       portability.
+
+2006-03-16     Jelmer Vernooij <jelmer@samba.org>
+
+       * ChangeLog: More work on OpenChange as a plugin. Most files build now.
+
+2006-03-09     Jelmer Vernooij <jelmer@samba.org>
+
+       * ChangeLog: More work on OpenChange as a plugin. 
+
+2006-02-12  Julien Kerihuel  <kerihu_j@zion.whitefocus.org>
+
+       * ChangeLog: nspi API now works with Exchange 2000 on Windows
+       SP4. Fix a bug in DNToEph which now uses the good x500
+       organization string. nspi_DNToEph IDL changed from a SPropTagArray
+       to a DNToEph_key structure.
+
+       mparse.pl changed so each tags now have a _ERROR version.
+
+       x500.c file added. The objective is to have an API allowing us to
+       explode and build x500 dn strings.
+       
+2006-01-06     Jelmer Vernooij <jelmer@samba.org>
+
+       * ChangeLog: More work on OpenChange as a plugin. 
+
+2006-01-03     Jelmer Vernooij <jelmer@samba.org>
+
+       * ChangeLog: More work on OpenChange as a plugin. 
+
+2006-01-01     Jelmer Vernooij <jelmer@samba.org>
+
+       * ChangeLog: Initial migration of OpenChange to being a plugin in Samba 4
+
+2005-12-01  Julien Kerihuel  <j.kerihuel@openchange.org>
+       
+       * ChangeLog: SPropTagArray parameter added for nspi functions
+       sending property tags arrays (NspiQueryRows, NspiGetMatches,
+       NspiGetProps). Exisitng SPropTagArray moved into nspi_profile.c
+       torture test.
+
+2005-11-29  Julien Kerihuel  <j.kerihuel@openchange.org>
+
+       * ChangeLog: PT_ERROR and PT_MV_UNICODE version of multi-valued
+       PT_MV_STRING8 property tags are now generated
+
+       mapicodes_enum.idl is now generated by mparse and defines an enum
+       named MAPICODES. This enum replaces the old uint32_t value for
+       PT_ERROR in SPropValue switch case.
+
+       MAPISTATUS data type has been removed from TypeList.pm and added
+       as an enumeration in the auto-generated file mapicodes_enum.idl.
+       MAPI Error codes have been removed from libmapi/include/mapicode.h
+       so there are no duplicated data. The auto-generated mapicode.c
+       file has been kept and uses ndr_print_MAPISTATUS from
+       librpc/gen_ndr/ndr_exchange.c
+       
+       * ChangeLog: libmapi/include/mapicode.h and libmapi/mapicode.c are
+       now auto-generated from mparse.pl at compilation time.
+
+2005-11-28  Julien Kerihuel  <j.kerihuel@openchange.org>
+
+       * ChangeLog: PT_ERROR types for property tags with PT_STRING8 or
+       PT_UNICODE type has been added to mapitags.{c,h} and
+       mapitags_enum.h.
+
+       - libmapi/config.mk now force to compile if modifications have been
+       added to mparse.pl
+       
+       - libmapi/conf/mapi-codes file has been added to the repository.
+       This file is for future use. The objective is to remove
+       include/mapicode.h and util/mapicode.c and auto-generate them +
+       create an enum for mapi error code and add it into exchange.idl.
+       Last but not least this file will help removing MAPISTATUS type
+       and replace it with an enum.
+       
+2005-10-31  Julien Kerihuel  <j.kerihuel@openchange.org>
+
+       * ChangeLog: GetHierarchyInfo now retrieves without any memory
+       allocation problem a SRowSet data strucure with all information
+       necessary for Outlook.
+
+       I now have to find how are container sorted and replace the
+       Recipients DISPLAY_NAME for the top recipients by a NULL string.
+
+2005-10-30  Julien Kerihuel  <j.kerihuel@openchange.org>
+
+       * ChangeLog: WARNING: This build SIGSEGV and is only temporary so
+       we can keep the merge with Samab4 up to date. There is memory
+       allocation problems with GetHierarchyInfo.
+
+       - source/libmapi/utils.c added. This file contains the
+       generate_recipient_entryid function which takes the PR_ENTRYID
+       field value, modify it the way Outlook expects it and returns a
+       struct SBinary.
+       
+       - the PR_ENTRYID field for the recipient with PR_DISPLAY_NAME
+       value set to NULL is now hardcoded in source/libmapi/utils.c
+
+       - add the recipient objectClass
+
+       - fixed the storedb schema
+
+       - libmapi/storedb/storedb.c filled with several functions which
+       access the store.
+
+       - GetHierarchyTable implemented
+
+       - a sample set_PropValue function has been added to
+       libmapi/property.c
+
+2005-10-27  Julien Kerihuel  <j.kerihuel@openchange.org>
+
+       * ChangeLog: OpenChange store schema fixed. Removed a superficial
+       Root Container and replaced it with the real one. basedn for Root
+       Container has been fixed.
+
+       storedb_search_container_tree function added to storedb.c
+       
+2005-10-26  Julien Kerihuel  <j.kerihuel@openchange.org>
+
+       * ChangeLog: change IsMaster attribute from INTEGER to STRING
+       storedb_search_count function added to the storedb subsystem.
+       
+       * ChangeLog: 
+       - member attribute replaces child in the storedb schema.
+       - memberOf attribute has been added and refer to the container's
+       parent.
+       - cn and name attributes overlapped. In order to have a generic
+       store, name has been removed and cn will be used instead.
+       - IsMaster attribute replaces master one.
+
+       storedb_search_dn function has been added to the storedb.c file.
+
+       a 0xFFFFFFFF containerID value has been assigned to the Root
+       container. This is temporary until we figure how to name it
+       correctly.
+
+       GetHierarchyInfo has been enhanced with a call to
+       storedb_search_dn for testing purpose.
+       
+       * ChangeLog: szSTORE_URL and lp_store_url() removed in
+       param/loadparm.c and replaced with a parametric option
+       exchange:store in smb.conf.
+
+       store binary added to test nspi function implementation. It will
+       be used at first to test GetHierarchyInfo and storedb
+       behavior/results.
+
+2005-10-25  Julien Kerihuel  <j.kerihuel@openchange.org>
+
+       * ChangeLog: libmapi/storedb directory added and STOREDB subsystem
+       appended to config.mk. A basic storedb implementation has been
+       added with the storedb_connect() fcnt.
+
+       - LIBMAPI_CORE now depends on STOREDB to compile container.c
+       (GetHierarchyInfo)
+
+       - OpenChange global parameter szSTORE_URL and lp_store_url()
+       function have been added to param/loadparm.c
+       
+2005-10-24  Julien Kerihuel  <j.kerihuel@openchange.org>
+
+       * ChangeLog: A basic howto has been added in OpenChange/howto.txt
+       so developers can easily configure OpenChange server and test it.
+       
+       * ChangeLog: entryID field added to container ldif file. entryID
+       value is an auto-generated GUID.
+       
+       * ChangeLog: libmapi/setup directory added. Scripts and skeleton
+       design have been added. We can create a default openchange
+       store with the containers requested in NspiGetHierarchyInfo.
+
+       sudo make installoc: install openchange script in /usr/local/samba/*
+       and allow to use openchange provision script.
+
+       libmapi/container.c added: This file contains the prototype of
+       GetHierarchyInfo and will access containers objectClass in the
+       store.ldb database. This database is set up using openchange setup
+       scripts.
+       
+       * ChangeLog: When samba4 changed the compilation system, a
+       conflict was detected for torture/config.mk. While the conflict
+       had been resolved, smbtorture refused to compile due to a blank
+       list of dependencies generated in Makefile. This commit fix this
+       compilation problem. diff with previous version to see the
+       "changes".
+
+2005-10-23  Julien Kerihuel  <j.kerihuel@openchange.org>
+
+       * ChangeLog: Fix libmapi build system
+       GetHierarchyInfo ulFlags added to mapidefs.h
+
+2005-10-20  Julien Kerihuel  <j.kerihuel@openchange.org>
+
+       * ChangeLog: 
+       - PR_SERVICE_INSTALL_ID (0x3d13001e) property tag added to
+       mapi-properties
+       - PR_CONTAINER_FLAGS added to libmapi/include/mapidefs.h
+       
+       * ChangeLog: Container flags added to libmapi/include/mapidefs.h
+       
+       * ChangeLog: mparse.pl now generates UNICODE version of PT_STRING8
+       property tags.
+       
+       * ChangeLog: bugs fixed in locale_codepage
+       - Code has been enhanced and now supports the -i option which
+       prints information, the user only have to paste into smb.conf to
+       have a running configuration. Need to add codepage support for a
+       given language.
+       - rpc_server/exchange/dcesrv_exchange.c now supports
+       NspiBind. GUID is auto-generated.
+       
+       
+2005-10-17  Julien Kerihuel  <j.kerihuel@openchange.org>
+
+       * ChangeLog: fix a var name bug in torture/rpc/emsmdb.c
+       
+       * ChangeLog: 
+       - removed spurious [ref] in exchange.idl and replaced ascstr with
+       [string,charset(DOS)] according to the new Jelmer's string
+       implementation.
+       - OpenChange/smb.conf sample updated
+       - RPC-NSPI_PROFILE now specify the server name in nspi_DNToEph
+       with --option="exchange:server=SERVER"
+       - Sample NSPI server implementation added to
+       rpc_server/exchange/dcerpc_exchange.c
+       - Temporary bug fix in libndr/ndr/ndr_string.c: CH_DOS strings
+       [size] and [length] are pushed on the network as if they were
+       non-null terminated string (ascstr_noterm). ndr_charset_length has
+       been modified to add the NULL character to the global string
+       length.
+       
+2005-10-12  Julien Kerihuel  <j.kerihuel@openchange.org>
+
+       * ChangeLog: "name" NAME_STRING field replaced by "server_dn" in
+       NspiDNToEph
+
+2005-10-11  Julien Kerihuel  <j.kerihuel@openchange.org>
+
+       * ChangeLog: Fixed an unknown property tags in libmapi/nspi.c due
+       to the recent libmapi/conf/mapi-properties modifications.
+
+       * ChangeLog: 
+       - mparse.pl now generates a MAPITAGS enum for exchange.idl.
+       - uint32_t ulPropTag has been replaced with MAPITAGS ulPropTag.
+       - ndrdump now displays MAPI property tags and associated values.
+       - mapitags.h include has been removed from include/includes.h
+       - duplicated tags removed from mapi-properties (BUSINESS tags and
+       personal researches)
+       
+2005-10-10  Julien Kerihuel  <j.kerihuel@openchange.org>
+
+       * ChangeLog: source/libmapi/conf directory added.
+       - mapi-properties file from Gnome Evolution added.
+       - mparse.pl perl code generator added.
+       - source/libmapi/include/mapitags.h and source/libmapi/mapitags.c
+         are now auto-generated from mapi-properties
+
+       * ChangeLog: RPC-NSPI_PROFILE test is now GENERIC. 
+
+       nspi_DNToEph has been modified to be generic: the required string
+       uses domain and Exchange netbios name:
+       - cli_credentials_get_domain
+       --option="exchange:server=SERVERNAME"
+
+       * ChangeLog: The fix Jelmer added has been removed due to ndr_pull
+       error in emsmdb_connect.
+       
+2005-10-07  Julien Kerihuel  <j.kerihuel@openchange.org>
+
+       * ChangeLog: Fix a bug: NspiQueryRows now uses the PR_INSTANCE_KEY
+       value returned by NspiGetMatches. instance_key field now replaces
+       a previously unknown field in NspiGetMatches [in].
+
+       struct mapi_profile added to nspi_context. This structure profile
+       information returned by the Exchange server.
+       
+       * ChangeLog: get_SPropValue_SRowSet function added to
+       source/libmapi/property.c return wanetd SPropValue structure from
+       a RowSet structure.
+       
+       * ChangeLog: NspiGetProps IDL and implementation in libmapi/nspi.c
+       is now working with the RPC-NSPI_PROFILE torture test. The first
+       RPC-NSPI_PROFILE test is now working.
+       
+       * ChangeLog: Fixed compilation error in torture/rpc/nspi.c - Bad
+       number of arguments for nspi_bind.
+
+       * ChangeLog: NspiDoToEph IDL and implementation in libmapi/nspi.c
+       is now working with the RPC-NSPI_PROFILE torture
+       test. Auto-generate the string will have to be implemented later
+       to make nspi_DnToEph generic.
+
+2005-10-07  Julien Kerihuel  <j.kerihuel@openchange.org>
+
+       * ChangeLog: NspiQueryRows IDL and implementation in
+       libmapi/nspi.c is now working with the RPC-NSPI_PROFILE torture
+       test.
+       
+       * ChangeLog: if no exchange:username option is provided then
+       NT4 username is used in NspiGetMatches.
+
+       OpenChange/smb.conf sample OpenChange configuration file added.
+       
+       * ChangeLog: NspiGetMatches IDL and implementation in
+       libmapi/nspi.c is now working with the RPC-NSPI_PROFILE torture
+       test. The username to check can be set on command-line using the
+       following argument:
+
+       --option="exchange:username=value"
+
+       source/libmapi/property.c file added. A function creating a
+       variable SPropTag array has been added.
+
+       source/libmapi/include/mapitags.h added. Include property tags
+       used in RPC-NSPI_PROFILE test.
+
+       source/libmapi/include/mapidefs.h added. Include restriction types
+       defines.
+       
+2005-10-06  Julien Kerihuel  <j.kerihuel@openchange.org>
+
+       * Changelog: Fix return values for NspiGetHierarchyInfo and
+       NspiGetMatches in rpc_server/exchange/dcesrv_exchange.c
+       
+       * Changelog: nspi_set_MAPI_SETTINGS function added in
+       libmapi/nspi.c. MAPI_SETTINGS seems to be used in most of the NSPI
+       functions IDL. This functions allocate a MAPI_SETTINGS structure
+       and set the default parameters (handle, codepage and locale_id).
+       Codepage, Language and Method can be set from command-line using
+       the following arguments:
+
+       --option="locale:codepage=value" 
+       --option="locale:language=value"
+       --option="locale:method=value"
+
+       nspi_set_MAPI_SETTINGS is called from nspi_bind.
+       a MAPI_SETTINGS structure has been added in nspi_context.
+
+       All the MAPI_SETTINGS common code has been removed from the
+       different nspi calls and replaced by an assignment to
+       nspi_context->settings.
+
+       * Changelog: Replace uint8_t padding[16] with a MAPIUID structure
+       and named it service_provider.
+       
+2005-10-05  Julien Kerihuel  <j.kerihuel@openchange.org>
+
+       * Changelog: NspiGetMatches IDL added, works for [in] and [out]
+
+2005-10-04  Julien Kerihuel  <j.kerihuel@openchange.org>
+
+       * Changelog: NspiGetHierarchyInfo IDL works for [in] and
+       [out]. Function added to source/libmapi/nspi.c and
+       RPC-NSPI_PROFILE torture case.
+
+2005-10-02  Julien Kerihuel  <j.kerihuel@openchange.org>
+
+       * Changelog: RPC-NSPI_PROFILE test skeleton ( NspiBind and
+       NspiUnbind) added in smbtorture. The objective is to create a
+       torture test able to create a MAPI Profile.
+       
+       libmapi/nspi.c and libmapi/include/nspi.h added:
+       - nspi_bind and nspi_unbind function added
+       - nspi_context data structure added
+
+       * Changelog: libmapi/IMAPISession.c removed
+       - OpenMsgStore IDL enhanced
+
+       * ChangeLog: Hybrid EcDoRpc implementation:
+       - source/libmapi/include/emsmdb.h file added
+       - source/libmapi/idl/build.sh added: Compilation of libmapi/idl
+       files
+       - automatic creation of the libmapi/generated directory
+       - source/libmapi/emsmdb.c file added:
+               * emsmdb_connect: Connect to an Exchange Server
+               * emsmdb_transaction: Marshall a MAPI_REQ struct
+               * emsmdb_transaction_unknown: Marshall a uint8_t blob
+               * emsmdb_registernotify: Register a session notification
+       - MAPI_DATA content marshalling/unmarshalling using a TDR layer.
+       - Implementation of the OpenMsgStore request IDL in
+       libmapi/idl/IMAPISession.idl
+       - emsmdb_context structure used to abstract emsmdb connection
+       params.
+       - OpenMessageStore RPC-EXCHANGE function written using the new
+       EcDoRpc implementation
+       - Fixed a bug in TDR.pm and added tdr_print_debug_helper in
+       lib/tdr/tdr.c
+       
+2005-09-27  Julien Kerihuel  <j.kerihuel@openchange.org>
+
+       * Changelog: A critical bug has been identified. There was a
+       problem with synchronization/merging between the trunk and the
+       local branch. Here is a detailed listing of the changes:
+
+       - source/build/pidl removed
+       - MCR layer removed / waiting for Jelmer TDR layer's example.
+       - mcr_full and mcr make rules have been removed
+       - mapi header files moved from source/include to
+         source/libmapi/include
+       - MAPI_STATUS push/pull/print moved from
+         source/librpc/ndr/ndr_basic.c to source/librpc/ndr/ndr_mapi.c
+       - opnum FUNCTIONS property removed
+
+       - ndrdump EcDoRpc dump has been tested and is working
+       - torture RPC-EXCHANGE test is functionnal.
+       
+2005-09-25  Julien Kerihuel  <j.kerihuel@openchange.org>
+
+       * Changelog: MCR Header package completed. IMAPISession.idl added
+       to libmapi/idl.
+
+       * Changelog: pidl executable fixed. mcr-header now uses
+       Pidl::Parse::NDR::Parse to build the pidl tree.
+
+       * Changelog: build/smb_build/makefile.pm now includes a mcr_full:
+       and mcr: build rules. The script/build_mcr.sh file has been added
+       to automatically generate the mcr .h and .c files.
+
+       * Changelog: --mcr-header and --mcr-parse options have been added
+       to pidl. The opnum keyword for FUNCTIONS has been added to
+       Validator.pm. This way we can generate the mapi opnum in the
+       libmapi/gen_mcr/mcr_$basename.h files.
+
+       * Changelog: Implementation of a second push/pull layer for MAPI
+       content marshalling/unmarshalling. A skeleton implementation of
+       MCR (MAPI Content Representation) has been added in
+       source/build/pidl/Parse/Pidl/OpenChange/MCR. Yet only a basic
+       Header.pm package has been developed. It generates defines for the
+       interfaces.
+
+2005-09-22  Julien Kerihuel  <j.kerihuel@openchange.org>
+
+       * Changelog: We consider the first 2 bytes of MAPI content define
+       the mapi opnum (operation number). The MAPI_DATA structure now
+       includes an uint16_t opnum field. The ndr push/pull for MAPI_DATA
+       and the RPC-EXCHANGE torture case have been modified to reflect
+       this change.
+
+       * Changelog: the MAPI_DATA ndr_print function has been improved.
+       It now prints the MAPI opnum and its corresponding name when
+       available, otherwise "Unknown opnum" is displayed.
+       
+2005-09-19  Julien Kerihuel  <j.kerihuel@openchange.org>
+
+       * Changelog: MAPI content length is now set in the user
+       context. It means that the content is for the user the blob of
+       data it receives without the length field. The length field is
+       automatically added in the push_MAPI_DATA ndr function.  
+
+       Comments have been added to source code in order to remind
+       operation tricks.
+       
+       * Changelog: The RPC-EXCHANGE torture case has been cleaned and
+       compiles without warnings.
+
+2005-09-18  Julien Kerihuel  <j.kerihuel@openchange.org>
+
+       * Changelog: Implementation of OpenInbox() started. Problems
+       encountered while trying to find how the remaining byte of the
+       first request is filled.
+       
+       * Changelog: OpenIPMSubtree() is now implemented in the
+       RPC-EXCHANGE torture case. The remaining byte algorithm has been
+       enhanced.
+       
+2005-09-17  Julien Kerihuel  <j.kerihuel@openchange.org>
+
+       * Changelog: OpenRootFolder() is now implemented in the 
+       RPC-EXCHANGE torture case. I've added an alpha version of the
+       algorithm dedicated to automatically fill the remaining bytes.
+
diff --git a/Makefile.in b/Makefile.in
new file mode 100644 (file)
index 0000000..f5c2d9c
--- /dev/null
@@ -0,0 +1,239 @@
+# Makefile for OpenChange
+# Written by Jelmer Vernooij <jelmer@samba.org>, 2005.
+
+CC=@CC@
+CFLAGS=@CFLAGS@ -I. -Wall
+PIDL=@PIDL@
+PERL=@PERL@
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+bindir=@bindir@
+libdir=@libdir@
+datadir=@datadir@
+
+top_builddir=${PWD}
+
+TORTURE_MODULESDIR=@TORTURE_MODULESDIR@
+SERVER_MODULESDIR=@SERVER_MODULESDIR@
+
+# Evolution plugin compilation rule
+EPLUGINS=@EPLUGINS@
+EPLUGINS_INSTALL=@EPLUGINS_INSTALL@
+EPLUGINS_UNINSTALL=@EPLUGINS_UNINSTALL@
+INTLTOOL_MERGE=@INTLTOOL_MERGE@
+plugindir=@plugindir@
+
+EPLUGINS_LIBS=@EPLUGINS_LIBS@ 
+EPLUGINS_CFLAGS=@EPLUGINS_CFLAGS@
+
+# This value should be determined by configure at some point
+SHLIBEXT=so
+
+LIBS+=-lpopt
+
+# Portability hack...
+CFLAGS+=-Duint_t="unsigned int" 
+
+CFLAGS+=@SAMBA_CFLAGS@
+LIBS+=@SAMBA_LIBS@
+
+CFLAGS+=@LDB_CFLAGS@ @TALLOC_CFLAGS@
+LIBS+=@LDB_LIBS@ @TALLOC_LIBS@
+
+all: proto.h mapi_proto.h torture_proto.h bin/schemaIDGUID bin/mapidump bin/store bin/locale_codepage torture/openchange.$(SHLIBEXT) \
+       server/dcesrv_exchange.$(SHLIBEXT) $(EPLUGINS)
+
+install: all $(EPLUGINS_INSTALL)
+       @echo "=============================="
+       @echo "Installing OpenChange plugin"
+       mkdir -p $(DESTDIR)$(bindir) $(DESTDIR)$(libdir)
+       cp bin/schemaIDGUID $(DESTDIR)$(bindir)
+       cp bin/mapidump $(DESTDIR)$(bindir)
+       cp bin/store $(DESTDIR)$(bindir)
+       cp bin/locale_codepage $(DESTDIR)$(bindir)
+       cp libmapi.$(SHLIBEXT) $(DESTDIR)$(libdir)
+       cp torture/openchange.$(SHLIBEXT) $(DESTDIR)$(TORTURE_MODULESDIR)
+       cp server/dcesrv_exchange.$(SHLIBEXT) $(DESTDIR)$(SERVER_MODULESDIR)
+       cp scripting/libjs/*.js $(DESTDIR)$(datadir)/js/
+       cp setup/*.ldif $(DESTDIR)$(datadir)/setup/
+       @echo "OpenChange plugin installed"
+
+uninstall: $(EPLUGINS_UNINSTALL)
+       rm -f $(DESTDIR)$(bindir)/schemaIDGUID
+       rm -f $(DESTDIR)$(bindir)/mapidump
+       rm -f $(DESTDIR)$(bindir)/store
+       rm -f $(DESTDIR)$(bindir)/locale_codepage
+       rm -f $(DESTDIR)$(libdir)/libmapi.*
+       rm -f $(DESTDIR)$(TORTURE_MODULESDIR)/openchange.*
+       rm -f $(DESTDIR)$(SERVER_MODULESDIR)/dcesrv_exchange.*
+       rm -f $(DESTDIR)$(datadir)/js/oc_provision.js
+       rm -f $(DESTDIR)$(datadir)/setup/oc_provision_containers.ldif
+       rm -f $(DESTDIR)$(datadir)/setup/oc_provision_init.ldif
+       rm -f $(DESTDIR)$(datadir)/setup/oc_provision.ldif
+
+re: clean install
+
+# Evolution plugin compilation
+
+eplugins-all: openchange-plugin
+
+eplugins-install: eplugins-all
+       cp eplugins/oc-plugin/org-openchange-plugin.eplug $(plugindir)
+       cp eplugins/oc-plugin/liborg-openchange-plugin.$(SHLIBEXT) $(plugindir)
+
+eplugins-uninstall:
+       rm -f $(plugindir)/org-openchange-plugin.eplug
+       rm -f $(plugindir)/liborg-openchange-plugin.$(SHLIBEXT)
+
+openchange-plugin: eplugins/oc-plugin/org-openchange-plugin.eplug eplugins/oc-plugin/liborg-openchange-plugin.$(SHLIBEXT) 
+
+eplugins/oc-plugin/%.o: CFLAGS+=$(EPLUGINS_CFLAGS)
+eplugins/oc-plugin/liborg-openchange-plugin.$(SHLIBEXT):  eplugins/oc-plugin/openchange-plugin.o
+       @echo "Linking $<"
+       @$(CC) -o $@ -shared $^ -L. $(EPLUGINS_LIBS)
+
+%.eplug: %.eplug.in
+       sed -e 's|\@PLUGINDIR\@|$(plugindir)|' -e 's|\@SOEXT\@|.$(SHLIBEXT)|' $< > $@
+
+torture/openchange.$(SHLIBEXT): torture/testjoin_exchange.o torture/emsmdb.o torture/exchange.o torture/nspi.o torture/nspi_profile.o torture/openchange.o torture/nspi_scantags.o 
+       @echo "Compiling $<"
+       @$(CC) -o $@ -shared $^ -L. $(LIBS) -lmapi
+
+server/dcesrv_exchange.$(SHLIBEXT): providers/emsabp.o server/dcesrv_exchange.o
+       @echo "Compiling $<"
+       @$(CC) -o $@ -shared $^ -L. -lmapi $(LIBS)
+
+exchange.idl: mapitags_enum.h mapicodes_enum.h
+
+%.h: %.idl
+       @echo "Compiling $<"
+       @$(PIDL) --outputdir=$(@D) --header -- $<
+
+.c.o:
+       @echo "Compiling $<"
+       @$(CC) $(EPLUGINS_UI_CFLAGS) $(CFLAGS) -c $< -o $@
+
+ndr_%.h ndr_%.c: %.idl %.h
+       @echo "Compiling $<"
+       @$(PIDL) --outputdir=$(@D) --ndr-parser -- $<
+
+ndr_%_c.h ndr_%_c.c: %.idl %.h
+       @echo "Compiling $<"
+       @$(PIDL) --outputdir=$(@D) --client -- $<
+
+tdr_%.h tdr_%.c: %.idl
+       @echo "Compiling $<"
+       @$(PIDL) --outputdir=$(@D) --tdr-parser -- $<
+
+ndr_%_s.c: %.idl
+       @echo "Compiling $<"
+       @$(PIDL) --outputdir=$(@D) --server -- $<
+
+libmapi/util/mapidump.c: ndr_exchange.h
+
+server/dcesrv_exchange.c: providers_proto.h ndr_exchange_s.c
+
+libmapi/emsmdb.c: libmapi/include/emsmdb.h libmapi/tdr_IMAPISession.h ndr_exchange_c.h
+
+libmapi/include/emsmdb.h: libmapi/IMAPISession.h
+
+libmapi/mapitables.c: libmapi/include/mapitables.h
+
+libmapi/mapitags.c libmapi/tag_to_ad_name.c libmapi/mapicode.c mapitags_enum.h mapicodes_enum.h: libmapi/conf/mapi-properties libmapi/conf/mapi-codes libmapi/conf/mparse.pl
+       @./libmapi/conf/build.sh
+
+bin/schemaIDGUID: utils/schemaIDGUID.o
+       @echo "Compiling $<"
+       @$(CC) -o $@ $^ $(LIBS)
+
+bin/mapidump: libmapi/util/mapidump.o libmapi.$(SHLIBEXT)
+       @echo "Compiling $<"
+       @$(CC) -o $@ $^
+
+bin/locale_codepage: libmapi/tests/locale_codepage.o libmapi.$(SHLIBEXT)
+       @echo "Compiling $<"
+       @$(CC) -o $@ $^ $(LIBS)
+
+bin/store: libmapi/tests/store.o libmapi/storedb/storedb.o libmapi.$(SHLIBEXT)
+       @echo "Compiling $<"
+       @$(CC) -o $@ $^ $(LIBS)
+
+distclean: clean
+       rm -rf autom4te.cache
+       rm -f Makefile config.status config.log
+       rm -f intltool-extract intltool-merge intltool-update
+
+realdistclean: distclean
+       rm -f libmapi.so
+       rm -f torture/openchange.so
+       rm -f server/dcesrv_exchange.so
+       rm -f eplugins/*/*.so
+
+clean:
+       rm -f libmapi/generated/*
+       rm -f libmapi/*.o
+       rm -f libmapi/tests/*.o
+       rm -f libmapi/util/*.o
+       rm -f libmapi/storedb/*.o
+       rm -f tests/*.o
+       rm -f bin/*
+       rm -f server/*.o
+       rm -f providers/*.o
+       rm -f torture/*.o
+       rm -f utils/*.o
+       rm -f ndr_exchange* exchange.h
+       rm -f libmapi/tdr_*
+       rm -f libmapi/mapicode.{c,h}
+       rm -f libmapi/mapitags.{c,h}
+       rm -f libmapi/include/proto.h
+       rm -f libmapi/include/mapi_proto.h
+       rm -f libmapi/IMAPISession.h
+       rm -f providers/providers_proto.h
+       rm -f torture/*.$(SHLIBEXT) server/*.$(SHLIBEXT)
+       rm -f torture/torture_proto.h
+       rm -f ndr_mapi.o
+       rm -f mapicodes_enum.h
+       rm -f mapitags_enum.h
+       rm -f eplugins/*/*.o eplugins/*/*.eplug
+       rm -f *~
+       rm -f */*~
+       rm -f */*/*~
+
+proto.h: libmapi/mapitags.c libmapi/mapicode.c
+       @echo "Generating proto.h"
+       @./script/mkproto.pl --private=libmapi/include/proto.h --public=libmapi/include/proto.h \
+       libmapi/mapi.c libmapi/x500.c libmapi/mapitags.c libmapi/mapicode.c libmapi/mapitables.c libmapi/utils.c \
+       libmapi/util/locale.c libmapi/util/codepage.c libmapi/storedb/storedb.c
+
+mapi_proto.h: libmapi/IMAPISession.h
+       @echo "Generating mapi_proto.h"
+       @./script/mkproto.pl --private=libmapi/include/mapi_proto.h --public=libmapi/include/mapi_proto.h \
+       libmapi/property.c libmapi/container.c libmapi/nspi.c libmapi/emsmdb.c
+
+providers_proto.h: providers/emsabp.c
+       @echo "Generating providers_proto.h"
+       @./script/mkproto.pl --private=providers/providers_proto.h --public=providers/providers_proto.h \
+       providers/emsabp.c
+
+torture_proto.h:
+       @echo "Generating torture_proto.h"
+       @./script/mkproto.pl --private=torture/torture_proto.h --public=torture/torture_proto.h torture/testjoin_exchange.c
+
+libmapi.$(SHLIBEXT): libmapi/mapi.o libmapi/utils.o libmapi/property.o \
+                               libmapi/container.o libmapi/mapitags.o libmapi/mapicode.o \
+                               libmapi/emsmdb.o libmapi/nspi.o ndr_exchange.o \
+                               libmapi/storedb/storedb.o libmapi/util/locale.o \
+                               libmapi/util/codepage.o libmapi/tdr_IMAPISession.o \
+                               ndr_mapi.o ndr_exchange_c.o libmapi/x500.o \
+                               libmapi/tag_to_ad_name.o libmapi/mapitables.o
+       @echo "Compiling $<"
+       @$(CC) -shared -o $@ $^ $(LIBS)
+
+tags:
+       ctags -R .
+
+.PRECIOUS: exchange.h ndr_exchange.h ndr_exchange.c ndr_exchange_c.c ndr_exchange_c.h libmapi/tdr_IMAPISession.h libmapi/tdr_IMAPISession.c
+
+Makefile: Makefile.in config.status
+       ./config.status
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644 (file)
index 0000000..43785a0
--- /dev/null
@@ -0,0 +1,170 @@
+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005  Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+# 
+# Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+       _pkg_min_version=m4_default([$1], [0.9.0])
+       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_RESULT([no])
+               PKG_CONFIG=""
+       fi
+               
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists.  Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+  m4_ifval([$2], [$2], [:])
+m4_ifvaln([$3], [else
+  $3])dnl
+fi])
+
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$PKG_CONFIG"; then
+    if test -n "$$1"; then
+        pkg_cv_[]$1="$$1"
+    else
+        PKG_CHECK_EXISTS([$3],
+                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+                        [pkg_failed=yes])
+    fi
+else
+       pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
+        else 
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+       ifelse([$4], , [AC_MSG_ERROR(dnl
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT
+])],
+               [$4])
+elif test $pkg_failed = untried; then
+       ifelse([$4], , [AC_MSG_FAILURE(dnl
+[The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
+               [$4])
+else
+       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        AC_MSG_RESULT([yes])
+       ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
+
diff --git a/autogen.sh b/autogen.sh
new file mode 100755 (executable)
index 0000000..d24e3e0
--- /dev/null
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+# Run this script to build openchange from SVN
+
+## insert all possible names (only works with
+## autoconf 2.x
+TESTAUTOHEADER="autoheader autoheader-2.53 autoheader2.50 autoheader259 autoheader253"
+TESTAUTOCONF="autoconf autoconf-2.53 autoconf2.50 autoconf259 autoconf253"
+
+AUTOHEADERFOUND="0"
+AUTOCONFFOUND="0"
+
+
+##
+## Look for autoheader
+##
+for i in $TESTAUTOHEADER; do
+        if which $i > /dev/null 2>&1; then
+                if test `$i --version | head -n 1 | cut -d.  -f 2 | tr -d [:alpha:]` -ge 53; then
+                        AUTOHEADER=$i
+                        AUTOHEADERFOUND="1"
+                        break
+                fi
+        fi
+done
+
+##
+## Look for autoconf
+##
+
+for i in $TESTAUTOCONF; do
+        if which $i > /dev/null 2>&1; then
+                if test `$i --version | head -n 1 | cut -d.  -f 2 | tr -d [:alpha:]` -ge 53; then
+                        AUTOCONF=$i
+                        AUTOCONFFOUND="1"
+                        break
+                fi
+        fi
+done
+
+
+##
+## do we have it?
+##
+if test "$AUTOCONFFOUND" = "0" -o "$AUTOHEADERFOUND" = "0"; then
+        echo "$0: need autoconf 2.53 or later to build samba from SVN" >&2
+        exit 1
+fi
+
+rm -rf autom4te*.cache
+rm -f configure include/config.h*
+
+aclocal
+
+echo "$0: running $AUTOHEADER"
+$AUTOHEADER || exit 1
+
+echo "$0: running $AUTOCONF"
+$AUTOCONF || exit 1
+
+
+rm -rf autom4te*.cache
+
+echo "Now run ./configure --prefix=path_to_samba and make"
+exit 0
diff --git a/config.h b/config.h
new file mode 100644 (file)
index 0000000..7a29fe4
--- /dev/null
+++ b/config.h
@@ -0,0 +1,56 @@
+/* config.h.  Generated by configure.  */
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `popt' library (-lpopt). */
+#define HAVE_LIBPOPT 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "openchange@openchange.org"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "openchange"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "openchange 0.1"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "openchange"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "0.1"
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Use GNU extensions */
+#define _GNU_SOURCE 1
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#define uint_t unsigned int
diff --git a/config.h.in b/config.h.in
new file mode 100644 (file)
index 0000000..d63ba64
--- /dev/null
@@ -0,0 +1,55 @@
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `popt' library (-lpopt). */
+#undef HAVE_LIBPOPT
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Use GNU extensions */
+#undef _GNU_SOURCE
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#undef uint_t
diff --git a/configure b/configure
new file mode 100755 (executable)
index 0000000..7b2d115
--- /dev/null
+++ b/configure
@@ -0,0 +1,4751 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.59 for openchange 0.1.
+#
+# Report bugs to <openchange@openchange.org>.
+#
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)$' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+         /^X\/\(\/\/\)$/{ s//\1/; q; }
+         /^X\/\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+        case $as_dir in
+        /*)
+          if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+            $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+            $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+            CONFIG_SHELL=$as_dir/$as_base
+            export CONFIG_SHELL
+            exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+          fi;;
+        esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='     ' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS="  $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete.  It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME='openchange'
+PACKAGE_TARNAME='openchange'
+PACKAGE_VERSION='0.1'
+PACKAGE_STRING='openchange 0.1'
+PACKAGE_BUGREPORT='openchange@openchange.org'
+
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT PERL PIDL PKG_CONFIG ac_pt_PKG_CONFIG TALLOC_CFLAGS TALLOC_LIBS SAMBA_CFLAGS SAMBA_LIBS LDB_CFLAGS LDB_LIBS TORTURE_MODULESDIR SERVER_MODULESDIR CPP EGREP EPLUGINS_CFLAGS EPLUGINS_LIBS EPLUGINS EPLUGINS_INSTALL EPLUGINS_UNINSTALL plugindir LIBOBJS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval "$ac_prev=\$ac_option"
+    ac_prev=
+    continue
+  fi
+
+  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_option in
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval "enable_$ac_feature=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "enable_$ac_feature='$ac_optarg'" ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_$ac_package='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/-/_/g'`
+    eval "with_$ac_package=no" ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+    eval "$ac_envvar='$ac_optarg'"
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+             localstatedir libdir includedir oldincludedir infodir mandir
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then its parent.
+  ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$0" : 'X\(//\)[^/]' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r $srcdir/$ac_unique_file; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+   { (exit 1); exit 1; }; }
+  else
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+  fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+   { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_PKG_CONFIG_set=${PKG_CONFIG+set}
+ac_env_PKG_CONFIG_value=$PKG_CONFIG
+ac_cv_env_PKG_CONFIG_set=${PKG_CONFIG+set}
+ac_cv_env_PKG_CONFIG_value=$PKG_CONFIG
+ac_env_TALLOC_CFLAGS_set=${TALLOC_CFLAGS+set}
+ac_env_TALLOC_CFLAGS_value=$TALLOC_CFLAGS
+ac_cv_env_TALLOC_CFLAGS_set=${TALLOC_CFLAGS+set}
+ac_cv_env_TALLOC_CFLAGS_value=$TALLOC_CFLAGS
+ac_env_TALLOC_LIBS_set=${TALLOC_LIBS+set}
+ac_env_TALLOC_LIBS_value=$TALLOC_LIBS
+ac_cv_env_TALLOC_LIBS_set=${TALLOC_LIBS+set}
+ac_cv_env_TALLOC_LIBS_value=$TALLOC_LIBS
+ac_env_SAMBA_CFLAGS_set=${SAMBA_CFLAGS+set}
+ac_env_SAMBA_CFLAGS_value=$SAMBA_CFLAGS
+ac_cv_env_SAMBA_CFLAGS_set=${SAMBA_CFLAGS+set}
+ac_cv_env_SAMBA_CFLAGS_value=$SAMBA_CFLAGS
+ac_env_SAMBA_LIBS_set=${SAMBA_LIBS+set}
+ac_env_SAMBA_LIBS_value=$SAMBA_LIBS
+ac_cv_env_SAMBA_LIBS_set=${SAMBA_LIBS+set}
+ac_cv_env_SAMBA_LIBS_value=$SAMBA_LIBS
+ac_env_LDB_CFLAGS_set=${LDB_CFLAGS+set}
+ac_env_LDB_CFLAGS_value=$LDB_CFLAGS
+ac_cv_env_LDB_CFLAGS_set=${LDB_CFLAGS+set}
+ac_cv_env_LDB_CFLAGS_value=$LDB_CFLAGS
+ac_env_LDB_LIBS_set=${LDB_LIBS+set}
+ac_env_LDB_LIBS_value=$LDB_LIBS
+ac_cv_env_LDB_LIBS_set=${LDB_LIBS+set}
+ac_cv_env_LDB_LIBS_value=$LDB_LIBS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+ac_env_EPLUGINS_CFLAGS_set=${EPLUGINS_CFLAGS+set}
+ac_env_EPLUGINS_CFLAGS_value=$EPLUGINS_CFLAGS
+ac_cv_env_EPLUGINS_CFLAGS_set=${EPLUGINS_CFLAGS+set}
+ac_cv_env_EPLUGINS_CFLAGS_value=$EPLUGINS_CFLAGS
+ac_env_EPLUGINS_LIBS_set=${EPLUGINS_LIBS+set}
+ac_env_EPLUGINS_LIBS_value=$EPLUGINS_LIBS
+ac_cv_env_EPLUGINS_LIBS_set=${EPLUGINS_LIBS+set}
+ac_cv_env_EPLUGINS_LIBS_value=$EPLUGINS_LIBS
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures openchange 0.1 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+  cat <<_ACEOF
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                         [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                         [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --infodir=DIR          info documentation [PREFIX/info]
+  --mandir=DIR           man documentation [PREFIX/man]
+_ACEOF
+
+  cat <<\_ACEOF
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of openchange 0.1:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-eplugins=yes,no Build Evolution plugins.
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --evolution=version Use Evolution version.
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
+              headers in a nonstandard directory <include dir>
+  PKG_CONFIG  path to pkg-config utility
+  TALLOC_CFLAGS
+              C compiler flags for TALLOC, overriding pkg-config
+  TALLOC_LIBS linker flags for TALLOC, overriding pkg-config
+  SAMBA_CFLAGS
+              C compiler flags for SAMBA, overriding pkg-config
+  SAMBA_LIBS  linker flags for SAMBA, overriding pkg-config
+  LDB_CFLAGS  C compiler flags for LDB, overriding pkg-config
+  LDB_LIBS    linker flags for LDB, overriding pkg-config
+  CPP         C preprocessor
+  EPLUGINS_CFLAGS
+              C compiler flags for EPLUGINS, overriding pkg-config
+  EPLUGINS_LIBS
+              linker flags for EPLUGINS, overriding pkg-config
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <openchange@openchange.org>.
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  ac_popdir=`pwd`
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d $ac_dir || continue
+    ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+    cd $ac_dir
+    # Check for guested configure; otherwise get Cygnus style configure.
+    if test -f $ac_srcdir/configure.gnu; then
+      echo
+      $SHELL $ac_srcdir/configure.gnu  --help=recursive
+    elif test -f $ac_srcdir/configure; then
+      echo
+      $SHELL $ac_srcdir/configure  --help=recursive
+    elif test -f $ac_srcdir/configure.ac ||
+          test -f $ac_srcdir/configure.in; then
+      echo
+      $ac_configure --help
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi
+    cd $ac_popdir
+  done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+  cat <<\_ACEOF
+openchange configure 0.1
+generated by GNU Autoconf 2.59
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by openchange $as_me 0.1, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *" "*|*"   "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+       ac_must_keep_next=false # Got value, back to normal.
+      else
+       case $ac_arg in
+         *=* | --config-cache | -C | -disable-* | --disable-* \
+         | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+         | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+         | -with-* | --with-* | -without-* | --without-* | --x)
+           case "$ac_configure_args0 " in
+             "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+           esac
+           ;;
+         -* ) ac_must_keep_next=true ;;
+       esac
+      fi
+      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+      # Get rid of the leading space.
+      ac_sep=" "
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+{
+  (set) 2>&1 |
+    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      sed -n \
+       "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+      ;;
+    *)
+      sed -n \
+       "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+}
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=$`echo $ac_var`
+      echo "$ac_var='"'"'$ac_val'"'"'"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+       eval ac_val=$`echo $ac_var`
+       echo "$ac_var='"'"'$ac_val'"'"'"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      sed "/^$/d" confdefs.h | sort
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core &&
+  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+     ' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . $cache_file;;
+      *)                      . ./$cache_file;;
+    esac
+  fi
+else
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+              sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+  eval ac_new_val="\$ac_env_${ac_var}_value"
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+       { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+       { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+       { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+       ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *" "*|*"   "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+          ac_config_headers="$ac_config_headers config.h"
+
+
+cat >>confdefs.h <<\_ACEOF
+#define _GNU_SOURCE 1
+_ACEOF
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CC" && break
+done
+
+  CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+  (eval $ac_link_default) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Find the output, starting from the most likely.  This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+       ;;
+    conftest.$ac_ext )
+       # This is the source file.
+       ;;
+    [ab].out )
+       # We found the default executable, but exeext='' is most
+       # certainly right.
+       break;;
+    *.* )
+       ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+       # FIXME: I believe we export ac_cv_exeext for Libtool,
+       # but it would be cool to find out if it's true.  Does anybody
+       # maintain Libtool? --akim.
+       export ac_cv_exeext
+       break;;
+    * )
+       break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+  if { ac_try='./$ac_file'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+       cross_compiling=yes
+    else
+       { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+         export ac_cv_exeext
+         break;;
+    * ) break;;
+  esac
+done
+else
+  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std1 is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std1.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX                  -qlanglvl=ansi
+# Ultrix and OSF/1     -std1
+# HP-UX 10.20 and later        -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4                 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+  x|xno)
+    echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+  *)
+    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+    CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C.  Since we use `exit',
+# in C++ we need to declare it.  In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+  choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  for ac_declaration in \
+   '' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PERL+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PERL in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+PERL=$ac_cv_path_PERL
+
+if test -n "$PERL"; then
+  echo "$as_me:$LINENO: result: $PERL" >&5
+echo "${ECHO_T}$PERL" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+if test -z "$PERL"
+then
+       { { echo "$as_me:$LINENO: error: Please install perl" >&5
+echo "$as_me: error: Please install perl" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+# Extract the first word of "pidl", so it can be a program name with args.
+set dummy pidl; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PIDL+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PIDL in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PIDL="$PIDL" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PIDL="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+PIDL=$ac_cv_path_PIDL
+
+if test -n "$PIDL"; then
+  echo "$as_me:$LINENO: result: $PIDL" >&5
+echo "${ECHO_T}$PIDL" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+if test -z "$PIDL"
+then
+       { { echo "$as_me:$LINENO: error: Please install pidl" >&5
+echo "$as_me: error: Please install pidl" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+
+
+echo "$as_me:$LINENO: checking for poptFreeContext in -lpopt" >&5
+echo $ECHO_N "checking for poptFreeContext in -lpopt... $ECHO_C" >&6
+if test "${ac_cv_lib_popt_poptFreeContext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpopt  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char poptFreeContext ();
+int
+main ()
+{
+poptFreeContext ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_popt_poptFreeContext=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_popt_poptFreeContext=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_popt_poptFreeContext" >&5
+echo "${ECHO_T}$ac_cv_lib_popt_poptFreeContext" >&6
+if test $ac_cv_lib_popt_poptFreeContext = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBPOPT 1
+_ACEOF
+
+  LIBS="-lpopt $LIBS"
+
+else
+   { { echo "$as_me:$LINENO: error: Popt is required" >&5
+echo "$as_me: error: Popt is required" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+       if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+
+if test -n "$PKG_CONFIG"; then
+  echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+  ac_pt_PKG_CONFIG=$PKG_CONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $ac_pt_PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+
+if test -n "$ac_pt_PKG_CONFIG"; then
+  echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
+echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  PKG_CONFIG=$ac_pt_PKG_CONFIG
+else
+  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+       _pkg_min_version=0.20
+       echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
+echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6
+       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+               echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+       else
+               echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+               PKG_CONFIG=""
+       fi
+
+fi
+
+pkg_failed=no
+echo "$as_me:$LINENO: checking for TALLOC" >&5
+echo $ECHO_N "checking for TALLOC... $ECHO_C" >&6
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$TALLOC_CFLAGS"; then
+        pkg_cv_TALLOC_CFLAGS="$TALLOC_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"talloc\"") >&5
+  ($PKG_CONFIG --exists --print-errors "talloc") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_TALLOC_CFLAGS=`$PKG_CONFIG --cflags "talloc" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+       pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$TALLOC_LIBS"; then
+        pkg_cv_TALLOC_LIBS="$TALLOC_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"talloc\"") >&5
+  ($PKG_CONFIG --exists --print-errors "talloc") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_TALLOC_LIBS=`$PKG_CONFIG --libs "talloc" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+       pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+               TALLOC_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "talloc"`
+        else
+               TALLOC_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "talloc"`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$TALLOC_PKG_ERRORS" >&5
+
+       { { echo "$as_me:$LINENO: error: Package requirements (talloc) were not met:
+
+$TALLOC_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables TALLOC_CFLAGS
+and TALLOC_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&5
+echo "$as_me: error: Package requirements (talloc) were not met:
+
+$TALLOC_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables TALLOC_CFLAGS
+and TALLOC_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&2;}
+   { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+       { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables TALLOC_CFLAGS
+and TALLOC_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
+See \`config.log' for more details." >&5
+echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables TALLOC_CFLAGS
+and TALLOC_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+       TALLOC_CFLAGS=$pkg_cv_TALLOC_CFLAGS
+       TALLOC_LIBS=$pkg_cv_TALLOC_LIBS
+        echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+       :
+fi
+
+pkg_failed=no
+echo "$as_me:$LINENO: checking for SAMBA" >&5
+echo $ECHO_N "checking for SAMBA... $ECHO_C" >&6
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$SAMBA_CFLAGS"; then
+        pkg_cv_SAMBA_CFLAGS="$SAMBA_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dcerpc ndr tdr samba-util samba-config\"") >&5
+  ($PKG_CONFIG --exists --print-errors "dcerpc ndr tdr samba-util samba-config") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_SAMBA_CFLAGS=`$PKG_CONFIG --cflags "dcerpc ndr tdr samba-util samba-config" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+       pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$SAMBA_LIBS"; then
+        pkg_cv_SAMBA_LIBS="$SAMBA_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dcerpc ndr tdr samba-util samba-config\"") >&5
+  ($PKG_CONFIG --exists --print-errors "dcerpc ndr tdr samba-util samba-config") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_SAMBA_LIBS=`$PKG_CONFIG --libs "dcerpc ndr tdr samba-util samba-config" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+       pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+               SAMBA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dcerpc ndr tdr samba-util samba-config"`
+        else
+               SAMBA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dcerpc ndr tdr samba-util samba-config"`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$SAMBA_PKG_ERRORS" >&5
+
+       { { echo "$as_me:$LINENO: error: Package requirements (dcerpc ndr tdr samba-util samba-config) were not met:
+
+$SAMBA_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables SAMBA_CFLAGS
+and SAMBA_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&5
+echo "$as_me: error: Package requirements (dcerpc ndr tdr samba-util samba-config) were not met:
+
+$SAMBA_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables SAMBA_CFLAGS
+and SAMBA_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&2;}
+   { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+       { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables SAMBA_CFLAGS
+and SAMBA_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
+See \`config.log' for more details." >&5
+echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables SAMBA_CFLAGS
+and SAMBA_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+       SAMBA_CFLAGS=$pkg_cv_SAMBA_CFLAGS
+       SAMBA_LIBS=$pkg_cv_SAMBA_LIBS
+        echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+       :
+fi
+
+pkg_failed=no
+echo "$as_me:$LINENO: checking for LDB" >&5
+echo $ECHO_N "checking for LDB... $ECHO_C" >&6
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$LDB_CFLAGS"; then
+        pkg_cv_LDB_CFLAGS="$LDB_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"ldb\"") >&5
+  ($PKG_CONFIG --exists --print-errors "ldb") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_LDB_CFLAGS=`$PKG_CONFIG --cflags "ldb" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+       pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$LDB_LIBS"; then
+        pkg_cv_LDB_LIBS="$LDB_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"ldb\"") >&5
+  ($PKG_CONFIG --exists --print-errors "ldb") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_LDB_LIBS=`$PKG_CONFIG --libs "ldb" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+       pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+               LDB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "ldb"`
+        else
+               LDB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "ldb"`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$LDB_PKG_ERRORS" >&5
+
+       { { echo "$as_me:$LINENO: error: Package requirements (ldb) were not met:
+
+$LDB_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables LDB_CFLAGS
+and LDB_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&5
+echo "$as_me: error: Package requirements (ldb) were not met:
+
+$LDB_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables LDB_CFLAGS
+and LDB_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&2;}
+   { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+       { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables LDB_CFLAGS
+and LDB_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
+See \`config.log' for more details." >&5
+echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables LDB_CFLAGS
+and LDB_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+       LDB_CFLAGS=$pkg_cv_LDB_CFLAGS
+       LDB_LIBS=$pkg_cv_LDB_LIBS
+        echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+       :
+fi
+
+TORTURE_MODULESDIR=`$PKG_CONFIG --variable=modulesdir torture`
+
+
+SERVER_MODULESDIR=`$PKG_CONFIG --variable=modulesdir dcerpc_server`
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
+    fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+                  (('a' <= (c) && (c) <= 'i') \
+                    || ('j' <= (c) && (c) <= 'r') \
+                    || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+       || toupper (i) != TOUPPER (i))
+      exit(2);
+  exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+                 inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+echo "$as_me:$LINENO: checking for uint_t" >&5
+echo $ECHO_N "checking for uint_t... $ECHO_C" >&6
+if test "${ac_cv_type_uint_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+if ((uint_t *) 0)
+  return 0;
+if (sizeof (uint_t))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_uint_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_uint_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_uint_t" >&5
+echo "${ECHO_T}$ac_cv_type_uint_t" >&6
+if test $ac_cv_type_uint_t = yes; then
+  :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define uint_t unsigned int
+_ACEOF
+
+fi
+
+
+
+
+# Check whether --with-evolution or --without-evolution was given.
+if test "${with_evolution+set}" = set; then
+  withval="$with_evolution"
+  evolution_version="$withval"
+else
+  evolution_version="2.6"
+fi;
+
+# Check whether --enable-eplugins or --disable-eplugins was given.
+if test "${enable_eplugins+set}" = set; then
+  enableval="$enable_eplugins"
+  enable_eplugins="$enableval"
+else
+  enable_eplugins="no"
+fi;
+
+if test "x${enable_eplugins}" = "xyes"; then
+
+
+pkg_failed=no
+echo "$as_me:$LINENO: checking for EPLUGINS" >&5
+echo $ECHO_N "checking for EPLUGINS... $ECHO_C" >&6
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$EPLUGINS_CFLAGS"; then
+        pkg_cv_EPLUGINS_CFLAGS="$EPLUGINS_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"evolution-plugin-\${evolution_version}\"") >&5
+  ($PKG_CONFIG --exists --print-errors "evolution-plugin-${evolution_version}") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_EPLUGINS_CFLAGS=`$PKG_CONFIG --cflags "evolution-plugin-${evolution_version}" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+       pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$EPLUGINS_LIBS"; then
+        pkg_cv_EPLUGINS_LIBS="$EPLUGINS_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"evolution-plugin-\${evolution_version}\"") >&5
+  ($PKG_CONFIG --exists --print-errors "evolution-plugin-${evolution_version}") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_EPLUGINS_LIBS=`$PKG_CONFIG --libs "evolution-plugin-${evolution_version}" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+       pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+               EPLUGINS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "evolution-plugin-${evolution_version}"`
+        else
+               EPLUGINS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "evolution-plugin-${evolution_version}"`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$EPLUGINS_PKG_ERRORS" >&5
+
+       { { echo "$as_me:$LINENO: error: Package requirements (evolution-plugin-${evolution_version}) were not met:
+
+$EPLUGINS_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables EPLUGINS_CFLAGS
+and EPLUGINS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&5
+echo "$as_me: error: Package requirements (evolution-plugin-${evolution_version}) were not met:
+
+$EPLUGINS_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables EPLUGINS_CFLAGS
+and EPLUGINS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&2;}
+   { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+       { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables EPLUGINS_CFLAGS
+and EPLUGINS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
+See \`config.log' for more details." >&5
+echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables EPLUGINS_CFLAGS
+and EPLUGINS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+       EPLUGINS_CFLAGS=$pkg_cv_EPLUGINS_CFLAGS
+       EPLUGINS_LIBS=$pkg_cv_EPLUGINS_LIBS
+        echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+       :
+fi
+
+               EPLUGINS="eplugins-all"
+
+
+       EPLUGINS_INSTALL="eplugins-install"
+
+
+       EPLUGINS_UNINSTALL="eplugins-uninstall"
+
+
+       plugindir=`$PKG_CONFIG --variable=plugindir evolution-plugin-${evolution_version}`
+
+fi
+
+
+
+          ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+  (set) 2>&1 |
+    case `(ac_space=' '; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+       "s/'/'\\\\''/g;
+         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;;
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n \
+       "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+} |
+  sed '
+     t clear
+     : clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+  if test -w $cache_file; then
+    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+    cat confcache >$cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[         ]*VPATH[        ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[    ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[      ]*$//;
+}'
+fi
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_i=`echo "$ac_i" |
+        sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+  # 2. Add them.
+  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)$' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+         /^X\/\(\/\/\)$/{ s//\1/; q; }
+         /^X\/\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+        case $as_dir in
+        /*)
+          if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+            $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+            $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+            CONFIG_SHELL=$as_dir/$as_base
+            export CONFIG_SHELL
+            exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+          fi;;
+        esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='     ' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS="  $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.  Logging --version etc. is OK.
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by openchange $as_me 0.1, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number, then exit
+  -q, --quiet      do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+                  instantiate the configuration file FILE
+  --header=FILE[:TEMPLATE]
+                  instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+openchange config.status 0.1
+configured by $0, generated by GNU Autoconf 2.59,
+  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "x$1" : 'x\([^=]*\)='`
+    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  -*)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  *) # This is not an option, so the user has probably given explicit
+     # arguments.
+     ac_option=$1
+     ac_need_defaults=false;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --vers* | -V )
+    echo "$ac_cs_version"; exit 0 ;;
+  --he | --h)
+    # Conflict between --help and --header
+    { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit 0 ;;
+  --debug | --d* | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+    ac_need_defaults=false;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1" ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+  case "$ac_config_target" in
+  # Handling of arguments.
+  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./confstat$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+  # Protect against being on the right side of a sed subst in config.status.
+  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@PERL@,$PERL,;t t
+s,@PIDL@,$PIDL,;t t
+s,@PKG_CONFIG@,$PKG_CONFIG,;t t
+s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
+s,@TALLOC_CFLAGS@,$TALLOC_CFLAGS,;t t
+s,@TALLOC_LIBS@,$TALLOC_LIBS,;t t
+s,@SAMBA_CFLAGS@,$SAMBA_CFLAGS,;t t
+s,@SAMBA_LIBS@,$SAMBA_LIBS,;t t
+s,@LDB_CFLAGS@,$LDB_CFLAGS,;t t
+s,@LDB_LIBS@,$LDB_LIBS,;t t
+s,@TORTURE_MODULESDIR@,$TORTURE_MODULESDIR,;t t
+s,@SERVER_MODULESDIR@,$SERVER_MODULESDIR,;t t
+s,@CPP@,$CPP,;t t
+s,@EGREP@,$EGREP,;t t
+s,@EPLUGINS_CFLAGS@,$EPLUGINS_CFLAGS,;t t
+s,@EPLUGINS_LIBS@,$EPLUGINS_LIBS,;t t
+s,@EPLUGINS@,$EPLUGINS,;t t
+s,@EPLUGINS_INSTALL@,$EPLUGINS_INSTALL,;t t
+s,@EPLUGINS_UNINSTALL@,$EPLUGINS_UNINSTALL,;t t
+s,@plugindir@,$plugindir,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+  cat >>$CONFIG_STATUS <<\_ACEOF
+  # Split the substitutions into bite-sized pieces for seds with
+  # small command number limits, like on Digital OSF/1 and HP-UX.
+  ac_max_sed_lines=48
+  ac_sed_frag=1 # Number of current file.
+  ac_beg=1 # First line for current file.
+  ac_end=$ac_max_sed_lines # Line after last line for current file.
+  ac_more_lines=:
+  ac_sed_cmds=
+  while $ac_more_lines; do
+    if test $ac_beg -gt 1; then
+      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    else
+      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    fi
+    if test ! -s $tmp/subs.frag; then
+      ac_more_lines=false
+    else
+      # The purpose of the label and of the branching condition is to
+      # speed up the sed processing (if there are no `@' at all, there
+      # is no need to browse any of the substitutions).
+      # These are the two extra sed commands mentioned above.
+      (echo ':t
+  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+      if test -z "$ac_sed_cmds"; then
+       ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+      else
+       ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+      fi
+      ac_sed_frag=`expr $ac_sed_frag + 1`
+      ac_beg=$ac_end
+      ac_end=`expr $ac_end + $ac_max_sed_lines`
+    fi
+  done
+  if test -z "$ac_sed_cmds"; then
+    ac_sed_cmds=cat
+  fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+       cat >$tmp/stdin
+       ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+       ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+       ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$ac_file" : 'X\(//\)[^/]' \| \
+        X"$ac_file" : 'X\(//\)$' \| \
+        X"$ac_file" : 'X\(/\)' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+
+
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    configure_input=
+  else
+    configure_input="$ac_file.  "
+  fi
+  configure_input=$configure_input"Generated from `echo $ac_file_in |
+                                    sed 's,.*/,,'` by configure."
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+        # Absolute (can't be DOS-style, as IFS=:)
+        test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+        echo "$f";;
+      *) # Relative
+        if test -f "$f"; then
+          # Build tree
+          echo "$f"
+        elif test -f "$srcdir/$f"; then
+          # Source tree
+          echo "$srcdir/$f"
+        else
+          # /dev/null tree
+          { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+        fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+  rm -f $tmp/stdin
+  if test x"$ac_file" != x-; then
+    mv $tmp/out $ac_file
+  else
+    cat $tmp/out
+    rm -f $tmp/out
+  fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
+ac_dB='[        ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+       cat >$tmp/stdin
+       ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+       ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+       ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+        # Absolute (can't be DOS-style, as IFS=:)
+        test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+        # Do quote $f, to prevent DOS paths from being IFS'd.
+        echo "$f";;
+      *) # Relative
+        if test -f "$f"; then
+          # Build tree
+          echo "$f"
+        elif test -f "$srcdir/$f"; then
+          # Source tree
+          echo "$srcdir/$f"
+        else
+          # /dev/null tree
+          { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+        fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+  # Remove the trailing spaces.
+  sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h.  The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status.  Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless.  Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
+
+# This sed command replaces #undef with comments.  This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >>conftest.undefs <<\_ACEOF
+s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo '  if grep "^[     ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo '  :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+  # Write a limited-size here document to $tmp/defines.sed.
+  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#define' lines.
+  echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/defines.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+  rm -f conftest.defines
+  mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo '  fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.undefs >/dev/null
+do
+  # Write a limited-size here document to $tmp/undefs.sed.
+  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#undef'
+  echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+  rm -f conftest.undefs
+  mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    echo "/* Generated by configure.  */" >$tmp/config.h
+  else
+    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
+  fi
+  cat $tmp/in >>$tmp/config.h
+  rm -f $tmp/in
+  if test x"$ac_file" != x-; then
+    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$ac_file" : 'X\(//\)[^/]' \| \
+        X"$ac_file" : 'X\(//\)$' \| \
+        X"$ac_file" : 'X\(/\)' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+      { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+      rm -f $ac_file
+      mv $tmp/config.h $ac_file
+    fi
+  else
+    cat $tmp/config.h
+    rm -f $tmp/config.h
+  fi
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
+
+
+
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..2fc7be2
--- /dev/null
@@ -0,0 +1,92 @@
+# Simple configuration script for OpenChange
+# Written by Jelmer Vernooij <jelmer@samba.org>
+
+AC_PREREQ(2.57)
+AC_INIT(openchange, 0.1, [openchange@openchange.org])
+AC_CONFIG_HEADER([config.h])
+AC_DEFINE(_GNU_SOURCE, 1, [Use GNU extensions])
+
+AC_PROG_CC
+
+dnl ***********************
+dnl Check for PERL
+dnl ***********************
+
+AC_PATH_PROG(PERL, perl)
+
+if test -z "$PERL"
+then
+       AC_MSG_ERROR(Please install perl)
+fi
+
+dnl ***********************
+dnl Check for Pidl
+dnl ***********************
+
+AC_PATH_PROG(PIDL, pidl)
+
+if test -z "$PIDL"
+then
+       AC_MSG_ERROR(Please install pidl)
+fi
+
+dnl *****************************
+dnl Check for samba dependencies 
+dnl *****************************
+
+AC_CHECK_LIB(popt, poptFreeContext, , [ AC_MSG_ERROR([Popt is required]) ])
+
+PKG_PROG_PKG_CONFIG([0.20])
+PKG_CHECK_MODULES(TALLOC, talloc)
+PKG_CHECK_MODULES(SAMBA, dcerpc ndr tdr samba-util samba-config)
+PKG_CHECK_MODULES(LDB, ldb)
+
+TORTURE_MODULESDIR=`$PKG_CONFIG --variable=modulesdir torture`
+AC_SUBST(TORTURE_MODULESDIR)
+
+SERVER_MODULESDIR=`$PKG_CONFIG --variable=modulesdir dcerpc_server`
+AC_SUBST(SERVER_MODULESDIR)
+
+AC_CHECK_TYPE(uint_t, unsigned int)
+
+dnl ****************************
+dnl Check for evolution plugins 
+dnl ****************************
+
+AC_ARG_WITH(evolution, [  --evolution=[version] Use Evolution version.],
+                       evolution_version="$withval", evolution_version="2.6")  
+
+AC_ARG_ENABLE(eplugins, [  --enable-eplugins=[yes,no] Build Evolution plugins.],
+                       enable_eplugins="$enableval", enable_eplugins="no")
+
+if test "x${enable_eplugins}" = "xyes"; then
+       dnl Check for dependencies
+
+       PKG_CHECK_MODULES(EPLUGINS, evolution-plugin-${evolution_version})
+
+       dnl Add evolution plugin rules here
+       EPLUGINS="eplugins-all"
+       AC_SUBST(EPLUGINS)
+
+       EPLUGINS_INSTALL="eplugins-install"
+       AC_SUBST(EPLUGINS_INSTALL)
+
+       EPLUGINS_UNINSTALL="eplugins-uninstall"
+       AC_SUBST(EPLUGINS_UNINSTALL)
+
+       plugindir=`$PKG_CONFIG --variable=plugindir evolution-plugin-${evolution_version}`
+       AC_SUBST(plugindir)
+fi
+
+
+dnl ***********************
+dnl Makefiles 
+dnl ***********************
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+
+dnl ***********************
+dnl Output 
+dnl ***********************
+
diff --git a/doc/howto.txt b/doc/howto.txt
new file mode 100644 (file)
index 0000000..b603704
--- /dev/null
@@ -0,0 +1,141 @@
+OpenChange developer howto
+--------------------------
+
+j.kerihuel@openchange.org, October 2005
+Updates by Jelmer Vernooij <jelmer@samba.org>, March 2006.
+Updates by Gregory Schiro <g.schiro@openchange.org>, April 2006.
+Updates by Julien Kerihuel <j.kerihuel@openchange.org>, May 2006.
+
+First of all, install Samba 4 correctly (see howto.txt in the Samba4 package).
+Make sure you build with shared library support enabled 
+(./configure --enable-dso). You will also need to install pidl 
+(run 'make installpidl' from the Samba source dir).
+
+Since the libraries will be installed in /usr/local/samba/lib, make 
+sure that path is listed in /etc/ld.so.conf and run 'ldconfig'.
+
+After that, make sure the right PKG_CONFIG_PATH is set if you installed 
+Samba4 to a weird location. For example, if you installed to /usr/local/samba
+(default if building from source), run:
+
+$ export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/local/samba/lib/pkgconfig
+
+pkg-config >= 0.20 is required.
+
+If you are running out of Subversion, run autogen.sh now:
+
+$ ./autogen.sh
+
+Now, run configure:
+
+$ ./configure --prefix=path_where_samba_is_installed
+
+At this point, you should be able to build and install openchange:
+
+$ make && make install
+
+Once this is done, you need to provision OpenChange:
+
+You need to run the "oc_provision" script to set up a basic OpenChange store.
+
+$ cd source
+$ ./libmapi/setup/oc_provision --domain=YOURDOM
+
+In order to run OpenChange, you need so set up additional parameters
+in the [global] section of smb.conf. A sample smb.conf for OpenChange can be 
+found
+in doc/smb.conf.
+
+You need to activate the exchange dcerpc endpoints servers. The
+following options overwrite the default endpoints list, we need to add
+them anew:
+
+       dcerpc endpoint servers = exchange_nsp exchange_emsmdb epmapper srvsvc wkssvc rpcecho samr netlogon lsarpc spoolss drsuapi winreg dssetup
+
+You also need to fill information about your locale ID. 3 information are requested:
+- codepage
+- input locale language
+- input locale method
+
+You can easily find the locale language and method for your country using ./bin/locale_codepage we developed:
+
+1. Select your Region
+
+  $ ./bin/locale_codepage -l
+Language groups:
+                CP_WESTERN_EUROPE_AND_US
+                CP_CENTRAL_EUROPE
+                CP_BALTIC
+                CP_GREEK
+                CP_CYRILLIC
+                CP_TURKIC
+                CP_JAPANESE
+                CP_KOREAN
+                CP_TRADITIONAL_CHINESE
+                CP_SIMPLIFIED_CHINESE
+                CP_THAI
+                CP_HEBREW
+                CP_ARABIC
+                CP_VIETNAMESE
+                CP_INDIC
+                CP_GEORGIAN
+                CP_ARMENIAN
+
+
+
+2. List languages in your region
+
+  $ ./bin/locale_codepage -G CP_WESTERN_EUROPE_AND_US
+               [...]
+               French_Standard
+               [...]
+
+
+3. Display language and method for your language
+
+  $ ./bin/locale_codepage -i French_Standard
+######### BEGIN: (copy and paste into smb.conf) #########
+locale:language = 0x40c
+locale:method = 0x409
+######### END:   (copy and paste into smb.conf) #########
+
+You can choose the codepage you want and check it using:
+
+  $ ./bin/locale_codepage -c 0x4e4
+        codepage                 : 0x4e4
+        codepage name            : cpWindows1252
+        codepage description     : ANSI - Latin I, Western European (Windows), Charset Label:Windows-1252, Aliases:ANSI_X3.4-1968, ANSI_X3.4-1986, ascii, cp367, cp819, csASCII, IBM367, ibm819, ISO_646.irv:1991, iso_8859-1, iso_8859-1:1987, ISO646-US, iso8859-1, iso-8859-1, iso-ir-100, i...
+
+
+  If you intend to run RPC-NSPI_PROFILE torture test and you have
+  configured OpenChange to run as a server, you'll need to specify the
+  exchange server you want to connect to. This can be specified on
+  command-line, but it's generally easier to add it into your smb.conf
+  file.
+
+  exchange:server = EXCHANGE
+
+  Your OpenChange server needs a unique GUID that identifies it:
+
+  exchange:GUID = 1b940e13-14d3-4e2a-9711-e06a2def5dfd
+
+
+The simplest is to just run "smbd", but as a developer you may find
+the following more useful:
+
+   # smbd -d3 -i -M single
+
+that means "start smbd without messages in stdout, and running a
+single process. That mode of operation makes debugging smbd with gdb
+particularly easy.
+
+Evolution Plugins
+-----------------
+
+To enable openchange evolution plugins compilation run:
+
+./configure --prefix=path_where_samba_is_installed --enable-eplugins=yes
+
+eplugins are disabled by default. If enabled, you'll need evolution-plugin-2.2
+package
+
diff --git a/doc/smb.conf.example b/doc/smb.conf.example
new file mode 100644 (file)
index 0000000..cf34ffc
--- /dev/null
@@ -0,0 +1,25 @@
+[globals]
+       netbios name            = zion
+       workgroup               = OPENCHANGE
+       realm                   = openchange.local
+       server role             = pdc
+
+dcerpc endpoint servers                = exchange_nsp exchange_emsmdb epmapper srvsvc wkssvc rpcecho samr netlogon lsarpc spoolss drsuapi winreg dssetup
+
+       locale:codepage         = 0x4e4
+       locale:language         = 0x40c
+       locale:method           = 0x409
+
+       exchange:server         = EXCHANGE-2000
+       exchange:organization   = OpenChange
+       exchange:GUID           = 1b940e13-14d3-4e2a-9711-e06a2def5dfd
+       exchange:store          = /usr/local/samba/private/store.ldb
+       exchange:dbtype         = tdb
+
+       PR_TAGS:tags_conf_path  = trunk/OpenChange/torture/scantags/nspi_scantags.conf
+        PR_TAGS:tags_path      = trunk/OpenChange/torture/scantags/proptags.conf
+
+
+[test]
+       path                    = /tmp
+       read only               = no
diff --git a/eplugins/oc-plugin/openchange-plugin.c b/eplugins/oc-plugin/openchange-plugin.c
new file mode 100644 (file)
index 0000000..e3654d4
--- /dev/null
@@ -0,0 +1,109 @@
+#ifndef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <string.h>
+#include <stdio.h>
+
+#include <gtk/gtk.h>
+#include <gtk/gtkdialog.h>
+#include <gtk/gtkmain.h>
+#include <gtk/gtkinvisible.h>
+#include <gtk/gtkselection.h>
+
+#include <e-util/e-plugin.h>
+#include <e-util/e-config.h>
+#include <e-util/e-account.h>
+
+
+#include <libintl.h>
+//#include <camel/camel-i18n.h>
+#include <camel/camel-provider.h>
+#include <camel/camel-url.h>
+#include <camel/camel-service.h>
+#include <camel/camel-folder.h>
+#include <camel/camel-exception.h>
+#include <camel/camel-multipart.h>
+#include <camel/camel-stream-mem.h>
+
+#include <libedataserver/e-xml-hash-utils.h>
+
+
+int            e_plugin_lib_enable(EPluginLib *ep, int enable);
+GtkWidget      *org_gnome_openchange_check_options(EPlugin *epl, EConfigHookItemFactoryData *data);
+GtkWidget      *org_gnome_openchange_account_settings(EPlugin *epl, EConfigHookItemFactoryData *data);
+void           org_gnome_openchange_url(EPlugin *epl, EConfigHookItemFactoryData *data);
+GtkWidget      *org_gnome_openchange_account_settings(EPlugin *epl, EConfigHookItemFactoryData *data);
+
+CamelProviderConfEntry openchange_conf_entries[] = {
+  { CAMEL_PROVIDER_CONF_LABEL, "username", NULL, "Openchange User_name:"},
+  
+  /* extra Openchange configuration settings */
+  { CAMEL_PROVIDER_CONF_SECTION_START, "activedirectory", NULL,
+    /* i18n: GAL is an Outlookism, AD is a Windowsism */
+    "Global Address List / Active Directory" },
+  
+  { CAMEL_PROVIDER_CONF_SECTION_END },
+  { CAMEL_PROVIDER_CONF_END }
+};
+
+static CamelProvider openchange_provider = {
+  "openchange",
+  "Openchange",
+  "For handling mail and other information on Openchange Server",
+  "mail",
+  CAMEL_PROVIDER_IS_REMOTE | CAMEL_PROVIDER_IS_SOURCE | CAMEL_PROVIDER_IS_STORAGE,
+  CAMEL_URL_NEED_USER | CAMEL_URL_HIDDEN_AUTH | CAMEL_URL_HIDDEN_HOST,
+  openchange_conf_entries
+};
+
+
+
+
+CamelType      camel_openchange_store_get_type(){
+  
+  return (0);
+}
+
+CamelType      camel_openchange_transport_get_type(){
+
+  return (0);
+}
+
+
+void camel_provider_module_init(void)
+{
+  openchange_provider.object_types[CAMEL_PROVIDER_STORE] = camel_openchange_store_get_type();
+  openchange_provider.object_types[CAMEL_PROVIDER_TRANSPORT] = camel_openchange_transport_get_type();
+
+  bindtextdomain("Openchange", NULL);
+  bind_textdomain_codeset("Openchange", "UTF-8");
+
+  camel_provider_register(&openchange_provider);
+}
+
+
+
+int    e_plugin_lib_enable(EPluginLib *ep, int enable)
+{
+  if (enable) {
+    printf("Openchange plugin enabled\n");
+
+  } else {
+    printf("Openchange plugin disabled\n");
+  }
+ return 0;
+}
+
+
+GtkWidget      *org_gnome_openchange_account_settings(EPlugin *epl, EConfigHookItemFactoryData *data)
+{
+  return (0);
+}
+
+GtkWidget      *org_gnome_openchange_check_options(EPlugin *epl, EConfigHookItemFactoryData *data)
+{
+  return (0);
+}
+
+
diff --git a/eplugins/oc-plugin/org-openchange-plugin.eplug.in b/eplugins/oc-plugin/org-openchange-plugin.eplug.in
new file mode 100644 (file)
index 0000000..daa7cab
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<e-plugin-list>
+  <e-plugin
+    type="shlib"
+    id="org.gnome.evolution.plugin.openchange"
+    location="@PLUGINDIR@/liborg-openchange-plugin.so"
+    name="OpenChange Plugin">
+    <description>OpenChange plugin to be compliant with the groupware server.</description>
+    <author name="Calvez Loic" email="l.calvez@openchange.org"/>
+    <!-- hook into the uri popup menu -->
+    <hook class="org.gnome.evolution.mail.config:1.0">
+       <group
+               target="account"
+               id="org.gnome.evolution.mail.config.accountEditor"/>
+                <item type="page"
+                        path="40.oof"
+                        label="Openchange Settings"
+                        factory="org_gnome_openchange_settings"/>
+                <item type="item_table"
+                        path="10.receive/10.config/20.owa"
+                        factory="org_gnome_openchange_url"/>
+                <item type="section"
+                        path="10.receive/30.auth/00.exchange_auth"
+                        factory="org_gnome_openchange_auth_section"/>
+        </group>
+    </hook>
+  </e-plugin>
+</e-plugin-list>
diff --git a/eplugins/sample-plugin/org-openchange-sample-plugin.eplug.in b/eplugins/sample-plugin/org-openchange-sample-plugin.eplug.in
new file mode 100644 (file)
index 0000000..fb02113
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<e-plugin-list>
+  <e-plugin
+    type="shlib"
+    id="org.openchange.sample.plugin"
+    location="@PLUGINDIR@/liborg-openchange-sample-plugin.so"
+    name="Sample OpenChange Plugin">
+    <description>A sample OpenChange plugin which does nothing.</description>
+    <author name="Julien Kerihuel" email="j.kerihuel@openchange.org"/>
+
+    <!-- hook into the uri popup menu -->
+    <hook class="org.gnome.evolution.sample-plugin:1.0">
+    </hook>
+  </e-plugin>
+</e-plugin-list>
diff --git a/eplugins/sample-plugin/sample-plugin.c b/eplugins/sample-plugin/sample-plugin.c
new file mode 100644 (file)
index 0000000..5e32608
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ *  OpenChange Evolution plugin implementation.
+ *
+ *  Copyright (C) Julien Kerihuel 2006
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef HAV_CONFIG_H
+#include "config.h"
+#endif
+
+#include <string.h>
+#include <stdio.h>
+
+#include <gtk/gtkmain.h>
+#include <gtk/gtkinvisible.h>
+#include <gtk/gtkselection.h>
+
+#include <e-util/e-plugin.h>
+
+int e_plugin_lib_enable(EPluginLib *ep, int enable);
+
+int
+e_plugin_lib_enable(EPluginLib *ep, int enable)
+{
+       fprintf(stderr, "OpenChange Sample Evolution Plugin\n");
+       return 0;
+}
diff --git a/exchange.idl b/exchange.idl
new file mode 100644 (file)
index 0000000..d82e0a3
--- /dev/null
@@ -0,0 +1,620 @@
+#include "idl_types.h"
+
+/*
+   http://support.microsoft.com/default.aspx?scid=KB;en-us;q159298
+   Any UUID starting with:
+   A4 - store
+   F5 - directory
+ */
+
+[
+  uuid("99e64010-b032-11d0-97a4-00c04fd6551d"),
+  pointer_default(unique),
+  version(3.0)
+] interface exchange_store_admin3
+{
+       void ec_store_admin3_dummy();
+}
+
+
+[
+  uuid("89742ace-a9ed-11cf-9c0c-08002be7ae86"),
+  pointer_default(unique),
+  version(2.0)
+] interface exchange_store_admin2
+{
+       void ec_store_admin2_dummy();
+}
+
+[
+  uuid("a4f1db00-ca47-1067-b31e-00dd010662da"),
+  pointer_default(unique),
+  version(1.0)
+] interface exchange_store_admin1
+{
+       void ec_store_admin1_dummy();
+}
+
+
+[
+  uuid("1544f5e0-613c-11d1-93df-00c04fd7bd09"),
+  pointer_default(unique),
+  version(1.0),
+  helpstring("Exchange 2003 Directory Request For Response")
+] interface exchange_ds_rfr
+{
+       /*****************/
+       /* Function 0x00 */
+       void RfrGetNewDSA();
+
+       /*****************/
+       /* Function 0x01 */
+       void RfrGetFQDNFromLegacyDN();
+}
+
+[
+  uuid("f930c514-1215-11d3-99a5-00a0c9b61b04"),
+  helpstring("System Attendant Cluster Interface"),
+  pointer_default(unique),
+  version(1.0)
+] interface exchange_sysatt_cluster
+{
+       void sysatt_cluster_dummy();
+}
+
+/*
+[83d72bf0-0d89-11ce-b13f-00aa003bac6c] MS Exchange
+System Attendant Private Interface
+*/
+
+[
+  uuid("469d6ec0-0d87-11ce-b13f-00aa003bac6c"),
+  pointer_default(unique),
+  helpstring("Exchange 5.5 System Attendant Request for Response")
+] interface exchange_system_attendant
+{
+       void sysatt_dummy();
+}
+
+[
+  uuid("9e8ee830-4559-11ce-979b-00aa005ffebe"),
+  pointer_default(unique),
+  version(2.0),
+  helpstring("Exchange 5.5 MTA")
+] interface exchange_mta
+{
+       /*****************/
+       /* Function 0x00 */
+       void MtaBind();
+
+       /*****************/
+       /* Function 0x01 */
+       void MtaBindAck();
+}
+
+[
+  uuid("f5cc59b4-4264-101a-8c59-08002b2f8426"),
+  pointer_default(unique),
+  version(21.0),
+  helpstring("Exchange 5.5 DRS")
+] interface exchange_drs
+{
+       /*****************/
+       /* Function 0x00 */
+       void ds_abandon();
+
+       /*****************/
+       /* Function 0x01 */
+       void ds_add_entry();
+
+       void ds_bind();
+       void ds_compare();
+       void ds_list();
+       void ds_modify_entry();
+       void ds_modify_rdn();
+       void ds_read();
+       void ds_receive_result();
+       void ds_remove_entry();
+       void ds_search();
+       void ds_unbind();
+       void ds_wait();
+       void dra_replica_add();
+       void dra_replica_delete();
+       void dra_replica_synchronize();
+       void dra_reference_update();
+       void dra_authorize_replica();
+       void dra_unauthorize_replica();
+       void dra_adopt();
+       void dra_set_status();
+       void dra_modify_entry();
+       void dra_delete_subref();
+}
+
+[
+  uuid("f5cc5a7c-4264-101a-8c59-08002b2f8426"),
+  version(21.0),
+  pointer_default(unique),
+  helpstring("Exchange 5.5 XDS")
+] interface exchange_xds
+{
+       void xds_dummy();
+}
+
+[
+  uuid("38a94e72-a9bc-11d2-8faf-00c04fa378ff"),
+  pointer_default(unique),
+  version(1.0)
+] interface exchange_mta_qadmin
+{
+       void exchange_mta_qadmin();
+}
+
+
+[
+  uuid("0e4a0156-dd5d-11d2-8c2f-00c04fb6bcde"),
+  pointer_default(unique),
+  version(1.0)
+] interface exchange_store_information
+{
+       void exchange_store_information_dummy();
+}
+
+[
+  uuid("f5cc5a18-4264-101a-8c59-08002b2f8426"),
+  endpoint("ncacn_np:[\\pipe\\exchange_nsp]", "ncacn_ip_tcp:"),
+  pointer_default(unique),
+  version(56.0),
+  helpstring("Exchange 5.5 Name Service Provider"),
+  helper("ndr_mapi.h"),
+  keepref
+] interface exchange_nsp
+{
+       /*
+         Abstract way to represent MAPI content
+       */
+
+       typedef [public,nopull,nopush,noprint] struct {
+               uint32          mapi_len;       /* whole mapi_data length */
+               uint16          length;         /* content length */
+               uint16          opnum;          /* mapi operation number */
+               uint8           *content;       /* content */
+               uint8           *remaining;     /* remaining bytes / non content */
+       } MAPI_DATA;
+
+#include "mapitags_enum.h"
+#include "mapicodes_enum.h"
+
+       /*****************/
+       /* Function 0x00 */
+
+       /*
+       ** MAPIUID explanation:
+       ** http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mapi/html/c42065c2-b1f5-4930-84a6-6ef90c6162d0.asp
+       */
+
+       typedef struct _MAPIUID{
+               uint8 ab[16];
+       } MAPIUID;
+
+       /* 
+       ** input locale combination: 
+       ** http://www.microsoft.com/globaldev/reference/win2k/setup/lcid.mspx
+       */
+
+       typedef struct {
+               uint32 language;
+               uint32 method;
+       } input_locale;
+
+       typedef [flag(NDR_NOALIGN)] struct {
+               uint32          handle;
+               uint32          flag;
+               MAPIUID         service_provider;
+               uint32          codepage;       /* CPID */
+               input_locale    input_locale;   /* LCID */
+       } MAPI_SETTINGS;
+
+       typedef struct {
+               [unique, length_is(cValues - 1), size_is(cValues - 1)] MAPITAGS *aulPropTag;
+               uint32 cValues;
+       } SPropTagArray;
+       
+       typedef struct {
+               [length_is(cValues - 1), size_is(cValues - 1)] uint32 *value;
+               uint32 cValues;
+       } instance_key;
+
+
+
+       /*****************/
+       /* Function 0x00 */
+       MAPISTATUS NspiBind(
+               [in] uint32                     unknown,
+               [in] MAPI_SETTINGS              *settings,
+               [in,out,unique] GUID            *mapiuid,
+               [out] policy_handle             *handle
+               );
+
+       /*****************/
+       /* Function 0x01 */
+       MAPISTATUS NspiUnbind(
+               [in, out] policy_handle *handle,
+               [in] uint32             status
+               );
+
+
+       void NspiUpdateStat();
+
+       /*****************/
+       /* Function 0x03 */
+       MAPISTATUS NspiQueryRows(
+               [in]                            policy_handle   *handle,
+               [in]                            uint32          flag,
+               [in,out]                        MAPI_SETTINGS   *settings,
+               [in]                            uint32          lRows,
+               [in][size_is(lRows)][unique]    uint32          *instance_key,
+               [in]                            uint32          unknown,
+               [in]                            SPropTagArray   *REQ_properties,
+               [out]                           SRowSet         **RowSet
+               );
+
+       void NspiSeekEntries();
+
+       /*****************/
+       /* Function 0x05 */
+
+       
+
+       typedef struct {
+               [unique] MAPIUID *lpguid;
+               uint32 ulKind;
+               uint32 lID; /* this is actually a union in mapidefs.h */
+       } MAPINAMEID;
+
+/* Restriction types */
+#define RES_AND            0
+#define RES_OR             1
+#define RES_NOT            2
+#define RES_CONTENT        3
+#define RES_PROPERTY       4
+#define RES_COMPAREPROPS   5
+#define RES_BITMASK        6
+#define RES_SIZE           7
+#define RES_EXIST          8
+#define RES_SUBRESTRICTION 9
+#define RES_COMMENT        10
+
+       typedef struct {
+               uint32 relop;
+               MAPITAGS ulPropTag;
+               SPropValue *lpProp;
+       } SPropertyRestriction;
+
+       typedef struct {
+               uint32  cRes;
+               [size_is(cRes)][unique]SRestriction *lpRes;
+       } SAndRestriction;
+
+       typedef [switch_type(uint32)] union {
+               [case(RES_AND)           ] SAndRestriction resAnd;
+//     [case(RES_OR)            ] SOrRestriction resOr;
+//     [case(RES_NOT)           ] SNotRestriction resNot;
+//     [case(RES_CONTENT)       ] SContentRestriction resContent;
+               [case(RES_PROPERTY)      ] SPropertyRestriction resProperty;
+//     [case(RES_COMPAREPROPS)  ] SComparePropsRestriction resCompareProps;
+//     [case(RES_BITMASK)       ] SBitMaskRestriction resBitMask;
+//     [case(RES_SUBRESTRICTION)] SSubRestriction resSub;
+//     [case(RES_SIZE)          ] SSizeRestriction resSize;
+//     [case(RES_EXIST)         ] SExistRestriction resExist;
+  } SRestriction_CTR;
+
+       typedef [public] struct _SRestriction{
+               uint32 rt;
+               [switch_is(rt)] SRestriction_CTR res;
+       } SRestriction;
+
+/* Sort type */
+#define TABLE_SORT_ASCEND      0
+#define TABLE_SORT_DESCEND     0
+
+       typedef [public] struct _SSortOrder{
+               uint32 ulPropTag;
+               uint32 ulOrder;
+       } SSortOrder;
+
+       typedef [public] struct _SSortOrderSet{
+               uint32 cSorts;
+               uint32 cCategories;
+               uint32 cExpanded;
+               [size_is(cSorts)][unique]SSortOrder *aSort;
+       } SSortOrderSet;
+
+       MAPISTATUS NspiGetMatches(
+               [in]            policy_handle   *handle,
+               [in]            uint32          unknown1,
+               [in,out]        MAPI_SETTINGS   *settings,
+               [in][unique]    SPropTagArray   *PropTagArray,
+               [in]            uint32          unknown2,
+               [in][unique]    SRestriction    *restrictions,
+               [in]            uint32          unknown3,
+               [out]           instance_key    *instance_key,
+               [in][unique]    SPropTagArray   *REQ_properties,
+               [out]           SRowSet         **RowSet
+               );
+
+
+       void NspiResortRestriction();
+
+       /*****************/
+       /* Function 0x07 */
+
+       typedef struct {
+               [string,charset(DOS)] uint8     *str;
+       } NAME_STRING;
+
+       MAPISTATUS NspiDNToEph(
+               [in] policy_handle      *handle,
+               [in] uint32             flag,
+               [in] uint32             size,
+               [in][size_is(size)] NAME_STRING server_dn[],
+               [out] instance_key      *instance_key
+               );
+
+       void NspiGetPropList();
+
+       /*****************/
+       /* Function 0x09 */
+       MAPISTATUS NspiGetProps(
+               [in]    policy_handle           *handle,
+               [in]    uint32                  flag,
+               [in]    MAPI_SETTINGS           *settings,
+               [in]    SPropTagArray           *REQ_properties,
+               [out]   SRow                    **REPL_values
+               );
+
+
+       void NspiCompareDNTs();
+       void NspiModProps();
+
+#define        PT_UNSPECIFIED  0x0000
+#define        PT_NULL         0x0001
+#define        PT_I2           0x0002
+#define        PT_LONG         0x0003
+#define        PT_R4           0x0004
+#define        PT_DOUBLE       0x0005
+#define        PT_CURRENCY     0x0006
+#define        PT_APPTIME      0x0007
+#define        PT_ERROR        0x000a /* means the given attr contains no value */
+#define        PT_BOOLEAN      0x000b
+#define        PT_OBJECT       0x000d
+#define        PT_I8           0x0014
+#define        PT_STRING8      0x001e
+#define        PT_UNICODE      0x001f
+#define        PT_SYSTIME      0x0040
+#define        PT_CLSID        0x0048
+#define        PT_BINARY       0x0102
+
+/* Multi-valued properties */
+
+#define        PT_MV_I2        0x1002
+#define        PT_MV_LONG      0x1003
+#define        PT_MV_R4        0x1004
+#define        PT_MV_DOUBLE    0x1005
+#define        PT_MV_CURRENCY  0x1006
+#define        PT_MV_APPTIME   0x1007
+#define        PT_MV_I8        0x1014
+#define        PT_MV_STRING8   0x101e
+#define        PT_MV_TSTRING   0x101e
+#define        PT_MV_UNICODE   0x101f
+#define        PT_MV_SYSTIME   0x1040
+#define        PT_MV_CLSID     0x1048
+#define        PT_MV_BINARY    0x1102
+
+       /*****************/
+       /* Function 0x0c */
+
+       typedef struct {
+               uint32                          cb;
+               [size_is(cb)][unique] uint8     *lpb;
+       } SBinary;
+
+       typedef struct {
+               uint32 dwLowDateTime;
+               uint32 dwHighDateTime;
+       } FILETIME;
+
+       typedef struct {
+               uint32 cValues;
+               [size_is(cValues)] uint16 *lpi;
+       } SShortArray;
+
+       typedef struct {
+               uint32 cValues;
+               [size_is(cValues)] uint32 *lpl; 
+       } MV_LONG_STRUCT;
+
+       typedef struct {
+               ascstr_noterm lppszA;
+       } LPSTR;
+
+       typedef struct {
+               uint32 cValues;
+               [size_is(cValues)] LPSTR **strings; 
+       } SLPSTRArray;
+
+       typedef struct {
+               uint32 cValues;
+               [size_is(cValues)] SBinary *lpbin;
+       } SBinaryArray;
+
+       typedef [flag(NDR_NOALIGN)] struct {
+               uint32 cValues;
+               [size_is(cValues)] uint32 *lpguid; 
+       } SGuidArray;
+
+       typedef struct {
+               uint32 cValues;
+               [size_is(cValues)] uint32 *lpi;
+       } MV_UNICODE_STRUCT;
+       
+       typedef struct {
+               uint32 cValues;
+               [size_is(cValues)] FILETIME *lpft;
+       } SDateTimeArray;
+
+       typedef [switch_type(uint32)] union {
+               [case(PT_I2)]                   uint16                  i;
+               [case(PT_LONG)]                 uint32                  l;
+               [case(PT_BOOLEAN)]              uint16                  b;
+               [case(PT_STRING8)][unique][string,charset(DOS)] uint8   *lpszA;
+               [case(PT_BINARY)]               SBinary                 bin;
+               [case(PT_UNICODE)]              [string,charset(UTF16)] uint16  *lpszW;
+               [case(PT_CLSID)]                MAPIUID                 *lpguid;
+               [case(PT_SYSTIME)]              FILETIME                ft;
+               [case(PT_ERROR)]                MAPISTATUS              err;
+               [case(PT_MV_I2)]                SShortArray             MVi;
+               [case(PT_MV_LONG)]              MV_LONG_STRUCT          MVl;
+               [case(PT_MV_STRING8)]           SLPSTRArray             MVszA;
+               [case(PT_MV_BINARY)]            SBinaryArray            MVbin;
+               [case(PT_MV_CLSID)]             SGuidArray              MVguid;
+               [case(PT_MV_UNICODE)]           MV_UNICODE_STRUCT       MVszW;
+               [case(PT_MV_SYSTIME)]           SDateTimeArray          MVft;
+               [case(PT_NULL)]                 uint32                  null;
+               [case(PT_OBJECT)]               uint32                  object;
+       } SPropValue_CTR;
+
+       typedef [public]struct {
+               MAPITAGS ulPropTag;
+               uint32 dwAlignPad;
+               [switch_is(ulPropTag & 0xFFFF)] SPropValue_CTR value; 
+       } SPropValue;
+       
+       typedef struct {
+               uint32 ulAdrEntryPad;
+               uint32 cValues;
+               [size_is(cValues)][unique] SPropValue *lpProps;
+       } SRow;
+
+
+       typedef [public] struct {
+               uint32 cRows;
+               [size_is(cRows)] SRow aRow[*];
+       } SRowSet;
+       
+       MAPISTATUS NspiGetHierarchyInfo(
+               [in] policy_handle      *handle,
+               [in] uint32             unknown1,
+               [in] MAPI_SETTINGS      *settings,
+               [in,out] uint32         *unknown2,
+               [out] SRowSet           **RowSet
+               );
+
+       void NspiGetTemplateInfo();
+       void NspiModLInkAtt();
+       void NspiDeleteEntries();
+       void NspiQueryColumns();
+       void NspiGetNamesFromIDs();
+       void NspiGetIDsFromNames();
+       void NspiResolveNames();
+       void NspiResolveNamesW();
+}
+
+[
+  uuid("a4f1db00-ca47-1067-b31f-00dd010662da"),
+  pointer_default(unique),
+  version(0.82),
+  helpstring("Exchange 5.5 EMSMDB")
+] interface exchange_emsmdb
+{
+       /*****************/
+       /* Function 0x00 */
+
+       MAPISTATUS EcDoConnect(
+               [out]                           policy_handle   *handle,
+                [in,string,charset(DOS)]       uint8           name[],
+               [in]                            uint32          unknown1[3],
+                [in]                           uint32          code_page,
+               [in]                            input_locale    input_locale,
+                [in]                           uint32          unknown2,
+                [in]                           uint16          unknown3,
+               [out]                           uint32          unknown4[3],
+                [out]                          uint16          *session_nb,
+                [out,unique,string,charset(DOS)]uint8          *org_group,
+                [out,unique,string,charset(DOS)]uint8          *user,
+                [out]                          uint16          store_version[3],
+               [in,out]                        uint16          emsmdb_client_version[3],
+                [in,out]                       uint32          *alloc_space
+               );
+
+       /*****************/
+       /* Function 0x01 */
+       MAPISTATUS EcDoDisconnect(
+               [in,out]   policy_handle   *handle
+               );
+
+       /*****************/
+       /* Function 0x02 */
+
+       typedef [flag(NDR_NOALIGN)]struct {
+               uint32 max_data;
+               uint32 offset;
+               [subcontext(4),flag(NDR_REMAINING|NDR_NOALIGN)] MAPI_DATA blob;
+       } EcDoRpcBlob;
+       
+       [flag(NDR_NOALIGN)] MAPISTATUS  EcDoRpc(
+               [in,out]        policy_handle   *handle,
+               [in,out]        EcDoRpcBlob     data,
+               [in,out]        uint16          *length,
+               [in]            uint16          max_data
+               );
+
+       /*****************/
+       /* Function 0x03 */
+       void EcGetMoreRpc();
+
+       /*****************/
+       /* Function 0x04 */
+       MAPISTATUS EcRRegisterPushNotification(
+               [in,out]        policy_handle           *handle,
+               [in]            uint32                  unknown,
+               [in]            DATA_BLOB               blob1,
+               [in]            uint16                  unknown1,
+               [in]            uint32                  unknown2,
+               [in]            DATA_BLOB               blob2,
+               [in]            uint16                  unknown3,
+               [out]           uint32                  *unknown4
+               );
+
+       /*****************/
+       /* Function 0x05 */
+       MAPISTATUS EcRUnregisterPushNotification(
+               [in,out]        policy_handle           *handle,
+               [in]            uint32                  unknown[2]
+               );
+
+       /*****************/
+       /* Function 0x06 */
+       void EcDummyRpc();
+
+       /*****************/
+       /* Function 0x07 */
+       void EcRGetDCName();
+
+       /*****************/
+       /* Function 0x08 */
+       void EcRNetGetDCName();
+
+       /*****************/
+       /* Function 0x09 */
+       void EcDoRpcExt();
+}
+
+[
+  uuid("c840a7dc-42c0-1a10-b4b9-08002b2fe182"),
+  pointer_default(unique),
+  helpstring("Unknown")
+] interface exchange_unknown
+{
+       void unknown_dummy();
+}
+
diff --git a/idl_types.h b/idl_types.h
new file mode 100644 (file)
index 0000000..98a8d1c
--- /dev/null
@@ -0,0 +1,97 @@
+#define STR_ASCII      LIBNDR_FLAG_STR_ASCII
+#define STR_LEN4       LIBNDR_FLAG_STR_LEN4
+#define STR_SIZE4      LIBNDR_FLAG_STR_SIZE4
+#define STR_SIZE2      LIBNDR_FLAG_STR_SIZE2
+#define STR_NOTERM     LIBNDR_FLAG_STR_NOTERM
+#define STR_NULLTERM   LIBNDR_FLAG_STR_NULLTERM
+#define STR_BYTESIZE   LIBNDR_FLAG_STR_BYTESIZE
+#define STR_FIXLEN32   LIBNDR_FLAG_STR_FIXLEN32
+#define STR_FIXLEN15   LIBNDR_FLAG_STR_FIXLEN15
+#define STR_CONFORMANT  LIBNDR_FLAG_STR_CONFORMANT
+#define STR_CHARLEN    LIBNDR_FLAG_STR_CHARLEN
+#define STR_UTF8       LIBNDR_FLAG_STR_UTF8
+#define STR_LARGE_SIZE LIBNDR_FLAG_STR_LARGE_SIZE
+
+/*
+  a UCS2 string prefixed with [size], 32 bits
+*/
+#define lstring                [flag(STR_SIZE4)] string
+
+/*
+  a null terminated UCS2 string
+*/
+#define nstring                [flag(STR_NULLTERM)] string
+
+/*
+  fixed length 32 character UCS-2 string
+*/
+#define string32       [flag(STR_FIXLEN32)] string
+
+/*
+  fixed length 16 character ascii string
+*/
+#define astring15       [flag(STR_ASCII|STR_FIXLEN15)] string
+
+/*
+  an ascii string prefixed with [offset] [length], both 32 bits
+  null terminated
+*/
+#define ascstr2                [flag(STR_ASCII|STR_LEN4)] string
+
+/*
+  an ascii string prefixed with [size], 32 bits
+*/
+#define asclstr                [flag(STR_ASCII|STR_SIZE4)] string
+
+/*
+  an ascii string prefixed with [size], 16 bits
+  null terminated
+*/
+#define ascstr3                [flag(STR_ASCII|STR_SIZE2)] string
+
+/*
+  an ascii string prefixed with [size] [offset] [length], all 32 bits
+  not null terminated
+*/
+#define ascstr_noterm  [flag(STR_NOTERM|STR_ASCII|STR_SIZE4|STR_LEN4)] string
+
+/*
+  a null terminated ascii string
+*/
+#define astring                [flag(STR_ASCII|STR_NULLTERM)] string
+
+/*
+  a null terminated UTF8 string
+*/
+#define utf8string     [flag(STR_UTF8|STR_NULLTERM)] string
+
+/*
+  a null terminated UCS2 string
+*/
+#define nstring_array  [flag(STR_NULLTERM)] string_array
+
+#define NDR_NOALIGN       LIBNDR_FLAG_NOALIGN
+#define NDR_REMAINING     LIBNDR_FLAG_REMAINING
+#define NDR_ALIGN2        LIBNDR_FLAG_ALIGN2
+#define NDR_ALIGN4        LIBNDR_FLAG_ALIGN4
+#define NDR_ALIGN8        LIBNDR_FLAG_ALIGN8
+
+/* this flag is used to force a section of IDL as little endian. It is
+   needed for the epmapper IDL, which is defined as always being LE */
+#define NDR_LITTLE_ENDIAN LIBNDR_FLAG_LITTLE_ENDIAN
+#define NDR_BIG_ENDIAN LIBNDR_FLAG_BIGENDIAN
+
+
+/*
+  these are used by the epmapper and mgmt interfaces
+*/
+#define error_status_t uint32
+#define boolean32 uint32
+#define unsigned32 uint32
+
+/*
+  this is used to control formatting of uint8 arrays
+*/
+#define NDR_PAHEX LIBNDR_PRINT_ARRAY_HEX
+
+#define bool8 uint8
diff --git a/install-sh b/install-sh
new file mode 100644 (file)
index 0000000..e9de238
--- /dev/null
@@ -0,0 +1,251 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission.  M.I.T. makes no representations about the
+# suitability of this software for any purpose.  It is provided "as is"
+# without express or implied warranty.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.  It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+    case $1 in
+       -c) instcmd="$cpprog"
+           shift
+           continue;;
+
+       -d) dir_arg=true
+           shift
+           continue;;
+
+       -m) chmodcmd="$chmodprog $2"
+           shift
+           shift
+           continue;;
+
+       -o) chowncmd="$chownprog $2"
+           shift
+           shift
+           continue;;
+
+       -g) chgrpcmd="$chgrpprog $2"
+           shift
+           shift
+           continue;;
+
+       -s) stripcmd="$stripprog"
+           shift
+           continue;;
+
+       -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+           shift
+           continue;;
+
+       -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+           shift
+           continue;;
+
+       *)  if [ x"$src" = x ]
+           then
+               src=$1
+           else
+               # this colon is to work around a 386BSD /bin/sh bug
+               :
+               dst=$1
+           fi
+           shift
+           continue;;
+    esac
+done
+
+if [ x"$src" = x ]
+then
+       echo "install:  no input file specified"
+       exit 1
+else
+       true
+fi
+
+if [ x"$dir_arg" != x ]; then
+       dst=$src
+       src=""
+       
+       if [ -d $dst ]; then
+               instcmd=:
+               chmodcmd=""
+       else
+               instcmd=mkdir
+       fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad 
+# if $src (and thus $dsttmp) contains '*'.
+
+       if [ -f $src -o -d $src ]
+       then
+               true
+       else
+               echo "install:  $src does not exist"
+               exit 1
+       fi
+       
+       if [ x"$dst" = x ]
+       then
+               echo "install:  no destination specified"
+               exit 1
+       else
+               true
+       fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+       if [ -d $dst ]
+       then
+               dst="$dst"/`basename $src`
+       else
+               true
+       fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+#  this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='   
+'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+       pathcomp="${pathcomp}${1}"
+       shift
+
+       if [ ! -d "${pathcomp}" ] ;
+        then
+               $mkdirprog "${pathcomp}"
+       else
+               true
+       fi
+
+       pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+       $doit $instcmd $dst &&
+
+       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+       if [ x"$transformarg" = x ] 
+       then
+               dstfile=`basename $dst`
+       else
+               dstfile=`basename $dst $transformbasename | 
+                       sed $transformarg`$transformbasename
+       fi
+
+# don't allow the sed command to completely eliminate the filename
+
+       if [ x"$dstfile" = x ] 
+       then
+               dstfile=`basename $dst`
+       else
+               true
+       fi
+
+# Make a temp file name in the proper directory.
+
+       dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+       $doit $instcmd $src $dsttmp &&
+
+       trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing.  If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+
+# Now rename the file to the real destination.
+
+       $doit $rmcmd -f $dstdir/$dstfile &&
+       $doit $mvcmd $dsttmp $dstdir/$dstfile 
+
+fi &&
+
+
+exit 0
diff --git a/ldif/AD_schema_kerihu_j_exchange b/ldif/AD_schema_kerihu_j_exchange
new file mode 100644 (file)
index 0000000..6c23898
--- /dev/null
@@ -0,0 +1,90 @@
+[kerihu_j@zion source]$ ldapsearch -x -D "kerihu_j@openchange.info" -b "dc=openchange,dc=info" -W -h 192.168.0.20 "cn=Julien Kerihuel" 
+Enter LDAP Password:
+# extended LDIF
+#
+# LDAPv3
+# base <dc=openchange,dc=info> with scope sub
+# filter: cn=Julien Kerihuel
+# requesting: ALL
+#
+
+# Julien Kerihuel, Users, openchange.info
+dn: CN=Julien Kerihuel,CN=Users,DC=openchange,DC=info
+homeMDB: CN=Mailbox Store (EXCHANGE),CN=First Storage Group,CN=InformationStor
+ e,CN=EXCHANGE,CN=Servers,CN=First Administrative Group,CN=Administrative Grou
+ ps,CN=OpenChange Organization,CN=Microsoft Exchange,CN=Services,CN=Configurat
+ ion,DC=openchange,DC=info
+memberOf: CN=Openchange Team,CN=Users,DC=openchange,DC=info
+accountExpires: 9223372036854775807
+badPasswordTime: 127843436719210000
+badPwdCount: 2
+codePage: 0
+cn: Julien Kerihuel
+countryCode: 0
+displayName: Julien Kerihuel
+mail: kerihu_j@openchange.info
+givenName: Julien
+instanceType: 4
+lastLogoff: 0
+lastLogon: 0
+legacyExchangeDN: /o=OpenChange Organization/ou=First Administrative Group/cn=
+ Recipients/cn=kerihu_j
+logonCount: 0
+distinguishedName: CN=Julien Kerihuel,CN=Users,DC=openchange,DC=info
+objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=openchange,DC=info
+objectClass: top
+objectClass: person
+objectClass: organizationalPerson
+objectClass: user
+objectGUID:: dGwHhXwOjUWWUkFLL+kr9Q==
+objectSid:: AQUAAAAAAAUVAAAAuiGiegJc4YptIAj0WwQAAA==
+primaryGroupID: 513
+proxyAddresses: SMTP:kerihu_j@openchange.info
+proxyAddresses: X400:c=US;a= ;p=OpenChange Organ;o=Exchange;s=Kerihuel;g=Julie
+ n;
+pwdLastSet: 127198680370447500
+name: Julien Kerihuel
+sAMAccountName: kerihu_j
+sAMAccountType: 805306368
+showInAddressBook: CN=Default Global Address List,CN=All Global Address Lists,
+ CN=Address Lists Container,CN=OpenChange Organization,CN=Microsoft Exchange,C
+ N=Services,CN=Configuration,DC=openchange,DC=info
+showInAddressBook: CN=All Users,CN=All Address Lists,CN=Address Lists Containe
+ r,CN=OpenChange Organization,CN=Microsoft Exchange,CN=Services,CN=Configurati
+ on,DC=openchange,DC=info
+sn: Kerihuel
+textEncodedORAddress: c=US;a= ;p=OpenChange Organ;o=Exchange;s=Kerihuel;g=Juli
+ en;
+userAccountControl: 66048
+userPrincipalName: kerihu_j@openchange.info
+uSNChanged: 18004
+uSNCreated: 17991
+whenChanged: 20040129164129.0Z
+whenCreated: 20040129164036.0Z
+homeMTA: CN=Microsoft MTA,CN=EXCHANGE,CN=Servers,CN=First Administrative Group
+ ,CN=Administrative Groups,CN=OpenChange Organization,CN=Microsoft Exchange,CN
+ =Services,CN=Configuration,DC=openchange,DC=info
+msExchHomeServerName: /o=OpenChange Organization/ou=First Administrative Group
+ /cn=Configuration/cn=Servers/cn=EXCHANGE
+mailNickname: kerihu_j
+mDBUseDefaults: TRUE
+msExchMailboxGuid:: BefBWRSbx0OEudcm3LgXKw==
+msExchMailboxSecurityDescriptor:: AQAEgHgAAACUAAAAAAAAABQAAAAEAGQAAQAAAAACFAAD
+ AAIAAQEAAAAAAAUKAAAATgA9AEMAbwBuAGYAaQBnAHUAcgBhAHQAaQBvAG4ALABEAEMAPQBvAHAAZ
+ QBuAGMAaABhAG4AZwBlACwARABDAD0AaQBuAGYAAQUAAAAAAAUVAAAAuiGiegJc4YptIAj09AEAAA
+ EFAAAAAAAFFQAAALohonoCXOGKbSAI9PQBAAA=
+msExchALObjectVersion: 56
+msExchPoliciesIncluded: {AA72A7BC-5FF4-4142-99CE-5AEC2E16C457},{26491CFC-9E50-
+ 4857-861B-0CB8DF22B5D7}
+msExchUserAccountControl: 0
+
+# search reference
+ref: ldap://openchange.info/CN=Configuration,DC=openchange,DC=info
+
+# search result
+search: 2
+result: 0 Success
+
+# numResponses: 3
+# numEntries: 1
+# numReferences: 1
diff --git a/ldif/AD_schema_nspiusertest b/ldif/AD_schema_nspiusertest
new file mode 100644 (file)
index 0000000..95b861e
--- /dev/null
@@ -0,0 +1,55 @@
+[kerihu_j@zion source]$ ldapsearch -x -D "nspitestuser@openchange.info" -b "dc=openchange,dc=info" -W -h 192.168.0.20 "cn=nspitestuser"
+Enter LDAP Password:
+# extended LDIF
+#
+# LDAPv3
+# base <dc=openchange,dc=info> with scope sub
+# filter: cn=nspitestuser
+# requesting: ALL
+#
+
+# nspitestuser, Users, openchange.info
+dn: CN=nspitestuser,CN=Users,DC=openchange,DC=info
+accountExpires: 9223372036854775807
+badPasswordTime: 0
+badPwdCount: 0
+codePage: 0
+cn: nspitestuser
+countryCode: 0
+description: Samba4 torture account created by host ZION: Tue Feb 14 05:55:42
+ 2006 CET
+displayName: nspitestuser
+instanceType: 4
+lastLogoff: 0
+lastLogon: 0
+logonCount: 0
+distinguishedName: CN=nspitestuser,CN=Users,DC=openchange,DC=info
+objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=openchange,DC=info
+objectClass: top
+objectClass: person
+objectClass: organizationalPerson
+objectClass: user
+objectGUID:: d1yAQ4ZMLUKC7ub144ao0Q==
+objectSid:: AQUAAAAAAAUVAAAAuiGiegJc4YptIAj0fwQAAA==
+primaryGroupID: 513
+pwdLastSet: 127843668777335000
+name: nspitestuser
+sAMAccountName: nspitestuser
+sAMAccountType: 805306368
+userAccountControl: 512
+comment: Tortured by Samba4: Tue Feb 14 05:55:42 2006 CET
+uSNChanged: 43746
+uSNCreated: 43741
+whenChanged: 20060214050117.0Z
+whenCreated: 20060214044908.0Z
+
+# search reference
+ref: ldap://openchange.info/CN=Configuration,DC=openchange,DC=info
+
+# search result
+search: 2
+result: 0 Success
+
+# numResponses: 3
+# numEntries: 1
+# numReferences: 1
diff --git a/ldif/AD_schema_nspiusertest_exchange b/ldif/AD_schema_nspiusertest_exchange
new file mode 100644 (file)
index 0000000..5b4d5b5
--- /dev/null
@@ -0,0 +1,87 @@
+[kerihu_j@zion source]$ ldapsearch -x -D "nspitestuser@openchange.info" -b "dc=openchange,dc=info" -W -h 192.168.0.20 "cn=nspitestuser"
+Enter LDAP Password:
+# extended LDIF
+#
+# LDAPv3
+# base <dc=openchange,dc=info> with scope sub
+# filter: cn=nspitestuser
+# requesting: ALL
+#
+
+# nspitestuser, Users, openchange.info
+dn: CN=nspitestuser,CN=Users,DC=openchange,DC=info
+homeMDB: CN=Mailbox Store (EXCHANGE),CN=First Storage Group,CN=InformationStor
+ e,CN=EXCHANGE,CN=Servers,CN=First Administrative Group,CN=Administrative Grou
+ ps,CN=OpenChange Organization,CN=Microsoft Exchange,CN=Services,CN=Configurat
+ ion,DC=openchange,DC=info
+accountExpires: 9223372036854775807
+badPasswordTime: 0
+badPwdCount: 0
+codePage: 0
+cn: nspitestuser
+countryCode: 0
+description: Samba4 torture account created by host ZION: Tue Feb 14 05:55:42
+ 2006 CET
+displayName: nspitestuser
+mail: nspitestuser@openchange.info
+instanceType: 4
+lastLogoff: 0
+lastLogon: 0
+legacyExchangeDN: /o=OpenChange Organization/ou=First Administrative Group/cn=
+ Recipients/cn=nspitestuser
+logonCount: 0
+distinguishedName: CN=nspitestuser,CN=Users,DC=openchange,DC=info
+objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=openchange,DC=info
+objectClass: top
+objectClass: person
+objectClass: organizationalPerson
+objectClass: user
+objectGUID:: d1yAQ4ZMLUKC7ub144ao0Q==
+objectSid:: AQUAAAAAAAUVAAAAuiGiegJc4YptIAj0fwQAAA==
+primaryGroupID: 513
+proxyAddresses: SMTP:nspitestuser@openchange.info
+proxyAddresses: X400:c=US;a= ;p=OpenChange Organ;o=Exchange;s=nspitestuser;
+pwdLastSet: 127843668777335000
+name: nspitestuser
+sAMAccountName: nspitestuser
+sAMAccountType: 805306368
+showInAddressBook: CN=Default Global Address List,CN=All Global Address Lists,
+ CN=Address Lists Container,CN=OpenChange Organization,CN=Microsoft Exchange,C
+ N=Services,CN=Configuration,DC=openchange,DC=info
+showInAddressBook: CN=All Users,CN=All Address Lists,CN=Address Lists Containe
+ r,CN=OpenChange Organization,CN=Microsoft Exchange,CN=Services,CN=Configurati
+ on,DC=openchange,DC=info
+textEncodedORAddress: c=US;a= ;p=OpenChange Organ;o=Exchange;s=nspitestuser;
+userAccountControl: 512
+comment: Tortured by Samba4: Tue Feb 14 05:55:42 2006 CET
+uSNChanged: 43749
+uSNCreated: 43741
+whenChanged: 20060214050937.0Z
+whenCreated: 20060214044908.0Z
+homeMTA: CN=Microsoft MTA,CN=EXCHANGE,CN=Servers,CN=First Administrative Group
+ ,CN=Administrative Groups,CN=OpenChange Organization,CN=Microsoft Exchange,CN
+ =Services,CN=Configuration,DC=openchange,DC=info
+msExchHomeServerName: /o=OpenChange Organization/ou=First Administrative Group
+ /cn=Configuration/cn=Servers/cn=EXCHANGE
+mailNickname: nspitestuser
+mDBUseDefaults: TRUE
+msExchMailboxGuid:: PXBVGIoYukiofwRy97t0mw==
+msExchMailboxSecurityDescriptor:: AQAEgHgAAACUAAAAAAAAABQAAAAEAGQAAQAAAAACFAAD
+ AAIAAQEAAAAAAAUKAAAATgA9AEMAbwBuAGYAaQBnAHUAcgBhAHQAaQBvAG4ALABEAEMAPQBvAHAAZ
+ QBuAGMAaABhAG4AZwBlACwARABDAD0AaQBuAGYAAQUAAAAAAAUVAAAAuiGiegJc4YptIAj09AEAAA
+ EFAAAAAAAFFQAAALohonoCXOGKbSAI9PQBAAA=
+msExchALObjectVersion: 62
+msExchPoliciesIncluded: {AA72A7BC-5FF4-4142-99CE-5AEC2E16C457},{26491CFC-9E50-
+ 4857-861B-0CB8DF22B5D7}
+msExchUserAccountControl: 0
+
+# search reference
+ref: ldap://openchange.info/CN=Configuration,DC=openchange,DC=info
+
+# search result
+search: 2
+result: 0 Success
+
+# numResponses: 3
+# numEntries: 1
+# numReferences: 1
diff --git a/libmapi/IMAPISession.idl b/libmapi/IMAPISession.idl
new file mode 100644 (file)
index 0000000..f42ee8e
--- /dev/null
@@ -0,0 +1,45 @@
+[
+       version(0.1),
+       helpstring("Open MAPI Session")
+] interface IMAPISession
+{
+       typedef [public] enum
+       {
+               op_OpenMsgStore = 0xFE
+       } mapi_opcodes;
+
+       /************************* CALLS **********************************/
+       typedef struct {
+               uint8   col;
+               uint8   row;
+               uint32  locale_id;
+               uint32  padding;
+               [value(strlen(profile_info) + 1)] uint16 profile_info_length;
+               [charset(DOS),string] uint8 profile_info[];
+       } OpenMsgStore_req;
+
+       typedef struct {
+
+       } OpenMsgStore_repl;
+
+       /***************************** UNIONS *****************************/
+       typedef union {
+               [case(op_OpenMsgStore)] OpenMsgStore_req openmsgstore;
+       } MAPI_REQ_UNION;
+
+       typedef union {
+               [case(op_OpenMsgStore)] OpenMsgStore_repl openmsgstore;
+       } MAPI_REPL_UNION;
+
+       typedef [public] struct
+       {
+               uint16 opcode;
+               [switch_is(opcode)] MAPI_REQ_UNION u;
+       } MAPI_REQ;
+
+       typedef [public] struct
+       {
+               uint16 opcode;
+               [switch_is(opcode)] MAPI_REPL_UNION u;
+       } MAPI_REPL;
+}
diff --git a/libmapi/conf/build.sh b/libmapi/conf/build.sh
new file mode 100755 (executable)
index 0000000..cb7795d
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+./libmapi/conf/mparse.pl --parser=mapitags --outputdir=libmapi/ libmapi/conf/mapi-properties
+./libmapi/conf/mparse.pl --parser=mapicodes --outputdir=libmapi/ libmapi/conf/mapi-codes
diff --git a/libmapi/conf/mapi-codes b/libmapi/conf/mapi-codes
new file mode 100644 (file)
index 0000000..6f48a89
--- /dev/null
@@ -0,0 +1,89 @@
+#
+# OpenChange MAPI implementation.
+# MAPI error codes
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+
+0x00000000  MAPI_E_SUCCESS
+0x80040102  MAPI_E_NO_SUPPORT
+0x80040103  MAPI_E_BAD_CHARWIDTH
+0x80040105  MAPI_E_STRING_TOO_LONG
+0x80040106  MAPI_E_UNKNOWN_FLAGS
+0x80040107  MAPI_E_INVALID_ENTRYID
+0x80040108  MAPI_E_INVALID_OBJECT
+0x80040109  MAPI_E_OBJECT_CHANGED
+0x8004010A  MAPI_E_OBJECT_DELETED
+0x8004010B  MAPI_E_BUSY
+0x8004010D  MAPI_E_NOT_ENOUGH_DISK
+0x8004010E  MAPI_E_NOT_ENOUGH_RESOURCES
+0x8004010F  MAPI_E_NOT_FOUND
+0x80040110  MAPI_E_VERSION
+0x80040111  MAPI_E_LOGON_FAILED
+0x80040112  MAPI_E_SESSION_LIMIT
+0x80040113  MAPI_E_USER_CANCEL
+0x80040114  MAPI_E_UNABLE_TO_ABORT
+0x80040115  MAPI_E_NETWORK_ERROR
+0x80040116  MAPI_E_DISK_ERROR
+0x80040117  MAPI_E_TOO_COMPLEX
+0x80040118  MAPI_E_BAD_COLUMN
+0x80040119  MAPI_E_EXTENDED_ERROR
+0x8004011A  MAPI_E_COMPUTED
+0x8004011B  MAPI_E_CORRUPT_DATA
+0x8004011C  MAPI_E_UNCONFIGURED
+0x8004011D  MAPI_E_FAILONEPROVIDER
+0x8004011E  MAPI_E_UNKNOWN_CPID
+0x8004011F  MAPI_E_UNKNOWN_LCID
+0x80040120  MAPI_E_PASSWORD_CHANGE_REQUIRED
+0x80040121  MAPI_E_PASSWORD_EXPIRED
+0x80040122  MAPI_E_INVALID_WORKSTATION_ACCOUNT
+0x80040123  MAPI_E_INVALID_ACCESS_TIME
+0x80040124  MAPI_E_ACCOUNT_DISABLED
+0x80040200  MAPI_E_END_OF_SESSION
+0x80040201  MAPI_E_UNKNOWN_ENTRYID
+0x80040202  MAPI_E_MISSING_REQUIRED_COLUMN
+0x80040203  MAPI_W_NO_SERVICE
+0x80040301  MAPI_E_BAD_VALUE
+0x80040302  MAPI_E_INVALID_TYPE
+0x80040303  MAPI_E_TYPE_NO_SUPPORT
+0x80040304  MAPI_E_UNEXPECTED_TYPE
+0x80040305  MAPI_E_TOO_BIG
+0x80040306  MAPI_E_DECLINE_COPY
+0x80040307  MAPI_E_UNEXPECTED_ID
+0x80040380  MAPI_W_ERRORS_RETURNED
+0x80040400  MAPI_E_UNABLE_TO_COMPLETE
+0x80040401  MAPI_E_TIMEOUT
+0x80040402  MAPI_E_TABLE_EMPTY
+0x80040403  MAPI_E_TABLE_TOO_BIG
+0x80040405  MAPI_E_INVALID_BOOKMARK
+0x80040481  MAPI_W_POSITION_CHANGED
+0x80040482  MAPI_W_APPROX_COUNT
+0x80040500  MAPI_E_WAIT
+0x80040501  MAPI_E_CANCEL
+0x80040502  MAPI_E_NOT_ME
+0x80040580  MAPI_W_CANCEL_MESSAGE
+0x80040600  MAPI_E_CORRUPT_STORE
+0x80040601  MAPI_E_NOT_IN_QUEUE
+0x80040602  MAPI_E_NO_SUPPRESS
+0x80040604  MAPI_E_COLLISION
+0x80040605  MAPI_E_NOT_INITIALIZED
+0x80040606  MAPI_E_NON_STANDARD
+0x80040607  MAPI_E_NO_RECIPIENTS
+0x80040608  MAPI_E_SUBMITTED
+0x80040609  MAPI_E_HAS_FOLDERS
+0x8004060A  MAPI_E_HAS_MESAGES
+0x8004060B  MAPI_E_FOLDER_CYCLE
+0x80040680  MAPI_W_PARTIAL_COMPLETION
+0x80040700  MAPI_E_AMBIGUOUS_RECIP
diff --git a/libmapi/conf/mapi-properties b/libmapi/conf/mapi-properties
new file mode 100644 (file)
index 0000000..f1f14a6
--- /dev/null
@@ -0,0 +1,1525 @@
+#
+# OpenChange MAPI implementation.
+# MAPI property tags
+#
+# This file was originally taken from the Gnome Evolution project.
+# evolution/evolution-exchange/docs/mapi-properties
+#
+# For the OpenChange project, UNICODE properties (1f) have been
+# replaced by PT_STRING8 ones (1e)
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+
+0x00010003  PR_ACKNOWLEDGEMENT_MODE test1
+0x0002000b  PR_ALTERNATE_RECIPIENT_ALLOWED test2
+0x00030102  PR_AUTHORIZING_USERS test3
+0x0004001e  PR_AUTO_FORWARD_COMMENT test4
+0x0005000b  PR_AUTO_FORWARDED test5
+0x00060102  PR_CONTENT_CONFIDENTIALITY_ALGORITHM_ID test6
+0x00070102  PR_CONTENT_CORRELATOR test7
+0x0008001e  PR_CONTENT_IDENTIFIER
+0x00090003  PR_CONTENT_LENGTH
+0x000a000b  PR_CONTENT_RETURN_REQUESTED
+0x000b0102  PR_CONVERSATION_KEY
+0x000c0102  PR_CONVERSION_EITS
+0x000d000b  PR_CONVERSION_WITH_LOSS_PROHIBITED
+0x000e0102  PR_CONVERTED_EITS
+0x000f0040  PR_DEFERRED_DELIVERY_TIME
+0x00100040  PR_DELIVER_TIME
+0x00110003  PR_DISCARD_REASON
+0x0012000b  PR_DISCLOSURE_OF_RECIPIENTS
+0x00130102  PR_DL_EXPANSION_HISTORY
+0x0014000b  PR_DL_EXPANSION_PROHIBITED
+0x00150040  PR_EXPIRY_TIME
+0x0016000b  PR_IMPLICIT_CONVERSION_PROHIBITED
+0x00170003  PR_IMPORTANCE
+0x00180102  PR_IPM_ID
+0x00190040  PR_LATEST_DELIVERY_TIME
+0x001a001e  PR_MESSAGE_CLASS
+0x001b0102  PR_MESSAGE_DELIVERY_ID
+0x001e0102  PR_MESSAGE_SECURITY_LABEL
+0x001f0102  PR_OBSOLETED_IPMS
+0x00200102  PR_ORIGINALLY_INTENDED_RECIPIENT_NAME
+0x00210102  PR_ORIGINAL_EITS
+0x00220102  PR_ORIGINATOR_CERTIFICATE
+0x0023000b  PR_ORIGINATOR_DELIVERY_REPORT_REQUESTED
+0x00240102  PR_ORIGINATOR_RETURN_ADDRESS
+0x00250102  PR_PARENT_KEY
+0x00260003  PR_PRIORITY
+0x00270102  PR_ORIGIN_CHECK
+0x0028000b  PR_PROOF_OF_SUBMISSION_REQUESTED
+0x0029000b  PR_READ_RECEIPT_REQUESTED
+0x002a0040  PR_RECEIPT_TIME
+0x002b000b  PR_RECIPIENT_REASSIGNMENT_PROHIBITED
+0x002c0102  PR_REDIRECTION_HISTORY
+0x002d0102  PR_RELATED_IPMS
+0x002e0003  PR_ORIGINAL_SENSITIVITY
+0x002f001e  PR_LANGUAGES
+0x00300040  PR_REPLY_TIME
+0x00310102  PR_REPORT_TAG
+0x00320040  PR_REPORT_TIME
+0x0033000b  PR_RETURNED_IPM
+0x00340003  PR_SECURITY
+0x0035000b  PR_INCOMPLETE_COPY
+0x00360003  PR_SENSITIVITY
+0x0037001e  PR_SUBJECT
+0x00380102  PR_SUBJECT_IPM
+0x00390040  PR_CLIENT_SUBMIT_TIME
+0x003a001e  PR_REPORT_NAME
+0x003b0102  PR_SENT_REPRESENTING_SEARCH_KEY
+0x003c0102  PR_X400_CONTENT_TYPE
+0x003d001e  PR_SUBJECT_PREFIX
+0x003e0003  PR_NON_RECEIPT_REASON
+0x003f0102  PR_RECEIVED_BY_ENTRYID
+0x0040001e  PR_RECEIVED_BY_NAME
+0x00410102  PR_SENT_REPRESENTING_ENTRYID
+0x0042001e  PR_SENT_REPRESENTING_NAME
+0x00430102  PR_RCVD_REPRESENTING_ENTRYID
+0x0044001e  PR_RCVD_REPRESENTING_NAME
+0x00450102  PR_REPORT_ENTRYID
+0x00460102  PR_READ_RECEIPT_ENTRYID
+0x00470102  PR_MESSAGE_SUBMISSION_ID
+0x00480040  PR_PROVIDER_SUBMIT_TIME
+0x0049001e  PR_ORIGINAL_SUBJECT
+0x004a000b  PR_DISC_VAL
+0x004b001e  PR_ORIG_MESSAGE_CLASS
+0x004c0102  PR_ORIGINAL_AUTHOR_ENTRYID
+0x004d001e  PR_ORIGINAL_AUTHOR_NAME
+0x004e0040  PR_ORIGINAL_SUBMIT_TIME
+0x004f0102  PR_REPLY_RECIPIENT_ENTRIES
+0x0050001e  PR_REPLY_RECIPIENT_NAMES
+0x00510102  PR_RECEIVED_BY_SEARCH_KEY
+0x00520102  PR_RCVD_REPRESENTING_SEARCH_KEY
+0x00530102  PR_READ_RECEIPT_SEARCH_KEY
+0x00540102  PR_REPORT_SEARCH_KEY
+0x00550040  PR_ORIGINAL_DELIVERY_TIME
+0x00560102  PR_ORIGINAL_AUTHOR_SEARCH_KEY
+0x0057000b  PR_MESSAGE_TO_ME
+0x0058000b  PR_MESSAGE_CC_ME
+0x0059000b  PR_MESSAGE_RECIP_ME
+0x005a001e  PR_ORIGINAL_SENDER_NAME
+0x005b0102  PR_ORIGINAL_SENDER_ENTRYID
+0x005c0102  PR_ORIGINAL_SENDER_SEARCH_KEY
+0x005d001e  PR_ORIGINAL_SENT_REPRESENTING_NAME
+0x005e0102  PR_ORIGINAL_SENT_REPRESENTING_ENTRYID
+0x005f0102  PR_ORIGINAL_SENT_REPRESENTING_SEARCH_KEY
+0x00600040  PR_START_DATE
+0x00610040  PR_END_DATE
+0x00620003  PR_OWNER_APPT_ID
+0x0063000b  PR_RESPONSE_REQUESTED
+0x0064001e  PR_SENT_REPRESENTING_ADDRTYPE
+0x0065001e  PR_SENT_REPRESENTING_EMAIL_ADDRESS
+0x0066001e  PR_ORIGINAL_SENDER_ADDRTYPE
+0x0067001e  PR_ORIGINAL_SENDER_EMAIL_ADDRESS
+0x0068001e  PR_ORIGINAL_SENT_REPRESENTING_ADDRTYPE
+0x0069001e  PR_ORIGINAL_SENT_REPRESENTING_EMAIL_ADDRESS
+0x0070001e  PR_CONVERSATION_TOPIC
+0x00710102  PR_CONVERSATION_INDEX
+0x0072001e  PR_ORIGINAL_DISPLAY_BCC
+0x0073001e  PR_ORIGINAL_DISPLAY_CC
+0x0074001e  PR_ORIGINAL_DISPLAY_TO
+0x0075001e  PR_RECEIVED_BY_ADDRTYPE
+0x0076001e  PR_RECEIVED_BY_EMAIL_ADDRESS
+0x0077001e  PR_RCVD_REPRESENTING_ADDRTYPE
+0x0078001e  PR_RCVD_REPRESENTING_EMAIL_ADDRESS
+0x0079001e  PR_ORIGINAL_AUTHOR_ADDRTYPE
+0x007a001e  PR_ORIGINAL_AUTHOR_EMAIL_ADDRESS
+0x007b001e  PR_ORIGINALLY_INTENDED_RECIP_ADDRTYPE
+0x007c001e  PR_ORIGINALLY_INTENDED_RECIP_EMAIL_ADDRESS
+0x007d001e  PR_TRANSPORT_MESSAGE_HEADERS
+0x007e0102  PR_DELEGATION
+0x007f0102  PR_TNEF_CORRELATION_KEY
+0x0c000102  PR_CONTENT_INTEGRITY_CHECK
+0x0c010003  PR_EXPLICIT_CONVERSION
+0x0c02000b  PR_IPM_RETURN_REQUESTED
+0x0c030102  PR_MESSAGE_TOKEN
+0x0c040003  PR_NDR_REASON_CODE
+0x0c050003  PR_NDR_DIAG_CODE
+0x0c06000b  PR_NON_RECEIPT_NOTIFICATION_REQUESTED
+0x0c070003  PR_DELIVERY_POINT
+0x0c08000b  PR_ORIGINATOR_NON_DELIVERY_REPORT_REQUESTED
+0x0c090102  PR_ORIGINATOR_REQUESTED_ALTERNATE_RECIPIENT
+0x0c0a000b  PR_PHYSICAL_DELIVERY_BUREAU_FAX_DELIVERY
+0x0c0b0003  PR_PHYSICAL_DELIVERY_MODE
+0x0c0c0003  PR_PHYSICAL_DELIVERY_REPORT_REQUEST
+0x0c0d0102  PR_PHYSICAL_FORWARDING_ADDRESS
+0x0c0e000b  PR_PHYSICAL_FORWARDING_ADDRESS_REQUESTED
+0x0c0f000b  PR_PHYSICAL_FORWARDING_PROHIBITED
+0x0c100102  PR_PHYSICAL_RENDITION_ATTRIBUTES
+0x0c110102  PR_PROOF_OF_DELIVERY
+0x0c12000b  PR_PROOF_OF_DELIVERY_REQUESTED
+0x0c130102  PR_RECIPIENT_CERTIFICATE
+0x0c14001e  PR_RECIPIENT_NUMBER_FOR_ADVICE
+0x0c150003  PR_RECIPIENT_TYPE
+0x0c160003  PR_REGISTERED_MAIL_TYPE
+0x0c17000b  PR_REPLY_REQUESTED
+0x0c180003  PR_REQUESTED_DELIVERY_METHOD
+0x0c190102  PR_SENDER_ENTRYID
+0x0c1a001e  PR_SENDER_NAME
+0x0c1b001e  PR_SUPPLEMENTARY_INFO
+0x0c1c0003  PR_TYPE_OF_MTS_USER
+0x0c1d0102  PR_SENDER_SEARCH_KEY
+0x0c1e001e  PR_SENDER_ADDRTYPE
+0x0c1f001e  PR_SENDER_EMAIL_ADDRESS
+0x0e000014  PR_CURRENT_VERSION
+0x0e01000b  PR_DELETE_AFTER_SUBMIT
+0x0e02001e  PR_DISPLAY_BCC
+0x0e03001e  PR_DISPLAY_CC
+0x0e04001e  PR_DISPLAY_TO
+0x0e05001e  PR_PARENT_DISPLAY
+0x0e060040  PR_MESSAGE_DELIVERY_TIME
+0x0e070003  PR_MESSAGE_FLAGS
+0x0e080003  PR_MESSAGE_SIZE
+0x0e080014  PR_MESSAGE_SIZE_EXTENDED
+0x0e090102  PR_PARENT_ENTRYID
+0x0e0a0102  PR_SENTMAIL_ENTRYID
+0x0e0c000b  PR_CORRELATE
+0x0e0d0102  PR_CORRELATE_MTSID
+0x0e0e000b  PR_DISCRETE_VALUES
+0x0e0f000b  PR_RESPONSIBILITY
+0x0e100003  PR_SPOOLER_STATUS
+0x0e110003  PR_TRANSPORT_STATUS
+0x0e12000d  PR_MESSAGE_RECIPIENTS
+0x0e13000d  PR_MESSAGE_ATTACHMENTS
+0x0e140003  PR_SUBMIT_FLAGS
+0x0e150003  PR_RECIPIENT_STATUS
+0x0e160003  PR_TRANSPORT_KEY
+0x0e170003  PR_MSG_STATUS
+0x0e180003  PR_MESSAGE_DOWNLOAD_TIME
+0x0e190014  PR_CREATION_VERSION
+0x0e1a0014  PR_MODIFY_VERSION
+0x0e1b000b  PR_HASATTACH
+0x0e1c0003  PR_BODY_CRC
+0x0e1d001e  PR_NORMALIZED_SUBJECT
+0x0e1f000b  PR_RTF_IN_SYNC
+0x0e200003  PR_ATTACH_SIZE
+0x0e210003  PR_ATTACH_NUM
+0x0e22000b  PR_PREPROCESS
+0x0e230003  PR_INTERNET_ARTICLE_NUMBER
+0x0e24001e  PR_NEWSGROUP_NAME
+0x0e250102  PR_ORIGINATING_MTA_CERTIFICATE
+0x0e260102  PR_PROOF_OF_SUBMISSION
+0x0e270102  PR_NT_SECURITY_DESCRIPTOR
+0x0e580102  PR_CREATOR_SID
+0x0e590102  PR_LAST_MODIFIER_SID
+0x0e5e0048  PR_MIME_HANDLER_CLASSIDS
+0x0e610003  PR_URL_COMP_NAME_POSTFIX
+0x0e62000b  PR_URL_COMP_NAME_SET
+0x0e630003  PR_SUBFOLDER_CT
+0x0e640003  PR_DELETED_SUBFOLDER_CT
+0x0e660040  PR_DELETE_TIME
+0x0e670102  PR_AGE_LIMIT
+0x0e790003  PR_TRUST_SENDER
+0x0e960102  PR_ATTACH_VIRUS_SCAN_INFO
+0x0ff40003  PR_ACCESS
+0x0ff50003  PR_ROW_TYPE
+0x0ff60102  PR_INSTANCE_KEY
+0x0ff70003  PR_ACCESS_LEVEL
+0x0ff80102  PR_MAPPING_SIGNATURE
+0x0ff90102  PR_RECORD_KEY
+0x0ffa0102  PR_STORE_RECORD_KEY
+0x0ffb0102  PR_STORE_ENTRYID
+0x0ffc0102  PR_MINI_ICON
+0x0ffd0102  PR_ICON
+0x0ffe0003  PR_OBJECT_TYPE
+0x0fff0102  PR_ENTRYID
+0x1000001e  PR_BODY
+0x1001001e  PR_REPORT_TEXT
+0x10020102  PR_ORIGINATOR_AND_DL_EXPANSION_HISTORY
+0x10030102  PR_REPORTING_DL_NAME
+0x10040102  PR_REPORTING_MTA_CERTIFICATE
+0x10060003  PR_RTF_SYNC_BODY_CRC
+0x10070003  PR_RTF_SYNC_BODY_COUNT
+0x1008001e  PR_RTF_SYNC_BODY_TAG
+0x10090102  PR_RTF_COMPRESSED
+0x10100003  PR_RTF_SYNC_PREFIX_COUNT
+0x10110003  PR_RTF_SYNC_TRAILING_COUNT
+0x10120102  PR_ORIGINALLY_INTENDED_RECIP_ENTRYID
+0x10130102  PR_HTML
+0x1030001e  PR_INTERNET_APPROVED
+0x1031001e  PR_INTERNET_CONTROL
+0x1032001e  PR_INTERNET_DISTRIBUTION
+0x1033001e  PR_INTERNET_FOLLOWUP_TO
+0x10340003  PR_INTERNET_LINES
+0x1035001e  PR_INTERNET_MESSAGE_ID
+0x1036001e  PR_INTERNET_NEWSGROUPS
+0x1037001e  PR_INTERNET_ORGANIZATION
+0x1038001e  PR_INTERNET_NNTP_PATH
+0x1039001e  PR_INTERNET_REFERENCES
+0x103a001e  PR_SUPERSEDES
+0x103b0102  PR_POST_FOLDER_ENTRIES
+0x103c001e  PR_POST_FOLDER_NAMES
+0x103d0102  PR_POST_REPLY_FOLDER_ENTRIES
+0x103e001e  PR_POST_REPLY_FOLDER_NAMES
+0x103f0102  PR_POST_REPLY_DENIED
+0x1040001e  PR_NNTP_XREF
+0x1041001e  PR_INTERNET_PRECEDENCE
+0x1042001e  PR_IN_REPLY_TO_ID
+0x1043001e  PR_LIST_HELP
+0x1044001e  PR_LIST_SUBSCRIBE
+0x1045001e  PR_LIST_UNSUBSCRIBE
+0x10800003  PR_ACTION
+0x10810003  PR_ACTION_FLAG
+0x10820040  PR_ACTION_DATE
+0x10900003  PR_FLAG_STATUS
+0x10910040  PR_FLAG_COMPLETE
+0x10c00102  PR_SMTP_TEMP_TBL_DATA
+0x10c10003  PR_SMTP_TEMP_TBL_DATA_2
+0x10c20102  PR_SMTP_TEMP_TBL_DATA_3
+0x10c30040  PR_CAL_START_TIME
+0x10c40040  PR_CAL_END_TIME
+0x10c50040  PR_CAL_RECURRING_ID
+0x10c6001e  PR_DAV_SUBMIT_DATA
+0x10c70003  PR_CDO_EXPANSION_INDEX
+0x10c80102  PR_IFS_INTERNAL_DATA
+0x10ca0040  PR_CAL_REMINDER_NEXT_TIME
+0x10f1001e  PR_OWA_URL
+0x10f2000b  PR_DISABLE_FULL_FIDELITY
+0x10f3001e  PR_URL_COMP_NAME
+0x10f4000b  PR_ATTR_HIDDEN
+0x10f5000b  PR_ATTR_SYSTEM
+0x10f6000b  PR_ATTR_READONLY
+0x11000102  PR_P1_CONTENT
+0x11010102  PR_P1_CONTENT_TYPE
+0x30000003  PR_ROWID
+0x3001001e  PR_DISPLAY_NAME
+0x3002001e  PR_ADDRTYPE
+0x3003001e  PR_EMAIL_ADDRESS
+0x3004001e  PR_COMMENT
+0x30050003  PR_DEPTH
+0x3006001e  PR_PROVIDER_DISPLAY
+0x30070040  PR_CREATION_TIME
+0x30080040  PR_LAST_MODIFICATION_TIME
+0x30090003  PR_RESOURCE_FLAGS
+0x300a001e  PR_PROVIDER_DLL_NAME
+0x300b0102  PR_SEARCH_KEY
+0x300c0102  PR_PROVIDER_UID
+0x300d0003  PR_PROVIDER_ORDINAL
+0x3301001e  PR_FORM_VERSION
+0x33020048  PR_FORM_CLSID
+0x3303001e  PR_FORM_CONTACT_NAME
+0x3304001e  PR_FORM_CATEGORY
+0x3305001e  PR_FORM_CATEGORY_SUB
+0x33061003  PR_FORM_HOST_MAP
+0x3307000b  PR_FORM_HIDDEN
+0x3308001e  PR_FORM_DESIGNER_NAME
+0x33090048  PR_FORM_DESIGNER_GUID
+0x330a0003  PR_FORM_MESSAGE_BEHAVIOR
+0x3400000b  PR_DEFAULT_STORE
+0x340d0003  PR_STORE_SUPPORT_MASK
+0x340e0003  PR_STORE_STATE
+0x34100102  PR_IPM_SUBTREE_SEARCH_KEY
+0x34110102  PR_IPM_OUTBOX_SEARCH_KEY
+0x34120102  PR_IPM_WASTEBASKET_SEARCH_KEY
+0x34130102  PR_IPM_SENTMAIL_SEARCH_KEY
+0x34140102  PR_MDB_PROVIDER
+0x3415000d  PR_RECEIVE_FOLDER_SETTINGS
+0x35df0003  PR_VALID_FOLDER_MASK
+0x35e00102  PR_IPM_SUBTREE_ENTRYID
+0x35e20102  PR_IPM_OUTBOX_ENTRYID
+0x35e30102  PR_IPM_WASTEBASKET_ENTRYID
+0x35e40102  PR_IPM_SENTMAIL_ENTRYID
+0x35e50102  PR_VIEWS_ENTRYID
+0x35e60102  PR_COMMON_VIEWS_ENTRYID
+0x35e70102  PR_FINDER_ENTRYID
+0x36000003  PR_CONTAINER_FLAGS
+0x36010003  PR_FOLDER_TYPE
+0x36020003  PR_CONTENT_COUNT
+0x36030003  PR_CONTENT_UNREAD
+0x3604000d  PR_CREATE_TEMPLATES
+0x3605000d  PR_DETAILS_TABLE
+0x3607000d  PR_SEARCH
+0x3609000b  PR_SELECTABLE
+0x360a000b  PR_SUBFOLDERS
+0x360b0003  PR_STATUS
+0x360c001e  PR_ANR
+0x360d1003  PR_CONTENTS_SORT_ORDER
+0x360e000d  PR_CONTAINER_HIERARCHY
+0x360f000d  PR_CONTAINER_CONTENTS
+0x3610000d  PR_FOLDER_ASSOCIATED_CONTENTS
+0x36110102  PR_DEF_CREATE_DL
+0x36120102  PR_DEF_CREATE_MAILUSER
+0x3613001e  PR_CONTAINER_CLASS
+0x36140014  PR_CONTAINER_MODIFY_VERSION
+0x36150102  PR_AB_PROVIDER_ID
+0x36160102  PR_DEFAULT_VIEW_ENTRYID
+0x36170003  PR_ASSOC_CONTENT_COUNT
+0x361c0102  PR_PACKED_NAME_PROPS
+0x36d00102  PR_IPM_APPOINTMENT_ENTRYID
+0x36d10102  PR_IPM_CONTACT_ENTRYID
+0x36d20102  PR_IPM_JOURNAL_ENTRYID
+0x36d30102  PR_IPM_NOTE_ENTRYID
+0x36d40102  PR_IPM_TASK_ENTRYID
+0x36d50102  PR_REMINDERS_ONLINE_ENTRYID
+0x36d60102  PR_REMINDERS_OFFLINE_ENTRYID
+0x36d70102  PR_IPM_DRAFTS_ENTRYID
+0x36d81102  PR_OUTLOOK_2003_ENTRYIDS
+0x36df0102  PR_FOLDER_WEBVIEWINFO
+0x36e00102  PR_FOLDER_XVIEWINFO_E
+0x36e10003  PR_FOLDER_VIEWS_ONLY
+0x36e41102  PR_FREEBUSY_ENTRYIDS
+0x36e5001e  PR_DEF_MSG_CLASS
+0x36e6001e  PR_DEF_FORM_NAME
+0x36e9000b  PR_GENERATE_EXCHANGE_VIEWS
+0x36ec0003  PR_AGING_PERIOD
+0x36ee0003  PR_AGING_GRANULARITY
+0x37000102  PR_ATTACHMENT_X400_PARAMETERS
+0x3701000d  PR_ATTACH_DATA_OBJ
+0x37010102  PR_ATTACH_DATA_BIN
+0x37020102  PR_ATTACH_ENCODING
+0x3703001e  PR_ATTACH_EXTENSION
+0x3704001e  PR_ATTACH_FILENAME
+0x37050003  PR_ATTACH_METHOD
+0x3707001e  PR_ATTACH_LONG_FILENAME
+0x3708001e  PR_ATTACH_PATHNAME
+0x37090102  PR_ATTACH_RENDERING
+0x370a0102  PR_ATTACH_TAG
+0x370b0003  PR_RENDERING_POSITION
+0x370c001e  PR_ATTACH_TRANSPORT_NAME
+0x370d001e  PR_ATTACH_LONG_PATHNAME
+0x370e001e  PR_ATTACH_MIME_TAG
+0x370f0102  PR_ATTACH_ADDITIONAL_INFO
+0x3712001e  PR_ATTACH_CONTENT_ID
+0x3713001e  PR_ATTACH_CONTENT_LOCATION
+0x37140003  PR_ATTACH_FLAGS
+0x3716001e  PR_ATTACH_CONTENT_DISPOSITION
+0x38800102  PR_SYNCEVENT_SUPPRESS_GUID
+0x39000003  PR_DISPLAY_TYPE
+0x39020102  PR_TEMPLATEID
+0x39040102  PR_PRIMARY_CAPABILITY
+0x39fe001e  PR_SMTP_ADDRESS
+0x39ff001e  PR_7BIT_DISPLAY_NAME
+0x3a00001e  PR_ACCOUNT
+0x3a010102  PR_ALTERNATE_RECIPIENT
+0x3a02001e  PR_CALLBACK_TELEPHONE_NUMBER
+0x3a03000b  PR_CONVERSION_PROHIBITED
+0x3a04000b  PR_DISCLOSE_RECIPIENTS
+0x3a05001e  PR_GENERATION
+0x3a06001e  PR_GIVEN_NAME
+0x3a07001e  PR_GOVERNMENT_ID_NUMBER
+0x3a08001e  PR_OFFICE_TELEPHONE_NUMBER
+0x3a09001e  PR_HOME_TELEPHONE_NUMBER
+0x3a0a001e  PR_INITIALS
+0x3a0b001e  PR_KEYWORD
+0x3a0c001e  PR_LANGUAGE
+0x3a0d001e  PR_LOCATION
+0x3a0e000b  PR_MAIL_PERMISSION
+0x3a0f001e  PR_MHS_COMMON_NAME
+0x3a10001e  PR_ORGANIZATIONAL_ID_NUMBER
+0x3a11001e  PR_SURNAME
+0x3a120102  PR_ORIGINAL_ENTRYID
+0x3a13001e  PR_ORIGINAL_DISPLAY_NAME
+0x3a140102  PR_ORIGINAL_SEARCH_KEY
+0x3a15001e  PR_POSTAL_ADDRESS
+0x3a16001e  PR_COMPANY_NAME
+0x3a17001e  PR_TITLE
+0x3a18001e  PR_DEPARTMENT_NAME
+0x3a19001e  PR_OFFICE_LOCATION
+0x3a1a001e  PR_PRIMARY_TELEPHONE_NUMBER
+0x3a1b001e  PR_OFFICE2_TELEPHONE_NUMBER
+0x3a1c001e  PR_MOBILE_TELEPHONE_NUMBER
+0x3a1d001e  PR_RADIO_TELEPHONE_NUMBER
+0x3a1e001e  PR_CAR_TELEPHONE_NUMBER
+0x3a1f001e  PR_OTHER_TELEPHONE_NUMBER
+0x3a20001e  PR_TRANSMITTABLE_DISPLAY_NAME
+0x3a21001e  PR_PAGER_TELEPHONE_NUMBER
+0x3a220102  PR_USER_CERTIFICATE
+0x3a23001e  PR_PRIMARY_FAX_NUMBER
+0x3a25001e  PR_HOME_FAX_NUMBER
+0x3a26001e  PR_COUNTRY
+0x3a27001e  PR_LOCALITY
+0x3a28001e  PR_STATE_OR_PROVINCE
+0x3a29001e  PR_STREET_ADDRESS
+0x3a2a001e  PR_POSTAL_CODE
+0x3a2b001e  PR_POST_OFFICE_BOX
+0x3a2c001e  PR_TELEX_NUMBER
+0x3a2d001e  PR_ISDN_NUMBER
+0x3a2e001e  PR_ASSISTANT_TELEPHONE_NUMBER
+0x3a2f001e  PR_HOME2_TELEPHONE_NUMBER
+0x3a30001e  PR_ASSISTANT
+0x3a40000b  PR_SEND_RICH_INFO
+0x3a410040  PR_WEDDING_ANNIVERSARY
+0x3a420040  PR_BIRTHDAY
+0x3a43001e  PR_HOBBIES
+0x3a44001e  PR_MIDDLE_NAME
+0x3a45001e  PR_DISPLAY_NAME_PREFIX
+0x3a46001e  PR_PROFESSION
+0x3a47001e  PR_PREFERRED_BY_NAME
+0x3a48001e  PR_SPOUSE_NAME
+0x3a49001e  PR_COMPUTER_NETWORK_NAME
+0x3a4a001e  PR_CUSTOMER_ID
+0x3a4b001e  PR_TTYTDD_PHONE_NUMBER
+0x3a4c001e  PR_FTP_SITE
+0x3a4d0002  PR_GENDER
+0x3a4e001e  PR_MANAGER_NAME
+0x3a4f001e  PR_NICKNAME
+0x3a50001e  PR_PERSONAL_HOME_PAGE
+0x3a51001e  PR_BUSINESS_HOME_PAGE
+0x3a520048  PR_CONTACT_VERSION
+0x3a531102  PR_CONTACT_ENTRYIDS
+0x3a54101e  PR_CONTACT_ADDRTYPES
+0x3a550003  PR_CONTACT_DEFAULT_ADDRESS_INDEX
+0x3a56101e  PR_CONTACT_EMAIL_ADDRESSES
+0x3a57001e  PR_COMPANY_MAIN_PHONE_NUMBER
+0x3a58101e  PR_CHILDRENS_NAMES
+0x3a59001e  PR_HOME_ADDRESS_CITY
+0x3a5a001e  PR_HOME_ADDRESS_COUNTRY
+0x3a5b001e  PR_HOME_ADDRESS_POSTAL_CODE
+0x3a5c001e  PR_HOME_ADDRESS_STATE_OR_PROVINCE
+0x3a5d001e  PR_HOME_ADDRESS_STREET
+0x3a5e001e  PR_HOME_ADDRESS_POST_OFFICE_BOX
+0x3a5f001e  PR_OTHER_ADDRESS_CITY
+0x3a60001e  PR_OTHER_ADDRESS_COUNTRY
+0x3a61001e  PR_OTHER_ADDRESS_POSTAL_CODE
+0x3a62001e  PR_OTHER_ADDRESS_STATE_OR_PROVINCE
+0x3a63001e  PR_OTHER_ADDRESS_STREET
+0x3a64001e  PR_OTHER_ADDRESS_POST_OFFICE_BOX
+0x3a701102  PR_USER_X509_CERTIFICATE
+0x3a710003  PR_SEND_INTERNET_ENCODING
+0x3d000102  PR_STORE_PROVIDERS
+0x3d010102  PR_AB_PROVIDERS
+0x3d020102  PR_TRANSPORT_PROVIDERS
+0x3d04000b  PR_DEFAULT_PROFILE
+0x3d051102  PR_AB_SEARCH_PATH
+0x3d060102  PR_AB_DEFAULT_DIR
+0x3d070102  PR_AB_DEFAULT_PAB
+0x3d080102  PR_FILTERING_HOOKS
+0x3d09001e  PR_SERVICE_NAME
+0x3d0a001e  PR_SERVICE_DLL_NAME
+0x3d0b001e  PR_SERVICE_ENTRY_NAME
+0x3d0c0102  PR_SERVICE_UID
+0x3d0d0102  PR_SERVICE_EXTRA_UIDS
+0x3d0e0102  PR_SERVICES
+0x3d0f101e  PR_SERVICE_SUPPORT_FILES
+0x3d10101e  PR_SERVICE_DELETE_FILES
+0x3d110102  PR_AB_SEARCH_PATH_UPDATE
+0x3d12001e  PR_PROFILE_NAME
+0x3d13001e  PR_SERVICE_INSTALL_ID
+0x3d210102  PR_ADMIN_SECURITY_DESCRIPTOR
+0x3e00001e  PR_IDENTITY_DISPLAY
+0x3e010102  PR_IDENTITY_ENTRYID
+0x3e020003  PR_RESOURCE_METHODS
+0x3e030003  PR_RESOURCE_TYPE
+0x3e040003  PR_STATUS_CODE
+0x3e050102  PR_IDENTITY_SEARCH_KEY
+0x3e060102  PR_OWN_STORE_ENTRYID
+0x3e07001e  PR_RESOURCE_PATH
+0x3e08001e  PR_STATUS_STRING
+0x3e09000b  PR_X400_DEFERRED_DELIVERY_CANCEL
+0x3e0a0102  PR_HEADER_FOLDER_ENTRYID
+0x3e0b0003  PR_REMOTE_PROGRESS
+0x3e0c001e  PR_REMOTE_PROGRESS_TEXT
+0x3e0d000b  PR_REMOTE_VALIDATE_OK
+0x3f000003  PR_CONTROL_FLAGS
+0x3f010102  PR_CONTROL_STRUCTURE
+0x3f020003  PR_CONTROL_TYPE
+0x3f030003  PR_DELTAX
+0x3f040003  PR_DELTAY
+0x3f050003  PR_XPOS
+0x3f060003  PR_YPOS
+0x3f070102  PR_CONTROL_ID
+0x3f080003  PR_INITIAL_DETAILS_PANE
+0x3f800014  PR_DID
+0x3f810014  PR_SEQID
+0x3f820014  PR_DRAFTID
+0x3f830040  PR_CHECK_IN_TIME
+0x3f84001e  PR_CHECK_IN_COMMENT
+0x3f850003  PR_VERSION_OP_CODE
+0x3f860102  PR_VERSION_OP_DATA
+0x3f870003  PR_VERSION_SEQUENCE_NUMBER
+0x3f880014  PR_ATTACH_ID
+0x3f8d001e  PR_PKM_DOC_STATUS
+0x3f8e101e  PR_MV_PKM_OPERATION_REQ
+0x3f8f001e  PR_PKM_DOC_INTERNAL_STATE
+0x3f900002  PR_VERSIONING_FLAGS
+0x3f910102  PR_PKM_LAST_UNAPPROVED_VID
+0x3f92101e  PR_MV_PKM_VERSION_LABELS
+0x3f93101e  PR_MV_PKM_VERSION_STATUS
+0x3f940102  PR_PKM_INTERNAL_DATA
+0x3fc90102  PR_LAST_CONFLICT
+0x3fca0102  PR_CONFLICT_MSG_KEY
+0x3fd00102  PR_REPL_HEADER
+0x3fd10102  PR_REPL_STATUS
+0x3fd20102  PR_REPL_CHANGES
+0x3fd30102  PR_REPL_RGM
+0x3fd40102  PR_RMI
+0x3fd50102  PR_INTERNAL_POST_REPLY
+0x3fd60040  PR_NTSD_MODIFICATION_TIME
+0x3fd8001e  PR_PREVIEW_UNREAD
+0x3fd9001e  PR_PREVIEW
+0x3fda001e  PR_ABSTRACT
+0x3fdb0003  PR_DL_REPORT_FLAGS
+0x3fdc0102  PR_BILATERAL_INFO
+0x3fdd0003  PR_MSG_BODY_ID
+0x3fde0003  PR_INTERNET_CPID
+0x3fdf0003  PR_AUTO_RESPONSE_SUPPRESS
+0x3fe0000d  PR_ACL_TABLE
+0x3fe00102  PR_ACL_DATA
+0x3fe1000d  PR_RULES_TABLE
+0x3fe10102  PR_RULES_DATA
+0x3fe20003  PR_FOLDER_DESIGN_FLAGS
+0x3fe3000b  PR_DELEGATED_BY_RULE
+0x3fe4000b  PR_DESIGN_IN_PROGRESS
+0x3fe5000b  PR_SECURE_ORIGINATION
+0x3fe6000b  PR_PUBLISH_IN_ADDRESS_BOOK
+0x3fe70003  PR_RESOLVE_METHOD
+0x3fe8001e  PR_ADDRESS_BOOK_DISPLAY_NAME
+0x3fe90003  PR_EFORMS_LOCALE_ID
+0x3fea000b  PR_HAS_DAMS
+0x3feb0003  PR_DEFERRED_SEND_NUMBER
+0x3fec0003  PR_DEFERRED_SEND_UNITS
+0x3fed0003  PR_EXPIRY_NUMBER
+0x3fee0003  PR_EXPIRY_UNITS
+0x3fef0040  PR_DEFERRED_SEND_TIME
+0x3ff00102  PR_CONFLICT_ENTRYID
+0x3ff10003  PR_MESSAGE_LOCALE_ID
+0x3ff20102  PR_RULE_TRIGGER_HISTORY
+0x3ff30102  PR_MOVE_TO_STORE_ENTRYID
+0x3ff40102  PR_MOVE_TO_FOLDER_ENTRYID
+0x3ff50003  PR_STORAGE_QUOTA_LIMIT
+0x3ff60003  PR_EXCESS_STORAGE_USED
+0x3ff7001e  PR_SVR_GENERATING_QUOTA_MSG
+0x3ff8001e  PR_CREATOR_NAME
+0x3ff90102  PR_CREATOR_ENTRYID
+0x3ffa001e  PR_LAST_MODIFIER_NAME
+0x3ffb0102  PR_LAST_MODIFIER_ENTRYID
+0x3ffc001e  PR_REPLY_RECIPIENT_SMTP_PROXIES
+0x3ffd0003  PR_MESSAGE_CODEPAGE
+0x3ffe0102  PR_EXTENDED_ACL_DATA
+0x3fff000b  PR_FROM_I_HAVE
+0x40000003  PR_NEW_ATTACH
+0x40010003  PR_START_EMBED
+0x40020003  PR_END_EMBED
+0x40030003  PR_START_RECIP
+0x40040003  PR_END_RECIP
+0x40050003  PR_END_CC_RECIP
+0x40060003  PR_END_BCC_RECIP
+0x40070003  PR_END_P1_RECIP
+0x40090003  PR_START_TOP_FLD
+0x400a0003  PR_START_SUB_FLD
+0x400b0003  PR_END_FOLDER
+0x400c0003  PR_START_MESSAGE
+0x400d0003  PR_END_MESSAGE
+0x400e0003  PR_END_ATTACH
+0x400f0003  PR_EC_WARNING
+0x40100003  PR_START_FAI_MSG
+0x40110102  PR_NEW_FX_FOLDER
+0x40120003  PR_INCR_SYNC_CHG
+0x40130003  PR_INCR_SYNC_DEL
+0x40140003  PR_INCR_SYNC_END
+0x40150003  PR_INCR_SYNC_MSG
+0x40160003  PR_FX_DEL_PROP
+0x40170003  PR_IDSET_GIVEN
+0x40190003  PR_SENDER_FLAGS
+0x401a0003  PR_SENT_REPRESENTING_FLAGS
+0x401b0003  PR_RCVD_BY_FLAGS
+0x401c0003  PR_RCVD_REPRESENTING_FLAGS
+0x401d0003  PR_ORIGINAL_SENDER_FLAGS
+0x401e0003  PR_ORIGINAL_SENT_REPRESENTING_FLAGS
+0x401f0003  PR_REPORT_FLAGS
+0x40200003  PR_READ_RECEIPT_FLAGS
+0x4021000b  PR_SOFT_DELETES
+0x402c0102  PR_MESSAGE_SUBMISSION_ID_FROM_CLIENT
+0x4030001e  PR_SENDER_SIMPLE_DISP_NAME
+0x4031001e  PR_SENT_REPRESENTING_SIMPLE_DISP_NAME
+0x4038001e  PR_CREATOR_SIMPLE_DISP_NAME
+0x403d001e  PR_ORG_ADDR_TYPE
+0x403e001e  PR_ORG_EMAIL_ADDR
+0x40590003  PR_CREATOR_FLAGS
+0x405a0003  PR_MODIFIER_FLAGS
+0x405b0003  PR_ORIGINATOR_FLAGS
+0x405c0003  PR_REPORT_DESTINATION_FLAGS
+0x405d0003  PR_ORIGINAL_AUTHOR_FLAGS
+0x40610102  PR_ORIGINATOR_SEARCH_KEY
+0x40640102  PR_REPORT_DESTINATION_SEARCH_KEY
+0x40650003  PR_ER_FLAG
+0x40680102  PR_INTERNET_SUBJECT
+0x40690102  PR_INTERNET_SENT_REPRESENTING_NAME
+0x59020003  PR_INET_MAIL_OVERRIDE_FORMAT
+0x59090003  PR_MSG_EDITOR_FORMAT
+0x60010003  PR_DOTSTUFF_STATE
+0x65a00014  PR_RULE_SERVER_RULE_ID
+0x65c20102  PR_REPLY_TEMPLATE_ID
+0x65e00102  PR_SOURCE_KEY
+0x65e10102  PR_PARENT_SOURCE_KEY
+0x65e20102  PR_CHANGE_KEY
+0x65e30102  PR_PREDECESSOR_CHANGE_LIST
+0x65e40003  PR_SYNCHRONIZE_FLAGS
+0x65e5000b  PR_AUTO_ADD_NEW_SUBS
+0x65e6000b  PR_NEW_SUBS_GET_AUTO_ADD
+0x65e7001e  PR_MESSAGE_SITE_NAME
+0x65e8000b  PR_MESSAGE_PROCESSED
+0x65e90003  PR_RULE_MSG_STATE
+0x65ea0003  PR_RULE_MSG_USER_FLAGS
+0x65eb001e  PR_RULE_MSG_PROVIDER
+0x65ec001e  PR_RULE_MSG_NAME
+0x65ed0003  PR_RULE_MSG_LEVEL
+0x65ee0102  PR_RULE_MSG_PROVIDER_DATA
+0x65ef0102  PR_RULE_MSG_ACTIONS
+0x65f00102  PR_RULE_MSG_CONDITION
+0x65f10003  PR_RULE_MSG_CONDITION_LCID
+0x65f20002  PR_RULE_MSG_VERSION
+0x65f30003  PR_RULE_MSG_SEQUENCE
+0x65f4000b  PR_PREVENT_MSG_CREATE
+0x65f50040  PR_IMAP_INTERNAL_DATE
+0x66000003  PR_PROFILE_VERSION
+0x66010003  PR_PROFILE_CONFIG_FLAGS
+0x6602001e  PR_PROFILE_HOME_SERVER
+0x6603001e  PR_PROFILE_USER
+0x66040003  PR_PROFILE_CONNECT_FLAGS
+0x66050003  PR_PROFILE_TRANSPORT_FLAGS
+0x66060003  PR_PROFILE_UI_STATE
+0x6607001e  PR_PROFILE_UNRESOLVED_NAME
+0x6608001e  PR_PROFILE_UNRESOLVED_SERVER
+0x66090003  PR_PROFILE_OPEN_FLAGS
+0x6609001e  PR_PROFILE_BINDING_ORDER
+0x660a0003  PR_PROFILE_TYPE
+0x660b001e  PR_PROFILE_MAILBOX
+0x660c001e  PR_PROFILE_SERVER
+0x660d0003  PR_PROFILE_MAX_RESTRICT
+0x660e001e  PR_PROFILE_AB_FILES_PATH
+0x660f001e  PR_PROFILE_FAVFLD_DISPLAY_NAME
+0x6610001e  PR_PROFILE_OFFLINE_STORE_PATH
+0x66110102  PR_PROFILE_OFFLINE_INFO
+0x6612001e  PR_PROFILE_HOME_SERVER_DN
+0x6613101e  PR_PROFILE_HOME_SERVER_ADDRS
+0x6614001e  PR_PROFILE_SERVER_DN
+0x6615001e  PR_PROFILE_FAVFLD_COMMENT
+0x6616001e  PR_PROFILE_ALLPUB_DISPLAY_NAME
+0x6617001e  PR_PROFILE_ALLPUB_COMMENT
+0x66180003  PR_DISABLE_WINSOCK
+0x6618000b  PR_IN_TRANSIT
+0x66190003  PR_PROFILE_AUTH_PACKAGE
+0x66190102  PR_USER_ENTRYID
+0x661a001e  PR_USER_NAME
+0x661b0102  PR_MAILBOX_OWNER_ENTRYID
+0x661c001e  PR_MAILBOX_OWNER_NAME
+0x661d000b  PR_OOF_STATE
+0x661e0102  PR_SCHEDULE_FOLDER_ENTRYID
+0x661f0102  PR_IPM_DAF_ENTRYID
+0x66200102  PR_NON_IPM_SUBTREE_ENTRYID
+0x66210102  PR_EFORMS_REGISTRY_ENTRYID
+0x66220102  PR_SPLUS_FREE_BUSY_ENTRYID
+0x6623001e  PR_HIERARCHY_SERVER
+0x66230102  PR_OFFLINE_ADDRBOOK_ENTRYID
+0x66240102  PR_EFORMS_FOR_LOCALE_ENTRYID
+0x66250102  PR_FREE_BUSY_FOR_LOCAL_SITE_ENTRYID
+0x66260102  PR_ADDRBOOK_FOR_LOCAL_SITE_ENTRYID
+0x66270102  PR_OFFLINE_MESSAGE_ENTRYID
+0x66280102  PR_GW_MTSIN_ENTRYID
+0x66290102  PR_GW_MTSOUT_ENTRYID
+0x662a000b  PR_TRANSFER_ENABLED
+0x662b0102  PR_TEST_LINE_SPEED
+0x662c000d  PR_HIERARCHY_SYNCHRONIZER
+0x662d000d  PR_CONTENTS_SYNCHRONIZER
+0x662e000d  PR_COLLECTOR
+0x662f000d  PR_FAST_TRANSFER
+0x66300102  PR_IPM_FAVORITES_ENTRYID
+0x66310102  PR_IPM_PUBLIC_FOLDERS_ENTRYID
+0x6632000b  PR_STORE_OFFLINE
+0x6634000d  PR_CHANGE_ADVISOR
+0x6635001e  PR_FAVORITES_DEFAULT_NAME
+0x66360102  PR_SYS_CONFIG_FOLDER_ENTRYID
+0x66370048  PR_CHANGE_NOTIFICATION_GUID
+0x66380003  PR_FOLDER_CHILD_COUNT
+0x66390003  PR_RIGHTS
+0x663a000b  PR_HAS_RULES
+0x663b0102  PR_ADDRESS_BOOK_ENTRYID
+0x663c0102  PR_PUBLIC_FOLDER_ENTRYID
+0x663d0003  PR_OFFLINE_FLAGS
+0x663e0003  PR_HIERARCHY_CHANGE_NUM
+0x663f000b  PR_HAS_MODERATOR_RULES
+0x66400003  PR_DELETED_MSG_COUNT
+0x66410003  PR_DELETED_FOLDER_COUNT
+0x66420040  PR_OLDEST_DELETED_ON
+0x66430003  PR_DELETED_ASSOC_MSG_COUNT
+0x6644001e  PR_REPLICA_SERVER
+0x66450102  PR_CLIENT_ACTIONS
+0x66460102  PR_DAM_ORIGINAL_ENTRYID
+0x6647000b  PR_DAM_BACK_PATCHED
+0x66480003  PR_RULE_ERROR
+0x66490003  PR_RULE_ACTION_TYPE
+0x664a000b  PR_HAS_NAMED_PROPERTIES
+0x664b0014  PR_REPLICA_VERSION
+0x66500003  PR_RULE_ACTION_NUMBER
+0x66510102  PR_RULE_FOLDER_ENTRYID
+0x66520102  PR_ACTIVE_USER_ENTRYID
+0x66530003  PR_0X400_ENVELOPE_TYPE
+0x66540040  PR_MSG_FOLD_TIME
+0x66550102  PR_ICS_CHANGE_KEY
+0x66580003  PR_GW_ADMIN_OPERATIONS
+0x66590102  PR_INTERNET_CONTENT
+0x665a000b  PR_HAS_ATTACH_FROM_IMAIL
+0x665b001e  PR_ORIGINATOR_NAME
+0x665c001e  PR_ORIGINATOR_ADDR
+0x665d001e  PR_ORIGINATOR_ADDRTYPE
+0x665e0102  PR_ORIGINATOR_ENTRYID
+0x665f0040  PR_ARRIVAL_TIME
+0x66600102  PR_TRACE_INFO
+0x66610102  PR_SUBJECT_TRACE_INFO
+0x66620003  PR_RECIPIENT_NUMBER
+0x66630102  PR_MTS_SUBJECT_ID
+0x6664001e  PR_REPORT_DESTINATION_NAME
+0x66650102  PR_REPORT_DESTINATION_ENTRYID
+0x66660102  PR_CONTENT_SEARCH_KEY
+0x66670102  PR_FOREIGN_ID
+0x66680102  PR_FOREIGN_REPORT_ID
+0x66690102  PR_FOREIGN_SUBJECT_ID
+0x666a0102  PR_INTERNAL_TRACE_INFO
+0x666c000b  PR_IN_CONFLICT
+0x66700102  PR_LONGTERM_ENTRYID_FROM_TABLE
+0x66710014  PR_MEMBER_ID
+0x6672001e  PR_MEMBER_NAME
+0x66730003  PR_MEMBER_RIGHTS
+0x66740014  PR_RULE_ID
+0x66750102  PR_RULE_IDS
+0x66760003  PR_RULE_SEQUENCE
+0x66770003  PR_RULE_STATE
+0x66780003  PR_RULE_USER_FLAGS
+0x667900fd  PR_RULE_CONDITION
+0x667b001e  PR_PROFILE_MOAB
+0x667c001e  PR_PROFILE_MOAB_GUID
+0x667d0003  PR_PROFILE_MOAB_SEQ
+0x667f1102  PR_IMPLIED_RESTRICTIONS
+0x668000fe  PR_RULE_ACTIONS
+0x6681001e  PR_RULE_PROVIDER
+0x6682001e  PR_RULE_NAME
+0x66830003  PR_RULE_LEVEL
+0x66840102  PR_RULE_PROVIDER_DATA
+0x66850040  PR_LAST_FULL_BACKUP
+0x66870102  PR_PROFILE_ADDR_INFO
+0x66890102  PR_PROFILE_OPTIONS_DATA
+0x668a0102  PR_EVENTS_ROOT_FOLDER_ENTRYID
+0x668d001e  PR_INBOUND_NEWSFEED_DN
+0x668e001e  PR_OUTBOUND_NEWSFEED_DN
+0x668f0040  PR_DELETED_ON
+0x66900003  PR_REPLICATION_STYLE
+0x66910102  PR_REPLICATION_SCHEDULE
+0x66920003  PR_REPLICATION_MESSAGE_PRIORITY
+0x66930003  PR_OVERALL_MSG_AGE_LIMIT
+0x66940003  PR_REPLICATION_ALWAYS_INTERVAL
+0x66950003  PR_REPLICATION_MSG_SIZE
+0x6696000b  PR_IS_NEWSGROUP_ANCHOR
+0x6697000b  PR_IS_NEWSGROUP
+0x66980102  PR_REPLICA_LIST
+0x66990003  PR_OVERALL_AGE_LIMIT
+0x669a001e  PR_INTERNET_CHARSET
+0x669b0014  PR_DELETED_MESSAGE_SIZE_EXTENDED
+0x669c0014  PR_DELETED_NORMAL_MESSAGE_SIZE_EXTENDED
+0x669d0014  PR_DELETED_ASSOC_MESSAGE_SIZE_EXTENDED
+0x669e000b  PR_SECURE_IN_SITE
+0x66a0001e  PR_NT_USER_NAME
+0x66a10003  PR_LOCALE_ID
+0x66a20040  PR_LAST_LOGON_TIME
+0x66a30040  PR_LAST_LOGOFF_TIME
+0x66a40003  PR_STORAGE_LIMIT_INFORMATION
+0x66a5001e  PR_NEWSGROUP_COMPONENT
+0x66a60102  PR_NEWSFEED_INFO
+0x66a7001e  PR_INTERNET_NEWSGROUP_NAME
+0x66a80003  PR_FOLDER_FLAGS
+0x66a90040  PR_LAST_ACCESS_TIME
+0x66aa0003  PR_RESTRICTION_COUNT
+0x66ab0003  PR_CATEG_COUNT
+0x66ac0003  PR_CACHED_COLUMN_COUNT
+0x66ad0003  PR_NORMAL_MSG_W_ATTACH_COUNT
+0x66ae0003  PR_ASSOC_MSG_W_ATTACH_COUNT
+0x66af0003  PR_RECIPIENT_ON_NORMAL_MSG_COUNT
+0x66b00003  PR_RECIPIENT_ON_ASSOC_MSG_COUNT
+0x66b10003  PR_ATTACH_ON_NORMAL_MSG_COUNT
+0x66b20003  PR_ATTACH_ON_ASSOC_MSG_COUNT
+0x66b30003  PR_NORMAL_MESSAGE_SIZE
+0x66b30014  PR_NORMAL_MESSAGE_SIZE_EXTENDED
+0x66b40003  PR_ASSOC_MESSAGE_SIZE
+0x66b40014  PR_ASSOC_MESSAGE_SIZE_EXTENDED
+0x66b5001e  PR_FOLDER_PATHNAME
+0x66b60003  PR_OWNER_COUNT
+0x66b70003  PR_CONTACT_COUNT
+0x66c30003  PR_CODE_PAGE_ID
+0x66c40003  PR_RETENTION_AGE_LIMIT
+0x66c5000b  PR_DISABLE_PERUSER_READ
+0x66c60102  PR_INTERNET_PARSE_STATE
+0x66c70102  PR_INTERNET_MESSAGE_INFO
+0x6700001e  PR_PST_PATH
+0x6701000b  PR_PST_REMEMBER_PW
+0x67020003  PR_OST_ENCRYPTION
+0x6703001e  PR_PST_PW_SZ_OLD
+0x6704001e  PR_PST_PW_SZ_NEW
+0x67050003  PR_SORT_LOCALE_ID
+0x6707001e  PR_URL_NAME
+0x67090040  PR_LOCAL_COMMIT_TIME
+0x670a0040  PR_LOCAL_COMMIT_TIME_MAX
+0x670b0003  PR_DELETED_COUNT_TOTAL
+0x670c0048  PR_AUTO_RESET
+0x67100003  PR_URL_COMP_NAME_HASH
+0x67110003  PR_MSG_FOLDER_TEMPLATE_RES_2
+0x67120003  PR_RANK
+0x6713000b  PR_MSG_FOLDER_TEMPLATE_RES_4
+0x6714000b  PR_MSG_FOLDER_TEMPLATE_RES_5
+0x6715000b  PR_MSG_FOLDER_TEMPLATE_RES_6
+0x67160102  PR_MSG_FOLDER_TEMPLATE_RES_7
+0x67170102  PR_MSG_FOLDER_TEMPLATE_RES_8
+0x67180102  PR_MSG_FOLDER_TEMPLATE_RES_9
+0x6719001e  PR_MSG_FOLDER_TEMPLATE_RES_10
+0x671a001e  PR_MSG_FOLDER_TEMPLATE_RES_11
+0x671b001e  PR_MSG_FOLDER_TEMPLATE_RES_12
+0x671e000b  PR_PF_PLATINUM_HOME_MDB
+0x671f000b  PR_PF_PROXY_REQUIRED
+0x67200102  PR_INTERNET_FREE_DOC_INFO
+0x67210003  PR_PF_OVER_HARD_QUOTA_LIMIT
+0x67220003  PR_PF_MSG_SIZE_LIMIT
+0x67430003  PR_CONNECTION_MODULUS
+0x6744001e  PR_DELIVER_TO_DN
+0x67460003  PR_MIME_SIZE
+0x67470014  PR_FILE_SIZE_EXTENDED
+0x67480014  PR_FID
+0x67490014  PR_PARENT_FID
+0x674a0014  PR_MID
+0x674b0014  PR_CATEG_ID
+0x674c0014  PR_PARENT_CATEG_ID
+0x674d0014  PR_INST_ID
+0x674e0003  PR_INSTANCE_NUM
+0x674f0014  PR_ADDRBOOK_MID
+0x67500003  PR_ICS_NOTIF
+0x67510003  PR_ARTICLE_NUM_NEXT
+0x67520003  PR_IMAP_LAST_ARTICLE_ID
+0x6753000b  PR_NOT_822_RENDERABLE
+0x67580102  PR_LTID
+0x67590102  PR_CN_EXPORT
+0x675a0102  PR_PCL_EXPORT
+0x675b1102  PR_CN_MV_EXPORT
+0x67790003  PR_PF_QUOTA_STYLE
+0x677b0003  PR_PF_STORAGE_QUOTA
+0x67830003  PR_SEARCH_FLAGS
+0x67aa000b  PR_ASSOCIATED
+0x67f00102  PR_PROFILE_SECURE_MAILBOX
+0x6800001e  PR_MAILBEAT_BOUNCE_SERVER
+0x68010040  PR_MAILBEAT_REQUEST_SENT
+0x6802001e  PR_USENET_SITE_NAME
+0x68030040  PR_MAILBEAT_REQUEST_RECEIVED
+0x68040040  PR_MAILBEAT_REQUEST_PROCESSED
+0x68060040  PR_MAILBEAT_REPLY_SENT
+0x68070040  PR_MAILBEAT_REPLY_SUBMIT
+0x68080040  PR_MAILBEAT_REPLY_RECEIVED
+0x68090040  PR_MAILBEAT_REPLY_PROCESSED
+0x6844101e  PR_DELEGATES_DISPLAY_NAMES
+0x68451102  PR_DELEGATES_ENTRYIDS
+0x68470003  PR_FREEBUSY_START_RANGE
+0x68480003  PR_FREEBUSY_END_RANGE
+0x6849001e  PR_FREEBUSY_EMAIL_ADDRESS
+0x684f1003  PR_FREEBUSY_ALL_MONTHS
+0x68501102  PR_FREEBUSY_ALL_EVENTS
+0x68511003  PR_FREEBUSY_TENTATIVE_MONTHS
+0x68521102  PR_FREEBUSY_TENTATIVE_EVENTS
+0x68531003  PR_FREEBUSY_BUSY_MONTHS
+0x68541102  PR_FREEBUSY_BUSY_EVENTS
+0x68551003  PR_FREEBUSY_OOF_MONTHS
+0x68561102  PR_FREEBUSY_OOF_EVENTS
+0x68680040  PR_FREEBUSY_LAST_MODIFIED
+0x68690003  PR_FREEBUSY_NUM_MONTHS
+0x686b1003  PR_DELEGATES_SEE_PRIVATE
+0x686c0102  PR_PERSONAL_FREEBUSY
+0x686d000b  PR_PROCESS_MEETING_REQUESTS
+0x686e000b  PR_DECLINE_RECURRING_MEETING_REQUESTS
+0x686f000b  PR_DECLINE_CONFLICTING_MEETING_REQUESTS
+0x70010102  PR_VD_BINARY
+0x7002001e  PR_VD_STRINGS
+0x70030003  PR_VD_FLAGS
+0x70040102  PR_VD_LINK_TO
+0x70050102  PR_VD_VIEW_FOLDER
+0x7006001e  PR_VD_NAME
+0x70070003  PR_VD_VERSION
+0x7c00001e  PR_FAV_DISPLAY_NAME_A
+0x7c020102  PR_FAV_PUBLIC_SOURCE_KEY
+0x7c040102  PR_OST_OSTID
+0x7c0a000b  PR_STORE_SLOWLINK
+0x7d010003  PR_FAV_AUTOSUBFOLDERS
+0x7d020102  PR_FAV_PARENT_SOURCE_KEY
+0x7d030003  PR_FAV_LEVEL_MASK
+0x7d070003  PR_FAV_INHERIT_AUTO
+0x7d080102  PR_FAV_DEL_SUBS
+0x7ffa0003  PR_ATTACHMENT_LINKID
+0x7ffb0040  PR_EXCEPTION_STARTTIME
+0x7ffc0040  PR_EXCEPTION_ENDTIME
+0x7ffd0003  PR_ATTACHMENT_FLAGS
+0x7ffe000b  PR_ATTACHMENT_HIDDEN
+0x8001000b  PR_EMS_AB_DISPLAY_NAME_OVERRIDE
+0x80031102  PR_EMS_AB_CA_CERTIFICATE
+0x8004001e  PR_EMS_AB_FOLDER_PATHNAME
+0x8005000d  PR_EMS_AB_MANAGER
+0x8005001e  PR_EMS_AB_MANAGER_T
+0x8006000d  PR_EMS_AB_HOME_MDB_O
+0x8006001e  PR_EMS_AB_HOME_MDB
+0x8007000d  PR_EMS_AB_HOME_MTA_O
+0x8007001e  PR_EMS_AB_HOME_MTA
+0x8008000d  PR_EMS_AB_IS_MEMBER_OF_DL
+0x8008001e  PR_EMS_AB_IS_MEMBER_OF_DL_T
+0x8009000d  PR_EMS_AB_MEMBER
+0x8009001e  PR_EMS_AB_MEMBER_T
+0x800a001e  PR_EMS_AB_AUTOREPLY_MESSAGE
+0x800b000b  PR_EMS_AB_AUTOREPLY
+0x800c000d  PR_EMS_AB_OWNER_O
+0x800c001e  PR_EMS_AB_OWNER
+0x800d000d  PR_EMS_AB_KM_SERVER_O
+0x800d001e  PR_EMS_AB_KM_SERVER
+0x800e000d  PR_EMS_AB_REPORTS
+0x800f101e  PR_EMS_AB_PROXY_ADDRESSES
+0x80100102  PR_EMS_AB_HELP_DATA32
+0x8011001e  PR_EMS_AB_TARGET_ADDRESS
+0x8012101e  PR_EMS_AB_TELEPHONE_NUMBER
+0x80130102  PR_EMS_AB_NT_SECURITY_DESCRIPTOR
+0x8014000d  PR_EMS_AB_HOME_MDB_BL_O
+0x8014101e  PR_EMS_AB_HOME_MDB_BL
+0x8015000d  PR_EMS_AB_PUBLIC_DELEGATES
+0x8015001e  PR_EMS_AB_PUBLIC_DELEGATES_T
+0x80160102  PR_EMS_AB_CERTIFICATE_REVOCATION_LIST
+0x80170102  PR_EMS_AB_ADDRESS_ENTRY_DISPLAY_TABLE
+0x80180102  PR_EMS_AB_ADDRESS_SYNTAX
+0x80230102  PR_EMS_AB_BUSINESS_ROLES
+0x8024000d  PR_EMS_AB_OWNER_BL_O
+0x8024101e  PR_EMS_AB_OWNER_BL
+0x80251102  PR_EMS_AB_CROSS_CERTIFICATE_PAIR
+0x80261102  PR_EMS_AB_AUTHORITY_REVOCATION_LIST
+0x80270102  PR_EMS_AB_ASSOC_NT_ACCOUNT
+0x80280040  PR_EMS_AB_EXPIRATION_TIME
+0x80290003  PR_EMS_AB_USN_CHANGED
+0x802d001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_1
+0x802e001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_2
+0x802f001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_3
+0x8030001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_4
+0x8031001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_5
+0x8032001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_6
+0x8033001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_7
+0x8034001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_8
+0x8035001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_9
+0x8036001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_10
+0x80371102  PR_EMS_AB_SECURITY_PROTOCOL
+0x8038000d  PR_EMS_AB_PF_CONTACTS_O
+0x8038101e  PR_EMS_AB_PF_CONTACTS
+0x803a0102  PR_EMS_AB_HELP_DATA16
+0x803b001e  PR_EMS_AB_HELP_FILE_NAME
+0x803c000d  PR_EMS_AB_OBJ_DIST_NAME_O
+0x803c001e  PR_EMS_AB_OBJ_DIST_NAME
+0x803d001e  PR_EMS_AB_ENCRYPT_ALG_SELECTED_OTHER
+0x803e001e  PR_EMS_AB_AUTOREPLY_SUBJECT
+0x803f000d  PR_EMS_AB_HOME_PUBLIC_SERVER_O
+0x803f001e  PR_EMS_AB_HOME_PUBLIC_SERVER
+0x8040101e  PR_EMS_AB_ENCRYPT_ALG_LIST_NA
+0x8041101e  PR_EMS_AB_ENCRYPT_ALG_LIST_OTHER
+0x8042001e  PR_EMS_AB_IMPORTED_FROM
+0x8043001e  PR_EMS_AB_ENCRYPT_ALG_SELECTED_NA
+0x80440003  PR_EMS_AB_ACCESS_CATEGORY
+0x80450102  PR_EMS_AB_ACTIVATION_SCHEDULE
+0x80460003  PR_EMS_AB_ACTIVATION_STYLE
+0x80470102  PR_EMS_AB_ADDRESS_ENTRY_DISPLAY_TABLE_MSDOS
+0x8048001e  PR_EMS_AB_ADDRESS_TYPE
+0x8049001e  PR_EMS_AB_ADMD
+0x804a001e  PR_EMS_AB_ADMIN_DESCRIPTION
+0x804b001e  PR_EMS_AB_ADMIN_DISPLAY_NAME
+0x804c001e  PR_EMS_AB_ADMIN_EXTENSION_DLL
+0x804d000d  PR_EMS_AB_ALIASED_OBJECT_NAME_O
+0x804d001e  PR_EMS_AB_ALIASED_OBJECT_NAME
+0x804e000d  PR_EMS_AB_ALT_RECIPIENT_O
+0x804e001e  PR_EMS_AB_ALT_RECIPIENT
+0x804f000d  PR_EMS_AB_ALT_RECIPIENT_BL_O
+0x804f101e  PR_EMS_AB_ALT_RECIPIENT_BL
+0x80500102  PR_EMS_AB_ANCESTOR_ID
+0x8051000d  PR_EMS_AB_ASSOC_REMOTE_DXA_O
+0x8051101e  PR_EMS_AB_ASSOC_REMOTE_DXA
+0x80520003  PR_EMS_AB_ASSOCIATION_LIFETIME
+0x8053000d  PR_EMS_AB_AUTH_ORIG_BL_O
+0x8053101e  PR_EMS_AB_AUTH_ORIG_BL
+0x8054001e  PR_EMS_AB_AUTHORIZED_DOMAIN
+0x80550102  PR_EMS_AB_AUTHORIZED_PASSWORD
+0x8056001e  PR_EMS_AB_AUTHORIZED_USER
+0x8057101e  PR_EMS_AB_BUSINESS_CATEGORY
+0x8058000d  PR_EMS_AB_CAN_CREATE_PF_O
+0x8058101e  PR_EMS_AB_CAN_CREATE_PF
+0x8059000d  PR_EMS_AB_CAN_CREATE_PF_BL_O
+0x8059101e  PR_EMS_AB_CAN_CREATE_PF_BL
+0x805a000d  PR_EMS_AB_CAN_CREATE_PF_DL_O
+0x805a101e  PR_EMS_AB_CAN_CREATE_PF_DL
+0x805b000d  PR_EMS_AB_CAN_CREATE_PF_DL_BL_O
+0x805b101e  PR_EMS_AB_CAN_CREATE_PF_DL_BL
+0x805c000d  PR_EMS_AB_CAN_NOT_CREATE_PF_O
+0x805c101e  PR_EMS_AB_CAN_NOT_CREATE_PF
+0x805d000d  PR_EMS_AB_CAN_NOT_CREATE_PF_BL_O
+0x805d101e  PR_EMS_AB_CAN_NOT_CREATE_PF_BL
+0x805e000d  PR_EMS_AB_CAN_NOT_CREATE_PF_DL_O
+0x805e101e  PR_EMS_AB_CAN_NOT_CREATE_PF_DL
+0x805f000d  PR_EMS_AB_CAN_NOT_CREATE_PF_DL_BL_O
+0x805f101e  PR_EMS_AB_CAN_NOT_CREATE_PF_DL_BL
+0x8060000b  PR_EMS_AB_CAN_PRESERVE_DNS
+0x80610003  PR_EMS_AB_CLOCK_ALERT_OFFSET
+0x8062000b  PR_EMS_AB_CLOCK_ALERT_REPAIR
+0x80630003  PR_EMS_AB_CLOCK_WARNING_OFFSET
+0x8064000b  PR_EMS_AB_CLOCK_WARNING_REPAIR
+0x8065001e  PR_EMS_AB_COMPUTER_NAME
+0x8066101e  PR_EMS_AB_CONNECTED_DOMAINS
+0x80670003  PR_EMS_AB_CONTAINER_INFO
+0x80680003  PR_EMS_AB_COST
+0x8069001e  PR_EMS_AB_COUNTRY_NAME
+0x806a0003  PR_EMS_AB_DELIV_CONT_LENGTH
+0x806b1102  PR_EMS_AB_DELIV_EITS
+0x806c1102  PR_EMS_AB_DELIV_EXT_CONT_TYPES
+0x806d000b  PR_EMS_AB_DELIVER_AND_REDIRECT
+0x806e0003  PR_EMS_AB_DELIVERY_MECHANISM
+0x806f101e  PR_EMS_AB_DESCRIPTION
+0x8070101e  PR_EMS_AB_DESTINATION_INDICATOR
+0x8071001e  PR_EMS_AB_DIAGNOSTIC_REG_KEY
+0x8072000d  PR_EMS_AB_DL_MEM_REJECT_PERMS_BL_O
+0x8072101e  PR_EMS_AB_DL_MEM_REJECT_PERMS_BL
+0x8073000d  PR_EMS_AB_DL_MEM_SUBMIT_PERMS_BL_O
+0x8073101e  PR_EMS_AB_DL_MEM_SUBMIT_PERMS_BL
+0x80741102  PR_EMS_AB_DL_MEMBER_RULE
+0x8075000d  PR_EMS_AB_DOMAIN_DEF_ALT_RECIP_O
+0x8075001e  PR_EMS_AB_DOMAIN_DEF_ALT_RECIP
+0x8076001e  PR_EMS_AB_DOMAIN_NAME
+0x80770102  PR_EMS_AB_DSA_SIGNATURE
+0x8078000b  PR_EMS_AB_DXA_ADMIN_COPY
+0x8079000b  PR_EMS_AB_DXA_ADMIN_FORWARD
+0x807a0003  PR_EMS_AB_DXA_ADMIN_UPDATE
+0x807b000b  PR_EMS_AB_DXA_APPEND_REQCN
+0x807c000d  PR_EMS_AB_DXA_CONF_CONTAINER_LIST_O
+0x807c101e  PR_EMS_AB_DXA_CONF_CONTAINER_LIST
+0x807d0040  PR_EMS_AB_DXA_CONF_REQ_TIME
+0x807e001e  PR_EMS_AB_DXA_CONF_SEQ
+0x807f0003  PR_EMS_AB_DXA_CONF_SEQ_USN
+0x80800003  PR_EMS_AB_DXA_EXCHANGE_OPTIONS
+0x8081000b  PR_EMS_AB_DXA_EXPORT_NOW
+0x80820003  PR_EMS_AB_DXA_FLAGS
+0x8083001e  PR_EMS_AB_DXA_IMP_SEQ
+0x80840040  PR_EMS_AB_DXA_IMP_SEQ_TIME
+0x80850003  PR_EMS_AB_DXA_IMP_SEQ_USN
+0x8086000b  PR_EMS_AB_DXA_IMPORT_NOW
+0x8087101e  PR_EMS_AB_DXA_IN_TEMPLATE_MAP
+0x8088000d  PR_EMS_AB_DXA_LOCAL_ADMIN_O
+0x8088001e  PR_EMS_AB_DXA_LOCAL_ADMIN
+0x80890003  PR_EMS_AB_DXA_LOGGING_LEVEL
+0x808a001e  PR_EMS_AB_DXA_NATIVE_ADDRESS_TYPE
+0x808b101e  PR_EMS_AB_DXA_OUT_TEMPLATE_MAP
+0x808c001e  PR_EMS_AB_DXA_PASSWORD
+0x808d0003  PR_EMS_AB_DXA_PREV_EXCHANGE_OPTIONS
+0x808e000b  PR_EMS_AB_DXA_PREV_EXPORT_NATIVE_ONLY
+0x808f0003  PR_EMS_AB_DXA_PREV_IN_EXCHANGE_SENSITIVITY
+0x8090000d  PR_EMS_AB_DXA_PREV_REMOTE_ENTRIES_O
+0x8090001e  PR_EMS_AB_DXA_PREV_REMOTE_ENTRIES
+0x80910003  PR_EMS_AB_DXA_PREV_REPLICATION_SENSITIVITY
+0x80920003  PR_EMS_AB_DXA_PREV_TEMPLATE_OPTIONS
+0x80930003  PR_EMS_AB_DXA_PREV_TYPES
+0x8094001e  PR_EMS_AB_DXA_RECIPIENT_CP
+0x8095000d  PR_EMS_AB_DXA_REMOTE_CLIENT_O
+0x8095001e  PR_EMS_AB_DXA_REMOTE_CLIENT
+0x8096001e  PR_EMS_AB_DXA_REQ_SEQ
+0x80970040  PR_EMS_AB_DXA_REQ_SEQ_TIME
+0x80980003  PR_EMS_AB_DXA_REQ_SEQ_USN
+0x8099001e  PR_EMS_AB_DXA_REQNAME
+0x809a001e  PR_EMS_AB_DXA_SVR_SEQ
+0x809b0040  PR_EMS_AB_DXA_SVR_SEQ_TIME
+0x809c0003  PR_EMS_AB_DXA_SVR_SEQ_USN
+0x809d0003  PR_EMS_AB_DXA_TASK
+0x809e0003  PR_EMS_AB_DXA_TEMPLATE_OPTIONS
+0x809f0040  PR_EMS_AB_DXA_TEMPLATE_TIMESTAMP
+0x80a00003  PR_EMS_AB_DXA_TYPES
+0x80a1000d  PR_EMS_AB_DXA_UNCONF_CONTAINER_LIST_O
+0x80a1101e  PR_EMS_AB_DXA_UNCONF_CONTAINER_LIST
+0x80a20003  PR_EMS_AB_ENCAPSULATION_METHOD
+0x80a3000b  PR_EMS_AB_ENCRYPT
+0x80a4000b  PR_EMS_AB_EXPAND_DLS_LOCALLY
+0x80a5000d  PR_EMS_AB_EXPORT_CONTAINERS_O
+0x80a5101e  PR_EMS_AB_EXPORT_CONTAINERS
+0x80a6000b  PR_EMS_AB_EXPORT_CUSTOM_RECIPIENTS
+0x80a7000b  PR_EMS_AB_EXTENDED_CHARS_ALLOWED
+0x80a81102  PR_EMS_AB_EXTENSION_DATA
+0x80a9101e  PR_EMS_AB_EXTENSION_NAME
+0x80aa101e  PR_EMS_AB_EXTENSION_NAME_INHERITED
+0x80ab1102  PR_EMS_AB_FACSIMILE_TELEPHONE_NUMBER
+0x80ac0102  PR_EMS_AB_FILE_VERSION
+0x80ad000b  PR_EMS_AB_FILTER_LOCAL_ADDRESSES
+0x80ae000d  PR_EMS_AB_FOLDERS_CONTAINER_O
+0x80ae001e  PR_EMS_AB_FOLDERS_CONTAINER
+0x80af0003  PR_EMS_AB_GARBAGE_COLL_PERIOD
+0x80b0001e  PR_EMS_AB_GATEWAY_LOCAL_CRED
+0x80b1001e  PR_EMS_AB_GATEWAY_LOCAL_DESIG
+0x80b2101e  PR_EMS_AB_GATEWAY_PROXY
+0x80b30102  PR_EMS_AB_GATEWAY_ROUTING_TREE
+0x80b40040  PR_EMS_AB_GWART_LAST_MODIFIED
+0x80b5000d  PR_EMS_AB_HAS_FULL_REPLICA_NCS_O
+0x80b5101e  PR_EMS_AB_HAS_FULL_REPLICA_NCS
+0x80b6000d  PR_EMS_AB_HAS_MASTER_NCS_O
+0x80b6101e  PR_EMS_AB_HAS_MASTER_NCS
+0x80b70003  PR_EMS_AB_HEURISTICS
+0x80b8000b  PR_EMS_AB_HIDE_DL_MEMBERSHIP
+0x80b9000b  PR_EMS_AB_HIDE_FROM_ADDRESS_BOOK
+0x80ba000d  PR_EMS_AB_IMPORT_CONTAINER_O
+0x80ba001e  PR_EMS_AB_IMPORT_CONTAINER
+0x80bb0003  PR_EMS_AB_IMPORT_SENSITIVITY
+0x80bc000d  PR_EMS_AB_INBOUND_SITES_O
+0x80bc101e  PR_EMS_AB_INBOUND_SITES
+0x80bd0003  PR_EMS_AB_INSTANCE_TYPE
+0x80be101e  PR_EMS_AB_INTERNATIONAL_ISDN_NUMBER
+0x80bf0102  PR_EMS_AB_INVOCATION_ID
+0x80c0000b  PR_EMS_AB_IS_DELETED
+0x80c1000b  PR_EMS_AB_IS_SINGLE_VALUED
+0x80c21102  PR_EMS_AB_KCC_STATUS
+0x80c3101e  PR_EMS_AB_KNOWLEDGE_INFORMATION
+0x80c40003  PR_EMS_AB_LINE_WRAP
+0x80c50003  PR_EMS_AB_LINK_ID
+0x80c6001e  PR_EMS_AB_LOCAL_BRIDGE_HEAD
+0x80c7001e  PR_EMS_AB_LOCAL_BRIDGE_HEAD_ADDRESS
+0x80c8000b  PR_EMS_AB_LOCAL_INITIAL_TURN
+0x80c9000d  PR_EMS_AB_LOCAL_SCOPE_O
+0x80c9101e  PR_EMS_AB_LOCAL_SCOPE
+0x80ca001e  PR_EMS_AB_LOG_FILENAME
+0x80cb0003  PR_EMS_AB_LOG_ROLLOVER_INTERVAL
+0x80cc000b  PR_EMS_AB_MAINTAIN_AUTOREPLY_HISTORY
+0x80cd0003  PR_EMS_AB_MAPI_DISPLAY_TYPE
+0x80ce0003  PR_EMS_AB_MAPI_ID
+0x80cf0003  PR_EMS_AB_MDB_BACKOFF_INTERVAL
+0x80d00003  PR_EMS_AB_MDB_MSG_TIME_OUT_PERIOD
+0x80d10003  PR_EMS_AB_MDB_OVER_QUOTA_LIMIT
+0x80d20003  PR_EMS_AB_MDB_STORAGE_QUOTA
+0x80d30003  PR_EMS_AB_MDB_UNREAD_LIMIT
+0x80d4000b  PR_EMS_AB_MDB_USE_DEFAULTS
+0x80d5000b  PR_EMS_AB_MESSAGE_TRACKING_ENABLED
+0x80d6000b  PR_EMS_AB_MONITOR_CLOCK
+0x80d7000b  PR_EMS_AB_MONITOR_SERVERS
+0x80d8000b  PR_EMS_AB_MONITOR_SERVICES
+0x80d9000d  PR_EMS_AB_MONITORED_CONFIGURATIONS_O
+0x80d9101e  PR_EMS_AB_MONITORED_CONFIGURATIONS
+0x80da000d  PR_EMS_AB_MONITORED_SERVERS_O
+0x80da101e  PR_EMS_AB_MONITORED_SERVERS
+0x80db101e  PR_EMS_AB_MONITORED_SERVICES
+0x80dc0003  PR_EMS_AB_MONITORING_ALERT_DELAY
+0x80dd0003  PR_EMS_AB_MONITORING_ALERT_UNITS
+0x80de0003  PR_EMS_AB_MONITORING_AVAILABILITY_STYLE
+0x80df0102  PR_EMS_AB_MONITORING_AVAILABILITY_WINDOW
+0x80e0000d  PR_EMS_AB_MONITORING_CACHED_VIA_MAIL_O
+0x80e0101e  PR_EMS_AB_MONITORING_CACHED_VIA_MAIL
+0x80e1000d  PR_EMS_AB_MONITORING_CACHED_VIA_RPC_O
+0x80e1101e  PR_EMS_AB_MONITORING_CACHED_VIA_RPC
+0x80e21102  PR_EMS_AB_MONITORING_ESCALATION_PROCEDURE
+0x80e30003  PR_EMS_AB_MONITORING_HOTSITE_POLL_INTERVAL
+0x80e40003  PR_EMS_AB_MONITORING_HOTSITE_POLL_UNITS
+0x80e50003  PR_EMS_AB_MONITORING_MAIL_UPDATE_INTERVAL
+0x80e60003  PR_EMS_AB_MONITORING_MAIL_UPDATE_UNITS
+0x80e70003  PR_EMS_AB_MONITORING_NORMAL_POLL_INTERVAL
+0x80e80003  PR_EMS_AB_MONITORING_NORMAL_POLL_UNITS
+0x80e9000d  PR_EMS_AB_MONITORING_RECIPIENTS_O
+0x80e9101e  PR_EMS_AB_MONITORING_RECIPIENTS
+0x80ea000d  PR_EMS_AB_MONITORING_RECIPIENTS_NDR_O
+0x80ea101e  PR_EMS_AB_MONITORING_RECIPIENTS_NDR
+0x80eb0003  PR_EMS_AB_MONITORING_RPC_UPDATE_INTERVAL
+0x80ec0003  PR_EMS_AB_MONITORING_RPC_UPDATE_UNITS
+0x80ed0003  PR_EMS_AB_MONITORING_WARNING_DELAY
+0x80ee0003  PR_EMS_AB_MONITORING_WARNING_UNITS
+0x80ef001e  PR_EMS_AB_MTA_LOCAL_CRED
+0x80f0001e  PR_EMS_AB_MTA_LOCAL_DESIG
+0x80f10102  PR_EMS_AB_N_ADDRESS
+0x80f20003  PR_EMS_AB_N_ADDRESS_TYPE
+0x80f3001e  PR_EMS_AB_NT_MACHINE_NAME
+0x80f40003  PR_EMS_AB_NUM_OF_OPEN_RETRIES
+0x80f50003  PR_EMS_AB_NUM_OF_TRANSFER_RETRIES
+0x80f60003  PR_EMS_AB_OBJECT_CLASS_CATEGORY
+0x80f70003  PR_EMS_AB_OBJECT_VERSION
+0x80f8000d  PR_EMS_AB_OFF_LINE_AB_CONTAINERS_O
+0x80f8101e  PR_EMS_AB_OFF_LINE_AB_CONTAINERS
+0x80f90102  PR_EMS_AB_OFF_LINE_AB_SCHEDULE
+0x80fa000d  PR_EMS_AB_OFF_LINE_AB_SERVER_O
+0x80fa001e  PR_EMS_AB_OFF_LINE_AB_SERVER
+0x80fb0003  PR_EMS_AB_OFF_LINE_AB_STYLE
+0x80fc0003  PR_EMS_AB_OID_TYPE
+0x80fd0102  PR_EMS_AB_OM_OBJECT_CLASS
+0x80fe0003  PR_EMS_AB_OM_SYNTAX
+0x80ff000b  PR_EMS_AB_OOF_REPLY_TO_ORIGINATOR
+0x81000003  PR_EMS_AB_OPEN_RETRY_INTERVAL
+0x8101101e  PR_EMS_AB_ORGANIZATION_NAME
+0x8102101e  PR_EMS_AB_ORGANIZATIONAL_UNIT_NAME
+0x81030102  PR_EMS_AB_ORIGINAL_DISPLAY_TABLE
+0x81040102  PR_EMS_AB_ORIGINAL_DISPLAY_TABLE_MSDOS
+0x8105000d  PR_EMS_AB_OUTBOUND_SITES_O
+0x8105101e  PR_EMS_AB_OUTBOUND_SITES
+0x81060102  PR_EMS_AB_P_SELECTOR
+0x81070102  PR_EMS_AB_P_SELECTOR_INBOUND
+0x81080102  PR_EMS_AB_PER_MSG_DIALOG_DISPLAY_TABLE
+0x81090102  PR_EMS_AB_PER_RECIP_DIALOG_DISPLAY_TABLE
+0x810a0102  PR_EMS_AB_PERIOD_REP_SYNC_TIMES
+0x810b0003  PR_EMS_AB_PERIOD_REPL_STAGGER
+0x810c1102  PR_EMS_AB_POSTAL_ADDRESS
+0x810d1003  PR_EMS_AB_PREFERRED_DELIVERY_METHOD
+0x810e001e  PR_EMS_AB_PRMD
+0x810f001e  PR_EMS_AB_PROXY_GENERATOR_DLL
+0x8110000d  PR_EMS_AB_PUBLIC_DELEGATES_BL_O
+0x8110101e  PR_EMS_AB_PUBLIC_DELEGATES_BL
+0x81110102  PR_EMS_AB_QUOTA_NOTIFICATION_SCHEDULE
+0x81120003  PR_EMS_AB_QUOTA_NOTIFICATION_STYLE
+0x81130003  PR_EMS_AB_RANGE_LOWER
+0x81140003  PR_EMS_AB_RANGE_UPPER
+0x8115001e  PR_EMS_AB_RAS_CALLBACK_NUMBER
+0x8116001e  PR_EMS_AB_RAS_PHONE_NUMBER
+0x8117001e  PR_EMS_AB_RAS_PHONEBOOK_ENTRY_NAME
+0x8118001e  PR_EMS_AB_RAS_REMOTE_SRVR_NAME
+0x81191102  PR_EMS_AB_REGISTERED_ADDRESS
+0x811a001e  PR_EMS_AB_REMOTE_BRIDGE_HEAD
+0x811b001e  PR_EMS_AB_REMOTE_BRIDGE_HEAD_ADDRESS
+0x811c000d  PR_EMS_AB_REMOTE_OUT_BH_SERVER_O
+0x811c001e  PR_EMS_AB_REMOTE_OUT_BH_SERVER
+0x811d000d  PR_EMS_AB_REMOTE_SITE_O
+0x811d001e  PR_EMS_AB_REMOTE_SITE
+0x811e0003  PR_EMS_AB_REPLICATION_SENSITIVITY
+0x811f0003  PR_EMS_AB_REPLICATION_STAGGER
+0x8120000b  PR_EMS_AB_REPORT_TO_ORIGINATOR
+0x8121000b  PR_EMS_AB_REPORT_TO_OWNER
+0x81220003  PR_EMS_AB_REQ_SEQ
+0x8123000d  PR_EMS_AB_RESPONSIBLE_LOCAL_DXA_O
+0x8123001e  PR_EMS_AB_RESPONSIBLE_LOCAL_DXA
+0x8124000d  PR_EMS_AB_RID_SERVER_O
+0x8124001e  PR_EMS_AB_RID_SERVER
+0x8125000d  PR_EMS_AB_ROLE_OCCUPANT_O
+0x8125101e  PR_EMS_AB_ROLE_OCCUPANT
+0x8126101e  PR_EMS_AB_ROUTING_LIST
+0x81270003  PR_EMS_AB_RTS_CHECKPOINT_SIZE
+0x81280003  PR_EMS_AB_RTS_RECOVERY_TIMEOUT
+0x81290003  PR_EMS_AB_RTS_WINDOW_SIZE
+0x812a000d  PR_EMS_AB_RUNS_ON_O
+0x812a101e  PR_EMS_AB_RUNS_ON
+0x812b0102  PR_EMS_AB_S_SELECTOR
+0x812c0102  PR_EMS_AB_S_SELECTOR_INBOUND
+0x812d0003  PR_EMS_AB_SEARCH_FLAGS
+0x812e1102  PR_EMS_AB_SEARCH_GUIDE
+0x812f000d  PR_EMS_AB_SEE_ALSO_O
+0x812f101e  PR_EMS_AB_SEE_ALSO
+0x8130101e  PR_EMS_AB_SERIAL_NUMBER
+0x81310003  PR_EMS_AB_SERVICE_ACTION_FIRST
+0x81320003  PR_EMS_AB_SERVICE_ACTION_OTHER
+0x81330003  PR_EMS_AB_SERVICE_ACTION_SECOND
+0x81340003  PR_EMS_AB_SERVICE_RESTART_DELAY
+0x8135001e  PR_EMS_AB_SERVICE_RESTART_MESSAGE
+0x81360003  PR_EMS_AB_SESSION_DISCONNECT_TIMER
+0x8137101e  PR_EMS_AB_SITE_AFFINITY
+0x8138101e  PR_EMS_AB_SITE_PROXY_SPACE
+0x81390040  PR_EMS_AB_SPACE_LAST_COMPUTED
+0x813a001e  PR_EMS_AB_STREET_ADDRESS
+0x813b000d  PR_EMS_AB_SUB_REFS_O
+0x813b101e  PR_EMS_AB_SUB_REFS
+0x813c0003  PR_EMS_AB_SUBMISSION_CONT_LENGTH
+0x813d1102  PR_EMS_AB_SUPPORTED_APPLICATION_CONTEXT
+0x813e000d  PR_EMS_AB_SUPPORTING_STACK_O
+0x813e101e  PR_EMS_AB_SUPPORTING_STACK
+0x813f000d  PR_EMS_AB_SUPPORTING_STACK_BL_O
+0x813f101e  PR_EMS_AB_SUPPORTING_STACK_BL
+0x81400102  PR_EMS_AB_T_SELECTOR
+0x81410102  PR_EMS_AB_T_SELECTOR_INBOUND
+0x8142101e  PR_EMS_AB_TARGET_MTAS
+0x81431102  PR_EMS_AB_TELETEX_TERMINAL_IDENTIFIER
+0x81440003  PR_EMS_AB_TEMP_ASSOC_THRESHOLD
+0x81450003  PR_EMS_AB_TOMBSTONE_LIFETIME
+0x8146001e  PR_EMS_AB_TRACKING_LOG_PATH_NAME
+0x81470003  PR_EMS_AB_TRANS_RETRY_MINS
+0x81480003  PR_EMS_AB_TRANS_TIMEOUT_MINS
+0x81490003  PR_EMS_AB_TRANSFER_RETRY_INTERVAL
+0x814a0003  PR_EMS_AB_TRANSFER_TIMEOUT_NON_URGENT
+0x814b0003  PR_EMS_AB_TRANSFER_TIMEOUT_NORMAL
+0x814c0003  PR_EMS_AB_TRANSFER_TIMEOUT_URGENT
+0x814d0003  PR_EMS_AB_TRANSLATION_TABLE_USED
+0x814e000b  PR_EMS_AB_TRANSPORT_EXPEDITED_DATA
+0x814f0003  PR_EMS_AB_TRUST_LEVEL
+0x81500003  PR_EMS_AB_TURN_REQUEST_THRESHOLD
+0x8151000b  PR_EMS_AB_TWO_WAY_ALTERNATE_FACILITY
+0x8152000d  PR_EMS_AB_UNAUTH_ORIG_BL_O
+0x8152101e  PR_EMS_AB_UNAUTH_ORIG_BL
+0x81531102  PR_EMS_AB_USER_PASSWORD
+0x81540003  PR_EMS_AB_USN_CREATED
+0x81550003  PR_EMS_AB_USN_DSA_LAST_OBJ_REMOVED
+0x81560003  PR_EMS_AB_USN_LAST_OBJ_REM
+0x81570003  PR_EMS_AB_USN_SOURCE
+0x8158101e  PR_EMS_AB_X121_ADDRESS
+0x81590102  PR_EMS_AB_X25_CALL_USER_DATA_INCOMING
+0x815a0102  PR_EMS_AB_X25_CALL_USER_DATA_OUTGOING
+0x815b0102  PR_EMS_AB_X25_FACILITIES_DATA_INCOMING
+0x815c0102  PR_EMS_AB_X25_FACILITIES_DATA_OUTGOING
+0x815d0102  PR_EMS_AB_X25_LEASED_LINE_PORT
+0x815e000b  PR_EMS_AB_X25_LEASED_OR_SWITCHED
+0x815f001e  PR_EMS_AB_X25_REMOTE_MTA_PHONE
+0x81600102  PR_EMS_AB_X400_ATTACHMENT_TYPE
+0x81610003  PR_EMS_AB_X400_SELECTOR_SYNTAX
+0x81620102  PR_EMS_AB_X500_ACCESS_CONTROL_LIST
+0x81630003  PR_EMS_AB_XMIT_TIMEOUT_NON_URGENT
+0x81640003  PR_EMS_AB_XMIT_TIMEOUT_NORMAL
+0x81650003  PR_EMS_AB_XMIT_TIMEOUT_URGENT
+0x81660102  PR_EMS_AB_SITE_FOLDER_GUID
+0x8167000d  PR_EMS_AB_SITE_FOLDER_SERVER_O
+0x8167001e  PR_EMS_AB_SITE_FOLDER_SERVER
+0x81680003  PR_EMS_AB_REPLICATION_MAIL_MSG_SIZE
+0x81690102  PR_EMS_AB_MAXIMUM_OBJECT_ID
+0x8170101e  PR_EMS_AB_NETWORK_ADDRESS
+0x8171101e  PR_EMS_AB_LDAP_DISPLAY_NAME
+0x81730003  PR_EMS_AB_SCHEMA_FLAGS
+0x8174000d  PR_EMS_AB_BRIDGEHEAD_SERVERS_O
+0x8174101e  PR_EMS_AB_BRIDGEHEAD_SERVERS
+0x8175001e  PR_EMS_AB_WWW_HOME_PAGE
+0x8176001e  PR_EMS_AB_NNTP_CONTENT_FORMAT
+0x8177001e  PR_EMS_AB_POP_CONTENT_FORMAT
+0x81780003  PR_EMS_AB_LANGUAGE
+0x8179001e  PR_EMS_AB_POP_CHARACTER_SET
+0x817a0003  PR_EMS_AB_USN_INTERSITE
+0x817b001e  PR_EMS_AB_SUB_SITE
+0x817c1003  PR_EMS_AB_SCHEMA_VERSION
+0x817d001e  PR_EMS_AB_NNTP_CHARACTER_SET
+0x817e000b  PR_EMS_AB_USE_SERVER_VALUES
+0x817f0003  PR_EMS_AB_ENABLED_PROTOCOLS
+0x81800102  PR_EMS_AB_CONNECTION_LIST_FILTER
+0x8181101e  PR_EMS_AB_AVAILABLE_AUTHORIZATION_PACKAGES
+0x8182101e  PR_EMS_AB_CHARACTER_SET_LIST
+0x8183000b  PR_EMS_AB_USE_SITE_VALUES
+0x8184101e  PR_EMS_AB_ENABLED_AUTHORIZATION_PACKAGES
+0x8185001e  PR_EMS_AB_CHARACTER_SET
+0x81860003  PR_EMS_AB_CONTENT_TYPE
+0x8187000b  PR_EMS_AB_ANONYMOUS_ACCESS
+0x81880102  PR_EMS_AB_CONTROL_MSG_FOLDER_ID
+0x8189001e  PR_EMS_AB_USENET_SITE_NAME
+0x818a0102  PR_EMS_AB_CONTROL_MSG_RULES
+0x818b001e  PR_EMS_AB_AVAILABLE_DISTRIBUTIONS
+0x818d0102  PR_EMS_AB_OUTBOUND_HOST
+0x818e101e  PR_EMS_AB_INBOUND_HOST
+0x818f0003  PR_EMS_AB_OUTGOING_MSG_SIZE_LIMIT
+0x81900003  PR_EMS_AB_INCOMING_MSG_SIZE_LIMIT
+0x8191000b  PR_EMS_AB_SEND_TNEF
+0x81920102  PR_EMS_AB_AUTHORIZED_PASSWORD_CONFIRM
+0x8193001e  PR_EMS_AB_INBOUND_NEWSFEED
+0x81940003  PR_EMS_AB_NEWSFEED_TYPE
+0x8195001e  PR_EMS_AB_OUTBOUND_NEWSFEED
+0x81960102  PR_EMS_AB_NEWSGROUP_LIST
+0x8197101e  PR_EMS_AB_NNTP_DISTRIBUTIONS
+0x8198001e  PR_EMS_AB_NEWSGROUP
+0x8199001e  PR_EMS_AB_MODERATOR
+0x819a001e  PR_EMS_AB_AUTHENTICATION_TO_USE
+0x819b000b  PR_EMS_AB_HTTP_PUB_GAL
+0x819c0003  PR_EMS_AB_HTTP_PUB_GAL_LIMIT
+0x819e1102  PR_EMS_AB_HTTP_PUB_PF
+0x81a1001e  PR_EMS_AB_X500_RDN
+0x81a2001e  PR_EMS_AB_X500_NC
+0x81a3101e  PR_EMS_AB_REFERRAL_LIST
+0x81a4000b  PR_EMS_AB_NNTP_DISTRIBUTIONS_FLAG
+0x81a5000d  PR_EMS_AB_ASSOC_PROTOCOL_CFG_NNTP_O
+0x81a5001e  PR_EMS_AB_ASSOC_PROTOCOL_CFG_NNTP
+0x81a6000d  PR_EMS_AB_NNTP_NEWSFEEDS_O
+0x81a6101e  PR_EMS_AB_NNTP_NEWSFEEDS
+0x81a8000b  PR_EMS_AB_ENABLED_PROTOCOL_CFG
+0x81a9101e  PR_EMS_AB_HTTP_PUB_AB_ATTRIBUTES
+0x81ab101e  PR_EMS_AB_HTTP_SERVERS
+0x81ac000b  PR_EMS_AB_MODERATED
+0x81ad001e  PR_EMS_AB_RAS_ACCOUNT
+0x81ae0102  PR_EMS_AB_RAS_PASSWORD
+0x81af0102  PR_EMS_AB_INCOMING_PASSWORD
+0x81b0000b  PR_EMS_AB_OUTBOUND_HOST_TYPE
+0x81b1000b  PR_EMS_AB_PROXY_GENERATION_ENABLED
+0x81b20102  PR_EMS_AB_ROOT_NEWSGROUPS_FOLDER_ID
+0x81b3000b  PR_EMS_AB_CONNECTION_TYPE
+0x81b40003  PR_EMS_AB_CONNECTION_LIST_FILTER_TYPE
+0x81b50003  PR_EMS_AB_PORT_NUMBER
+0x81b6101e  PR_EMS_AB_PROTOCOL_SETTINGS
+0x81b7001e  PR_EMS_AB_GROUP_BY_ATTR_1
+0x81b8001e  PR_EMS_AB_GROUP_BY_ATTR_2
+0x81b9001e  PR_EMS_AB_GROUP_BY_ATTR_3
+0x81ba001e  PR_EMS_AB_GROUP_BY_ATTR_4
+0x81be001e  PR_EMS_AB_VIEW_SITE
+0x81bf001e  PR_EMS_AB_VIEW_CONTAINER_1
+0x81c0001e  PR_EMS_AB_VIEW_CONTAINER_2
+0x81c1001e  PR_EMS_AB_VIEW_CONTAINER_3
+0x81c20040  PR_EMS_AB_PROMO_EXPIRATION
+0x81c3101e  PR_EMS_AB_DISABLED_GATEWAY_PROXY
+0x81c40102  PR_EMS_AB_COMPROMISED_KEY_LIST
+0x81c5000d  PR_EMS_AB_INSADMIN_O
+0x81c5001e  PR_EMS_AB_INSADMIN
+0x81c6000b  PR_EMS_AB_OVERRIDE_NNTP_CONTENT_FORMAT
+0x81c7000d  PR_EMS_AB_OBJ_VIEW_CONTAINERS_O
+0x81c7101e  PR_EMS_AB_OBJ_VIEW_CONTAINERS
+0x8c180003  PR_EMS_AB_VIEW_FLAGS
+0x8c19001e  PR_EMS_AB_GROUP_BY_ATTR_VALUE_STR
+0x8c1a000d  PR_EMS_AB_GROUP_BY_ATTR_VALUE_DN_O
+0x8c1a001e  PR_EMS_AB_GROUP_BY_ATTR_VALUE_DN
+0x8c1b1102  PR_EMS_AB_VIEW_DEFINITION
+0x8c1c0102  PR_EMS_AB_MIME_TYPES
+0x8c1d0003  PR_EMS_AB_LDAP_SEARCH_CFG
+0x8c1e000d  PR_EMS_AB_INBOUND_DN_O
+0x8c1e001e  PR_EMS_AB_INBOUND_DN
+0x8c1f000b  PR_EMS_AB_INBOUND_NEWSFEED_TYPE
+0x8c20000b  PR_EMS_AB_INBOUND_ACCEPT_ALL
+0x8c21000b  PR_EMS_AB_ENABLED
+0x8c22000b  PR_EMS_AB_PRESERVE_INTERNET_CONTENT
+0x8c23000b  PR_EMS_AB_DISABLE_DEFERRED_COMMIT
+0x8c24000b  PR_EMS_AB_CLIENT_ACCESS_ENABLED
+0x8c25000b  PR_EMS_AB_REQUIRE_SSL
+0x8c26001e  PR_EMS_AB_ANONYMOUS_ACCOUNT
+0x8c270102  PR_EMS_AB_CERTIFICATE_CHAIN_V3
+0x8c280102  PR_EMS_AB_CERTIFICATE_REVOCATION_LIST_V3
+0x8c290102  PR_EMS_AB_CERTIFICATE_REVOCATION_LIST_V1
+0x8c301102  PR_EMS_AB_CROSS_CERTIFICATE_CRL
+0x8c31000b  PR_EMS_AB_SEND_EMAIL_MESSAGE
+0x8c32000b  PR_EMS_AB_ENABLE_COMPATIBILITY
+0x8c33101e  PR_EMS_AB_SMIME_ALG_LIST_NA
+0x8c34101e  PR_EMS_AB_SMIME_ALG_LIST_OTHER
+0x8c35001e  PR_EMS_AB_SMIME_ALG_SELECTED_NA
+0x8c36001e  PR_EMS_AB_SMIME_ALG_SELECTED_OTHER
+0x8c37000b  PR_EMS_AB_DEFAULT_MESSAGE_FORMAT
+0x8c38001e  PR_EMS_AB_TYPE
+0x8c3a0003  PR_EMS_AB_DO_OAB_VERSION
+0x8c3b0102  PR_EMS_AB_VOICE_MAIL_SYSTEM_GUID
+0x8c3c001e  PR_EMS_AB_VOICE_MAIL_USER_ID
+0x8c3d001e  PR_EMS_AB_VOICE_MAIL_PASSWORD
+0x8c3e0102  PR_EMS_AB_VOICE_MAIL_RECORDED_NAME
+0x8c3f101e  PR_EMS_AB_VOICE_MAIL_GREETINGS
+0x8c401102  PR_EMS_AB_VOICE_MAIL_FLAGS
+0x8c410003  PR_EMS_AB_VOICE_MAIL_VOLUME
+0x8c420003  PR_EMS_AB_VOICE_MAIL_SPEED
+0x8c431003  PR_EMS_AB_VOICE_MAIL_RECORDING_LENGTH
+0x8c44001e  PR_EMS_AB_DISPLAY_NAME_SUFFIX
+0x8c451102  PR_EMS_AB_ATTRIBUTE_CERTIFICATE
+0x8c461102  PR_EMS_AB_DELTA_REVOCATION_LIST
+0x8c471102  PR_EMS_AB_SECURITY_POLICY
+0x8c48000b  PR_EMS_AB_SUPPORT_SMIME_SIGNATURES
+0x8c49000b  PR_EMS_AB_DELEGATE_USER
+0x8c50000b  PR_EMS_AB_LIST_PUBLIC_FOLDERS
+0x8c51001e  PR_EMS_AB_LABELEDURI
+0x8c52000b  PR_EMS_AB_RETURN_EXACT_MSG_SIZE
+0x8c53001e  PR_EMS_AB_GENERATION_QUALIFIER
+0x8c54001e  PR_EMS_AB_HOUSE_IDENTIFIER
+0x8c550102  PR_EMS_AB_SUPPORTED_ALGORITHMS
+0x8c56001e  PR_EMS_AB_DMD_NAME
+0x8c57001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_11
+0x8c58001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_12
+0x8c59001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_13
+0x8c60001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_14
+0x8c61001e  PR_EMS_AB_EXTENSION_ATTRIBUTE_15
+0x8c620003  PR_EMS_AB_REPLICATED_OBJECT_VERSION
+0x8c63001e  PR_EMS_AB_MAIL_DROP
+0x8c64001e  PR_EMS_AB_FORWARDING_ADDRESS
+0x8c650102  PR_EMS_AB_FORM_DATA
+0x8c66001e  PR_EMS_AB_OWA_SERVER
+0x8c67001e  PR_EMS_AB_EMPLOYEE_NUMBER
+0x8c68001e  PR_EMS_AB_TELEPHONE_PERSONAL_PAGER
+0x8c69001e  PR_EMS_AB_EMPLOYEE_TYPE
+0x8c6a1102  PR_EMS_AB_TAGGED_X509_CERT
+0x8c6b001e  PR_EMS_AB_PERSONAL_TITLE
+0x8c6c001e  PR_EMS_AB_LANGUAGE_ISO639
+0xf000000d  PR_EMS_AB_OTHER_RECIPS
+0xfff8101e  PR_EMS_AB_CHILD_RDNS
+0xfff9001e  PR_EMS_AB_HIERARCHY_PATH
+0xfffa0102  PR_EMS_AB_OBJECT_OID
+0xfffb000b  PR_EMS_AB_IS_MASTER
+0xfffc0102  PR_EMS_AB_PARENT_ENTRYID
+0xfffd0003  PR_EMS_AB_CONTAINERID
+0xfffe001e  PR_EMS_AB_SERVER test42
diff --git a/libmapi/conf/mparse.pl b/libmapi/conf/mparse.pl
new file mode 100755 (executable)
index 0000000..02cfd75
--- /dev/null
@@ -0,0 +1,456 @@
+#!/usr/bin/perl -w
+
+###################################################
+# package to parse the mapi-properties files and 
+# generate code for libmapi in OpenChange
+#
+# Perl code based on pidl one from Andrew Tridgell and the Samba team
+#
+# Copyright (C) Julien Kerihuel 2005-2007
+# released under the GNU GPL
+
+use strict;
+use Getopt::Long;
+
+my $ret = "";
+my $tabs = "";
+
+sub indent() { $tabs.="\t"; }
+sub deindent() { $tabs = substr($tabs, 1); }
+sub mparse($) { $ret .= $tabs.(shift)."\n"; }
+
+my($opt_outputdir) = '.';
+my($opt_parser) = '';
+
+my     %prop_types = (
+    0x0                => "PT_UNSPECIFIED",
+    0x1                => "PT_NULL",
+    0x2                => "PT_SHORT",
+    0x3                => "PT_LONG",
+    0x4                => "PT_FLOAT",
+    0x5                => "PT_DOUBLE",
+    0x6                => "PT_CURRENCY",
+    0x7                => "PT_APPTIME",
+    0xa                => "PT_ERROR",
+    0xb                => "PT_BOOLEAN",
+    0xd                => "PT_OBJECT",
+    0x14       => "PT_I8",
+    0x1e       => "PT_STRING8",
+    0x1f       => "PT_UNICODE",
+    0x40       => "PT_SYSTIME",
+    0x48       => "PT_CLSID",
+    0x102      => "PT_BINARY",
+# Multi-valued property types
+    0x1002     => "PT_MV_SHORT",
+    0x1003     => "PT_MV_LONG",
+    0x1004     => "PT_MV_FLOAT",
+    0x1005     => "PT_MV_DOUBLE",
+    0x1006     => "PT_MV_CURRENCY",
+    0x1007     => "PT_MV_APPTIME",
+    0x1014     => "PT_MV_I8",
+    0x101e     => "PT_MV_STRING8",
+    0x101f     => "PT_MV_UNICODE",
+    0x1040     => "PT_MV_SYSTIME",
+    0x1048     => "PT_MV_CLSID",
+    0x1102     => "PT_MV_BINARY"
+);
+
+# main program
+
+my $result = GetOptions (
+                        'outputdir=s' => \$opt_outputdir,
+                        'parser=s' => \$opt_parser
+                        );
+
+if (not $result) {
+    exit(1);
+}
+
+#####################################################################
+# read a file into a string
+sub FileLoad($)
+{
+    my($filename) = shift;
+    local(*INPUTFILE);
+    open(INPUTFILE, $filename) || return undef;
+    my($saved_delim) = $/;
+    undef $/;
+    my($data) = <INPUTFILE>;
+    close(INPUTFILE);
+    $/ = $saved_delim;
+    return $data;
+}
+
+#####################################################################
+# write a string into a file
+sub FileSave($$)
+{
+    my($filename) = shift;
+    my($v) = shift;
+    local(*FILE);
+    open(FILE, ">$filename") || die "can't open $filename";    
+    print FILE $v;
+    close(FILE);
+}
+
+#####################################################################
+# generate mapitags.h file
+sub mapitags_header($)
+{
+    my $contents = shift;
+    my $line;
+    my @lines;
+    my @prop;
+    my $prop_type;
+    my $prop_value;
+
+    mparse "/* parser auto-generated by mparse */";
+    mparse "#ifndef __MAPITAGS_H__";
+    mparse "#define __MAPITAGS_H__";
+    mparse "";
+
+    @lines = split(/\n/, $contents);
+    foreach $line (@lines) {
+       $line =~ s/^\#+.*$//;
+       if ($line) {
+           @prop = split(/\s+/, $line);
+           $prop_type = hex $prop[0];
+           $prop_type &= 0xFFFF;
+           $prop_value = hex $prop[0];
+           $prop_value = ($prop_value >> 16) & 0xFFFF;
+
+           mparse sprintf "#define %-51s PROP_TAG(%-13s, 0x%.04x) /* %s */", $prop[1], $prop_types{$prop_type}, $prop_value, $prop[0] if ($prop_types{$prop_type});
+           if (($prop_type == 0x1e) || ($prop_type == 0x101e)){
+               $prop_type++;
+               $prop[0] = sprintf "0x%.8x", ((hex $prop[0]) & 0xFFFF0000) + $prop_type;
+               mparse sprintf "#define %-51s PROP_TAG(%-13s, 0x%.04x) /* %s */", "$prop[1]_UNICODE", $prop_types{$prop_type}, $prop_value, $prop[0] if ($prop_types{$prop_type});
+           }
+           $prop_type = 0xa;
+           $prop[0] = sprintf "0x%.8x", ((hex $prop[0]) & 0xFFFF0000) + $prop_type;
+           mparse sprintf "#define %-51s PROP_TAG(%-13s, 0x%.04x) /* %s */", "$prop[1]_ERROR", $prop_types{$prop_type}, $prop_value, $prop[0] if ($prop_types{$prop_type});
+       }
+    }
+    mparse "";
+    mparse "#endif /* !__MAPITAGS_H__ */";
+
+    return $ret;
+    
+}
+
+
+#####################################################################
+# generate mapitags.c file
+sub mapitags_interface($)
+{
+    my $contents = shift;
+    my $line;
+    my @lines;
+    my @prop;
+    my $prop_url;
+    my $prop_type;
+    my $prop_value;
+
+    mparse "/* parser auto-generated by mparse */";
+    mparse "#include \"openchange.h\"";
+    mparse "#include \"libmapi/include/mapidefs.h\"";
+    mparse "#include \"mapitags.h\"";
+    mparse "";
+    mparse "struct mapi_proptags";
+    mparse "{";
+    indent;
+    mparse "uint32_t   proptag;";
+    mparse "uint32_t   proptype;";
+    mparse "const char *propname;";
+    deindent;
+    mparse "};";
+    mparse "";
+    mparse "static struct mapi_proptags mapitags[] = {";
+    indent;
+    
+    @lines = split(/\n/, $contents);
+    foreach $line (@lines) {
+       $line =~ s/^\#+.*$//;
+       if ($line) {
+           @prop = split(/\s+/, $line);
+           $prop_type = hex $prop[0];
+           $prop_type &= 0xFFFF;
+           $prop_value = hex $prop[0];
+           $prop_value = ($prop_value >> 16) & 0xFFFF;
+           if ($prop_types{$prop_type}) {
+               mparse sprintf "{ %-51s, %-13s, \"%s\" },", $prop[1], $prop_types{$prop_type}, $prop[1];
+               if (($prop_type == 0x1e) || ($prop_type == 0x101e)) {
+                   $prop_type++;
+                   mparse sprintf "{ %-51s, %-13s, \"%s\" },", "$prop[1]_UNICODE", $prop_types{$prop_type}, $prop[1];
+               }
+                   $prop_type = 0xa;
+               mparse sprintf "{ %-51s, %-13s, \"%s\" },", "$prop[1]_ERROR", $prop_types{$prop_type}, $prop[1];
+           }
+       }
+    }
+
+    mparse sprintf "{ %-51s, %-13d, \"NULL\"}", 0, 0;
+    deindent;
+    mparse "};;";
+    mparse "";
+    mparse "const char *get_proptag_name(uint32_t proptag)";
+    mparse "{";
+    indent;
+    mparse "uint32_t idx;";
+    mparse "";
+    mparse "for (idx = 0; mapitags[idx].proptag; idx++) {";
+    indent;
+    mparse "if (mapitags[idx].proptag == proptag) { ";
+    indent;
+    mparse "return mapitags[idx].propname;";
+    deindent;
+    mparse "}";
+    deindent;
+    mparse "}";
+    mparse "";
+    mparse "return NULL;";
+    deindent;
+    mparse "}";
+    mparse "";
+    mparse "uint32_t get_proptag_value(const char *propname)";
+    mparse "{";
+    indent;
+    mparse "uint32_t idx;";
+    mparse "";
+    mparse "for (idx = 0; mapitags[idx].proptag; idx++) {";
+    indent;
+    mparse "if (!strcmp(mapitags[idx].propname, propname)) { ";
+    indent;
+    mparse "return mapitags[idx].proptag;";
+    deindent;
+    mparse "}";
+    deindent;
+    mparse "}";
+    mparse "";
+    mparse "return 0;";
+    deindent;
+    mparse "}";
+    mparse "";
+
+    return $ret;
+    
+}
+
+#####################################################################
+# generate mapitags_enum.idl file
+sub mapitags_enum($)
+{
+    my $contents = shift;
+    my $line;
+    my @lines;
+    my @prop;
+    my $prop_type;
+    my %hash;
+
+    mparse "/* parser auto-generated by mparse */";
+    mparse "";
+
+    mparse "typedef [v1_enum, flag(NDR_PAHEX)] enum {";
+    indent;
+    
+    @lines = split(/\n/, $contents);
+    foreach $line (@lines) {
+       $line =~ s/^\#+.*$//;
+       if ($line) {
+           @prop = split(/\s+/, $line);
+           $prop_type = hex $prop[0];
+           $prop_type &= 0xFFFF;
+
+           mparse sprintf "%-51s = %s,", $prop[1], $prop[0];
+
+           if (($prop_type == 0x1e) || ($prop_type == 0x101e)) {
+               $prop_type = hex $prop[0];
+               $prop_type++;
+               mparse sprintf "%-51s = 0x%.8x,", "$prop[1]_UNICODE", $prop_type;
+           }
+           if (!exists($hash{((hex $prop[0]) & 0xFFFF0000)})) {
+               $prop_type = 0xa;
+               $prop_type += ((hex $prop[0]) & 0xFFFF0000);
+               mparse sprintf "%-51s = 0x%.8x,", "$prop[1]_ERROR", $prop_type;
+               $hash{((hex $prop[0]) & 0xFFFF0000)} = 1;
+           }
+       }
+    }
+    mparse sprintf "%-51s = %s", "MAPI_PROP_RESERVED", "0xFFFFFFFF";
+    deindent;
+    mparse "} MAPITAGS;";    
+    mparse "";
+    
+    return $ret;
+}
+
+#####################################################################
+# generate mapicode.h file
+sub mapicodes_header($)
+{
+    my $contents = shift;
+    my $line;
+    my @lines;
+    my @prop;
+    my $error;
+
+    mparse "/* parser auto-generated by mparse */";
+    mparse "#ifndef __MAPICODE_H__";
+    mparse "#define __MAPICODE_H__";
+    mparse "";
+    mparse "/* Status macros for MAPI */";
+    mparse "typedef unsigned long      SCODE;";
+    mparse "typedef SCODE              MAPISTATUS;";
+    mparse "";
+    mparse "";
+    mparse "#define SEVERITY_ERROR     1";
+    mparse "#define SEVERITY_WARN      0";
+    mparse "";
+    mparse "#define FACILITY_ITF       4";
+    mparse "#define    MAKE_MAPI_CODE(sev, fac, code) \\";
+    mparse "(((SCODE)(sev)<<31)|((SCODE)(fac)<<16)|((SCODE)(code)))";
+    mparse "";
+    mparse "#define    MAKE_MAPI_E(code) (MAKE_MAPI_CODE(SEVERITY_ERROR, FACILITY_ITF, code))";
+    mparse "#define    MAKE_MAPI_S(code) (MAKE_MAPI_CODE(SEVERITY_WARN, FACILITY_ITF, code))";
+    mparse "";
+    mparse "#define    MAPI_STATUS_V(x) ((MAPISTATUS)x)";
+    mparse "";
+    mparse "#define    MAPI_STATUS_IS_OK(x) (MAPI_STATUS_V(x) == 0)";
+    mparse "#define    MAPI_STATUS_IS_ERR(x) ((MAPI_STATUS_V(x) & 0xc0000000) == 0xc0000000)";
+    mparse "#define    MAPI_STATUS_EQUAL(x,y) (MAPI_STATUS_V(x) == MAPI_STATUS_V(y))";
+    mparse "";
+    mparse "#define    MAPI_STATUS_IS_OK_RETURN(x) do { \\";
+    mparse "           if (MAPI_STATUS_IS_OK(x)) {\\";
+    mparse "                   return x;\\";
+    mparse "           }\\";
+    mparse "} while (0)";
+    mparse "";
+    mparse "#define    MAPI_STATUS_NOT_OK_RETURN(x) do { \\";
+    mparse "           if (!MAPI_STATUS_IS_OK(x)) {\\";
+    mparse "                   return x;\\";
+    mparse "           }\\";
+    mparse "} while (0)";
+    mparse "";
+    mparse "#define    MAPI_STATUS_IS_ERR_RETURN(x) do { \\";
+    mparse "           if (MAPI_STATUS_IS_ERR(x)) {\\";
+    mparse "                   return x;\\";
+    mparse "           }\\";
+    mparse "} while (0)";
+    mparse "";
+    mparse "#define    MAPI_STATUS_NOT_ERR_RETURN(x) do { \\";
+    mparse "           if (!MAPI_STATUS_IS_ERR(x)) {\\";
+    mparse "                   return x;\\";
+    mparse "           }\\";
+    mparse "} while (0)";
+    mparse "";
+    mparse "";
+    mparse "#endif /* !__MAPICODE_H__ */";
+
+    return $ret;
+    
+}
+
+#####################################################################
+# generate mapicode.c file
+
+sub mapicodes_interface($)
+{
+    my $contents = shift;
+    my $line;
+    my @lines;
+    my @prop;
+    my $prop_url;
+    my $prop_type;
+    my $prop_value;
+
+    mparse "/* parser auto-generated by mparse */";
+    mparse "#include \"openchange.h\"";
+    mparse "#include \"ndr_exchange.h\"";
+    mparse "";
+    mparse "void mapi_errstr(const char *function, uint32_t mapi_code)";
+    mparse "{";
+    indent;
+    mparse "struct ndr_print   ndr_print;";
+    mparse "";
+    mparse "ndr_print.depth = 1;";
+    mparse "ndr_print.print = ndr_print_debug_helper;";
+    mparse "ndr_print_MAPISTATUS(&ndr_print, function, mapi_code);";
+    deindent;
+    mparse "}";
+}
+
+#####################################################################
+# generate mapicodes_enum.idl file
+sub mapicodes_enum($)
+{
+    my $contents = shift;
+    my $line;
+    my @lines;
+    my @prop;
+    my $prop_type;
+
+    mparse "/* parser auto-generated by mparse */";
+    mparse "";
+
+    mparse "typedef [public, v1_enum, flag(NDR_PAHEX)] enum {";
+    indent;
+    
+    @lines = split(/\n/, $contents);
+    foreach $line (@lines) {
+       $line =~ s/^\#+.*$//;
+       if ($line) {
+           @prop = split(/\s+/, $line);
+           mparse sprintf "%-51s = %s,", $prop[1], $prop[0];
+       }
+    }
+    mparse sprintf "%-51s = %s", "MAPI_E_RESERVED", "0xFFFFFFFF";
+    deindent;
+    mparse "} MAPISTATUS;";    
+    mparse "";
+    
+    return $ret;
+}
+
+sub process_file($)
+{
+    my $mapi_file = shift;
+    my $outputdir = $opt_outputdir;
+
+    print "\nParsing $mapi_file\n";
+    my $contents = FileLoad($mapi_file);
+    defined $contents || return undef;
+
+    
+    if ($opt_parser eq "mapitags") {
+       print "Generating $outputdir" . "mapitags.h\n";
+       my $parser = ("$outputdir/mapitags.h");
+       FileSave($parser, mapitags_header($contents));
+       
+       print "Generating $outputdir" . "mapitags.c\n";
+       $ret = '';
+       my $code_parser = ("$outputdir/mapitags.c");
+       FileSave($code_parser, mapitags_interface($contents));
+       
+       print "Generating mapitags_enum.h\n";
+       $ret = '';
+       my $enum_parser = ("mapitags_enum.h");
+       FileSave($enum_parser, mapitags_enum($contents));
+    }
+
+    if ($opt_parser eq "mapicodes") {
+       print "Generating $outputdir" . "mapicode.h\n";
+       my $parser = ("$outputdir/mapicode.h");
+       FileSave($parser, mapicodes_header($contents));
+
+       print "Generating $outputdir" . "mapicode.c\n";
+       $ret = '';
+       my $code_parser = ("$outputdir/mapicode.c");
+       FileSave($code_parser, mapicodes_interface($contents));
+
+       print "Generating mapicodes_enum.h\n";
+       $ret = '';
+       my $enum_parser = ("mapicodes_enum.h");
+       FileSave($enum_parser, mapicodes_enum($contents));
+    }
+}
+
+process_file($_) foreach (@ARGV);
diff --git a/libmapi/conf/tag2ad.pm b/libmapi/conf/tag2ad.pm
new file mode 100755 (executable)
index 0000000..aa3689b
--- /dev/null
@@ -0,0 +1,338 @@
+#!/usr/bin/perl -w
+## tag2ad.pm for OpenChange
+## 
+## Copyright (C) Gregory Schiro
+## Mail   <g.schiro@openchange.org>
+## 
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+## 
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+## 
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+## 
+## Started on  Wed Mar 22 19:05:28 2006 gregory schiro
+## Last update Thu Mar 23 22:13:39 2006 gregory schiro
+##
+
+package tag2ad;
+
+use    strict;
+
+my     $content = '';
+
+our    %hash;
+
+my     %prop_types = (
+                      0x0      => ["PT_UNSPECIFIED", 0],
+                      0x1      => ["PT_NULL", 1],
+                      0x2      => ["PT_SHORT", 2],
+                      0x3      => ["PT_LONG", 3],
+                      0x4      => ["PT_FLOAT", 4],
+                      0x5      => ["PT_DOUBLE", 5],
+                      0x6      => ["PT_CURRENCY",6],
+                      0x7      => ["PT_APPTIME",7],
+                      0xa      => ["PT_ERROR",8],
+                      0xb      => ["PT_BOOLEAN", 9],
+                      0xd      => ["PT_OBJECT", 10],
+                      0x14     => ["PT_I8", 11],
+                      0x1e     => ["PT_STRING8", 12],
+                      0x1f     => ["PT_UNICODE", 13],
+                      0x40     => ["PT_SYSTIME", 14],
+                      0x48     => ["PT_CLSID", 15],
+                      0xfd     => ["UNKNOWN", -1],
+                      0xfe     => ["UNKNOWN", -1],
+                      0x102    => ["PT_BINARY", 16],
+                      0x1002   => ["PT_MV_SHORT", 17],
+                      0x1003   => ["PT_MV_LONG", 18],
+                      0x1004   => ["PT_MV_FLOAT", 19],
+                      0x1005   => ["PT_MV_DOUBLE", 20],
+                      0x1006   => ["PT_MV_CURRENCY", 21],
+                      0x1007   => ["PT_MV_APPTIME", 22],
+                      0x1014   => ["PT_MV_I8", 23],
+                      0x101e   => ["PT_MV_STRING8", 24],
+                      0x101f   => ["PT_MV_UNICODE", 25],
+                      0x1040   => ["PT_MV_SYSTIME", 26],
+                      0x1048   => ["PT_MV_CLSID", 27],
+                      0x1102   => ["PT_MV_BINARY", 28]
+                      );
+
+sub    print_lineNL($)
+{
+    $content .= shift;
+    $content .= "\n";
+}
+
+sub    print_line($)
+{
+    $content .= shift;
+}
+
+sub    header()
+{
+    &print_lineNL('/* Auto-generated by '.$0.' */');
+    &print_lineNL("\n");
+    &print_lineNL('#include "openchange.h"');
+    &print_lineNL('#include "libmapi/include/mapidefs.h"');
+    &print_lineNL('#include "mapitags.h"');
+    &print_lineNL("\n");
+}
+
+sub    getX500Index($)
+{
+    my $type = shift;
+    
+    if (exists($prop_types{$type})) {
+       my $ref = undef;
+       $ref = $prop_types{$type};
+       my @tab = @$ref;
+
+       return $tab[1];
+    }
+
+    return -1;
+}
+
+sub    add_x500($$$)
+{
+    my $two = shift;
+    my $type = shift;
+    my $ad_name = shift;
+    my $id = getX500Index($type);
+
+    if ($id >= 0) {
+       $hash{$two}[$id] = $ad_name;
+    }
+    else {
+       $hash{$two}[$id] = 0;
+    }
+}
+
+sub    init_hash()
+{
+    my $tmp = join ',', split '', sprintf('%030s', '');
+    for (my $i = 0; $i < 0xFF; $i++) {
+       eval('$hash{'.$i.'} = ['.$tmp.']');
+    }
+}
+
+sub    empty_line($)
+{
+    my $nb = shift;
+    my $line = '';
+    my  $tmp = join ',', split '', sprintf('%0256s', '');
+    my @list;
+
+    eval('@list = ('.$tmp.')');
+    while ($nb-- > 0) {
+       $line .= '{'.join(', ', @list)."},\n";
+    }
+
+    return $line;
+}
+
+sub    built_line()
+{
+    my $ref = undef;
+    my $is_empty = 1;
+    my $line = '';
+    my $curr = '';
+    my @list = ();
+    my $empty = sprintf('%030s', '');
+
+    for (my $i = 0; $i < 0xFF; $i++) {
+       $ref = $hash{$i};
+       if (defined($ref)) {
+           @list = @$ref;
+           $curr = join('', @list);
+           if ($curr ne $empty) {
+               $line .= "\t\t{".join(', ', @list)."},\n";
+               $is_empty = 0;
+           }
+           else {
+               #$line .= "\t\t0,\n";
+           }
+           $ref = undef;
+       }
+       @list = ();
+    }
+    
+    return "\t{\n".substr($line, 0, length($line) - 2)."\n\t},\n" if (!$is_empty);
+    return "\t{ {0} },\n";
+}
+
+sub    print_functions()
+{
+    &print_lineNL("uint16_t get_type_index(uint16_t type)");
+    &print_lineNL("{");
+    &print_lineNL("\tswitch (type) {");
+    &print_lineNL("\tcase PT_UNSPECIFIED :");
+    &print_lineNL("\tcase PT_NULL :");
+    &print_lineNL("\tcase PT_SHORT :");
+    &print_lineNL("\tcase PT_LONG :");
+    &print_lineNL("\tcase PT_FLOAT :");
+    &print_lineNL("\tcase PT_DOUBLE :");
+    &print_lineNL("\tcase PT_CURRENCY :");
+    &print_lineNL("\tcase PT_APPTIME :");
+    &print_lineNL("\t\treturn type;");
+    &print_lineNL("\tcase PT_ERROR :");
+    &print_lineNL("\t\treturn 8;");
+    &print_lineNL("\tcase PT_BOOLEAN :");
+    &print_lineNL("\t\treturn 9;");
+    &print_lineNL("\tcase PT_OBJECT :");
+    &print_lineNL("\t\treturn 10;");
+    &print_lineNL("\tcase PT_I8 :");
+    &print_lineNL("\t\treturn 11;");
+    &print_lineNL("\tcase PT_STRING8 :");
+    &print_lineNL("\t\treturn 12;");
+    &print_lineNL("\tcase PT_UNICODE :");
+    &print_lineNL("\t\treturn 13;");
+    &print_lineNL("\tcase PT_SYSTIME :");
+    &print_lineNL("\t\treturn 14;");
+    &print_lineNL("\tcase PT_CLSID :");
+    &print_lineNL("\t\treturn 15;");
+    &print_lineNL("\tcase PT_BINARY :");
+    &print_lineNL("\t\treturn 16;");
+    &print_lineNL("\tcase PT_MV_SHORT :");
+    &print_lineNL("\t\treturn 18;");
+    &print_lineNL("\tcase PT_MV_LONG :");
+    &print_lineNL("\t\treturn 19;");
+    &print_lineNL("\tcase PT_MV_FLOAT :");
+    &print_lineNL("\t\treturn 20;");
+    &print_lineNL("\tcase PT_MV_DOUBLE :");
+    &print_lineNL("\t\treturn 21;");
+    &print_lineNL("\tcase PT_MV_CURRENCY :");
+    &print_lineNL("\t\treturn 22;");
+    &print_lineNL("\tcase PT_MV_APPTIME :");
+    &print_lineNL("\t\treturn 23;");
+    &print_lineNL("\tcase PT_MV_I8 :");
+    &print_lineNL("\t\treturn 24;");
+    &print_lineNL("\tcase PT_MV_STRING8 :");
+    &print_lineNL("\t\treturn 25;");
+    &print_lineNL("\tcase PT_MV_UNICODE :");
+    &print_lineNL("\t\treturn 26;");
+    &print_lineNL("\tcase PT_MV_SYSTIME :");
+    &print_lineNL("\t\treturn 27;");
+    &print_lineNL("\tcase PT_MV_CLSID :");
+    &print_lineNL("\t\treturn 28;");
+    &print_lineNL("\tcase PT_MV_BINARY :");
+    &print_lineNL("\t\treturn 29;");
+    &print_lineNL("\tdefault :");
+    &print_lineNL("\t\tbreak;");
+    &print_lineNL("\t}");
+    &print_lineNL('');
+    &print_lineNL("\treturn 0xFF;");
+    &print_lineNL("}");
+    &print_lineNL('');
+
+    &print_lineNL("uint8_t get_line_index(uint8_t line)");
+    &print_lineNL("{");
+    &print_lineNL("\treturn tab_index[line];");
+    &print_lineNL("}");
+    &print_lineNL('');
+
+    &print_lineNL("const char *get_ad_name(uint32_t mapitag)");
+    &print_lineNL("{");
+    &print_lineNL("\tuint8_t           line;");
+    &print_lineNL("\tuint8_t           col;");
+    &print_lineNL("\tuint16_t  type;");
+    &print_lineNL("\tuint16_t  i;");
+    &print_lineNL("");
+    &print_lineNL("\tline = (mapitag >> 24) & 0xFF;");
+    &print_lineNL("\tcol = (mapitag >> 16) & 0xFF;");
+    &print_lineNL("\ttype = mapitag & 0xFFFF;");
+    &print_lineNL("");
+    &print_lineNL("\tif ((i = get_type_index(type)) != 0xFF) {");
+    &print_lineNL("\t\tline = get_line_index(line);");
+    &print_lineNL("\t\treturn tag_to_x500[line][col][i];");
+    &print_lineNL("\t}");
+    &print_lineNL("");
+    &print_lineNL("\treturn NULL;");
+    &print_lineNL("}");
+    &print_lineNL('');
+}
+
+sub    tab_index(@)
+{
+    my @tab = @_;
+
+    &print_lineNL("uint16_t\ttab_index[256] = {");
+    &print_lineNL("".join ', ', @tab);
+    &print_lineNL("};\n");
+}
+
+sub    tab_name()
+{
+    my @tmp = split /\n/, $content;
+    my @lines = sort @tmp;
+    my $prev_one = 0x0;
+    my $prev_two = 0x1;
+    my $counter = 0;
+    my $end = 0;
+    my @tab_line = split '', sprintf('%0256s', '');
+
+    $content = '';
+    &header();
+    &print_lineNL("const char\t*tag_to_x500[256][256][30] = {");    
+    &init_hash();
+    $tab_line[$prev_one] = $counter++;
+    foreach my $line (@lines) {
+       $line =~ s/^\#+.*$//;
+       if ($line) {
+           my  @prop = split(/\s+/, $line);
+           my  $hexa = hex $prop[0];
+           my  $one = ($hexa >> 24) & 0xFF;
+           my  $two = ($hexa >> 16) & 0xFF;
+           my  $type = ($hexa) & 0xFFFF;
+           my  $tag_name = $prop[1];
+           my  $ad_name = 0;
+
+           $ad_name = '"'.$prop[2].'"' if (defined($prop[2]));
+           #print "$one $two $type $tag_name $ad_name\n";
+           if ($one > $prev_one) {
+               &print_line(&built_line());
+               &init_hash();
+               $tab_line[$one] = $counter++;
+               $prev_one = $one;
+           }
+           &add_x500($two, $type, $ad_name);
+           $end = $one;
+       }
+    }
+    &print_line(&built_line());
+    $tab_line[$end] = $counter++;
+    &print_lineNL("\t{ {0} }\n};");
+    &print_line("\n");
+
+    return @tab_line;
+}
+
+sub    load_file()
+{
+    open(FILE, 'mapi-properties') or die "Can't open file\n";
+    my($saved_delim) = $/;
+    undef $/;
+    $content = <FILE>;
+    close(FILE);
+    $/ = $saved_delim;
+}
+
+sub    parse($)
+{
+    $content = shift;
+
+#    &load_file();
+    &tab_index(&tab_name());
+    &print_functions();
+
+    return $content;
+}
+
+1;
diff --git a/libmapi/conf/tagsconfgen.pl b/libmapi/conf/tagsconfgen.pl
new file mode 100755 (executable)
index 0000000..cea41aa
--- /dev/null
@@ -0,0 +1,39 @@
+#!/usr/bin/perl -w
+## tagsconfgen.pl for tags conf generator
+## 
+## Made by Pauline KHUN
+## Login   p.khun
+## Mail   <p.khun@openchange.org>
+## 
+## Started on  Tue Nov 29 16:23:58 2005 Pauline KHUN
+## Last update Tue Dec 20 15:18:49 2005 Pauline KHUN
+##
+
+use    strict;
+
+## tagsconfgen.pl script generates a conf file for Nspi_profile torture test:
+## - the conf file contains a Property tags per section and thus allows a test for
+##   one tag.
+## This script can be changed according to the torture test to do.
+
+sub    TAGSCONF        { return ("proptags.conf"); }
+sub    TAGSFILE        { return ("mapi-properties"); }
+
+my     @line;
+
+open(CONF, ">", TAGSCONF) or die('Cannot open ' . TAGSCONF . "\n");
+open(FD, TAGSFILE) or die('Cannot open ' . TAGSFILE . "\n");
+while (<FD>)
+{
+    if ($_ !~ /^\#/)
+    {
+       @line = split(/\p{IsSpace}/, $_);
+       if (defined($line[2]))
+       {
+           print CONF "[proptags]\n";
+           print CONF "$line[2] = $line[0]\n";
+       }
+    }
+}
+close(FD);
+close(CONF);
diff --git a/libmapi/container.c b/libmapi/container.c
new file mode 100644 (file)
index 0000000..5571bf6
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+   MAPI Implementation: Containers
+
+   OpenChange Project
+
+   Copyright (C) Julien Kerihuel 2005
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "openchange.h"
+#include "ndr_exchange.h"
+#include "libmapi/include/proto.h"
+
+NTSTATUS GetHierarchyTable(uint32_t flags, struct SRowSet **RowSet)
+{
+       TALLOC_CTX              *mem_ctx;
+       struct ldb_context      *ldb_ctx;
+       struct ldb_dn           *container_dn;
+       struct ldb_result       *container_tree;
+
+       mem_ctx = talloc_init("GetHierarchyTable");
+
+       ldb_ctx = storedb_connect(mem_ctx);
+       
+       if (!ldb_ctx) {
+         DEBUG(0, ("connection to the store database failed\n"));
+         return NT_STATUS(MAPI_E_CORRUPT_STORE);
+       }
+
+       container_dn = storedb_search_dn(ldb_ctx, mem_ctx, NULL,
+                                        "(&(objectClass=container)(containerID=0x0))");
+
+       if (!container_dn) {
+         DEBUG(0, ("GetHierarchyInfo: Root container not found in storedb, returning MAPI_E_CORRUPT_STORE\n"));
+         return NT_STATUS(MAPI_E_CORRUPT_STORE);
+       }
+
+       *RowSet = storedb_search_container_tree(ldb_ctx, mem_ctx, container_dn, &container_tree,
+                                               "(&(objectClass=container))");
+
+       return NT_STATUS(MAPI_E_SUCCESS);
+}
diff --git a/libmapi/emsmdb.c b/libmapi/emsmdb.c
new file mode 100644 (file)
index 0000000..e0fe705
--- /dev/null
@@ -0,0 +1,243 @@
+/*
+ *  OpenChange MAPI implementation.
+ *
+ *  Copyright (C) Julien Kerihuel 2005.
+ *  Copyright (C) Jelmer Vernooij 2005.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "openchange.h"
+#include "ndr_exchange_c.h"
+#include "libmapi/include/emsmdb.h"
+#include "libmapi/tdr_IMAPISession.h"
+#include "libmapi/mapicode.h"
+#include "libmapi/include/proto.h"
+
+#define        ECDOCONNECT_FORMAT      "/o=%s Organization/ou=First Administrative Group/cn=Recipients/cn=%s"
+
+uint8_t        *previous = NULL;
+uint32_t plength = 0;
+
+static void debug_print_infos(const char *info, struct MAPI_DATA blob)
+{
+       uint32_t        length;
+       static uint32_t idx = 0;
+
+       if (info && !strcmp(info, "request")) {
+               length = blob.length + 2;
+       } else {
+               length = blob.length;
+       }
+
+       printf("\n\n[%s][%d]:\t0x%.04X\n", info, idx, blob.opnum);
+       printf("\t\tmapi_len = %d\n", blob.mapi_len);
+       printf("\t\tlength = %d\n", blob.length);
+       printf("\t\tcontent:\n");
+       dump_data(1, blob.content, blob.length);
+       printf("\t\tremaining:\n");
+       dump_data(1, blob.remaining, blob.mapi_len - length);
+       idx++;
+}
+
+/* !!! BROKEN !!! Code:  Investigation and fixes needed */
+
+struct emsmdb_context *emsmdb_connect(TALLOC_CTX *mem_ctx, struct dcerpc_pipe *p, struct cli_credentials *cred)
+{
+       struct EcDoConnect      r;
+       NTSTATUS                status;
+       const char              *organization;
+       const char              *username;
+       uint32_t                codepage = lp_parm_int(-1, "locale", "codepage", 0);
+       uint32_t                language = lp_parm_int(-1, "locale", "language", 0);
+       uint32_t                method = lp_parm_int(-1, "locale", "method", 0);
+       char                    *session;
+       uint32_t                length;
+       struct emsmdb_context   *ret;
+
+       organization = cli_credentials_get_domain(cred);
+       username = cli_credentials_get_username(cred);
+
+       if (!organization || !username) {
+               DEBUG(1,("emsmdb_connect: username and domain required"));
+               return NULL;
+       }
+
+       if (!codepage || !language || !method) {
+               DEBUG(3, ("emsmdb_connect: Invalid parameter\n"));
+               return NULL;
+       }
+
+       ret = talloc(mem_ctx, struct emsmdb_context);
+       ret->rpc_connection = p;
+       ret->mem_ctx = mem_ctx;
+       
+       session = talloc_asprintf(mem_ctx, ECDOCONNECT_FORMAT, organization, username);
+       length = strlen(session);
+
+       r.in.name = session;
+       r.in.unknown1[0] = 0x0;
+       r.in.unknown1[1] = 0x1eeebaac;
+       r.in.unknown1[2] = 0x0;
+       r.in.code_page = codepage;
+       r.in.input_locale.language = language;
+       r.in.input_locale.method = method;
+       r.in.unknown2 = 0xffffffff;
+       r.in.unknown3 = 0x1;
+       r.in.emsmdb_client_version[0] = 0x000a;
+       r.in.emsmdb_client_version[1] = 0x0000;
+       r.in.emsmdb_client_version[2] = 0x1013;
+
+       r.in.alloc_space = talloc(mem_ctx, uint32_t);
+       *r.in.alloc_space = 0;
+
+       r.out.unknown4[0] = talloc(mem_ctx, uint32_t);
+       r.out.unknown4[1] = talloc(mem_ctx, uint32_t);
+       r.out.unknown4[2] = talloc(mem_ctx, uint32_t);
+       r.out.session_nb = talloc(mem_ctx, uint16_t);
+       r.out.alloc_space = talloc(mem_ctx, uint32_t);
+       r.out.handle = &ret->handle;
+
+       status = dcerpc_EcDoConnect(p, mem_ctx, &r);
+
+       talloc_free(session);
+
+       if (!MAPI_STATUS_IS_OK(NT_STATUS_V(status))) {
+               mapi_errstr("EcDoConnect", r.out.result);
+               return NULL;
+       }
+
+       DEBUG(3, ("emsmdb_connect\n"));
+       DEBUG(3, ("\t\t user = %s\n", r.out.user));
+       DEBUG(3, ("\t\t organization = %s\n", r.out.org_group));
+       mapi_errstr("EcDoConnect", r.out.result);
+
+       return ret;
+}
+
+NTSTATUS emsmdb_transaction(struct emsmdb_context *emsmdb, struct MAPI_DATA blob, struct MAPI_REQ *req)
+{
+       struct EcDoRpc  r;
+       NTSTATUS        status;
+       struct tdr_push *push;
+       uint16_t        length = blob.mapi_len;
+
+       push = talloc_zero(emsmdb->mem_ctx, struct tdr_push);
+
+       r.in.handle = r.out.handle = &emsmdb->handle;
+       r.in.max_data = 0x7fff;
+       r.in.length = &length;
+       r.out.length = &length;
+
+       r.in.data.max_data = 0x7fff;
+       r.in.data.offset = 0x0;
+
+       r.in.data.blob.mapi_len = blob.mapi_len;
+       r.in.data.blob.opnum = req->opcode;
+
+       TDR_CHECK(tdr_push_MAPI_REQ(push, req));
+
+       r.in.data.blob.length = push->data.length + 1;
+       r.in.data.blob.content = talloc_zero_array(emsmdb->mem_ctx, uint8_t, push->data.length - 1);
+       memcpy(r.in.data.blob.content, push->data.data + 2, push->data.length - 2);
+
+       r.in.data.blob.remaining = fill_remaining_blob(r.in.data.blob, previous, plength);
+
+       debug_print_infos("request", r.in.data.blob);
+
+       status = dcerpc_EcDoRpc(emsmdb->rpc_connection, emsmdb->mem_ctx, &r);
+
+       debug_print_infos("response", r.out.data.blob);
+
+       if (!MAPI_STATUS_IS_OK(NT_STATUS_V(status))) {
+               mapi_errstr("EcDoRpc", r.out.result);
+       }
+       else {
+               previous = r.out.data.blob.remaining;
+               plength = r.out.data.blob.mapi_len - r.out.data.blob.length;
+       }
+
+       return status;
+}
+
+NTSTATUS emsmdb_transaction_unknown(struct emsmdb_context *emsmdb, struct MAPI_DATA blob)
+{
+       struct EcDoRpc  r;
+       NTSTATUS        status;
+       uint16_t        length = blob.mapi_len;
+
+       r.in.handle = r.out.handle = &emsmdb->handle;
+       r.in.max_data = 0x7fff;
+       r.in.length = &length;
+       r.out.length = &length;
+
+       r.in.data.max_data = 0x7fff;
+       r.in.data.offset = 0x0;
+
+       r.in.data.blob.mapi_len = blob.mapi_len;
+       r.in.data.blob.length = blob.length;
+       r.in.data.blob.opnum = blob.opnum;
+       r.in.data.blob.content = blob.content;
+       r.in.data.blob.remaining = fill_remaining_blob(r.in.data.blob, previous, plength);
+
+       printf("---------------------------------------\n");
+       dump_data(0, r.in.data.blob.content, r.in.data.blob.length);
+       printf("---------------------------------------\n");
+
+       debug_print_infos("request", r.in.data.blob);
+
+       status = dcerpc_EcDoRpc(emsmdb->rpc_connection, emsmdb->mem_ctx, &r);
+
+       debug_print_infos("response", r.out.data.blob);
+
+        if (!MAPI_STATUS_IS_OK(NT_STATUS_V(status))) {
+               mapi_errstr("EcDoRpc", r.out.result);
+        } else {
+               previous = r.out.data.blob.remaining;
+               plength = r.out.data.blob.mapi_len - r.out.data.blob.length;
+       }
+
+       return status;
+}
+
+BOOL emsmdb_registernotify(struct emsmdb_context *emsmdb, DATA_BLOB blob1, DATA_BLOB blob2) 
+{
+       struct EcRRegisterPushNotification      r;
+       BOOL                                    ret = True;
+       NTSTATUS                                status;
+
+       r.out.handle = r.in.handle = &emsmdb->handle;
+
+       r.in.unknown = 0x0;
+       r.in.blob1 = blob1;
+       r.in.unknown1 = blob1.length;
+       r.in.unknown2 = 0xffffffff;
+       r.in.blob2 = blob2;
+       r.in.unknown3 = blob2.length;
+
+       r.out.unknown4 = talloc(emsmdb, uint32_t);
+
+        status = dcerpc_EcRRegisterPushNotification(emsmdb->rpc_connection, emsmdb, &r);
+
+       mapi_errstr("EcRRegisterPushNotification", r.out.result);
+
+       if (!MAPI_STATUS_IS_OK(NT_STATUS_V(status))) {
+               ret = False;
+       } else {
+               ret = True;
+       }
+
+       return ret;
+}
diff --git a/libmapi/include/emsmdb.h b/libmapi/include/emsmdb.h
new file mode 100644 (file)
index 0000000..c11e851
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ *  OpenChange EMSMDB implementation.
+ *
+ *  Copyright (C) Jelmer Vernooij 2005.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __EMSMDB_H__
+#define        __EMSMDB_H__
+
+#include "libmapi/IMAPISession.h"
+
+struct emsmdb_context {
+  struct dcerpc_pipe *rpc_connection;
+  struct policy_handle handle;
+  TALLOC_CTX *mem_ctx;
+};
+
+NTSTATUS emsmdb_transaction(struct emsmdb_context *emsmdb, struct MAPI_DATA blob, struct MAPI_REQ *req);
+NTSTATUS emsmdb_transaction_unknown(struct emsmdb_context *emsmdb, struct MAPI_DATA blob);
+
+#endif /* __EMSMDB_H__ */
diff --git a/libmapi/include/mapi.h b/libmapi/include/mapi.h
new file mode 100644 (file)
index 0000000..0851c6e
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ *  OpenChange MAPI implementation.
+ *  Status codes returned my MAPI
+ *
+ *  Copyright (C) Julien Kerihuel 2005.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef        _MAPI_H
+#define        _MAPI_H
+
+/*
+  MAPI opnums
+ */
+
+#define        OPNUM_Unknown           "Unknown opnum"
+#define        OPNUM_LEN               2
+
+#define        OPNUM_OpenMsgStore      0x00FE
+
+struct opnums {
+       uint16_t        opnum;
+       const char      *name;
+};
+
+/*
+  OpenMsgStore Data structure
+ */
+
+typedef struct SOpenMsgStore {
+       uint8_t         *unknown;               /* unknown bytes        */
+       uint16_t        proflen;                /* profile info length  */
+       const char      *profile_info;          /* profile info string  */
+} MSG_STORE;
+
+#endif /*!_MAPI_H */
diff --git a/libmapi/include/mapidefs.h b/libmapi/include/mapidefs.h
new file mode 100644 (file)
index 0000000..11943b1
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ *  OpenChange MAPI implementation.
+ *  MAPI definitions
+ *
+ *  Copyright (C) Julien Kerihuel 2005.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __MAPIDEFS_H__
+#define __MAPIDEFS_H__
+
+#define PROP_TAG(type, id) (((id << 16))| (type))
+#define MV_FLAG                        0x1000
+
+/* Property types */
+#define        PT_UNSPECIFIED          0x0
+#define        PT_NULL                 0x1
+#define        PT_SHORT                0x2
+#define        PT_LONG                 0x3
+#define        PT_FLOAT                0x4
+#define        PT_DOUBLE               0x5
+#define        PT_CURRENCY             0x6
+#define        PT_APPTIME              0x7
+#define        PT_ERROR                0xa
+#define        PT_BOOLEAN              0xb
+#define        PT_OBJECT               0xd
+#define        PT_I8                   0x14
+#define        PT_STRING8              0x1e
+#define        PT_UNICODE              0x1f
+#define        PT_SYSTIME              0x40
+#define        PT_CLSID                0x48
+#define        PT_BINARY               0x102
+
+/* Multi valued property types */
+#define        PT_MV_SHORT             (MV_FLAG | PT_SHORT)
+#define        PT_MV_LONG              (MV_FLAG | PT_LONG)
+#define        PT_MV_FLOAT             (MV_FLAG | PT_FLOAT)
+#define        PT_MV_DOUBLE            (MV_FLAG | PT_DOUBLE)
+#define        PT_MV_CURRENCY          (MV_FLAG | PT_CURRENCY)
+#define        PT_MV_APPTIME           (MV_FLAG | PT_APPTIME)
+#define        PT_MV_I8                (MV_FLAG | PT_I8)
+#define        PT_MV_STRING8           (MV_FLAG | PT_STRING8)
+#define        PT_MV_UNICODE           (MV_FLAG | PT_UNICODE)
+#define        PT_MV_SYSTIME           (MV_FLAG | PT_SYSTIME)
+#define PT_MV_CLSID            (MV_FLAG | PT_CLSID)
+#define        PT_MV_BINARY            (MV_FLAG | PT_BINARY)
+
+/* Restriction types */
+#define RES_AND                        0
+#define RES_OR                 1
+#define RES_NOT                        2
+#define RES_CONTENT            3
+#define RES_PROPERTY           4
+#define RES_COMPAREPROPS       5
+#define RES_BITMASK            6
+#define RES_SIZE               7
+#define RES_EXIST              8
+#define RES_SUBRESTRICTION     9
+#define RES_COMMENT            10
+
+/* Object Type */
+#define MAPI_STORE             0x1     /* Message Store */
+#define MAPI_ADDRBOOK          0x2     /* Address Book */
+#define MAPI_FOLDER            0x3     /* Folder */
+#define MAPI_ABCONT            0x4     /* Address Book Container */
+#define MAPI_MESSAGE           0x5     /* Message */
+#define MAPI_MAILUSER          0x6     /* Individual Recipient */
+#define MAPI_ATTACH            0x7     /* Attachment */
+#define MAPI_DISTLIST          0x8     /* Distribution List Recipient */
+#define MAPI_PROFSECT          0x9     /* Profile Section */
+#define MAPI_STATUS            0xA     /* Status Object */
+#define MAPI_SESSION           0xB     /* Session */
+#define MAPI_FORMINFO          0xC     /* Form Information */
+
+/*
+ * ENTRYID flags
+ */
+
+/* definition for abFlags[0] */
+#define MAPI_SHORTTERM          0x80
+#define MAPI_NOTRECIP           0x40
+#define MAPI_THISSESSION        0x20
+#define MAPI_NOW                0x10
+#define MAPI_NOTRESERVED        0x08
+
+/* definition for abFlags[1] */
+#define MAPI_COMPOUND           0x80
+
+#endif /*!__MAPIDEFS_H__ */
diff --git a/libmapi/include/mapitables.h b/libmapi/include/mapitables.h
new file mode 100644 (file)
index 0000000..b905810
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+** mapitables.h for OpenChange
+** 
+** Copyright (C) Gregory Schiro
+** Mail   <g.schiro@openchange.org>
+** 
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+** 
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+** GNU General Public License for more details.
+** 
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+** 
+** Started on  Tue Apr 11 17:11:29 2006 root
+** Last update Wed Apr 12 04:43:25 2006 root
+*/
+
+#ifndef _MAPITABLES_H_
+# define _MAPITABLES_H_
+
+
+struct GUID_users {
+       uint8_t                 guid[16];
+       struct GUID_users       *next;
+};
+
+
+struct GUID_users      *GUID_user_list = NULL;
+
+#endif /* !_MAPITABLES_H_ */
+
diff --git a/libmapi/include/nspi.h b/libmapi/include/nspi.h
new file mode 100644 (file)
index 0000000..fa66615
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ *  OpenChange NSPI implementation.
+ *
+ *  Copyright (C) Julien Kerihuel 2005.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __NSPI_H__
+#define        __NSPI_H__
+
+struct mapi_profile {
+       uint32_t        *instance_key;
+};
+
+struct nspi_context {
+       struct dcerpc_pipe      *rpc_connection;
+       struct policy_handle    handle;
+       TALLOC_CTX              *mem_ctx;
+       struct cli_credentials  *cred;
+       struct MAPI_SETTINGS    *settings;
+       struct mapi_profile     *profile;
+       struct SRowSet          *rowSet;
+       char                    *org;
+       char                    *org_unit;
+};
+
+#define        ORG             "/o="
+#define        ORG_UNIT        "/ou="
+#define        SERVER_DN       "/o=%s/ou=%s/cn=Configuration/cn=Servers/cn=%s"
+
+#endif /* __NSPI_H__ */
diff --git a/libmapi/include/property.h b/libmapi/include/property.h
new file mode 100644 (file)
index 0000000..9c9df3e
--- /dev/null
@@ -0,0 +1,56 @@
+/* 
+   OpenChange Project
+
+   property headers
+
+   Copyright (C) Gregory Schiro 2006
+   
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#ifndef _PROPERTY_H_
+#define _PROPERTY_H_
+
+struct                         SPropTagByFunc
+{
+       char                    *FuncName;
+       uint32_t                nb_tags;
+       uint32_t                poped_yet;
+       uint32_t                *aulPropTag;
+};
+
+struct                         SPropTagGBuild
+{
+       TALLOC_CTX              *mem_ctx;
+       int                     cur_idx;
+       int                     tag_idx;
+       struct SPropTagByFunc   *TagsT;
+};
+
+struct                         mapitags_x500
+{
+        uint32_t                mapitag;
+        const char              *x500;
+};
+
+# define GENERATED       (-1)
+
+# define STRING_TYPE   (0)
+# define INT_TYPE      (1)
+# define DOUBLE_TYPE   (2)
+# define FLOAT_TYPE    (3)
+
+#endif /* !_PROPERTY_H_ */
+
diff --git a/libmapi/mapi.c b/libmapi/mapi.c
new file mode 100644 (file)
index 0000000..dc25e8a
--- /dev/null
@@ -0,0 +1,232 @@
+/* 
+   MAPI Implementation
+
+   OpenChange Project
+
+   Copyright (C) Julien Kerihuel 2005
+   
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "openchange.h"
+#include "exchange.h"
+#include "libmapi/include/mapi.h"
+
+#define        DFLT_REMAINING "\xFF\xFF\xFF\xFF"
+#define DFLT_PADDING   0xFF
+
+/*
+  FILL_FIRST_BYTE maps the latest previous byte to the first reqr one:
+  previous:    xxxxxxxx [byte n]
+  reqr:                [byte 1] FFFFFFF
+*/
+
+#define        FILL_FIRST_BYTE(reqr, previous, length) do { \
+       reqr[0] = previous[length - 4]; \
+       reqr[1] = previous[length - 3]; \
+       reqr[2] = previous[length - 2]; \
+       reqr[3] = previous[length - 1]; \
+} while (0)
+
+#define        FILL_WITH_FIRST_BYTE(reqr, previous) do { \
+       reqr[0] = previous[0]; \
+       reqr[1] = previous[1]; \
+       reqr[2] = previous[2]; \
+       reqr[3] = previous[3];  \
+} while (0)
+
+/*
+  SWAP_BYTES inverts the latest bytes of previous and store them in reqr:
+  previous     [byte 1][byte 2]
+  reqr         [byte 2][byte 1]
+*/
+
+#define        SWAP_BYTES(reqr, previous, length) do { \
+       reqr[0] = previous[length - 4];         \
+       reqr[1] = previous[length - 3];         \
+       reqr[2] = previous[length - 2];         \
+       reqr[3] = previous[length - 1];         \
+                                               \
+       reqr[4] = previous[length - 8];         \
+       reqr[5] = previous[length - 7];         \
+       reqr[6] = previous[length - 6];         \
+       reqr[7] = previous[length - 5];         \
+} while (0)
+
+/*
+  CONCAT_BYTES maps the first and last byte of previous at the same offset in reqr:
+  previous:    [byte 1] xxxxxxxx [byte n]
+  reqr:                [byte 1] FFFFFFFF [byte n]
+*/
+
+#define        CONCAT_BYTES(reqr, previous, length, curlen) do {       \
+       reqr = memmove(reqr, previous, 4);                      \
+       reqr[curlen - 4] = previous[length - 4];                \
+       reqr[curlen - 3] = previous[length - 3];                \
+       reqr[curlen - 2] = previous[length - 2];                \
+       reqr[curlen - 1] = previous[length - 1];                \
+} while (0);
+
+uint8_t *remaining_blob_alloc(size_t bnumber)
+{
+       uint8_t         *blob;
+       size_t          length;
+
+       length = bnumber * 4;
+
+       blob = talloc_size(NULL, length);
+       memset(blob, DFLT_PADDING, length);
+
+       return (blob);
+}
+
+uint8_t *fill_remaining_blob(struct MAPI_DATA current, uint8_t *previous, uint32_t length)
+{
+       uint8_t                 *reqr = NULL;
+       static uint16_t         opnum;
+       static uint8_t          remcode[3];
+       static uint8_t          remcode_0x5[3];
+       uint16_t                copnum;
+       static BOOL             lock = False;
+
+       if (!previous)
+       {
+               reqr = remaining_blob_alloc(1);
+       }
+       else {
+/*             copnum = (current.content[1] << 8) | current.content[0]; */
+               copnum = current.opnum;
+               printf("current opnum = 0x%.04x\n", copnum);
+               printf("previous remaining length = %d\n", length);
+               switch (copnum)
+               {
+               case 0x4:
+               {
+                       reqr = remaining_blob_alloc(2);
+                       FILL_FIRST_BYTE(reqr, previous, length);
+                       FILL_FIRST_BYTE(remcode, previous, length);
+/*                     printf("------------------\n"); */
+/*                     dump_data(1, remcode, 4); */
+/*                     printf("------------------\n"); */
+                       break;
+               }
+               case 0x5:
+               {
+                       reqr = remaining_blob_alloc(2);
+                       FILL_FIRST_BYTE(reqr, remcode, 4);
+                       break;
+               }
+               case 0x12:
+               {
+                       if (opnum == 0x4) {
+                               reqr = remaining_blob_alloc(1);
+                               FILL_FIRST_BYTE(reqr, previous, length);
+                       }
+                       if (opnum == 0x5) {
+                               reqr = remaining_blob_alloc(3);
+                               SWAP_BYTES(reqr, previous, length);
+                       }
+                       if (opnum == 0x12) {
+                               reqr = remaining_blob_alloc(2);
+                               SWAP_BYTES(reqr, previous, length);
+                       }
+                       break;
+               }
+               case 0x18:
+               {
+                       reqr = remaining_blob_alloc(1);
+                       FILL_WITH_FIRST_BYTE(reqr, previous);
+/*                     FILL_FIRST_BYTE(reqr, previous, length); */
+
+                       printf("--------0x5----------\n");
+                       dump_data(1, remcode_0x5, 4);
+                       printf("------------------\n");
+/*                     FILL_FIRST_BYTE(reqr, remcode_0x5, 4); */
+                       break;
+               }
+               case 0x29:
+               {
+                       if (opnum == 0xFE || opnum == 0x12) {
+                               reqr = remaining_blob_alloc(9);
+                               FILL_FIRST_BYTE(reqr, previous, length);
+                       }
+                       else {
+                               if (lock != True) {
+                                       FILL_FIRST_BYTE(remcode_0x5, previous, length);
+                                       printf("--------0x5----------\n");
+                                       dump_data(1, remcode_0x5, 4);
+                                       printf("------------------\n");
+                                       lock = True;
+                               }
+                               reqr = remaining_blob_alloc(8);
+                               CONCAT_BYTES(reqr, previous, length, (8 * 4));
+                               FILL_FIRST_BYTE(remcode, previous, length);
+                               printf("------------------\n");
+                               dump_data(1, remcode, 4);
+                               printf("------------------\n");
+                       }
+                       break;
+               }
+               }
+       }
+
+       /* For the moment we store the previous "opnum" in order to define the next remaining data size */
+       printf("opnum = 0x%.04x\n", opnum);
+/*     opnum = (current.content[1] << 8) | current.content[0]; */
+       opnum = current.opnum;
+
+       return (reqr);
+}
+
+static struct opnums mapi_opnums[] = {
+       {OPNUM_OpenMsgStore,    "OpenMsgStore"},
+       {0x0,                   NULL}
+};
+
+
+/*
+  retrieves mapi opnum name
+ */
+
+const char *get_mapi_opname(uint16_t opnum)
+{
+       uint32_t                i;
+
+       for (i = 0; mapi_opnums[i].name != NULL; i++) {
+               if (mapi_opnums[i].opnum == opnum) {
+                       return mapi_opnums[i].name;
+               }
+       }
+       return OPNUM_Unknown;
+}
+
+/*
+  retrieves mapi opnum
+ */
+
+uint16_t get_mapi_opnum(const char *name)
+{
+       uint32_t                i;
+
+       if (!name) {
+               return -1;
+       }
+       for (i = 0; mapi_opnums[i].name != NULL; i++) {
+               if (!strcmp(mapi_opnums[i].name, name)) {
+                       return mapi_opnums[i].opnum;
+               }
+       }
+       return -1;
+}
diff --git a/libmapi/mapitables.c b/libmapi/mapitables.c
new file mode 100644 (file)
index 0000000..f27c394
--- /dev/null
@@ -0,0 +1,276 @@
+/*
+** mapitables.c for openchange
+** 
+** Copyright (C) Gregory Schiro
+** Mail   <g.schiro@openchange.org>
+** 
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+** 
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+** GNU General Public License for more details.
+** 
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+** 
+** Started on  Sun Mar 12 13:03:39 2006 gregory schiro
+** Last update Fri Apr 14 04:20:48 2006 root
+*/
+
+#include "openchange.h"
+#include "ndr_exchange.h"
+#include "mapitags.h"
+#include "libmapi/include/mapidefs.h"
+#include "libmapi/include/property.h"
+#include "server/dcesrv_exchange.h"
+#include "libmapi/IMAPISession.h"
+#include "libmapi/include/proto.h"
+#include "libmapi/include/mapi_proto.h"
+#include "libmapi/include/mapitables.h"
+
+extern struct GUID_users       *GUID_user_list;
+
+/*
+  mapi_setColumns() : Returns requested properties.
+*/
+/* struct SPropValue *mapitables_setcolumns(TALLOC_CTX *mem_ctx, struct dcesrv_call_state *dce_call, */
+/*                                      struct SPropTagArray **pPropTagArray) */
+/* { */
+/*     void **mapiValues; */
+       
+/*     mapiValues = get_value_tags(mem_ctx, dce_call, pPropTagArray); */
+       
+/*     return set_SPropValues(mem_ctx, *pPropTagArray, mapiValues); */
+/* } */
+
+/*
+  mapitables_restrict_check() : Returns True if the property matchs with the restrictions.
+*/
+BOOL mapitables_restrict_check(struct SPropValue *pPropValue, void *restriction, uint32_t type)
+{
+       BOOL    res = True;
+
+       switch(type) {
+       case RES_AND:
+               res &= mapitables_restrict_check(pPropValue,
+                                                ((struct SAndRestriction *)restriction)->lpRes,
+                                                RES_AND);
+               break;
+       case RES_BITMASK:
+               break;
+       case RES_COMMENT:
+               break;
+       case RES_COMPAREPROPS:
+               break;
+       case RES_CONTENT:
+               break;
+       case RES_EXIST:
+               break;
+       case RES_NOT:
+               break;
+       case RES_OR:
+               break;
+       case RES_PROPERTY:
+               break;
+       case RES_SIZE:
+               break;
+       case RES_SUBRESTRICTION:
+               break;
+       default:
+               break;
+       }
+
+       return res;
+}
+
+/*
+  mapitables_restrict() : Returns requested properties with applied restrictions.
+  size is pPropValue length, modified by address.
+*/
+struct SPropValue *mapitables_restrict(TALLOC_CTX *mem_ctx, struct SRestriction *restrictions,
+                                      struct SPropValue *pPropValue, uint32_t *size)
+{
+       struct SPropValue       *lpProps = NULL;
+       uint32_t                i = 0;
+       uint32_t                new_size = 0;
+
+       for (i = 0; i < *size; i++) {
+               if (mapitables_restrict_check(pPropValue + i, &(restrictions->res), restrictions->rt) == True) {
+                       lpProps = talloc_realloc_size(mem_ctx, lpProps, sizeof(*lpProps));
+                       memcpy(lpProps + i, pPropValue + i, sizeof(*lpProps));
+                       new_size++;
+               }
+       }
+       *size = new_size;
+
+       return lpProps;
+}
+
+/*
+  mapitables_sorttable() : Sorts the properties and returns a RowSet.
+  size is pPropValue length, modified by address.
+*/
+struct SRowSet *mapitables_sorttable(TALLOC_CTX *mem_ctx, struct SSortOrderSet *order,
+                                     struct SPropValue *pPropValue, uint32_t *size)
+{
+       return NULL;
+}
+
+/*
+  mapitables_guid_get_user_guid() : Gets the GUID of an user identified by username.
+*/
+BOOL mapitables_guid_get_user_guid(TALLOC_CTX *mem_ctx, struct dcesrv_call_state *dce_call, char *username, uint8_t guid[])
+{
+       struct ldb_context      *conn;
+       struct ldb_result       *res;
+       char                    *expr;
+       int                     ret;
+
+       conn = samdb_connect(mem_ctx, NTLM_AUTH_SESSION_INFO(dce_call));
+        if (conn == NULL) {
+                return False;
+        }
+       expr = talloc_asprintf(mem_ctx, "(&(objectClass=user)(cn=*%s*))", username);
+        if (expr == NULL) {
+                return False;
+        }
+        ret = ldb_search(conn, NULL, LDB_SCOPE_SUBTREE, expr, NULL, &res);
+        if ((ret != LDB_SUCCESS) || (res->count != 1)) {
+                DEBUG(3, ("Failed to find a record for user: %s\n", username));
+                return False;
+        }
+/*     (mem_ctx, res->msgs[0], "userGUID"); */
+
+       return True;
+}
+
+/*
+  mapitables_guid_add_by_username() : Adds the GUID of an user (identified by username) to the list.
+*/
+BOOL mapitables_guid_add_by_username(TALLOC_CTX *mem_ctx, struct dcesrv_call_state *dce_call, char *username)
+{
+       uint8_t                 guid[16];
+
+       if (mapitables_guid_get_user_guid(mem_ctx, dce_call, username, guid) == True) {
+               return mapitables_guid_add_by_guid(mem_ctx, guid);
+       }
+
+       return False;
+}
+
+/*
+  mapitables_guid_add_by_guid() : Adds the GUID of an user (identified by username) to the list.
+*/
+BOOL mapitables_guid_add_by_guid(TALLOC_CTX *mem_ctx, uint8_t guid[])
+{
+       struct GUID_users       *new;
+       
+       if (mapitables_guid_find_by_guid(guid) == NULL) {
+               new = talloc_size(mem_ctx, sizeof(*new));
+               memcpy(new->guid, guid, sizeof(guid));
+               new->next = GUID_user_list;
+               GUID_user_list = new;
+
+               return True;
+       }
+
+       return False;
+}
+
+/*
+  mapitables_guid_is_equal() : Compares two GUIDs, returns True if equal, False otherwise.
+*/
+BOOL mapitables_guid_is_equal(uint8_t guid1[], uint8_t guid2[])
+{
+       uint32_t        i;
+       uint32_t        len = sizeof(guid1);
+
+       if (len != sizeof(guid2)) {
+               return False;
+       }
+       for (i = 0; i < len; i++) {
+               if (guid1[i] != guid2[i]) {
+                       return False;
+               }
+       }
+
+       return True;
+}
+
+/*
+  mapitables_guid_del_by_username() : Deletes the GUID of an user (identified by username) from the list.
+*/
+BOOL mapitables_guid_del_by_username(TALLOC_CTX *mem_ctx, struct dcesrv_call_state *dce_call, char *username)
+{
+       uint8_t guid[16];
+
+       if (mapitables_guid_get_user_guid(mem_ctx, dce_call, username, guid) == False) {
+               return False;
+       }
+
+       return mapitables_guid_del_by_guid(guid);
+}
+
+/*
+  mapitables_guid_del_by_guid() : Deletes the GUID of an user (identified by guid) from the list.
+*/
+BOOL mapitables_guid_del_by_guid(uint8_t guid[])
+{
+       struct GUID_users       *guid_list = GUID_user_list;
+       struct GUID_users       *guid_prev = NULL;
+
+       while (guid_list) {
+               if (mapitables_guid_is_equal(guid_list->guid, guid)) {
+                       if (guid_prev) {
+                               guid_prev->next = guid_list->next;
+                       }
+                       else {
+                               GUID_user_list = guid_list->next;
+                       }
+                       talloc_free(guid_list);
+
+                       return True;
+               }
+               guid_prev = guid_list;
+               guid_list = guid_list->next;
+       }
+
+       return False;
+}
+
+/*
+  mapitables_guid_find_by_username() : Searchs the GUID of an user (identified by username) in the list.
+*/
+struct GUID_users *mapitables_guid_find_by_username(TALLOC_CTX *mem_ctx, struct dcesrv_call_state *dce_call, char *username)
+{
+       uint8_t guid[16];
+
+        if (mapitables_guid_get_user_guid(mem_ctx, dce_call, username, guid) == False) {
+                return NULL;
+        }
+
+       return mapitables_guid_find_by_guid(guid);
+}
+
+/*
+  mapitables_guid_find_by_guid() : Searchs the GUID of an user (identified by GUID) in the list.
+*/
+struct GUID_users *mapitables_guid_find_by_guid(uint8_t guid[])
+{
+       struct GUID_users       *guid_list = GUID_user_list;
+
+        while (guid_list) {
+                if (mapitables_guid_is_equal(guid_list->guid, guid)) {
+                        return guid_list;
+               }
+                guid_list = guid_list->next;
+        }
+       
+       return NULL;
+}
+
diff --git a/libmapi/nspi.c b/libmapi/nspi.c
new file mode 100644 (file)
index 0000000..1ad33f2
--- /dev/null
@@ -0,0 +1,430 @@
+/*
+ *  OpenChange NSPI implementation.
+ *
+ *  Copyright (C) Julien Kerihuel 2005-2006
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "openchange.h"
+#include "ndr_exchange_c.h"
+#include "libmapi/include/nspi.h"
+#include "libmapi/include/mapidefs.h"
+#include "libmapi/mapicode.h"
+#include "libmapi/include/proto.h"
+#include "libmapi/IMAPISession.h"
+#include "libmapi/include/mapi_proto.h"
+
+/*
+ * nspi_set_MAPI_SETTINGS
+ * set the client language/keyboard preferences (fetched from smb.conf
+ * or inline)
+ */
+
+static struct MAPI_SETTINGS *nspi_set_MAPI_SETTINGS(TALLOC_CTX *mem_ctx)
+{
+       struct MAPI_SETTINGS    *settings;
+       uint32_t                codepage = lp_parm_int(-1, "locale", "codepage", 0);
+       uint32_t                language = lp_parm_int(-1, "locale", "language", 0);
+       uint32_t                method = lp_parm_int(-1, "locale", "method", 0);
+
+       if (!codepage || !language || !method) {
+               DEBUG(3, ("nspi_set_dflt_settings: Invalid parameter\n"));
+               return NULL;
+       }
+
+       settings = talloc(mem_ctx, struct MAPI_SETTINGS);
+       settings->handle = 0;
+       settings->flag = 0;
+
+       memset(settings, 0, 16);
+
+       settings->codepage = codepage;
+       settings->input_locale.language = language;
+       settings->input_locale.method = method;
+
+       return settings;
+}
+
+/*
+ * nspi_bind
+ * Bind on the nspi endpoint and returns an opaque nspi_context
+ * structure
+ */
+
+struct nspi_context *nspi_bind(TALLOC_CTX *mem_ctx, struct dcerpc_pipe *p, struct cli_credentials *cred)
+{
+       struct NspiBind         r;
+       NTSTATUS                status;
+       struct nspi_context     *ret;
+       struct GUID             guid;
+
+       ret = talloc(mem_ctx, struct nspi_context);
+       ret->rpc_connection = p;
+       ret->mem_ctx = mem_ctx;
+       ret->cred = cred;
+       if (!(ret->settings = nspi_set_MAPI_SETTINGS(mem_ctx))) {
+               DEBUG(0, ("nspi_set_MAPI_SETTINGS: Invalid parameter\n"));
+               return NULL;
+       }
+       ret->profile = talloc(mem_ctx, struct mapi_profile);
+       ret->profile->instance_key = talloc(mem_ctx, uint32_t);
+
+       r.in.unknown = 0;
+
+       r.in.settings = ret->settings;
+       r.in.settings->flag = 0xffffffff;
+
+       memset(r.in.settings->service_provider.ab, 0, 16);
+       r.in.settings->service_provider.ab[12] = 0xd6;
+       r.in.settings->service_provider.ab[13] = 0x11;
+       r.in.settings->service_provider.ab[14] = 0x43;
+       r.in.settings->service_provider.ab[15] = 0x80;
+
+       r.in.mapiuid = talloc(mem_ctx, struct GUID);
+       memset(r.in.mapiuid, 0, sizeof(struct GUID));
+       
+       r.out.mapiuid = &guid;
+
+       r.in.mapiuid = talloc(mem_ctx, struct GUID);
+       memset(r.in.mapiuid, 0, sizeof(struct GUID));
+
+       r.out.handle = &ret->handle;
+
+
+       status = dcerpc_NspiBind(p, mem_ctx, &r);
+
+       if (!MAPI_STATUS_IS_OK(NT_STATUS_V(status)) || r.out.result != MAPI_E_SUCCESS) {
+               mapi_errstr("NspiBind", r.out.result);
+               return NULL;
+       }
+       
+       mapi_errstr("NspiBind", r.out.result);
+
+       return ret;
+}
+
+
+/*
+ * nspi_unbind
+ * Unbind from the endpoint
+ */
+
+BOOL nspi_unbind(struct nspi_context *nspi)
+{
+       struct NspiUnbind       r;
+       NTSTATUS                status;
+
+       r.in.handle = r.out.handle = &nspi->handle;
+       r.in.status = 0;
+
+       status = dcerpc_NspiUnbind(nspi->rpc_connection, nspi->mem_ctx, &r);
+
+       if (!MAPI_STATUS_IS_OK(NT_STATUS_V(status))) {
+               mapi_errstr("NspiUnbind", r.out.result);
+               return False;
+       }
+
+       mapi_errstr("NspiUnbind", r.out.result);
+
+       return True;
+}
+
+
+/*
+ * nspi_QueryRows
+ * retrieve mapitags/x500 attr values from the object requested in
+ * NspiGetMatches
+ */
+
+BOOL nspi_QueryRows(struct nspi_context *nspi, struct SPropTagArray *SPropTagArray)
+{
+       struct NspiQueryRows            r;
+       NTSTATUS                        status;
+       struct MAPI_SETTINGS            *settings;
+
+       r.in.handle = &nspi->handle;
+       r.in.flag = 0x0;
+
+       r.in.settings = nspi->settings;
+       memset(r.in.settings->service_provider.ab, 0, 16);
+       r.in.settings->service_provider.ab[12] = 0x1;
+
+       r.in.lRows = 0x1;
+
+       r.in.instance_key = nspi->profile->instance_key;
+       DEBUG(5, ("r.in.instance_key = 0x%x\n", *r.in.instance_key));
+
+       r.in.unknown = 0x1;
+       
+       r.in.REQ_properties = SPropTagArray;
+
+       settings = talloc(nspi->mem_ctx, struct MAPI_SETTINGS);
+       r.out.settings = settings;
+
+       nspi->rowSet = talloc(nspi->mem_ctx, struct SRowSet);
+       r.out.RowSet = &(nspi->rowSet);
+
+       status = dcerpc_NspiQueryRows(nspi->rpc_connection, nspi->mem_ctx, &r);
+
+       if (!MAPI_STATUS_IS_OK(NT_STATUS_V(status))) {
+               mapi_errstr("NspiQueryRows", r.out.result);
+               return False;
+       }
+       
+       mapi_errstr("NspiQueryRows", r.out.result);
+
+       return True;
+
+}
+
+/*
+ * nspi_GetMatches
+ * Request an exchange server for a view (mapitable) on an Address
+ * Book object and retrieve an instance key
+ *
+ */
+
+BOOL nspi_GetMatches(struct nspi_context *nspi, struct SPropTagArray *SPropTagArray)
+{
+       struct NspiGetMatches           r;
+       NTSTATUS                        status;
+       struct SPropertyRestriction     *prop_restrictions;
+       struct SPropValue               *lpProp;
+       struct instance_key             *instance_key;
+       struct MAPI_SETTINGS            *settings;
+       const char                      *username = lp_parm_string(-1, "exchange", "username");
+       struct SBinary                  bin;
+
+       if (!username) {
+               username = cli_credentials_get_username(nspi->cred);
+               if (!username) {
+                       DEBUG(0, ("nspi_GetMatches: not loggued on the domain\n"));
+               }
+       }
+               
+       r.in.handle = &nspi->handle;
+       r.in.unknown1 = 0;
+       
+       r.in.settings = nspi->settings;
+       r.in.settings->flag = 0x0;
+
+       memset(r.in.settings->service_provider.ab, 0, 16);
+
+       r.in.PropTagArray = NULL;
+       r.in.unknown2 = 0;
+
+       r.in.restrictions = talloc(nspi->mem_ctx, struct SRestriction);
+       r.in.restrictions->rt = RES_PROPERTY;
+
+       prop_restrictions = talloc(nspi->mem_ctx, struct SPropertyRestriction);
+       prop_restrictions->relop = RES_PROPERTY;
+       prop_restrictions->ulPropTag = PR_ANR;
+
+       lpProp = talloc(nspi->mem_ctx, struct SPropValue);
+       lpProp->ulPropTag = PR_ANR;
+       lpProp->dwAlignPad = 0;
+       lpProp->value.lpszA = username;
+       prop_restrictions->lpProp = lpProp;
+
+       r.in.restrictions->res.resProperty = *prop_restrictions;
+
+       r.in.unknown3 = 0;
+
+       r.in.REQ_properties = SPropTagArray;
+       
+       settings = talloc(nspi->mem_ctx, struct MAPI_SETTINGS);
+       r.out.settings = settings;
+
+       instance_key = talloc(nspi->mem_ctx, struct instance_key);
+       r.out.instance_key = instance_key;
+
+       nspi->rowSet = talloc(nspi->mem_ctx, struct SRowSet);
+       r.out.RowSet = &(nspi->rowSet);
+
+       status = dcerpc_NspiGetMatches(nspi->rpc_connection, nspi->mem_ctx, &r);
+
+       if (!MAPI_STATUS_IS_OK(NT_STATUS_V(status))) {
+               mapi_errstr("NspiGetMatches", r.out.result);
+               return False;
+       }
+       
+       mapi_errstr("NspiGetMatches", r.out.result);
+       
+       lpProp = get_SPropValue_SRowSet(*r.out.RowSet, PR_INSTANCE_KEY);
+       if (lpProp) {
+         
+         bin = lpProp->value.bin;
+          
+         nspi->profile->instance_key = (uint32_t *)bin.lpb;
+       } else {
+         nspi->profile->instance_key = 0;
+       }       
+
+       lpProp = get_SPropValue_SRowSet(*r.out.RowSet, PR_EMAIL_ADDRESS);
+       if (lpProp) {
+               DEBUG(3, ("PR_EMAIL_ADDRESS: %s\n", lpProp->value.lpszA));
+               nspi->org = x500_get_dn_element(nspi->mem_ctx, lpProp->value.lpszA, ORG);
+               nspi->org_unit = x500_get_dn_element(nspi->mem_ctx, lpProp->value.lpszA, ORG_UNIT);
+               if (!nspi->org_unit || !nspi->org) return False;
+       }
+
+       return True;
+}
+
+/*
+ * nspi_DNToEph
+ * Request for an object giving its DN and retrieve its instance key
+ * This function is used during MAPI profiles setup to request the
+ * Exchange object in the Active Directory
+ */
+
+BOOL nspi_DNToEph(struct nspi_context *nspi)
+{
+       struct NspiDNToEph      r;
+       NTSTATUS                status;
+       struct NAME_STRING      *server_dn;
+       const char              *org = lp_parm_string(-1, "exchange", "org");
+       const char              *org_unit = lp_parm_string(-1, "exchange", "org_unit");
+       const char              *servername = lp_parm_string(-1, "exchange", "server");
+       struct instance_key     *instance_key;
+
+       if (!servername || (!nspi->org && !org) || (!nspi->org_unit && !org_unit)) {
+               DEBUG(0, ("server, organization or organization unit name required\n"));
+               return False;
+       }
+
+
+       r.in.handle = &nspi->handle;
+       r.in.flag = 0;
+       r.in.size = 1;
+
+       server_dn = talloc(nspi->mem_ctx, struct NAME_STRING);
+       server_dn->str = talloc_asprintf(nspi->mem_ctx, SERVER_DN,
+                                        nspi->org ? nspi->org : org,
+                                        nspi->org_unit ? nspi->org_unit : org_unit,
+                                        servername);
+
+       r.in.server_dn = server_dn;
+
+       instance_key = talloc(nspi->mem_ctx, struct instance_key);
+       r.out.instance_key = instance_key;
+
+       status = dcerpc_NspiDNToEph(nspi->rpc_connection, nspi->mem_ctx, &r);
+
+       if (!MAPI_STATUS_IS_OK(NT_STATUS_V(status))) {
+               mapi_errstr("NspiDNToEph", r.out.result);
+               return False;
+       }
+
+       nspi->profile->instance_key =  instance_key->value;
+
+       mapi_errstr("NspiDNToEph", r.out.result);
+
+       return True;
+}
+
+
+/*
+ * nspi_GetProps
+ * request for properties associated with the given mapiuid (mapiuid
+ * is computed with the instance key)
+ */
+
+BOOL nspi_GetProps(struct nspi_context *nspi, struct SPropTagArray *SPropTagArray)
+{
+       struct NspiGetProps     r;
+       NTSTATUS                status;
+       struct SRow             *REPL_values;
+
+       r.in.handle = &nspi->handle;
+       r.in.flag = 0;
+
+       if (!nspi->profile->instance_key) {
+               return False;
+       }
+
+       r.in.settings = nspi->settings;
+       memset(r.in.settings->service_provider.ab, 0, 16);
+       r.in.settings->service_provider.ab[0] = *nspi->profile->instance_key;
+       r.in.settings->service_provider.ab[1] = (*nspi->profile->instance_key & 0xFF00) >> 8;
+
+       r.in.REQ_properties = SPropTagArray;
+
+       REPL_values = talloc(nspi->mem_ctx, struct SRow);
+       r.out.REPL_values = &REPL_values;
+
+       nspi->rowSet = talloc(nspi->mem_ctx, struct SRowSet);
+       nspi->rowSet->cRows = 1;
+       nspi->rowSet->aRow = talloc_size(nspi->rowSet, sizeof(struct SRow));
+
+       status = dcerpc_NspiGetProps(nspi->rpc_connection, nspi->mem_ctx, &r);
+
+       if (!MAPI_STATUS_IS_OK(NT_STATUS_V(status))) {
+               mapi_errstr("NspiGetProps", r.out.result);
+               return False;
+       }
+
+       nspi->rowSet->aRow[0].ulAdrEntryPad = REPL_values->ulAdrEntryPad;
+       nspi->rowSet->aRow[0].cValues = REPL_values->cValues;
+       nspi->rowSet->aRow[0].lpProps = REPL_values->lpProps;
+       
+       mapi_errstr("NspiGetProps", r.out.result);
+
+       return True;
+}
+
+/*
+ * nspi_GetHierarchyInfo
+ * Retrieve the Address Book container hierarchy
+ */
+
+BOOL nspi_GetHierarchyInfo(struct nspi_context *nspi)
+{
+       struct NspiGetHierarchyInfo     r;
+       NTSTATUS                        status;
+       uint32_t                        unknown = 0;
+       struct SRowSet                  *SRowSet;
+
+       r.in.handle = &nspi->handle;
+       r.in.unknown1 = 0;
+
+       r.in.settings = nspi->settings;
+       r.in.settings->flag = 0xffff;
+
+       memset(r.in.settings->service_provider.ab, 0, 16);
+       r.in.settings->service_provider.ab[12] = 0x98;
+       r.in.settings->service_provider.ab[13] = 0x6a;
+       r.in.settings->service_provider.ab[14] = 0xf8;
+       r.in.settings->service_provider.ab[15] = 0x77;
+
+       r.in.unknown2 = &unknown;
+
+       r.out.unknown2 = &unknown;
+
+       SRowSet = talloc(nspi->mem_ctx, struct SRowSet);
+       r.out.RowSet = &SRowSet;
+
+       status = dcerpc_NspiGetHierarchyInfo(nspi->rpc_connection, nspi->mem_ctx, &r);
+
+       if (!MAPI_STATUS_IS_OK(NT_STATUS_V(status))) {
+               mapi_errstr("NspiGetHierarchyInfo", r.out.result);
+               return False;
+       }
+       
+       mapi_errstr("NspiGetHierarchyInfo", r.out.result);
+
+       return True;
+}
diff --git a/libmapi/property.c b/libmapi/property.c
new file mode 100644 (file)
index 0000000..0ac28aa
--- /dev/null
@@ -0,0 +1,254 @@
+/*
+   MAPI Implementation
+
+   OpenChange Project
+
+   Copyright (C) Julien Kerihuel 2005-2006
+   Copyright (C) Gregory Schiro 2006
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "openchange.h"
+#include "ndr_exchange.h"
+#include "mapitags.h"
+#include "libmapi/include/mapidefs.h"
+#include "libmapi/include/property.h"
+#include "server/dcesrv_exchange.h"
+#include "libmapi/IMAPISession.h"
+#include "libmapi/include/proto.h"
+#include "libmapi/include/mapi_proto.h"
+
+BOOL   OnSection(const char *SectionName, void *UserData)
+{
+       struct SPropTagGBuild   *Data = (struct SPropTagGBuild *)UserData;
+
+       Data->TagsT = talloc_realloc(Data->mem_ctx, Data->TagsT,
+                                    struct SPropTagByFunc, Data->cur_idx + 1);
+       Data->TagsT[Data->cur_idx].FuncName = talloc_strdup(Data->mem_ctx, SectionName);
+       Data->TagsT[Data->cur_idx].poped_yet = 0;
+       Data->TagsT[Data->cur_idx].nb_tags = 0;
+       Data->TagsT[Data->cur_idx].aulPropTag = talloc_array_size(Data->mem_ctx, sizeof(uint32_t), 0);
+       Data->cur_idx += 1;
+       Data->tag_idx = 0;
+
+       return True;
+}
+
+BOOL   OnKey(const char *KeyName, const char *KeyValue, void *UserData)
+{
+       struct SPropTagGBuild   *Data = (struct SPropTagGBuild *)UserData;
+
+       Data->TagsT[Data->cur_idx - 1].aulPropTag =
+               talloc_realloc(Data->mem_ctx, Data->TagsT[Data->cur_idx - 1].aulPropTag,
+                              uint32_t, Data->tag_idx + 1);
+       Data->TagsT[Data->cur_idx - 1].aulPropTag[Data->tag_idx] = get_proptag_value(KeyName);
+       Data->TagsT[Data->cur_idx - 1].nb_tags += 1;
+       Data->tag_idx += 1;
+
+       return True;
+}
+
+struct SPropTagArray *set_SPropTagFile(TALLOC_CTX *mem_ctx, const char *conf_path, const char *Function)
+{
+       static struct SPropTagGBuild    *Data = NULL;
+       struct SPropTagArray    *SPropTag;
+       uint32_t                i;
+       uint32_t                j;
+
+       if (Data == NULL) {
+               if (conf_path == NULL)
+                       conf_path = lp_parm_string(-1, "pr_tags", "cf_path");
+               Data = talloc(mem_ctx, struct SPropTagGBuild);
+               Data->mem_ctx = Data;
+               Data->cur_idx = 0;
+               Data->tag_idx = 0;
+               Data->TagsT = talloc_array_size(Data, sizeof(struct SPropTagByFunc), 0);
+               if (pm_process(conf_path, OnSection, OnKey, Data) == False) {
+                       return NULL;
+               }
+               Data->TagsT = talloc_realloc(Data, Data->TagsT,
+                                            struct SPropTagByFunc, Data->cur_idx + 1);
+               Data->TagsT[Data->cur_idx].FuncName = NULL;
+               Data->TagsT[Data->cur_idx].aulPropTag = NULL;
+               if (DEBUGLEVEL == 12) {
+                       for (i = 0; Data->TagsT[i].FuncName; i++) {
+                               printf("[%s]\n", Data->TagsT[i].FuncName);
+                               for (j = 0; j < Data->TagsT[i].nb_tags; j++)
+                                       printf("%s\n", get_proptag_name(Data->TagsT[i].aulPropTag[j]));
+                               printf("\n");
+                       }
+               }
+       }
+       if (Function) {
+               for (i = 0; Data->TagsT[i].FuncName; i++) {
+                       if (!strcmp(Function, Data->TagsT[i].FuncName) && (Data->TagsT[i].poped_yet == 0)) {
+                               SPropTag = talloc(mem_ctx, struct SPropTagArray);
+                               SPropTag->aulPropTag = Data->TagsT[i].aulPropTag;
+                               SPropTag->cValues = Data->TagsT[i].nb_tags + 1;
+                               Data->TagsT[i].poped_yet = 1;
+                               if (DEBUGLEVEL == 12) {
+                                       printf("Sended tags for %s :\n", Function);
+                                       for (j = 0; j < Data->TagsT[i].nb_tags; j++) {
+                                               printf("%s\n", get_proptag_name(Data->TagsT[i].aulPropTag[j]));
+                                       }
+                               }
+
+                               return SPropTag;
+                       }
+               }
+
+               return NULL;
+       }
+
+       return NULL;
+}
+
+struct SPropTagArray *set_SPropTagArray(TALLOC_CTX *mem_ctx, uint32_t prop_nb, ...)
+{
+       struct SPropTagArray    *SPropTag;
+       va_list                 ap;
+       uint32_t                i;
+       uint32_t                *aulPropTag;
+
+       aulPropTag = talloc_array_size(mem_ctx, sizeof (uint32_t), prop_nb);
+
+       va_start(ap, prop_nb);
+       for (i = 0; i != prop_nb; i++) {
+               aulPropTag[i] = va_arg(ap, int);
+       }
+       va_end(ap);
+
+       SPropTag = talloc(mem_ctx, struct SPropTagArray);
+       SPropTag->aulPropTag = aulPropTag;
+       SPropTag->cValues = prop_nb + 1;
+
+       return SPropTag;
+}
+
+struct SPropValue *get_SPropValue_SRowSet(struct SRowSet *RowSet, uint32_t ulPropTag)
+{
+       uint32_t        i;
+       uint32_t        j;
+
+       for (i = 0; i != RowSet->cRows; i++) {
+               for (j = 0; j != RowSet->aRow[i].cValues; j++) {
+                       if (ulPropTag == RowSet->aRow[i].lpProps[j].ulPropTag) {
+                               return (&RowSet->aRow[i].lpProps[j]);
+                       }
+               }
+       }
+
+       return NULL;
+}
+
+BOOL set_SPropValue_proptag(struct SPropValue* lpProps, uint32_t aulPropTag, void *data)
+{
+       lpProps->ulPropTag = aulPropTag;
+       lpProps->dwAlignPad = 0x0;
+
+       return set_SPropValue(lpProps, data);
+}
+
+BOOL set_SPropValue(struct SPropValue* lpProps, void *data)
+{
+       if (data == NULL) {
+               lpProps->value.err = MAPI_E_NOT_FOUND;
+               return False;
+       }
+       switch (lpProps->ulPropTag & 0xFFFF) {
+       case PT_SHORT:
+               lpProps->value.i = *((uint16_t *)data);
+               break;
+       case PT_LONG:
+               lpProps->value.l = *((uint32_t *)data);
+               break;
+       case PT_BOOLEAN:
+               lpProps->value.b = *((uint16_t *)data);
+               break;
+       case PT_STRING8:
+               lpProps->value.lpszA = (char *) data;
+               break;
+       case PT_BINARY:
+               lpProps->value.bin = *((struct SBinary *)data);
+               break;
+       case PT_UNICODE:
+               lpProps->value.lpszW = (char *) data;
+               break;
+       case PT_CLSID:
+               lpProps->value.lpguid = (struct MAPIUID *) data;
+               break;
+       case PT_SYSTIME:
+               lpProps->value.ft = *((struct FILETIME *)data);
+               break;
+       case PT_ERROR:
+               lpProps->value.err = *((uint32_t *)data);
+               break;
+       case PT_MV_SHORT:
+               lpProps->value.err = *((uint32_t *)data);
+               break;
+       case PT_MV_LONG:
+               lpProps->value.MVl = *((struct MV_LONG_STRUCT *)data);
+               break;
+       case PT_MV_STRING8:
+               lpProps->value.MVszA = *((struct SLPSTRArray *)data);
+               break;
+       case PT_MV_BINARY:
+               lpProps->value.MVbin = *((struct SBinaryArray *)data);
+               break;
+       case PT_MV_CLSID:
+               lpProps->value.MVguid = *((struct SGuidArray *)data);
+               break;
+       case PT_MV_UNICODE:
+               lpProps->value.MVszW = *((struct MV_UNICODE_STRUCT *)data);
+               break;
+       case PT_MV_SYSTIME:
+               lpProps->value.MVft = *((struct SDateTimeArray *)data);
+               break;
+       case PT_NULL:
+               lpProps->value.null = *((uint32_t *)data);
+               break;
+       case PT_OBJECT:
+               lpProps->value.null = *((uint32_t *)data);
+               break;
+       default:
+               lpProps->value.err = MAPI_E_NOT_FOUND;
+
+               return False;
+       }
+
+       return True;
+}
+
+/*
+  set_SPropValues : Returns a pointer on struct SPropValue with all data set
+*/
+/* struct SPropValue *set_SPropValues(TALLOC_CTX *mem_ctx, struct SPropTagArray* pPropTagArray, void **data) */
+/* { */
+/*     struct SPropValue       *lpProps; */
+/*     uint32_t                size; */
+/*     uint32_t                i; */
+
+/*     size = (pPropTagArray->cValues) ? pPropTagArray->cValues - 1 : 0; */
+/*     lpProps = talloc_size(mem_ctx, sizeof(*lpProps) * size); */
+/*     for (i = 0; i < size; i++) { */
+/*             lpProps[i].ulPropTag = pPropTagArray->aulPropTag[i]; */
+/*             lpProps[i].dwAlignPad = 0x0; */
+/*             set_SPropValue(&(lpProps[i]), data[i]); */
+/*     } */
+
+/*     return lpProps; */
+/* } */
+
diff --git a/libmapi/storedb/storedb.c b/libmapi/storedb/storedb.c
new file mode 100644 (file)
index 0000000..c7cd1df
--- /dev/null
@@ -0,0 +1,286 @@
+/*
+   MAPI Implementation.
+
+   interface functions for the store database
+
+   OpenChange Project
+
+   Copyright (C) Julien Kerihuel 2006
+   Copyright (C) Jerome Medegan 2006
+   Copyright (C) Pauline Khun 2006
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "openchange.h"
+#include "ndr_exchange.h"
+#include "libmapi/include/proto.h"
+#include "libmapi/IMAPISession.h"
+#include "libmapi/include/mapi_proto.h"
+
+/*
+  Connect to the STORE database
+  return an opaque context pointer on success, or NULL on failure
+*/
+
+struct ldb_context     *storedb_connect(TALLOC_CTX *mem_ctx)
+{
+       struct ldb_context      *ldb;
+       const char              *storedb = lp_parm_string(-1, "exchange", "store");
+       const char              *dbtype = lp_parm_string(-1, "exchange", "dbtype");
+       const char              *url;
+
+       ldb = ldb_init(mem_ctx);
+       if (!storedb) {
+         DEBUG(0, ("No exchange:store option specified\n"));
+         return NULL;
+       }
+       if (!dbtype) {
+         DEBUG(0, ("No exchange:dbtype option specified\n"));
+         return NULL;
+       }
+
+       url = talloc_asprintf(ldb, "%s://%s", dbtype, storedb);
+       
+       if (0 != ldb_connect(ldb, url, LDB_FLG_RDONLY, NULL)) {
+         DEBUG(0, ("storedb connection failed\n"));
+         return NULL;
+       }
+       return (ldb);
+}
+
+/*
+  search the store for the specified attributes - va_list variant
+ */
+
+struct ldb_result              *storedb_search_v(struct ldb_context            *ldb_ctx,
+                                                 TALLOC_CTX                    *mem_ctx,
+                                                 const struct ldb_dn           *basedn,
+                                                 uint32_t                      scope,
+                                                 const char * const            *attrs,
+                                                 const char                    *format,
+                                                 va_list ap) _PRINTF_ATTRIBUTE(6,0)
+{
+       struct ldb_result       *result;
+       char                    *expr = NULL;
+       int                     count;
+       
+       if (!scope) {
+               scope = LDB_SCOPE_SUBTREE;
+       }
+       
+       if (format) {
+               vasprintf(&expr, format, ap);
+               if (expr == NULL) {
+                       return NULL;
+               }
+       } else {
+               scope = LDB_SCOPE_BASE;
+       }
+       
+       result = NULL;
+
+       count = ldb_search(ldb_ctx, basedn, scope, expr, attrs, &result);
+
+       if (result) talloc_steal(mem_ctx, result);
+       
+       DEBUG(4, ("storedb_search_v: %s %s -> %d (%s)\n",
+                 basedn?ldb_dn_linearize(mem_ctx, basedn):"NULL",
+                 expr?expr:"NULL", count,
+                 count==-1?ldb_errstring(ldb_ctx):"OK"));
+
+       free(expr);
+
+       return result;
+}
+
+/*
+  search the store for a single record matching the query
+ */
+
+struct ldb_dn          *storedb_search_dn(struct ldb_context *store_ldb,
+                                          TALLOC_CTX *mem_ctx,
+                                          const struct ldb_dn *basedn,
+                                          const char *format, ...) _PRINTF_ATTRIBUTE(4,5)
+{
+       va_list                 ap;
+       struct ldb_dn           *ret;
+       struct ldb_result       *result;
+
+       va_start(ap, format);
+       result = storedb_search_v(store_ldb, mem_ctx, basedn, 0, NULL, format, ap);
+       va_end(ap);
+
+       if (result->count != 1) return NULL;
+
+       ret = talloc_steal(mem_ctx, result->msgs[0]->dn);
+       talloc_free(result);
+
+       return ret;
+}
+
+/*
+  return the count of the number of records in the store matching the query
+*/
+int                    storedb_search_count(struct ldb_context *store_ldb,
+                                            TALLOC_CTX *mem_ctx,
+                                            const struct ldb_dn *basedn,
+                                            const char *format, ...) _PRINTF_ATTRIBUTE(4,5)
+{
+       va_list                 ap;
+       const char * const      attrs[] = { NULL };
+       struct ldb_result       *result;
+
+       va_start(ap, format);
+       result = storedb_search_v(store_ldb, mem_ctx, basedn, 0, attrs, format, ap);
+       va_end(ap);
+
+       return result->count;
+}
+
+/*
+  search the store for the parentID and returns a SBinary structure
+ */
+
+struct SBinary         *store_search_container_parentid(struct ldb_context *ldb_ctx,
+                                               TALLOC_CTX *mem_ctx,
+                                               const struct ldb_dn *basedn,
+                                               const char *format, ...) _PRINTF_ATTRIBUTE(4,5)
+{
+       va_list                 ap;
+       struct SBinary          *bin;
+       const char * const      attrs[] = { "entryID" , 0};
+       struct ldb_result       *result;
+
+       va_start(ap, format);
+       result = storedb_search_v(ldb_ctx, mem_ctx, basedn, LDB_SCOPE_SUBTREE, attrs, format, ap);
+       va_end(ap);
+
+       if (result->count != 1) {
+               return NULL;
+       }
+
+       bin = generate_recipient_entryid(mem_ctx, ldb_msg_find_attr_as_string(result->msgs[0], "entryID", NULL));
+
+       return bin;
+}
+
+/*
+  search the store and retrieve the container list with a scope = LDB_SCOPE_SUBTREE (2)
+  containers are returned in ldb_message.
+  The function returns the number of container it found
+*/
+
+struct SRowSet *storedb_search_container_tree(struct ldb_context       *ldb_ctx, 
+                                             TALLOC_CTX                *mem_ctx,
+                                             const struct ldb_dn       *basedn,
+                                             struct ldb_result         **result,
+                                             const char *format, ...) _PRINTF_ATTRIBUTE(5,6)
+{
+       va_list                 ap;
+       const char * const      attr[] = { "*" , 0};
+       uint32_t                i;
+       struct SRowSet          *SRowSet;
+       struct SBinary          *entryID;
+       struct SBinary          *parentID = (struct SBinary *) NULL;
+       uint32_t                *containerFlags;
+       uint32_t                containerID;
+       const char              *display_name_const;
+       char                    *display_name;
+       const char              *memberOf;
+       uint32_t                depth;
+       const char              *IsMaster;
+       uint32_t                IsMaster_nb;
+       uint32_t                prop_count;
+
+       va_start(ap, format);
+       *result = storedb_search_v(ldb_ctx, mem_ctx, basedn, LDB_SCOPE_SUBTREE, attr, format, ap);
+       va_end(ap);
+
+       SRowSet = talloc(mem_ctx, struct SRowSet);
+       SRowSet->cRows = (*result)->count;
+       SRowSet->aRow = talloc_array(mem_ctx, struct SRow, (*result)->count);
+
+       for (i=0; i != (*result)->count; i++) {
+
+               entryID = generate_recipient_entryid(mem_ctx, ldb_msg_find_attr_as_string((*result)->msgs[i], "entryID", NULL));
+               
+               containerFlags = talloc(mem_ctx, uint32_t);
+               *containerFlags = ldb_msg_find_attr_as_int((*result)->msgs[i], "containerFlags", 0);
+               containerID = ldb_msg_find_attr_as_int((*result)->msgs[i], "containerID", 0);
+               display_name_const = ldb_msg_find_attr_as_string((*result)->msgs[i], "cn", NULL);
+               display_name = talloc_strdup(mem_ctx, display_name_const);
+
+               IsMaster = ldb_msg_find_attr_as_string((*result)->msgs[i], "IsMaster", NULL);
+               if (IsMaster) {
+                       IsMaster_nb = (!strcmp(IsMaster, "TRUE") ? 0x1 : 0x0);
+               } else
+                       IsMaster_nb = 0x0;
+
+
+               memberOf = ldb_msg_find_attr_as_string((*result)->msgs[i], "memberOf", NULL);
+
+               if (memberOf) {
+                       memberOf = talloc_strdup(mem_ctx, memberOf);
+                       parentID = store_search_container_parentid(ldb_ctx, mem_ctx, NULL,
+                                                                  "(&(objectClass=recipient)(dn=%s))", memberOf);
+               }
+
+               prop_count = (memberOf) ? 7 : 6;
+               depth = (memberOf) ? 1 : 0;
+
+               SRowSet->aRow[i].ulAdrEntryPad = 0;
+               SRowSet->aRow[i].cValues = prop_count;
+
+               SRowSet->aRow[i].lpProps = talloc_array(mem_ctx, struct SPropValue, prop_count);
+
+               set_SPropValue_proptag(&SRowSet->aRow[i].lpProps[0], PR_ENTRYID, (void *)entryID);
+               set_SPropValue_proptag(&SRowSet->aRow[i].lpProps[1], PR_CONTAINER_FLAGS, (void *)containerFlags);
+               set_SPropValue_proptag(&SRowSet->aRow[i].lpProps[2], PR_DEPTH, (void *)&depth);
+               set_SPropValue_proptag(&SRowSet->aRow[i].lpProps[3], PR_EMS_AB_CONTAINERID, (void *)&containerID);
+               set_SPropValue_proptag(&SRowSet->aRow[i].lpProps[4], PR_DISPLAY_NAME, (void *)display_name);
+               set_SPropValue_proptag(&SRowSet->aRow[i].lpProps[5], PR_EMS_AB_IS_MASTER, (void *)&IsMaster_nb);
+
+               if (memberOf) {
+                 set_SPropValue_proptag(&SRowSet->aRow[i].lpProps[6], PR_EMS_AB_PARENT_ENTRYID, (void *)parentID);
+               }
+               DEBUG(4, ("dn = %s\n", ldb_dn_linearize(mem_ctx, (*result)->msgs[i]->dn)));
+               DEBUG(4, ("cn = %s\n", display_name));
+               DEBUG(4, ("containerID = 0x%x\n", containerID));
+               DEBUG(4, ("containerFlags = 0x%x\n", *containerFlags));
+               DEBUG(4, ("IsMaster = %d\n", IsMaster_nb));
+       }
+
+       return SRowSet;
+}
+
+
+
+/*
+  pull a string from a result set.
+*/
+const char *storedb_result_string(struct ldb_message *msg, const char *attr,
+                               const char *default_value)
+{
+       return ldb_msg_find_attr_as_string(msg, attr, default_value);
+}
+
+/*
+  pull a uint from a result set.
+*/
+uint_t                 storedb_result_uint(struct ldb_message *msg, const char *attr, uint_t default_value)
+{
+       return ldb_msg_find_attr_as_uint(msg, attr, default_value);
+}
diff --git a/libmapi/tag_to_ad_name.c b/libmapi/tag_to_ad_name.c
new file mode 100644 (file)
index 0000000..7cdceee
--- /dev/null
@@ -0,0 +1,145 @@
+/* Auto-generated by ./libmapi/conf/mparse.pl */
+
+
+#include "openchange.h"
+#include "libmapi/include/mapidefs.h"
+#include "mapitags.h"
+
+
+const char     *tag_to_x500[256][256][30] = {
+       {
+               {0, 0, 0, "test1", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+               {0, 0, 0, 0, 0, 0, 0, 0, 0, "test2", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+               {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "test3", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+               {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "test4", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+               {0, 0, 0, 0, 0, 0, 0, 0, 0, "test5", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+               {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "test6", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+               {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "test7", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+       },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       { {0} },
+       {
+               {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "test42", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+       },
+       { {0} }
+};
+
+uint16_t       tab_index[256] = {
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 7, 8, 9, 10, 11, 12, 13, 14, 0, 0, 15, 16, 17, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 21, 22, 23, 24, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 27, 0, 28, 29, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34
+};
+
+uint16_t get_type_index(uint16_t type)
+{
+       switch (type) {
+       case PT_UNSPECIFIED :
+       case PT_NULL :
+       case PT_SHORT :
+       case PT_LONG :
+       case PT_FLOAT :
+       case PT_DOUBLE :
+       case PT_CURRENCY :
+       case PT_APPTIME :
+               return type;
+       case PT_ERROR :
+               return 8;
+       case PT_BOOLEAN :
+               return 9;
+       case PT_OBJECT :
+               return 10;
+       case PT_I8 :
+               return 11;
+       case PT_STRING8 :
+               return 12;
+       case PT_UNICODE :
+               return 13;
+       case PT_SYSTIME :
+               return 14;
+       case PT_CLSID :
+               return 15;
+       case PT_BINARY :
+               return 16;
+       case PT_MV_SHORT :
+               return 18;
+       case PT_MV_LONG :
+               return 19;
+       case PT_MV_FLOAT :
+               return 20;
+       case PT_MV_DOUBLE :
+               return 21;
+       case PT_MV_CURRENCY :
+               return 22;
+       case PT_MV_APPTIME :
+               return 23;
+       case PT_MV_I8 :
+               return 24;
+       case PT_MV_STRING8 :
+               return 25;
+       case PT_MV_UNICODE :
+               return 26;
+       case PT_MV_SYSTIME :
+               return 27;
+       case PT_MV_CLSID :
+               return 28;
+       case PT_MV_BINARY :
+               return 29;
+       default :
+               break;
+       }
+
+       return 0xFF;
+}
+
+uint8_t get_line_index(uint8_t line)
+{
+       return tab_index[line];
+}
+
+const char *get_ad_name(uint32_t mapitag)
+{
+       uint8_t         line;
+       uint8_t         col;
+       uint16_t        type;
+       uint16_t        i;
+
+       line = (mapitag >> 24) & 0xFF;
+       col = (mapitag >> 16) & 0xFF;
+       type = mapitag & 0xFFFF;
+
+       if ((i = get_type_index(type)) != 0xFF) {
+               line = get_line_index(line);
+               return tag_to_x500[line][col][i];
+       }
+
+       return NULL;
+}
+
diff --git a/libmapi/tests/locale.c b/libmapi/tests/locale.c
new file mode 100644 (file)
index 0000000..2f78a6a
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ *  OpenChange MAPI implementation.
+ *  Codepages handled by Microsoft Windows Exchange
+ *
+ *  Copyright (C) Julien Kerihuel 2005.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <talloc.h>
+#include <popt.h>
+#include <util.h>
+
+/* command line options */
+static struct {
+       BOOL locale_id;
+       BOOL language_group;
+       BOOL group;
+} options;
+
+/*
+  print locales information given a locale_id
+*/
+
+static void process_one(const char *name)
+{
+       uint32_t value = 0;
+
+       if (options.group) {
+               printf("Language groups:\n");
+               print_group();
+       }
+
+       else if (options.locale_id) {
+               value = (uint32_t)strtol(name, NULL, 16);
+               if (print_locale(value) == False) {
+                       DEBUG(0, ("Unknown locale id in the locale database (%s)\n", name));
+               }
+                       
+       }
+       else if (options.language_group) {
+               if ((value = strtol(name, NULL, 10)) == 0) {
+                       if ((value = lang2nb(name)) == -1) {
+                               DEBUG(0, ("Invalid language group provided (%s)\n", name));
+                               exit (1);
+                       }
+               }
+               DEBUG(3, ("value = %d\n", value));
+               print_groupmember(value);
+       }
+}
+
+int main(int argc, const char *argv[])
+{
+       poptContext pc;
+       struct poptOption long_options[] = {
+               POPT_AUTOHELP
+               { "locale_id", 'L', POPT_ARG_VAL, &options.locale_id, 
+                 'L', "Display locale information for a given locale id", "LOCALE ID" },
+
+               { "language_group", 'G', POPT_ARG_VAL, &options.language_group,
+                 'G', "Display all languages for the specified language group", "LANGUAGE_GROUP" },
+
+               {"list_groups", 'l', POPT_ARG_NONE, &options.group,
+                True, "List existing language groups"},
+
+               { 0, 0, 0, 0 }
+       };
+       
+       pc = poptGetContext("locale", argc, (const char **)argv, long_options,
+                           POPT_CONTEXT_KEEP_FIRST);
+
+       while ((poptGetNextOpt(pc) != -1)) /* noop */;
+
+       /* swallow argv[0] */
+       poptGetArg(pc);
+
+       if (!poptPeekArg(pc)) {
+               poptPrintUsage(pc, stderr, 0);
+               exit (1);
+       }
+
+       while (poptPeekArg(pc)) {
+               const char *name = poptGetArg(pc);
+
+               process_one(name);
+       }
+
+       poptFreeContext(pc);
+
+       return 0;
+}
diff --git a/libmapi/tests/locale_codepage.c b/libmapi/tests/locale_codepage.c
new file mode 100644 (file)
index 0000000..93948ce
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+ *  OpenChange MAPI implementation.
+ *  Codepages handled by Microsoft Windows Exchange
+ *
+ *  Copyright (C) Julien Kerihuel 2005.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "openchange.h"
+#include "exchange.h"
+#include "libmapi/include/proto.h"
+
+/* command line options */
+static struct {
+       uint32_t         locale_id;
+       char            *language_group;
+       BOOL            group;
+       uint32_t        codepage;
+       char            *language_info;
+} options;
+
+/*
+  print locales information given a locale_id
+*/
+
+static void process_one(const char *name)
+{
+       if (options.group) {
+               printf("Language groups:\n");
+               print_group();
+       }
+
+       if (options.locale_id) {
+               if (print_locale(options.locale_id) == False) {
+                       DEBUG(0, ("Unknown locale id in the locale database (%s)\n", name));
+               }
+                       
+       }
+       if (options.language_group) {
+               if (print_groupmember(lang2nb(options.language_group)) == False) {
+                       DEBUG(0, ("(%s)\n", name));
+                       exit (1);
+               }
+       }
+
+       if (options.codepage) {
+               if (print_codepage_infos(options.codepage) == False) {
+                       DEBUG(0, ("Invalid codepage (%s)\n", name));
+                       exit (1);
+               }
+       }
+       if (options.language_info) {
+               printf("######### BEGIN: (copy and paste into smb.conf) #########\n");
+               if (get_locales(options.language_info) == False) {
+                       DEBUG(0, ("Invalid language (%s)\n", name));
+                       exit (1);
+               }
+               printf("######### END:   (copy and paste into smb.conf) #########\n");
+       }
+}
+
+int main(int argc, const char *argv[])
+{
+       poptContext pc;
+       int opt;
+       enum{OPT_LOCALID=1,OPT_LANGROUPS,OPT_GROUPS,OPT_CP,OPT_LANGINFO};
+       struct poptOption popt_options[] = {
+               POPT_AUTOHELP
+               { "locale_id",          'L', POPT_ARG_STRING,   &options.locale_id,     OPT_LOCALID,    "Display locale information for a given locale id", "LOCALE ID" },
+               { "language_group",     'G', POPT_ARG_STRING,   &options.language_group,OPT_LANGROUPS,  "Display all languages for the specified language group", "LANGUAGE_GROUP" },
+               {"list_groups",         'l', POPT_ARG_NONE,     &options.group,         OPT_GROUPS,     "List existing language groups"},
+               {"codepage",            'c', POPT_ARG_INT,      &options.codepage,      OPT_CP,         "Check if CODEPAGE exists and display related information\n", "CODEPAGE"},
+               {"language_info",       'i', POPT_ARG_STRING,   &options.language_info, OPT_LANGINFO,   "Copy and Paste information into your smb.conf file\n", "LANGUAGE"},
+               POPT_TABLEEND
+       };
+       
+       pc = poptGetContext(argv[0], argc, argv, popt_options,
+                           POPT_CONTEXT_KEEP_FIRST);
+
+       while ((opt = poptGetNextOpt(pc)) != -1) {
+               switch (opt) {
+               case OPT_GROUPS:
+                       process_one(NULL);
+                       break;
+               case OPT_LOCALID:
+               case OPT_LANGROUPS:
+               case OPT_CP:
+               case OPT_LANGINFO:
+                       process_one(poptGetOptArg(pc));
+                       break;
+               }
+       }
+               
+       return 0;
+}
diff --git a/libmapi/tests/store.c b/libmapi/tests/store.c
new file mode 100644 (file)
index 0000000..25ca4d5
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ *  OpenChange MAPI implementation.
+ *  Access the OpenChange Store database
+ *
+ *  Copyright (C) Julien Kerihuel 2005.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "openchange.h"
+#include "ndr_exchange.h"
+#include "libmapi/IMAPISession.h"
+#include "libmapi/include/mapi_proto.h"
+
+
+#define        OP_HELP                 0x0
+#define        OP_GETHIERARCHYINFO     0x1
+
+/* command line options */
+static struct {
+       uint32_t        operation;
+} options;
+
+static void op_help(void)
+{
+       printf("%-15s %s\n", "0x0", "This Help message");
+       printf("%-15s %s\n", "0x1", "GetHierarchyInfo");
+}
+
+static void op_getHierarchyInfo(void)
+{
+       TALLOC_CTX              *mem_ctx;
+       struct SRowSet          *RowSet;
+       struct ndr_print        *ndr;
+
+       mem_ctx = talloc_init("GetHierarchyTableDump");
+       lp_set_cmdline("exchange:store", "/usr/local/samba/private/store.ldb");
+       lp_set_cmdline("exchange:dbtype", "tdb");
+
+       GetHierarchyTable(0, &RowSet);
+
+       ndr = talloc_zero(mem_ctx, struct ndr_print);
+       ndr->depth = 1;
+       ndr->print = ndr_print_debug_helper;
+       ndr_print_SRowSet(ndr, "GetHierarchyInfo", RowSet);
+       talloc_free(mem_ctx);
+}
+
+static void process_one(const char *name)
+{
+       if (options.operation) {
+               switch(options.operation) {
+               case OP_HELP:
+                       (void)op_help();
+                       break;
+               case OP_GETHIERARCHYINFO:
+                       op_getHierarchyInfo();
+                       break;
+               }
+       }
+}
+
+int main(int argc, char *argv[])
+{
+       poptContext pc;
+       int opt;
+       enum{OPT_OPERATION=1};
+       struct poptOption popt_options[] = {
+               POPT_AUTOHELP
+               {"operation",   'o', POPT_ARG_INT, &options.operation, OPT_OPERATION, "Execute a single operation on the store database", "OPERATION"},
+               POPT_TABLEEND
+       };
+       
+       pc = poptGetContext(argv[0], argc, (const char **)argv, popt_options,
+                           POPT_CONTEXT_KEEP_FIRST);
+
+       while ((opt = poptGetNextOpt(pc)) != -1) {
+               switch (opt) {
+               case OPT_OPERATION:
+                       process_one(poptGetOptArg(pc));
+                       break;
+               }
+       }
+       
+       return (0);
+}
diff --git a/libmapi/util/codepage.c b/libmapi/util/codepage.c
new file mode 100644 (file)
index 0000000..c42b3c5
--- /dev/null
@@ -0,0 +1,229 @@
+/*
+ *  OpenChange MAPI implementation.
+ *  Codepages handled by Microsoft Windows Exchange
+ *
+ *  Copyright (C) Julien Kerihuel 2005.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "openchange.h"
+#include <core.h>
+
+#define        CP_VAL  "codepage"
+#define        CP_NAME "codepage name"
+#define        CP_DESC "codepage description"
+
+struct codepages
+{
+       const char     *cp_name;
+       uint32_t        cpid;
+       const char     *cp_desc;
+};
+
+static struct codepages codepages[] = 
+{
+       { "cpANSI", 0x0, "ANSI code page" },
+       { "cpOEM", 0x1, "OEM code page" },
+       { "cpMAC", 0x2, "Macintosh code page." },
+       { "cpebcdiccpus", 0x25, "IBM EBCDIC - U.S./Canada, IBM EBCDIC (US-Canada), Charset Label:ebcdic-cp-us" },
+       { "cpIBM437", 0x1B5, "OEM - United States, OEM United States, Charset Label:IBM437, Aliases:437, cp437, csPC8, CodePage437" },
+       { "cpIBMEBCDICInternational", 0x1F4, "IBM EBCDIC - International" },
+       { "cpASMO708", 0x2C4, "Arabic - ASMO 708, Arabic (ASMO 708), Charset Label:ASMO-708" },
+       { "cpArabicASMO449BCONV4", 0x2C5, "Arabic - ASMO 449+, BCON V4" },
+       { "cpArabicTransparentArabic", 0x2C6, "Arabic - Transparent Arabic" },
+       { "cpDOS720", 0x2D0, "Arabic - Transparent ASMO, Arabic (DOS), Charset Label:DOS-720" },
+       { "cpibm737", 0x2E1, "OEM - Greek (formerly 437G), Greek (DOS), Charset Label:ibm737" },
+       { "cpibm775", 0x307, "OEM - Baltic, Baltic (DOS), Charset Label:ibm775, Aliases:CP500" },
+       { "cpibm850", 0x352, "OEM - Multilingual Latin I, Western European (DOS), Charset Label:ibm850" },
+       { "cpibm852", 0x354, "OEM - Latin II, Central European (DOS), Charset Label:ibm852, Aliases:cp852" },
+       { "cpOEMCyrillicprimarilyRussian", 0x357, "OEM - Cyrillic (primarily Russian)" },
+       { "cpibm857", 0x359, "OEM - Turkish, Turkish (DOS), Charset Label:ibm857" },
+       { "cpOEMMultlingualLatinIEurosymbol", 0x35A, "OEM - Multlingual Latin I + Euro symbol" },
+       { "cpOEMPortuguese", 0x35C, "OEM - Portuguese" },
+       { "cpibm861", 0x35D, "OEM - Icelandic, Icelandic (DOS), Charset Label:ibm861" },
+       { "cpDOS862", 0x35E, "OEM - Hebrew, Hebrew (DOS), Charset Label:DOS-862" },
+       { "cpOEMCanadianFrench", 0x35F, "OEM - Canadian-French, " },
+       { "cpOEMArabic", 0x360, "OEM - Arabic, " },
+       { "cpOEMNordic", 0x361, "OEM - Nordic, " },
+       { "cpcp866", 0x362, "OEM - Russian, Cyrillic (DOS), Charset Label:cp866, Aliases:ibm866" },
+       { "cpibm869", 0x365, "OEM - Modern Greek, Greek, Modern (DOS), Charset Label:ibm869" },
+       { "cpCP870", 0x366, "IBM EBCDIC - Multilingual/ROECE (Latin-2), IBM EBCDIC (Multilingual Latin-2), Charset Label:CP870" },
+       { "cpwindows874", 0x36A, "ANSI/OEM - Thai (same as 28605, ISO 8859-15), Thai (Windows), Charset Label:windows-874, Aliases:DOS-874, iso-8859-11, TIS-620" },
+       { "cpxEBCDICGreekModern", 0x36B, "IBM EBCDIC - Modern Greek, IBM EBCDIC (Greek Modern), Charset Label:x-EBCDIC-GreekModern" },
+       { "cpshiftjis", 0x3A4, "ANSI/OEM - Japanese, Shift-JIS, Japanese (Shift-JIS), Charset Label:shift_jis, Aliases:csShiftJIS, csWindows31J, ms_Kanji, shift-jis, x-ms-cp932, x-sjis" },
+       { "cpgb2312", 0x3A8, "ANSI/OEM - Simplified Chinese (PRC, Singapore), Chinese Simplified (GB2312), Charset Label:gb2312, Aliases:chinese, CN-GB, csGB2312, csGB231280, csISO58GB231280, GB_2312-80, GB231280, GB2312-80, GBK, iso-ir-58" },
+       { "cpksc56011987", 0x3B5, "ANSI/OEM - Korean (Unified Hangeul Code), Korean, Charset Label:ks_c_5601-1987, Aliases:csKSC56011987, euc-kr, iso-ir-149, korean, ks_c_5601, ks_c_5601_1987, ks_c_5601-1989, KSC_5601, KSC5601" },
+       { "cpbig5", 0x3B6, "ANSI/OEM - Traditional Chinese (Taiwan; Hong Kong SAR, PRC), Chinese Traditional (Big5), Charset Label:big5, Aliases:cn-big5, csbig5, x-x-big5" },
+       { "cpCP1026", 0x402, "IBM EBCDIC - Turkish (Latin-5), IBM EBCDIC (Turkish Latin-5), Charset Label:CP1026" },
+       { "cpIBMEBCDICLatin1OpenSystem", 0x417, "IBM EBCDIC - Latin 1/Open System, " },
+       { "cpxebcdiccpuseuro", 0x474, "IBM EBCDIC - U.S./Canada (037 + Euro symbol), IBM EBCDIC (US-Canada-Euro), Charset Label:x-ebcdic-cp-us-euro" },
+       { "cpxebcdicgermanyeuro", 0x475, "IBM EBCDIC - Germany (20273 + Euro symbol), IBM EBCDIC (Germany-Euro), Charset Label:x-ebcdic-germany-euro" },
+       { "cpxebcdicdenmarknorwayeuro", 0x476, "IBM EBCDIC - Denmark/Norway (20277 + Euro symbol), IBM EBCDIC (Denmark-Norway-Euro), Charset Label:x-ebcdic-denmarknorway-euro" },
+       { "cpxebcdicfinlandswedeneuro", 0x477, "IBM EBCDIC - Finland/Sweden (20278 + Euro symbol), IBM EBCDIC (Finland-Sweden-Euro), Charset Label:x-ebcdic-finlandsweden-euro, Aliases:X-EBCDIC-France" },
+       { "cpxebcdicitalyeuro", 0x478, "IBM EBCDIC - Italy (20280 + Euro symbol), IBM EBCDIC (Italy-Euro), Charset Label:x-ebcdic-italy-euro" },
+       { "cpxebcdicspaineuro", 0x479, "IBM EBCDIC - Latin America/Spain (20284 + Euro symbol), IBM EBCDIC (Spain-Euro), Charset Label:x-ebcdic-spain-euro" },
+       { "cpxebcdicukeuro", 0x47A, "IBM EBCDIC - United Kingdom (20285 + Euro symbol), IBM EBCDIC (UK-Euro), Charset Label:x-ebcdic-uk-euro" },
+       { "cpxebcdicfranceeuro", 0x47B, "IBM EBCDIC - France (20297 + Euro symbol), IBM EBCDIC (France-Euro), Charset Label:x-ebcdic-france-euro" },
+       { "cpxebcdicinternationaleuro", 0x47C, "IBM EBCDIC - International (500 + Euro symbol), IBM EBCDIC (International-Euro), Charset Label:x-ebcdic-international-euro" },
+       { "cpxebcdicicelandiceuro", 0x47D, "IBM EBCDIC - Icelandic (20871 + Euro symbol), IBM EBCDIC (Icelandic-Euro), Charset Label:x-ebcdic-icelandic-euro" },
+       { "cpunicode", 0x4B0, "Unicode UCS-2 Little-Endian (BMP of ISO 10646), Unicode, Charset Label:unicode, Aliases:utf-16" },
+       { "cpunicodeFFFE", 0x4B1, "Unicode UCS-2 Big-Endian, Unicode (Big-Endian), Charset Label:unicodeFFFE" },
+       { "cpwindows1250", 0x4E2, "ANSI - Central European, Central European (Windows), Charset Label:windows-1250, Aliases:x-cp1250" },
+       { "cpwindows1251", 0x4E3, "ANSI - Cyrillic, Cyrillic (Windows), Charset Label:windows-1251, Aliases:x-cp1251" },
+       { "cpWindows1252", 0x4E4, "ANSI - Latin I, Western European (Windows), Charset Label:Windows-1252, Aliases:ANSI_X3.4-1968, ANSI_X3.4-1986, ascii, cp367, cp819, csASCII, IBM367, ibm819, ISO_646.irv:1991, iso_8859-1, iso_8859-1:1987, ISO646-US, iso8859-1, iso-8859-1, iso-ir-100, i..." },
+       { "cpwindows1253", 0x4E5, "ANSI - Greek, Greek (Windows), Charset Label:windows-1253" },
+       { "cpwindows1254", 0x4E6, "ANSI - Turkish, Turkish (Windows), Charset Label:windows-1254, Aliases:ISO_8859-9, ISO_8859-9:1989, iso-8859-9, iso-ir-148, latin5" },
+       { "cpwindows1255", 0x4E7, "ANSI - Hebrew, Hebrew (Windows), Charset Label:windows-1255, Aliases:ISO_8859-8-I, ISO-8859-8, visual" },
+       { "cpwindows1256", 0x4E8, "ANSI - Arabic, Arabic (Windows), Charset Label:windows-1256, Aliases:cp1256" },
+       { "cpwindows1257", 0x4E9, "ANSI - Baltic, Baltic (Windows), Charset Label:windows-1257" },
+       { "cpwindows1258", 0x4EA, "ANSI/OEM - Vietnamese, Vietnamese (Windows), Charset Label:windows-1258" },
+       { "cpJohab", 0x551, "Korean (Johab), Korean (Johab), Charset Label:Johab" },
+       { "cpmacintosh", 0x2710, "MAC - Roman, Western European (Mac), Charset Label:macintosh" },
+       { "cpxmacjapanese", 0x2711, "MAC - Japanese, Japanese (Mac), Charset Label:x-mac-japanese" },
+       { "cpxmacchinesetrad", 0x2712, "MAC - Traditional Chinese (Big5), Chinese Traditional (Mac), Charset Label:x-mac-chinesetrad" },
+       { "cpxmackorean", 0x2713, "MAC - Korean, Korean (Mac), Charset Label:x-mac-korean" },
+       { "cpxmacarabic", 0x2714, "MAC - Arabic, Arabic (Mac), Charset Label:x-mac-arabic" },
+       { "cpxmachebrew", 0x2715, "MAC - Hebrew, Hebrew (Mac), Charset Label:x-mac-hebrew" },
+       { "cpxmacgreek", 0x2716, "MAC - Greek I, Greek (Mac), Charset Label:x-mac-greek" },
+       { "cpxmaccyrillic", 0x2717, "MAC - Cyrillic, Cyrillic (Mac), Charset Label:x-mac-cyrillic" },
+       { "cpxmacchinesesimp", 0x2718, "MAC - Simplified Chinese (GB 2312), Chinese Simplified (Mac), Charset Label:x-mac-chinesesimp" },
+       { "cpMACRomania", 0x271A, "MAC - Romania, " },
+       { "cpMACUkraine", 0x2721, "MAC - Ukraine, " },
+       { "cpMACThai", 0x2725, "MAC - Thai, " },
+       { "cpxmacce", 0x272D, "MAC - Latin II, Central European (Mac), Charset Label:x-mac-ce" },
+       { "cpxmacicelandic", 0x275F, "MAC - Icelandic, Icelandic (Mac), Charset Label:x-mac-icelandic" },
+       { "cpxmacturkish", 0x2761, "MAC - Turkish, Turkish (Mac), Charset Label:x-mac-turkish" },
+       { "cpMACCroatia", 0x2762, "MAC - Croatia, " },
+       { "cpUnicodeUCS4LittleEndian", 0x2EE0, "Unicode UCS-4 Little-Endian, " },
+       { "cpUnicodeUCS4BigEndian", 0x2EE1, "Unicode UCS-4 Big-Endian, " },
+       { "cpxChineseCNS", 0x4E20, "CNS - Taiwan, Chinese Traditional (CNS), Charset Label:x-Chinese-CNS" },
+       { "cpTCATaiwan", 0x4E21, "TCA - Taiwan, " },
+       { "cpxChineseEten", 0x4E22, "Eten - Taiwan, Chinese Traditional (Eten), Charset Label:x-Chinese-Eten" },
+       { "cpIBM5550Taiwan", 0x4E23, "IBM5550 - Taiwan, " },
+       { "cpTeleTextTaiwan", 0x4E24, "TeleText - Taiwan, " },
+       { "cpWangTaiwan", 0x4E25, "Wang - Taiwan, " },
+       { "cpxIA5", 0x4E89, "IA5 IRV International Alphabet No. 5 (7-bit), Western European (IA5), Charset Label:x-IA5" },
+       { "cpxIA5German", 0x4E8A, "IA5 German (7-bit), German (IA5), Charset Label:x-IA5-German" },
+       { "cpxIA5Swedish", 0x4E8B, "IA5 Swedish (7-bit), Swedish (IA5), Charset Label:x-IA5-Swedish" },
+       { "cpxIA5Norwegian", 0x4E8C, "IA5 Norwegian (7-bit), Norwegian (IA5), Charset Label:x-IA5-Norwegian" },
+       { "cpusascii", 0x4E9F, "US-ASCII (7-bit), US-ASCII, Charset Label:us-ascii, Aliases:ANSI_X3.4-1968, ANSI_X3.4-1986, ascii, cp367, csASCII, IBM367, ISO_646.irv:1991, ISO646-US, iso-ir-6us" },
+       { "cpT61", 0x4F25, "T.61, " },
+       { "cpISO6937NonSpacingAccent", 0x4F2D, "ISO 6937 Non-Spacing Accent, " },
+       { "cpxEBCDICGermany", 0x4F31, "IBM EBCDIC - Germany, IBM EBCDIC (Germany), Charset Label:x-EBCDIC-Germany" },
+       { "cpxEBCDICDenmarkNorway", 0x4F35, "IBM EBCDIC - Denmark/Norway, IBM EBCDIC (Denmark-Norway), Charset Label:x-EBCDIC-DenmarkNorway" },
+       { "cpxEBCDICFinlandSweden", 0x4F36, "IBM EBCDIC - Finland/Sweden, IBM EBCDIC (Finland-Sweden), Charset Label:x-EBCDIC-FinlandSweden" },
+       { "cpxEBCDICItaly", 0x4F38, "IBM EBCDIC - Italy, IBM EBCDIC (Italy), Charset Label:x-EBCDIC-Italy" },
+       { "cpXEBCDICSpain", 0x4F3C, "IBM EBCDIC - Latin America/Spain, IBM EBCDIC (Spain), Charset Label:X-EBCDIC-Spain" },
+       { "cpxEBCDICUK", 0x4F3D, "IBM EBCDIC - United Kingdom, IBM EBCDIC (UK), Charset Label:x-EBCDIC-UK" },
+       { "cpxEBCDICJapaneseKatakana", 0x4F42, "IBM EBCDIC - Japanese Katakana Extended, IBM EBCDIC (Japanese katakana), Charset Label:x-EBCDIC-JapaneseKatakana" },
+       { "cpIBMEBCDICFrance", 0x4F49, "IBM EBCDIC - France, " },
+       { "cpxEBCDICArabic", 0x4FC4, "IBM EBCDIC - Arabic, IBM EBCDIC (Arabic), Charset Label:x-EBCDIC-Arabic" },
+       { "cpxEBCDICGreek", 0x4FC7, "IBM EBCDIC - Greek, IBM EBCDIC (Greek), Charset Label:x-EBCDIC-Greek" },
+       { "cpxEBCDICHebrew", 0x4FC8, "IBM EBCDIC - Hebrew, IBM EBCDIC (Hebrew), Charset Label:x-EBCDIC-Hebrew" },
+       { "cpxEBCDICKoreanExtended", 0x5161, "IBM EBCDIC - Korean Extended, IBM EBCDIC (Korean Extended), Charset Label:x-EBCDIC-KoreanExtended" },
+       { "cpxEBCDICThai", 0x5166, "IBM EBCDIC - Thai, IBM EBCDIC (Thai), Charset Label:x-EBCDIC-Thai" },
+       { "cpkoi8r", 0x5182, "Russian - KOI8-R, Cyrillic (KOI8-R), Charset Label:koi8-r, Aliases:csKOI8R, koi, koi8, koi8r" },
+       { "cpxEBCDICIcelandic", 0x5187, "IBM EBCDIC - Icelandic, IBM EBCDIC (Icelandic), Charset Label:x-EBCDIC-Icelandic" },
+       { "cpxEBCDICCyrillicRussian", 0x5190, "IBM EBCDIC - Cyrillic (Russian), IBM EBCDIC (Cyrillic Russian), Charset Label:x-EBCDIC-CyrillicRussian" },
+       { "cpxEBCDICTurkish", 0x51A9, "IBM EBCDIC - Turkish, IBM EBCDIC (Turkish), Charset Label:x-EBCDIC-Turkish" },
+       { "cpIBMEBCDICLatin1OpenSystem1047Eurosymbol", 0x51BC, "IBM EBCDIC - Latin-1/Open System (1047 + Euro symbol), " },
+       { "cpJISX0208199001211990", 0x51C4, "JIS X 0208-1990 & 0121-1990, " },
+       { "cpSimplifiedChineseGB2312", 0x51C8, "Simplified Chinese (GB2312), " },
+       { "cpxEBCDICCyrillicSerbianBulgarian", 0x5221, "IBM EBCDIC - Cyrillic (Serbian, Bulgarian), IBM EBCDIC (Cyrillic Serbian-Bulgarian), Charset Label:x-EBCDIC-CyrillicSerbianBulgarian" },
+       { "cpExtendedAlphaLowercase", 0x5223, "Extended Alpha Lowercase, " },
+       { "cpkoi8u", 0x556A, "Ukrainian (KOI8-U), Cyrillic (KOI8-U), Charset Label:koi8-u, Aliases:koi8-ru" },
+       { "cpiso88591", 0x6FAF, "ISO 8859-1 Latin I, Western European (ISO), Charset Label:iso-8859-1, Aliases:cp819, csISO, Latin1, ibm819, iso_8859-1, iso_8859-1:1987, iso8859-1, iso-ir-100, l1, latin1" },
+       { "cpiso88592", 0x6FB0, "ISO 8859-2 Central Europe, Central European (ISO), Charset Label:iso-8859-2, Aliases:csISOLatin2, iso_8859-2, iso_8859-2:1987, iso8859-2, iso-ir-101, l2, latin2" },
+       { "cpiso88593", 0x6FB1, "ISO 8859-3 Latin 3, Latin 3 (ISO), Charset Label:iso-8859-3, Aliases:csISO, Latin3, ISO_8859-3, ISO_8859-3:1988, iso-ir-109, l3, latin3" },
+       { "cpiso88594", 0x6FB2, "ISO 8859-4 Baltic, Baltic (ISO), Charset Label:iso-8859-4, Aliases:csISOLatin4, ISO_8859-4, ISO_8859-4:1988, iso-ir-110, l4, latin4" },
+       { "cpiso88595", 0x6FB3, "ISO 8859-5 Cyrillic, Cyrillic (ISO), Charset Label:iso-8859-5, Aliases:csISOLatin5, csISOLatinCyrillic, cyrillic, ISO_8859-5, ISO_8859-5:1988, iso-ir-144, l5" },
+       { "cpiso88596", 0x6FB4, "ISO 8859-6 Arabic, Arabic (ISO), Charset Label:iso-8859-6, Aliases:arabic, csISOLatinArabic, ECMA-114, ISO_8859-6, ISO_8859-6:1987, iso-ir-127" },
+       { "cpiso88597", 0x6FB5, "ISO 8859-7 Greek, Greek (ISO), Charset Label:iso-8859-7, Aliases:csISOLatinGreek, ECMA-118, ELOT_928, greek, greek8, ISO_8859-7, ISO_8859-7:1987, iso-ir-126" },
+       { "cpiso88598", 0x6FB6, "ISO 8859-8 Hebrew, Hebrew (ISO-Visual), Charset Label:iso-8859-8, Aliases:csISOLatinHebrew, hebrew, ISO_8859-8, ISO_8859-8:1988, ISO-8859-8, iso-ir-138, visual" },
+       { "cpiso88599", 0x6FB7, "ISO 8859-9 Latin 5, Turkish (ISO), Charset Label:iso-8859-9, Aliases:csISO, Latin5, ISO_8859-9, ISO_8859-9:1989, iso-ir-148, l5, latin5" },
+       { "cpiso885915", 0x6FBD, "ISO 8859-15 Latin 9, Latin 9 (ISO), Charset Label:iso-8859-15, Aliases:csISO, Latin9, ISO_8859-15, l9, latin9" },
+       { "cpxEuropa", 0x7149, "Europa 3, Europa, Charset Label:x-Europa" },
+       { "cpiso88598i", 0x96C6, "ISO 8859-8 Hebrew, Hebrew (ISO-Logical), Charset Label:iso-8859-8-i, Aliases:logical" },
+       { "cpiso2022jp", 0xC42C, "ISO 2022 Japanese with no halfwidth Katakana, Japanese (JIS), Charset Label:iso-2022-jp" },
+       { "cpcsISO2022JP", 0xC42D, "ISO 2022 Japanese with halfwidth Katakana, Japanese (JIS-Allow 1 byte Kana), Charset Label:csISO2022JP, Aliases:_iso-2022-jp" },
+       { "cpiso2022jp1", 0xC42E, "ISO 2022 Japanese JIS X 0201-1989, Japanese (JIS-Allow 1 byte Kana - SO/SI), Charset Label:iso-2022-jp-1, Aliases:_iso-2022-jp$SIO" },
+       { "cpiso2022kr", 0xC431, "ISO 2022 Korean, Korean (ISO), Charset Label:iso-2022-kr, Aliases:csISO2022KR" },
+       { "cpISO2022SimplifiedChinese", 0xC433, "ISO 2022 Simplified Chinese, " },
+       { "cpISO2022TraditionalChinese", 0xC435, "ISO 2022 Traditional Chinese, " },
+       { "cpxEBCDICJapaneseAndKana", 0xC6F2, "Japanese (Katakana) Extended, IBM EBCDIC (Japanese and Japanese Katakana), Charset Label:x-EBCDIC-JapaneseAndKana" },
+       { "cpxEBCDICJapaneseAndUSCanada", 0xC6F3, "US/Canada and Japanese, IBM EBCDIC (Japanese and US-Canada), Charset Label:x-EBCDIC-JapaneseAndUSCanada" },
+       { "cpxEBCDICKoreanAndKoreanExtended", 0xC6F5, "Korean Extended and Korean, IBM EBCDIC (Korean and Korean Extended), Charset Label:x-EBCDIC-KoreanAndKoreanExtended" },
+       { "cpxEBCDICSimplifiedChinese", 0xC6F7, "Simplified Chinese Extended and Simplified Chinese, IBM EBCDIC (Simplified Chinese), Charset Label:x-EBCDIC-SimplifiedChinese" },
+       { "cpSimplifiedChinese", 0xC6F8, "Simplified Chinese, " },
+       { "cpxEBCDICTraditionalChinese", 0xC6F9, "US/Canada and Traditional Chinese, IBM EBCDIC (Traditional Chinese), Charset Label:x-EBCDIC-TraditionalChinese" },
+       { "cpxEBCDICJapaneseAndJapaneseLatin", 0xC6FB, "Japanese (Latin) Extended and Japanese, IBM EBCDIC (Japanese and Japanese-Latin), Charset Label:x-EBCDIC-JapaneseAndJapaneseLatin" },
+       { "cpeucjp", 0xCADC, "EUC - Japanese, Japanese (EUC), Charset Label:euc-jp, Aliases:csEUCPkdFmtJapanese, Extended_UNIX_Code_Packed_Format_for_Japanese, x-euc, x-euc-jp" },
+       { "cpEUCCN", 0xCAE0, "EUC - Simplified Chinese, Chinese Simplified (EUC), Charset Label:EUC-CN, Aliases:x-euc-cn" },
+       { "cpeuckr", 0xCAED, "EUC - Korean, Korean (EUC), Charset Label:euc-kr, Aliases:csEUCKR" },
+       { "cpEUCTraditionalChinese", 0xCAEE, "EUC - Traditional Chinese, " },
+       { "cphzgb2312", 0xCEC8, "HZ-GB2312 Simplified Chinese, Chinese Simplified (HZ), Charset Label:hz-gb-2312" },
+       { "cpWindowsXPGB18030SimplifiedChinese4Byte", 0xD698, "Windows XP: GB18030 Simplified Chinese (4 Byte), " },
+       { "cpxisciide", 0xDEAA, "ISCII Devanagari, ISCII Devanagari, Charset Label:x-iscii-de" },
+       { "cpxisciibe", 0xDEAB, "ISCII Bengali, ISCII Bengali, Charset Label:x-iscii-be" },
+       { "cpxisciita", 0xDEAC, "ISCII Tamil, ISCII Tamil, Charset Label:x-iscii-ta" },
+       { "cpxisciite", 0xDEAD, "ISCII Telugu, ISCII Telugu, Charset Label:x-iscii-te" },
+       { "cpxisciias", 0xDEAE, "ISCII Assamese, ISCII Assamese, Charset Label:x-iscii-as" },
+       { "cpxisciior", 0xDEAF, "ISCII Oriya, ISCII Oriya, Charset Label:x-iscii-or" },
+       { "cpxisciika", 0xDEB0, "ISCII Kannada, ISCII Kannada, Charset Label:x-iscii-ka" },
+       { "cpxisciima", 0xDEB1, "ISCII Malayalam, ISCII Malayalam, Charset Label:x-iscii-ma" },
+       { "cpxisciigu", 0xDEB2, "ISCII Gujarati, ISCII Gujarathi, Charset Label:x-iscii-gu" },
+       { "cpxisciipa", 0xDEB3, "ISCII Punjabi, ISCII Panjabi, Charset Label:x-iscii-pa" },
+       { "cputf7", 0xFDE8, "Unicode UTF-7, Unicode (UTF-7), Charset Label:utf-7, Aliases:csUnicode11UTF7, unicode-1-1-utf-7, x-unicode-2-0-utf-7" },
+       { "cputf8", 0xFDE9, "Unicode UTF-8, Unicode (UTF-8), Charset Label:utf-8, Aliases:unicode-1-1-utf-8, unicode-2-0-utf-8, x-unicode-2-0-utf-8" },
+       {NULL, 0, NULL}
+};
+
+/*
+ Check for a valid codepage
+*/
+
+BOOL valid_codepage(uint32_t cpid)
+{
+       uint32_t idx = 0;
+
+       while (codepages[idx].cp_name) {
+               if (codepages[idx].cpid == cpid) {
+                       return True;
+               }
+               idx++;
+       }
+       return False;
+}
+
+BOOL print_codepage_infos(uint32_t cpid)
+{
+       uint32_t idx = 0;
+
+       if (valid_codepage(cpid) == False) {
+               return False;
+       }
+       
+       while (codepages[idx].cp_name) {
+               if (codepages[idx].cpid == cpid) {
+                       printf("\t%-25s: 0x%x\n", CP_VAL, cpid);
+                       printf("\t%-25s: %s\n", CP_NAME, codepages[idx].cp_name);
+                       printf("\t%-25s: %s\n", CP_DESC, codepages[idx].cp_desc);
+                       return True;
+               }
+               idx++;
+       }
+       return False;
+}
diff --git a/libmapi/util/locale.c b/libmapi/util/locale.c
new file mode 100644 (file)
index 0000000..7b83077
--- /dev/null
@@ -0,0 +1,337 @@
+/*
+ *  OpenChange MAPI implementation.
+ *  Locales handled by Microsoft Windows Exchange
+ *
+ *  Copyright (C) Julien Kerihuel 2005.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "openchange.h"
+#include <core.h>
+#include <util.h>
+
+#define        CP_WESTERN_EUROPE_AND_US        1       /* 1  (Western Europe & US) */
+#define        CP_CENTRAL_EUROPE               2       /* 2  (Central Europe) */
+#define        CP_BALTIC                       3       /* 3  (Baltic) */
+#define        CP_GREEK                        4       /* 4  (Greek) */
+#define        CP_CYRILLIC                     5       /* 5  (Cyrillic) */
+#define        CP_TURKIC                       6       /* 6  (Turkic) */
+#define        CP_JAPENESE                     7       /* 7  (Japanese) */
+#define        CP_KOREAN                       8       /* 8  (Korean) */
+#define        CP_TRADITIONAL_CHINESE          9       /* 9  (Traditional Chinese) */
+#define        CP_SIMPLIFIED_CHINESE           10      /* 10 (Simplified Chinese) */
+#define        CP_THAI                         11      /* 11 (Thai) */
+#define        CP_HEBREW                       12      /* 12 (Hebrew) */
+#define        CP_ARABIC                       13      /* 13 (Arabic) */
+#define        CP_VIETNAMESE                   14      /* 14 (Vietnamese) */
+#define        CP_INDIC                        15      /* 15 (Indic) */
+#define        CP_GEORGIAN                     16      /* 16 (Georgian) */
+#define        CP_ARMENIAN                     17      /* 17 (Armenian) */
+
+#define        LANG_GROUP              "language group"
+#define        LOCALE_ID               "locale id"
+#define        INPUT_COMBINATIONS      "input combinations"
+
+static const char *language_group[] = 
+{
+       "CP_NONEXISTENT",
+       "CP_WESTERN_EUROPE_AND_US",
+       "CP_CENTRAL_EUROPE",
+       "CP_BALTIC",
+       "CP_GREEK",
+       "CP_CYRILLIC",
+       "CP_TURKIC",
+       "CP_JAPANESE",
+       "CP_KOREAN",
+       "CP_TRADITIONAL_CHINESE",
+       "CP_SIMPLIFIED_CHINESE",
+       "CP_THAI",
+       "CP_HEBREW",
+       "CP_ARABIC",
+       "CP_VIETNAMESE",
+       "CP_INDIC",
+       "CP_GEORGIAN",
+       "CP_ARMENIAN",
+       NULL
+};
+
+struct combination {
+       uint32_t        lcid;
+       uint32_t        input_locale;
+};
+
+struct locale_struct {
+       const char              *locale_str;
+       uint32_t                lcid;
+       uint32_t                language_group;
+       struct combination      combination[6];
+};
+
+static const struct locale_struct locales[] =
+{
+       { "Afrikaans", 0x436, CP_WESTERN_EUROPE_AND_US, { {0x436, 0x409}, {0x409, 0x409}, {0, 0} } },
+       { "Albanian", 0x41c, CP_CENTRAL_EUROPE, { {0x41c, 0x41c}, {0x409, 0x409}, {0, 0} } },
+       { "Arabic_Saudi_Arabia", 0x401, CP_ARABIC, { {0x409, 0x409},  {0x401, 0x401}, {0, 0} } },
+       { "Arabic_Iraq", 0x801, CP_ARABIC, { {0x409, 0x409}, {0x801, 0x401}, {0, 0} } },
+       { "Arabic_Egypt", 0xc01, CP_ARABIC, { {0x409, 0x409}, {0xc01, 0x401}, {0, 0} } },
+       { "Arabic_Libya ", 0x1001, CP_ARABIC, { {0x40c, 0x40c}, {0x1001, 0x20401}, {0, 0} } },
+       { "Arabic_Algeria", 0x1401, CP_ARABIC, { {0x40c, 0x40c}, {0x1401, 0x20401}, {0, 0} } },
+       { "Arabic_Morocco", 0x1801, CP_ARABIC, { {0x40c, 0x40c}, {0x1801, 0x20401}, {0, 0} } },
+       { "Arabic_Tunisia", 0x1c01, CP_ARABIC, { {0x40c, 0x40c}, {0x1c01, 0x20401}, {0, 0} } },
+       { "Arabic_Oman", 0x2001, CP_ARABIC, { {0x409, 0x409}, {0x2001, 0x401}, {0, 0} } },
+       { "Arabic_Yemen", 0x2401, CP_ARABIC, { {0x409, 0x409}, {0x2401, 0x401}, {0, 0} } },
+       { "Arabic_Syria", 0x2801, CP_ARABIC, { {0x409,0x409}, {0x2801, 0x401}, {0, 0} } },
+       { "Arabic_Jordan", 0x2c01, CP_ARABIC, { {0x409, 0x409}, {0x2c01, 0x401}, {0, 0} } },
+       { "Arabic_Lebanon", 0x3001, CP_ARABIC, { {0x409, 0x409}, {0x3001, 0x401}, {0, 0} } },
+       { "Arabic_Kuwait", 0x3401, CP_ARABIC, { {0x409, 0x409}, {0x3401, 0x401}, {0, 0} } },
+       { "Arabic_UAE", 0x3801, CP_ARABIC, { {0x409, 0x409}, {0x3801, 0x401}, {0, 0} } },
+       { "Arabic_Bahrain", 0x3c01, CP_ARABIC, { {0x409, 0x409}, {0x3c01, 0x401}, {0, 0} } },
+       { "Arabic_Qatar", 0x4001, CP_ARABIC, { {0x409, 0x409}, {0x4001, 0x401}, {0, 0} } },
+       { "Armenian", 0x42b, CP_ARMENIAN, { {0x42b, 0x42b}, {0x409, 0x409}, {0x419,0x419}, {0, 0} } },
+       { "Azeri_Latin", 0x42c, CP_TURKIC, { {0x42c, 0x42c}, {0x82c, 0x82c}, {0x419, 0x419}, {0, 0} } },
+       { "Azeri_Cyrillic", 0x82c, CP_CYRILLIC, { {0x82c, 0x82c}, {0x42c, 0x42c}, {0x419, 0x419}, {0, 0} } },
+       { "Basque", 0x42d, CP_WESTERN_EUROPE_AND_US, { {0x42d, 0x40a}, {0x409, 0x409}, {0, 0} } },
+       { "Belarusian", 0x423, CP_CYRILLIC, { {0x423, 0x423}, {0x409, 0x409}, {0x419, 0x419}, {0, 0} } },
+       { "Bulgarian", 0x402, CP_CYRILLIC, { {0x402, 0x402}, {0x409, 0x409}, {0, 0} } },
+       { "Catalan", 0x403, CP_WESTERN_EUROPE_AND_US, { {0x403, 0x40a}, {0x409, 0x409}, {0, 0} } },
+       { "Chinese_Taiwan", 0x404, CP_TRADITIONAL_CHINESE, { {0x404, 0x404}, {0x404, 0xe0080404}, {0x404, 0xe0010404}, {0, 0} } },
+       { "Chinese_PRC", 0x804, CP_SIMPLIFIED_CHINESE, { {0x804, 0x804}, {0x804, 0xe00e0804}, {0x804, 0xe0010804}, {0x804, 0xe0030804}, {0x804, 0xe0040804}, {0, 0} } },
+       { "Chinese_Hong_Kong", 0xc04, CP_TRADITIONAL_CHINESE, { {0x409, 0x409}, {0xc04, 0xe0080404}, {0, 0} } },
+       { "Chinese_Singapore", 0x1004, CP_SIMPLIFIED_CHINESE, { {0x409, 0x409}, {0x804, 0xe00e0804}, {0x804, 0xe0010804}, {0x804, 0xe0030804}, {0x804, 0xe0040804}, {0, 0} } },
+       { "Chinese_Macau", 0x1404, CP_TRADITIONAL_CHINESE, { {0x409, 0x409}, {0x804, 0xe00e0804}, {0x404, 0xe0020404}, {0x404, 0xe0080404}, {0, 0} } },
+       { "Croatian", 0x41a, CP_CENTRAL_EUROPE, { {0x41a, 0x41a}, {0x409, 0x409}, {0, 0} } },
+       { "Czech", 0x405, CP_CENTRAL_EUROPE, { {0x405, 0x405}, {0x409, 0x409}, {0, 0} } },
+       { "Danish", 0x406, CP_WESTERN_EUROPE_AND_US, { {0x406, 0x406}, {0x409, 0x409}, {0, 0} } },
+       { "Dutch_Standard", 0x413, CP_WESTERN_EUROPE_AND_US, { {0x409, 0x20409}, {0x413, 0x413}, {0x409, 0x409}, {0, 0} } },
+       { "Dutch_Belgian", 0x813, CP_WESTERN_EUROPE_AND_US, { {0x813, 0x813}, {0x409, 0x409}, {0, 0} } },
+       { "English_United_States", 0x409, CP_WESTERN_EUROPE_AND_US, { {0x409, 0x409}, {0, 0} } },
+       { "English_United_Kingdom", 0x809, CP_WESTERN_EUROPE_AND_US, { {0x809, 0x809}, {0, 0} } },
+       { "English_Australian", 0xc09, CP_WESTERN_EUROPE_AND_US, { {0xc09, 0x409}, {0, 0} } },
+       { "English_Canadian", 0xc09, CP_WESTERN_EUROPE_AND_US, { {0x1009, 0x409}, {0x1009, 0x11009}, {0x1009, 0x1009}, {0, 0} } },
+       { "English_New_Zealand", 0x1409, CP_WESTERN_EUROPE_AND_US, { {0x1409, 0x409}, {0, 0} } },
+       { "English_Irish", 0x1809, CP_WESTERN_EUROPE_AND_US, { {0x1809, 0x1809}, {0x1809, 0x11809}, {0, 0} } },
+       { "English_South_Africa", 0x1c09, CP_WESTERN_EUROPE_AND_US, { {0x1c09, 0x409}, {0, 0} } },
+       { "English_Jamaica", 0x2009, CP_WESTERN_EUROPE_AND_US, { {0x2009, 0x409}, {0, 0} } },
+       { "English_Caribbean", 0x2409, CP_WESTERN_EUROPE_AND_US, { {0x2409, 0x409}, {0, 0} } },
+       { "English_Belize", 0x2809, CP_WESTERN_EUROPE_AND_US, { {0x2809, 0x409}, {0, 0} } },
+       { "English_Trinidad", 0x2c09, CP_WESTERN_EUROPE_AND_US, { {0x2c09, 0x409}, {0, 0} } },
+       { "English_Zimbabwe", 0x3009, CP_WESTERN_EUROPE_AND_US, { {0x3009, 0x409}, {0, 0} } },
+       { "English_Philippines", 0x3409, CP_WESTERN_EUROPE_AND_US, { {0x3409, 0x409}, {0, 0} } },
+       { "Estonian", 0x425, CP_BALTIC, { {0x425, 0x425}, {0, 0} } },
+       { "Faeroese", 0x438, CP_WESTERN_EUROPE_AND_US, { {0x438, 0x406}, {0x409, 0x409}, {0, 0} } },
+       { "Farsi", 0x429, CP_ARABIC, { {0x409, 0x409}, {0x429, 0x429}, {0x429, 0x401}, {0, 0} } },
+       { "Finnish", 0x40b, CP_WESTERN_EUROPE_AND_US, { {0x40b, 0x40b}, {0x409, 0x409}, {0, 0} } },
+       { "French_Standard", 0x40c, CP_WESTERN_EUROPE_AND_US, { {0x40c, 0x40c}, {0x409, 0x409}, {0, 0} } },
+       { "French_Belgian", 0x80c, CP_WESTERN_EUROPE_AND_US, { {0x80c, 0x80c}, {0x409, 0x409}, {0, 0} } },
+       { "French_Canadian", 0xc0c, CP_WESTERN_EUROPE_AND_US, { {0xc0c, 0x11009}, {0x409, 0x409}, {0, 0} } },
+       { "French_Swiss", 0x100c, CP_WESTERN_EUROPE_AND_US, { {0x100c, 0x100c}, {0x409, 0x409}, {0, 0} } },
+       { "French_Luxembourg", 0x140c, CP_WESTERN_EUROPE_AND_US, { {0x140c, 0x40c}, {0x409, 0x409}, {0, 0} } },
+       { "French_Monaco", 0x180c, CP_WESTERN_EUROPE_AND_US, { {0x180c, 0x40c}, {0x409, 0x409}, {0, 0} } },
+       { "Georgian", 0x437, CP_GEORGIAN, { {0x437, 0x437}, {0x409, 0x409}, {0x419, 0x419}, {0, 0} } },
+       { "German_Standard", 0x407, CP_WESTERN_EUROPE_AND_US, { {0x407, 0x407}, {0x409, 0x409}, {0, 0} } },
+       { "German_Swiss", 0x807, CP_WESTERN_EUROPE_AND_US, { {0x807, 0x807}, {0x409, 0x409}, {0, 0} } },
+       { "German_Austrian", 0xc07, CP_WESTERN_EUROPE_AND_US, { {0xc07, 0x407}, {0x409, 0x409}, {0, 0} } },
+       { "German_Luxembourg", 0x1007, CP_WESTERN_EUROPE_AND_US, { {0x1007, 0x407}, {0x409, 0x409}, {0, 0} } },
+       { "German_Liechtenstein", 0x1407, CP_WESTERN_EUROPE_AND_US, { {0x1407, 0x407}, {0x409, 0x409}, {0, 0} } },
+       { "Greek", 0x408, CP_GREEK, { {0x409, 0x409}, {0x408, 0x408}, {0, 0} } },
+       { "Hebrew", 0x40d, CP_HEBREW, { {0x409, 0x409}, {0x40d, 0x40d}, {0, 0} } },
+       { "Hindi", 0x439, CP_INDIC, { {0x409, 0x409}, {0x439, 0x10439}, {0x439, 0x439}, {0, 0} } },
+       { "Hungarian", 0x40e, CP_CENTRAL_EUROPE, { {0x40e, 0x40e}, {0x409, 0x409}, {0, 0} } },
+       { "Icelandic", 0x40f, CP_WESTERN_EUROPE_AND_US, { {0x40f, 0x40f}, {0x409, 0x409}, {0, 0} } },
+       { "Indonesian", 0x421, CP_WESTERN_EUROPE_AND_US, { {0x421, 0x409}, {0x409, 0x409}, {0, 0} } },
+       { "Italian_Standard", 0x410, CP_WESTERN_EUROPE_AND_US, { {0x410, 0x410}, {0x409, 0x409}, {0, 0} } },
+       { "Italian_Swiss", 0x810, CP_WESTERN_EUROPE_AND_US, { {0x810, 0x410}, {0x409, 0x409}, {0, 0} } },
+       { "Japanese", 0x411, CP_JAPENESE, { {0x411, 0xe0010411}, {0, 0} } },
+       { "Kazakh", 0x43f, CP_CYRILLIC, { {0x43f, 0x43f}, {0x409, 0x409}, {0x419, 0x419}, {0, 0} } },
+       { "Konkani", 0x457, CP_INDIC, { {0x409, 0x409}, {0x457, 0x439}, {0, 0} } },
+       { "Korean", 0x412, CP_KOREAN, { {0x412, 0xe0010412}, {0, 0} } },
+       { "Latvian", 0x426, CP_BALTIC, { {0x426, 0x10426}, {0, 0} } },
+       { "Lithuanian", 0x427, CP_BALTIC, { {0x427, 0x10427}, {0, 0} } },
+       { "Macedonian", 0x42f, CP_CYRILLIC, { {0x42f, 0x42f}, {0x409, 0x409}, {0, 0} } },
+       { "Malay_Malaysia", 0x43e, CP_WESTERN_EUROPE_AND_US, { {0x409, 0x409}, {0, 0} } },
+       { "Malay_Brunei_Darussalam", 0x83e, CP_WESTERN_EUROPE_AND_US, { {0x409, 0x409}, {0, 0} } },
+       { "Marathi", 0x44e, CP_INDIC, { {0x409, 0x409}, {0x44e, 0x44e}, {0x44e, 0x439}, {0, 0} } },
+       { "Norwegian_Bokmal", 0x414, CP_WESTERN_EUROPE_AND_US, { {0x414, 0x414}, {0x409, 0x409}, {0, 0} } },
+       { "Norwegian_Nynorsk", 0x814, CP_WESTERN_EUROPE_AND_US, { {0x814, 0x414}, {0x409, 0x409}, {0, 0} } },
+       { "Polish", 0x415, CP_CENTRAL_EUROPE, { {0x415, 0x10415}, {0x415, 0x415}, {0x409, 0x409}, {0, 0} } },
+       { "Portuguese_Brazilian", 0x416, CP_WESTERN_EUROPE_AND_US, { {0x416, 0x416}, {0x409, 0x409}, {0, 0} } },
+       { "Portuguese_Standard", 0x816, CP_WESTERN_EUROPE_AND_US, { {0x816, 0x816}, {0x409, 0x409}, {0, 0} } },
+       { "Romanian", 0x418, CP_CENTRAL_EUROPE, { {0x418, 0x418}, {0x409, 0x409}, {0, 0} } },
+       { "Russian", 0x419, CP_CYRILLIC, { {0x419, 0x419}, {0x409, 0x409}, {0, 0} } },
+       { "Sanskrit", 0x44f, CP_INDIC, { {0x409, 0x409}, {0x44f, 0x439}, {0, 0} } },
+       { "Serbian_Latin", 0x81a, CP_CENTRAL_EUROPE, { {0x81a, 0x81a}, {0x409, 0x409}, {0, 0} } },
+       { "Serbian_Cyrillic", 0xc1a, CP_CYRILLIC, { {0xc1a, 0xc1a}, {0x409, 0x409}, {0, 0} } },
+       { "Slovak", 0x41b, CP_CENTRAL_EUROPE, { {0x41b, 0x41b}, {0x409, 0x409}, {0, 0}, {0, 0} } },
+       { "Slovenian", 0x424, CP_CENTRAL_EUROPE, { {0x424, 0x424}, {0x409, 0x409}, {0, 0}, {0, 0} } },
+       { "Spanish_Traditional_Sort", 0x40a, CP_WESTERN_EUROPE_AND_US, { {0x40a, 0x40a}, {0x409, 0x409}, {0, 0} } },
+       { "Spanish_Mexican", 0x80a, CP_WESTERN_EUROPE_AND_US, { {0x80a, 0x80a}, {0x409, 0x409}, {0, 0} } },
+       { "Spanish_Modern_Sort", 0xc0a, CP_WESTERN_EUROPE_AND_US, { {0xc0a, 0x40a}, {0x409, 0x409}, {0, 0} } },
+       { "Spanish_Guatemala", 0x100a, CP_WESTERN_EUROPE_AND_US, { {0x100a, 0x80a}, {0x409, 0x409}, {0, 0} } },
+       { "Spanish_Costa_Rica", 0x140a, CP_WESTERN_EUROPE_AND_US, { {0x140a, 0x80a}, {0x409, 0x409}, {0, 0} } },
+       { "Spanish_Panama", 0x180a, CP_WESTERN_EUROPE_AND_US, { {0x180a, 0x80a}, {0x409, 0x409}, {0, 0} } },
+       { "Spanish_Dominican_Republic", 0x1c0a, CP_WESTERN_EUROPE_AND_US, { {0x1c0a, 0x80a}, {0x409, 0x409}, {0, 0} } },
+       { "Spanish_Venezuela", 0x200a, CP_WESTERN_EUROPE_AND_US, { {0x200a, 0x80a}, {0x409, 0x409}, {0, 0} } },
+       { "Spanish_Colombia", 0x240a, CP_WESTERN_EUROPE_AND_US, { {0x240a, 0x80a}, {0x409, 0x409}, {0, 0} } },
+       { "Spanish_Peru", 0x280a, CP_WESTERN_EUROPE_AND_US, { {0x280a, 0x80a}, {0x409, 0x409}, {0, 0} } },
+       { "Spanish_Argentina", 0x2c0a, CP_WESTERN_EUROPE_AND_US, { {0x2c0a, 0x80a}, {0x409, 0x409}, {0, 0} } },
+       { "Spanish_Ecuador", 0x300a, CP_WESTERN_EUROPE_AND_US, { {0x300a, 0x80a}, {0x409, 0x409}, {0, 0} } },
+       { "Spanish_Chile", 0x340a, CP_WESTERN_EUROPE_AND_US, { {0x340a, 0x80a}, {0x409, 0x409}, {0, 0} } },
+       { "Spanish_Uruguay", 0x380a, CP_WESTERN_EUROPE_AND_US, { {0x380a, 0x80a}, {0x409, 0x409}, {0, 0} } },
+       { "Spanish_Paraguay", 0x3c0a, CP_WESTERN_EUROPE_AND_US, { {0x3c0a, 0x80a}, {0x409, 0x409}, {0, 0} } },
+       { "Spanish_Bolivia", 0x400a, CP_WESTERN_EUROPE_AND_US, { {0x400a, 0x80a}, {0x409, 0x409}, {0, 0} } },
+       { "Spanish_El_Salvador", 0x440a, CP_WESTERN_EUROPE_AND_US, { {0x440a, 0x80a}, {0x409, 0x409}, {0, 0} } },
+       { "Spanish_Honduras", 0x480a, CP_WESTERN_EUROPE_AND_US, { {0x480a, 0x80a}, {0x409, 0x409}, {0, 0} } },
+       { "Spanish_Nicaragua", 0x4c0a, CP_WESTERN_EUROPE_AND_US, { {0x4c0a, 0x80a}, {0x409, 0x409}, {0, 0} } },
+       { "Spanish_Puerto_Rico", 0x500a, CP_WESTERN_EUROPE_AND_US, { {0x500a, 0x80a}, {0x409, 0x409}, {0, 0} } },
+       { "Swahili", 0x441, CP_WESTERN_EUROPE_AND_US, { {0x409, 0x409}, {0, 0} } },
+       { "Swedish", 0x41d, CP_WESTERN_EUROPE_AND_US, { {0x41d, 0x41d}, {0x409, 0x409}, {0, 0} } },
+       { "Swedish_Finland", 0x81d, CP_WESTERN_EUROPE_AND_US, { {0x81d, 0x41d}, {0x409, 0x409}, {0, 0} } },
+       { "Tamil", 0x449, CP_INDIC, { {0x409, 0x409}, {0x449, 0x449}, {0, 0} } },
+       { "Tatar", 0x444, CP_CYRILLIC, { {0x444, 0x444}, {0x409, 0x409}, {0x419, 0x419}, {0, 0} } },
+       { "Thai", 0x41e, CP_THAI, { {0x409, 0x409}, {0x41e, 0x41e}, {0, 0} } },
+       { "Turkish", 0x41f, CP_TURKIC, { {0x41f, 0x41f}, {0x409, 0x41f}, {0, 0} } },
+       { "Ukrainian", 0x422, CP_CYRILLIC, { {0x422, 0x422}, {0x409, 0x409}, {0, 0} } },
+       { "Urdu", 0x420, CP_ARABIC, { {0x420, 0x401}, {0x409, 0x409}, {0, 0} } },
+       { "Uzbek_Latin", 0x443, CP_TURKIC, { {0x443, 0x409}, {0x843, 0x843}, {0x419, 0x419}, {0, 0} } },
+       { "Uzbek_Cyrillic", 0x843, CP_CYRILLIC, { {0x843, 0x843}, {0x443, 0x409}, {0x419, 0x419}, {0, 0} } },
+       { "Vietnamese", 0x42a, CP_VIETNAMESE, { {0x409, 0x409}, {0x42a, 0x42a}, {0, 0} } },
+       { NULL, 0, 0, { { 0, 0 } } }
+};
+
+/*
+  Print locale_id information for a given Language
+*/
+
+BOOL get_locales(const char *lang)
+{
+       int idx = 0;
+       
+       if (!lang) {
+               return False;
+       }
+               
+       while (locales[idx].locale_str != NULL) {
+               if (!strcmp(lang, locales[idx].locale_str)) {
+                       DEBUG(0, ("locale:language = 0x%x\n", locales[idx].lcid));
+                       /* Fix me */
+                       DEBUG(0, ("locale:method = 0x%x\n", locales[idx].combination[1].lcid));
+                       return True;
+               }
+               idx++;
+       }
+       return False;
+}
+
+/*
+  Check if the locale provided exists
+*/
+
+BOOL valid_locale(uint32_t locale)
+{
+       int idx = 0;
+
+       while (locales[idx].locale_str != NULL) {
+               if (locales[idx].lcid == locale)
+                       return True;
+               idx++;
+       }
+       return False;
+}
+
+/*
+  Print locale information for a given locale id
+ */
+
+BOOL print_locale(uint32_t locale)
+{
+       int idx = 0;
+       int i = 0;
+
+       while (locales[idx].locale_str != NULL) {
+               if (locales[idx].lcid == locale) {
+                       printf("%s:\n", locales[idx].locale_str);
+                       printf("\t%-25s:    %s\n", LANG_GROUP, language_group[locales[idx].language_group]);
+                       printf("\t%-25s:    0x%x\n", LOCALE_ID, locales[idx].lcid);
+                       printf("\t%-25s:\n", INPUT_COMBINATIONS);
+                       for (i = 0; locales[idx].combination[i].lcid != 0; i++) {
+                               printf("\t\t\t\t      0x%x:0x%x\n", 
+                                      locales[idx].combination[i].lcid,
+                                      locales[idx].combination[i].input_locale);
+                       }
+                       return True;
+               }
+               idx++;
+       }
+       return False;
+}
+
+/*
+  Print language groups
+ */
+
+void print_group(void)
+{
+       int idx = 1;
+
+       while (language_group[idx]) {
+               printf("\t\t%s\n", language_group[idx]);
+               idx++;
+       }
+}
+
+/*
+  Print languages associated to a single language group
+ */
+
+BOOL print_groupmember(uint32_t group)
+{
+       uint32_t idx = 0;
+
+       if (group == -1) {
+         DEBUG(0, ("Invalid language group "));
+         return False;
+       }
+
+       DEBUG(0, ("%s:\n", language_group[group]));
+
+       for (idx = 0; locales[idx].locale_str != NULL; idx++) {
+               if (locales[idx].language_group == group) {
+                       printf("\t\t\t%s\n", locales[idx].locale_str);
+               }
+       }
+       return True;
+}
+
+/*
+  Convert language group from string to integer
+ */
+
+uint32_t lang2nb(const char *name)
+{
+       int idx = 0;
+
+       if (!name) {
+               return -1;
+       }
+               
+       while (language_group[idx]) {
+               if (!strcmp(language_group[idx], name)) {
+                       return idx++;
+               }
+               idx++;
+       }
+       return -1;
+}
diff --git a/libmapi/util/mapidump.c b/libmapi/util/mapidump.c
new file mode 100644 (file)
index 0000000..aedc09a
--- /dev/null
@@ -0,0 +1,320 @@
+/* 
+   Unix SMB/CIFS implementation.
+   SMB torture tester
+   Copyright (C) Andrew Tridgell 2003
+   
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "openchange.h"
+#include "mapidump.h"
+#include "ndr_exchange.h"
+#include "libmapi/include/proto.h"
+
+static const struct dcerpc_interface_call *find_function(
+       const struct dcerpc_interface_table *p,
+       const char *function)
+{
+       int     i;
+       
+       if (isdigit(function[0])) {
+               i = strtol(function, NULL, 0);
+               return &p->calls[i];
+       }
+       for (i=0;i<p->num_calls;i++) {
+               if (strcmp(p->calls[i].name, function) == 0) {
+                       break;
+               }
+       }
+       if (i == p->num_calls) {
+               printf("Function '%s' not found\n", function);
+               exit(1);
+       }
+       return &p->calls[i];
+}
+
+
+static void    show_pipes(void)
+{
+       const struct dcerpc_interface_list      *l;
+       
+       printf("\nYou must specify a pipe\n");
+       printf("known pipes are:\n");
+       for (l=NULL;l;l=l->next) { /* FIXME */
+               if(l->table->helpstring) {
+                       printf("\t%s - %s\n", l->table->name, l->table->helpstring);
+               } else {
+                       printf("\t%s\n", l->table->name);
+               }
+       }
+       exit(1);
+}
+
+static void    show_functions(const struct dcerpc_interface_table *p)
+{
+       int             i;
+       
+       printf("\nYou must specify a function\n");
+       printf("known functions on '%s' are:\n", p->name);
+       for (i=0;i<p->num_calls;i++) {
+               printf("\t0x%02x (%2d) %s\n", i, i, p->calls[i].name);
+       }
+       exit(1);
+}
+
+static char    *stdin_load(TALLOC_CTX *mem_ctx, size_t *size)
+{
+       int             num_read, total_len = 0;
+       char            buf[255];
+       char            *result = NULL;
+       
+       while((num_read = read(STDIN_FILENO, buf, 255)) > 0) {
+               if (result) {
+                       result = (char *) talloc_realloc(
+                               mem_ctx, result, char *, total_len + num_read);
+               } else {
+                       result = talloc_size(mem_ctx, num_read);
+               }
+               memcpy(result + total_len, buf, num_read); 
+               total_len += num_read;
+       }
+       if (size)
+               *size = total_len;
+       return result;
+}
+
+/*
+** Display hypertext link instead of simple TAG name
+*/
+void            ndr_printhtml_debug_helper(struct ndr_print *ndr, const char *format, ...) 
+{
+       int           i, j, len;
+       const char    *tag, *url;
+       char          *info, *value;
+       va_list       ap;
+       char          *s = NULL;
+       
+       va_start(ap, format);
+       vasprintf(&s, format, ap);
+       va_end(ap);
+       for (i = 0; i < ndr->depth; i++)
+               DEBUG(0, ("    "));
+       len = strlen(s);
+       for (i = 0; s[i] && (s[i] != ':'); i++);
+       s[++i] = 0;
+       info = s;
+       for (j = i + 1; s[j] && (s[j] != ' '); j++);
+       s[j] = 0;
+       tag = &s[++i];
+       value = &s[++j];
+       url = get_proptag_url(tag);
+       if (url && strcmp(url, "NULL"))
+               tag = url;
+       DEBUG(0,("%s ", info));
+       DEBUG(0,("%s ", tag));
+       if (j < len)
+         DEBUG(0,("%s\n", value));
+       else
+         DEBUG(0,("\n"));
+       free(s);
+}
+
+int    main(int argc, const char *argv[])
+{
+       const struct dcerpc_interface_table     *p;
+       const struct dcerpc_interface_call      *f;
+       const char                              *pipe_name, *function, *inout, *filename;
+       uint8_t                         *data;
+       size_t                          size;
+       DATA_BLOB                               blob;
+       struct ndr_pull                 *ndr_pull;
+       struct ndr_print                        *ndr_print;
+       TALLOC_CTX                              *mem_ctx;
+       int                                     flags;
+       poptContext                             pc;
+       NTSTATUS                                status;
+       void                                    *st;
+       void                                    *v_st;
+       const char                              *ctx_filename = NULL;
+       BOOL                                    validate = False;
+       BOOL                                    dumpdata = False;
+       BOOL                                    html = False;
+       int                                     opt;
+       struct poptOption                       long_options[] = {
+               {"context-file", 'c', POPT_ARG_STRING, &ctx_filename, 0, "In-filename to parse first", "CTX-FILE" },
+               {"validate", 0, POPT_ARG_NONE, &validate, 0, "try to validate the data", NULL },
+               {"dump-data", 0, POPT_ARG_NONE, &dumpdata, 0, "dump the hex data", NULL },
+               {"html", 0, POPT_ARG_NONE, &html, 0, "dump with  html tags", NULL },
+               POPT_AUTOHELP
+               POPT_TABLEEND
+       };
+
+       pc = poptGetContext("ndrdump", argc, argv, long_options, 0);
+       poptSetOtherOptionHelp(pc, "<pipe|uuid> <function> <inout> [<filename>]");
+       while ((opt = poptGetNextOpt(pc)) != -1) {
+       }
+       pipe_name = poptGetArg(pc);
+       if (!pipe_name) {
+               poptPrintUsage(pc, stderr, 0);
+               show_pipes();
+               exit(1);
+       }
+       p = NULL; /* FIXME p = idl_iface_by_name(pipe_name); */
+       if (!p) {
+               p = NULL; /* FIXME idl_iface_by_uuid(pipe_name); */
+               if (!p) {
+                       printf("Unknown pipe or UUID '%s'\n", pipe_name);
+                       exit(1);
+               }
+       }
+       function = poptGetArg(pc);
+       inout = poptGetArg(pc);
+       filename = poptGetArg(pc);
+       if (!function || !inout) {
+               poptPrintUsage(pc, stderr, 0);
+               show_functions(p);
+               exit(1);
+       }
+       
+       if (strcmp(inout, "in") == 0 ||
+           strcmp(inout, "request") == 0) {
+               flags = NDR_IN;
+       } else if (strcmp(inout, "out") == 0 ||
+                  strcmp(inout, "response") == 0) {
+               flags = NDR_OUT;
+       } else {
+               printf("Bad inout value '%s'\n", inout);
+               exit(1);
+       }
+       f = find_function(p, function);
+       PRINT_TAG(html, "<pre>")
+       mem_ctx = talloc_init("ndrdump");
+       st = talloc_zero_size(mem_ctx, f->struct_size);
+       if (!st) {
+               printf("Unable to allocate %d bytes\n", (int)f->struct_size);
+               exit(1);
+       }
+       v_st = talloc_zero_size(mem_ctx, f->struct_size);
+       if (!v_st) {
+               printf("Unable to allocate %d bytes\n", (int)f->struct_size);
+               exit(1);
+       }
+       if (ctx_filename) {
+               if (flags == NDR_IN) {
+                       printf("Context file can only be used for \"out\" packages\n");
+                       exit(1);
+               }
+               data = (uint8_t *)file_load(ctx_filename, &size, mem_ctx);
+               if (!data) {
+                       perror(ctx_filename);
+                       exit(1);
+               }
+               blob.data = data;
+               blob.length = size;
+               ndr_pull = ndr_pull_init_blob(&blob, mem_ctx);
+               ndr_pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+               status = f->ndr_pull(ndr_pull, NDR_IN, st);
+               if (ndr_pull->offset != ndr_pull->data_size) {
+                       printf("WARNING! %d unread bytes while parsing context file\n", ndr_pull->data_size - ndr_pull->offset);
+               }
+               if (!NT_STATUS_IS_OK(status)) {
+                       printf("pull for context file returned %s\n", nt_errstr(status));
+                       exit(1);
+               }
+               memcpy(v_st, st, f->struct_size);
+       } 
+       if (filename)
+               data = (uint8_t *)file_load(filename, &size, mem_ctx);
+       else
+               data = (uint8_t *)stdin_load(mem_ctx, &size);
+       if (!data) {
+               if (filename)
+                       perror(filename);
+               else
+                       perror("stdin");
+               exit(1);
+       }
+       blob.data = data;
+       blob.length = size;
+       ndr_pull = ndr_pull_init_blob(&blob, mem_ctx);
+       ndr_pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+       status = f->ndr_pull(ndr_pull, flags, st);
+       printf("pull returned %s\n", nt_errstr(status));
+       if (ndr_pull->offset != ndr_pull->data_size) {
+               printf("WARNING! %d unread bytes\n", ndr_pull->data_size - ndr_pull->offset);
+               dump_data(0, ndr_pull->data+ndr_pull->offset, ndr_pull->data_size - ndr_pull->offset);
+       }
+       if (dumpdata) {
+               printf("%d bytes consumed\n", ndr_pull->offset);
+               dump_data(0, blob.data, blob.length);
+       }
+       ndr_print = talloc_zero(mem_ctx, struct ndr_print);
+       ndr_print->print = (html) ? ndr_printhtml_debug_helper : ndr_print_debug_helper;
+       ndr_print->depth = 1;
+       f->ndr_print(ndr_print, function, flags, st);
+       if (!NT_STATUS_IS_OK(status)) {
+               printf("dump FAILED\n");
+               PRINT_TAG(html, "</pre>")
+               exit(1);
+       }
+       if (validate) {
+               DATA_BLOB               v_blob;
+               struct ndr_push *ndr_v_push;
+               struct ndr_pull *ndr_v_pull;
+               struct ndr_print        *ndr_v_print;
+               
+               ndr_v_push = ndr_push_init_ctx(mem_ctx);
+               status = f->ndr_push(ndr_v_push, flags, st);
+               if (!NT_STATUS_IS_OK(status)) {
+                       printf("validate push FAILED\n");
+                       PRINT_TAG(html, "</pre>")
+                       exit(1);
+               }
+               v_blob = ndr_push_blob(ndr_v_push);
+               if (dumpdata) {
+                       printf("%ld bytes generated (validate)\n", (long)v_blob.length);
+                       dump_data(0, v_blob.data, v_blob.length);
+               }
+               
+               ndr_v_pull = ndr_pull_init_blob(&v_blob, mem_ctx);
+               ndr_v_pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+               status = f->ndr_pull(ndr_v_pull, flags, v_st);
+               if (!NT_STATUS_IS_OK(status)) {
+                       printf("validate pull FAILED\n");
+                       PRINT_TAG(html, "</pre>")
+                       exit(1);
+               }
+               printf("pull returned %s\n", nt_errstr(status));
+               if (ndr_v_pull->offset != ndr_v_pull->data_size) {
+                       printf("WARNING! %d unread bytes in validation\n", ndr_v_pull->data_size - ndr_v_pull->offset);
+                       dump_data(0, ndr_v_pull->data+ndr_v_pull->offset, ndr_v_pull->data_size - ndr_v_pull->offset);
+               }
+               ndr_v_print = talloc_zero(mem_ctx, struct ndr_print);
+               ndr_v_print->print = (html) ? ndr_printhtml_debug_helper : ndr_print_debug_helper;
+               ndr_v_print->depth = 1;
+               f->ndr_print(ndr_v_print, function, flags, v_st); 
+               if (blob.length != v_blob.length) {
+                       printf("WARNING! orig bytes:%ld validated pushed bytes:%ld\n", (long)blob.length, (long)v_blob.length);
+               }
+               if (ndr_pull->offset != ndr_v_pull->offset) {
+                       printf("WARNING! orig pulled bytes:%d validated pulled bytes:%d\n", ndr_pull->offset, ndr_v_pull->offset);
+               }
+       }
+       printf("dump OK\n");
+       PRINT_TAG(html, "</pre>")
+       talloc_free(mem_ctx);
+       poptFreeContext(pc);  
+       return 0;
+}
diff --git a/libmapi/util/mapidump.h b/libmapi/util/mapidump.h
new file mode 100644 (file)
index 0000000..61917e8
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+** mapidump.h for  in 
+** 
+** Made by Gregory SCHIRO
+** Mail   <g.schiro@openchange.org>
+** 
+** Started on  Mon Nov 28 12:10:46 2005 Gregory SCHIRO
+** Last update Mon Nov 28 12:19:16 2005 Gregory SCHIRO
+*/
+
+#ifndef _MAPIDUMP_H_
+# define _MAPIDUMP_H_
+
+# define PRINT_TAG(html, tag)  if (html) {DEBUG(0, (tag));}
+
+#endif /* !_MAPIDUMP_H_ */
diff --git a/libmapi/utils.c b/libmapi/utils.c
new file mode 100644 (file)
index 0000000..6984649
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+   MAPI Implementation: Utils functions
+
+   OpenChange Project
+
+   Copyright (C) Julien Kerihuel 2005
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "openchange.h"
+#include "ndr_exchange.h"
+
+/*
+  Constructs a PR_ENTRYID value for recipients.
+ */
+
+/* 
+   FIXME: 
+   nor     0x00 0x00 0x00 0x00 at the beginning 
+   neither 0x2f at the end should be listed 
+*/
+static const uint8_t MAPI_LOCAL_UID[] = {
+       0xdc, 0xa7, 0x40, 0xc8, 0xc0, 0x42, 0x10, 0x1a,
+       0xb4, 0xb9, 0x08, 0x00, 0x2b, 0x2f, 0xe1, 0x82
+};
+
+static const uint8_t MAPI_LOCAL_UID_END[] = {
+       0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 
+       0x00, 0x2f
+};
+
+char *guid_delete_dash(TALLOC_CTX *mem_ctx, const char *recipient_id)
+{
+       char            *guid;
+       uint32_t        count,i;
+
+       if (!recipient_id) {
+               return NULL;
+       }
+
+       for (count=0,i=0;i!=strlen(recipient_id);i++) {
+               if (recipient_id[i] != '-') count++;
+       }
+
+       guid = talloc_zero_size(mem_ctx, count+1);
+       for (count=0,i = 0;i!=strlen(recipient_id);i++) {
+               if (recipient_id[i] != '-') {
+                       guid[count] = recipient_id[i];
+                       count++;
+               }
+       }
+
+       return guid;
+}
+
+struct SBinary *generate_recipient_entryid(TALLOC_CTX *mem_ctx, const char *recipient_id)
+{
+       struct SBinary *entryid;
+       uint32_t        off;
+       char            *guid = (char *) NULL;
+
+       entryid = talloc(mem_ctx, struct SBinary);
+       entryid->cb = sizeof (uint32_t) + sizeof (MAPI_LOCAL_UID) + sizeof (MAPI_LOCAL_UID_END) + 1;
+
+       if (recipient_id) {
+               guid = guid_delete_dash(mem_ctx, recipient_id);
+               entryid->cb += strlen(guid);
+       }
+
+       entryid->lpb = talloc_zero_size(mem_ctx, entryid->cb);
+       off = 4;
+       memcpy(entryid->lpb + off, MAPI_LOCAL_UID, sizeof (MAPI_LOCAL_UID));
+       off += sizeof (MAPI_LOCAL_UID);
+       
+       memcpy(entryid->lpb + off, MAPI_LOCAL_UID_END, sizeof (MAPI_LOCAL_UID_END));
+       off += sizeof (MAPI_LOCAL_UID_END);
+
+       if (recipient_id) {
+               strcpy((char *)entryid->lpb + off, guid);
+               off += strlen(recipient_id);
+       }
+       
+       return entryid;
+}
diff --git a/libmapi/x500.c b/libmapi/x500.c
new file mode 100644 (file)
index 0000000..e692707
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ *  OpenChange NSPI implementation.
+ *
+ *  Copyright (C) Julien Kerihuel 2005-2006
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "openchange.h"
+
+/*
+ * x500_get_element
+ * Fetch an element from a DN
+ *
+ */
+
+char *x500_get_dn_element(TALLOC_CTX *mem_ctx, const char *dn, const char *element)
+{
+       char    *pdn, *p, *str;
+       char    *tmp_dn;
+
+       if ((dn == NULL) || (dn[0] == '\0') || !element) return NULL;
+
+       tmp_dn = talloc_strdup(mem_ctx, dn);
+       pdn = strstr((const char *)tmp_dn, element);
+       if (pdn != NULL) {
+               pdn += strlen(element);
+               p = pdn;
+       }
+       if ((p = strchr(pdn, '/')) != NULL) {
+               p[0] = '\0';
+       }
+       DEBUG(3, ("x500 %s %s\n", element, pdn));
+
+       str = talloc_strdup(mem_ctx, pdn);
+       
+       talloc_free(tmp_dn);
+       return str;
+}
diff --git a/ndr_mapi.c b/ndr_mapi.c
new file mode 100644 (file)
index 0000000..249f37d
--- /dev/null
@@ -0,0 +1,129 @@
+/* 
+   OpenChange implementation.
+
+   libndr mapi support
+
+   Copyright (C) Julien Kerihuel 2005
+   
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "openchange.h"
+#include <ndr.h>
+#include <core/nterr.h>
+#include "ndr_exchange.h"
+#include "ndr_mapi.h"
+
+#define mapi_data_talloc(ctx, ptr, size) mapi_data_talloc_named(ctx, ptr, size, "MAPI_DATA:"__location__)
+
+const char *get_mapi_opname(uint16_t opnum);
+
+static void obfuscate_data(uint8_t *data, uint32_t size, uint8_t salt)
+{
+       uint32_t i;
+
+       for (i=0; i<size; i++) {
+               data[i] ^= salt;
+       }
+}
+
+/*
+  print the MAPI_DATA structure
+ */
+
+void ndr_print_MAPI_DATA(struct ndr_print *ndr, const char *name, const struct MAPI_DATA *r)
+{
+       uint32_t        rlength;
+
+       rlength = r->mapi_len - r->length;
+
+       ndr->print(ndr, "%-25s: MAPI_DATA (content) length=%u", name, r->length);
+       ndr->print(ndr, "%-25s: MAPI DATA opnum = %s (0x%.04X)", name, get_mapi_opname(r->opnum), r->opnum);
+       if (r->length) {
+               dump_data(10, r->content, r->length);
+       }
+       ndr->print(ndr, "%-25s: MAPI_DATA (remaining) length=%u", name, rlength);
+       if (rlength) {
+               dump_data(10, r->remaining, rlength);
+       }
+}
+
+/*
+  push a MAPI_DATA onto the wire.  
+
+  MAPI length field includes length bytes. 
+  But these bytes do not belong to the mapi content in the user
+  context. We have to add them when pushing mapi content length
+  (uint16_t) and next substract when pushing the content blob
+*/
+
+NTSTATUS ndr_push_MAPI_DATA(struct ndr_push *ndr, int ndr_flags, const struct MAPI_DATA *_blob)
+{
+       uint32_t        remaining_length;
+       struct MAPI_DATA blob = *_blob;
+
+       if (!(ndr->flags & LIBNDR_FLAG_REMAINING)) {
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, blob.mapi_len));
+       }
+       blob.length += 2;
+       NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, blob.length));
+
+       blob.mapi_len -= 2;
+       blob.length -= 2;
+       NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, blob.opnum));
+       /* opnum is extracted from content and is 2 bytes long */
+       NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, blob.content, blob.length - 2));
+
+       remaining_length = blob.mapi_len - blob.length;
+       NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, blob.remaining, remaining_length));
+
+       obfuscate_data(ndr->data, ndr->alloc_size, 0xA5);
+
+       return NT_STATUS_OK;
+}
+
+/*
+  pull a MAPI_DATA from the wire
+*/
+
+NTSTATUS ndr_pull_MAPI_DATA(struct ndr_pull *ndr, int ndr_flags, struct MAPI_DATA *blob)
+{
+       uint32_t length;
+       uint32_t remaining_length;
+
+       obfuscate_data(ndr->data, ndr->data_size, 0xA5);
+
+       if (ndr->flags & LIBNDR_FLAG_REMAINING) {
+               length = ndr->data_size - ndr->offset;
+       } else {
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &length));
+       }
+       NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &blob->length));
+       blob->mapi_len = length - 2;
+
+       /* length includes length field, we have to substract it */
+       blob->length -= 2;
+       
+       NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &blob->opnum));
+       /* opnum is extracted from content and is 2 bytes long */
+       blob->content = talloc_size(NULL, blob->length - 2);
+       NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, blob->content, (uint32_t)blob->length - 2));
+
+       remaining_length = blob->mapi_len - blob->length;
+       blob->remaining = talloc_size(NULL, remaining_length);
+       NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, blob->remaining, remaining_length));
+
+       return NT_STATUS_OK;
+}
diff --git a/ndr_mapi.h b/ndr_mapi.h
new file mode 100644 (file)
index 0000000..8f4877f
--- /dev/null
@@ -0,0 +1,25 @@
+/* 
+   OpenChange implementation.
+
+   libndr mapi support
+
+   Copyright (C) Julien Kerihuel 2005
+   
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+void ndr_print_MAPI_DATA(struct ndr_print *ndr, const char *name, const struct MAPI_DATA *r);
+NTSTATUS ndr_push_MAPI_DATA(struct ndr_push *ndr, int ndr_flags, const struct MAPI_DATA *blob);
+NTSTATUS ndr_pull_MAPI_DATA(struct ndr_pull *ndr, int ndr_flags, struct MAPI_DATA *blob);
diff --git a/openchange.h b/openchange.h
new file mode 100644 (file)
index 0000000..a3e992d
--- /dev/null
@@ -0,0 +1,54 @@
+#ifndef __OPENCHANGE_H__
+#define __OPENCHANGE_H__
+
+#include "config.h"
+#include <stdint.h>
+#include <stdio.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <talloc.h>
+#include <string.h>
+#include <stdarg.h>
+#include <fcntl.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef HAVE_NOT_DIRENT_H
+#include <sys/dir.h>
+#else
+#include <dirent.h>
+#endif
+
+#include <dcerpc.h>
+
+#include <core.h>
+#include <core/error.h>
+#include <core/nterr.h>
+#include <util.h>
+#include <param.h>
+#include <param/proto.h>
+#include <samba/popt.h>
+#include <auth.h>
+#include <credentials.h>
+#include <ndr.h>
+#include <popt.h>
+#include <ctype.h>
+
+#include <dcerpc_server.h>
+
+#include <gen_ndr/misc.h>
+#include <gen_ndr/security.h>
+#include <gen_ndr/samr.h>
+
+#include <ldap.h>
+#include <ldb.h>
+#include <ldb_errors.h>
+#include <samdb.h>
+
+#include <db_wrap.h>
+
+#define TEST_USER_NAME         "nspitestuser"
+#define        TEST_MACHINE_NAME       "nspitestcomputer"
+
+#endif /* __OPENCHANGE_H__ */
diff --git a/providers/emsabp.c b/providers/emsabp.c
new file mode 100644 (file)
index 0000000..701b1be
--- /dev/null
@@ -0,0 +1,711 @@
+/*
+   OpenChange Project
+
+   ems address book provider implementation
+
+   Copyright (C) Julien Kerihuel 2006
+   Copyright (C) Pauline Khun 2006
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "openchange.h"
+#include "ndr_exchange.h"
+#include "libmapi/include/mapidefs.h"
+#include "libmapi/IMAPISession.h"
+#include "libmapi/include/mapi_proto.h"
+#include "libmapi/include/proto.h"
+#include "libmapi/mapitags.h"
+#include "emsabp.h"
+
+struct mapitags_x500 emsabp_single_x500_tags[] =
+{
+       /* GetHierarchyInfo property tags */
+
+       { PR_CONTAINER_FLAGS,           "containerFlags"        },
+       { PR_EMS_AB_CONTAINERID,        "containerID"           },
+       { PR_EMS_AB_IS_MASTER,          "IsMaster"              },
+       { PR_EMS_AB_PARENT_ENTRYID,     "parentID"              },
+
+       /* GetMatches property tags */
+
+        { PR_DISPLAY_NAME,             "displayName"           },
+       { PR_DISPLAY_NAME_UNICODE,      "displayName"           },
+        { PR_TITLE,                    "personalTitle"         },
+        { PR_COMPANY_NAME,             "company"               },
+        { PR_EMAIL_ADDRESS,            "legacyExchangeDN"      },
+        { PR_ACCOUNT,                  "sAMAccountName"        },
+       { PR_ACCOUNT_UNICODE,           "saMAccountName"        },
+
+       /* QueryRows property tags */
+
+       { PR_EMS_AB_PROXY_ADDRESSES,    "proxyAddresses"        },
+
+       /* GetProps property tags */
+
+        { PR_EMS_AB_NETWORK_ADDRESS,   "networkAddress"        },
+
+        { 0,                           NULL                    }
+};
+
+struct mapitags_x500 emsabp_multi_x500_tags[] =
+{
+       { PR_EMS_AB_HOME_MDB,           "homeMDB"               },
+        { 0,                           NULL                    }
+};
+
+struct emsabp_containerID emsabp_containerID[] = 
+{
+       { "All Address Lists",  0x1b50 } ,
+       { "All Contacts",       0x1b53 } ,
+       { "All Groups",         0x1b52 } ,
+       { "All Users",          0x1b51 } ,
+       { "Public Folders",     0x1b54 } ,
+       { NULL,                 0x0    }
+};
+
+/*
+  Initialize the context data structure and open a connection on samdb database
+*/
+
+struct emsabp_ctx *emsabp_init(TALLOC_CTX *mem_ctx, struct dcesrv_call_state *dce_call)
+{
+       struct emsabp_ctx       *emsabp_ctx;
+
+       emsabp_ctx = talloc_named(mem_ctx, sizeof (struct emsabp_ctx), EMSABP_CTX);
+       if (!emsabp_ctx) return NULL;
+       emsabp_ctx->mem_ctx = talloc_init(EMSABP_CTX);
+
+       /* return an opaque context pointer on samdb database */
+       emsabp_ctx->sam_ctx = samdb_connect(emsabp_ctx->mem_ctx, dce_call->conn->auth_state.session_info); 
+       if (emsabp_ctx->sam_ctx == NULL) {
+               talloc_free(emsabp_ctx);
+               return NULL;
+       }       
+       
+       emsabp_ctx->entry_ids = NULL;
+
+       return emsabp_ctx;
+}
+
+/*
+  Add an entry in the chain list
+*/
+
+BOOL emsabp_add_entry(struct emsabp_ctx *emsabp_ctx, uint8_t *instance_key,
+                     struct ldb_message *ldb_recipient)
+{
+       struct entry_id         *entry;
+
+       entry = talloc(emsabp_ctx->mem_ctx, struct entry_id);
+       entry->guid = samdb_result_guid(ldb_recipient, "objectGUID");
+       
+       entry->instance_key =  talloc_size(emsabp_ctx->mem_ctx, 4 * sizeof (uint8_t));
+       
+       memset(entry->instance_key, 0, 4);
+       entry->instance_key[0] = entry->guid.node[4];
+       entry->instance_key[1] = entry->guid.node[5];
+
+       entry->msg = ldb_recipient;
+       entry->next = emsabp_ctx->entry_ids;
+
+       if (instance_key) {
+               memset(instance_key, 0, 4);
+               instance_key[0] = entry->instance_key[0];
+               instance_key[1] = entry->instance_key[1];
+       }
+
+       emsabp_ctx->entry_ids = entry;
+
+       return True;
+}
+
+
+/*
+  search and open an entry in the Active Directory
+  PR_ANR is mapped under PR_ACCOUNT_NAME
+  PR_ACCOUNT_NAME is represented in the AD by the samrAccountName attribute
+*/
+
+NTSTATUS emsabp_search(struct emsabp_ctx *emsabp_ctx, uint8_t *instance_key, struct SRestriction *res)
+{
+       struct SPropertyRestriction     *res_prop = NULL;
+       struct ldb_message              **ldb_recipient;
+       struct SPropValue               *lpProp = NULL;
+       const char * const              recipient_attrs[] = { "*", NULL};
+       char                            *recipient;
+       char                            *ldb_filter;
+       int                             ret;
+
+       if (((uint32_t)(res->rt)) != RES_PROPERTY) {
+               return NT_STATUS_NOT_IMPLEMENTED;
+       }
+
+       res_prop = (struct SPropertyRestriction *)&(res->res);
+       if ((res_prop->ulPropTag != PR_ANR) && (res_prop->ulPropTag != PR_ANR_UNICODE)) {
+               return NT_STATUS_NOT_IMPLEMENTED;
+       }
+
+       lpProp = res_prop->lpProp;
+       if ((recipient = (char *)((res_prop->ulPropTag == PR_ANR) ? lpProp->value.lpszA : lpProp->value.lpszW))) {
+               ldb_filter = talloc_asprintf(emsabp_ctx->mem_ctx, "(sAMAccountName=%s)", recipient);
+       } else {
+               return NT_STATUS_INVALID_PARAMETER;
+       }
+       ret = gendb_search(emsabp_ctx->sam_ctx,
+                          emsabp_ctx, NULL, &ldb_recipient, recipient_attrs,
+                          ldb_filter);
+       if (ret != 1) {
+               return NT_STATUS_NO_SUCH_USER;
+       }
+
+       if (!emsabp_add_entry(emsabp_ctx, instance_key, ldb_recipient[0])) {
+               /* FIXME: Change NTSTATUS value */
+               return NT_STATUS_INVALID_PARAMETER;
+       }
+       
+       return NT_STATUS_OK;
+}
+
+/*
+  search and open an entry in the Active Directory
+  according to the given dn
+*/
+
+NTSTATUS emsabp_search_dn(struct emsabp_ctx *emsabp_ctx, struct ldb_message **ldb_res, uint8_t *instance_key, const char *dn)
+{
+       const struct ldb_dn     *ldb_dn = NULL;
+       const char * const      recipient_attrs[] = { "*", NULL};
+       struct ldb_message      **ldb_recipient;
+       char                    *ldb_filter;
+       int                     ret;
+
+       if (dn == NULL) {
+               return NT_STATUS_INVALID_PARAMETER;
+       }       
+       /* Search for an Active Directory dn */
+       ldb_dn = ldb_dn_explode(emsabp_ctx->mem_ctx, dn);
+        if (ldb_dn != NULL) {
+                ret = gendb_search_dn(emsabp_ctx->sam_ctx, emsabp_ctx, ldb_dn,
+                                      &ldb_recipient, recipient_attrs);
+        } else {
+                /* Search for an x400 dn which identifies an Exchange object on the Active Directory */
+                ldb_filter = talloc_asprintf(emsabp_ctx->mem_ctx, "(legacyExchangeDN=%s)", dn);
+                ret = gendb_search(emsabp_ctx->sam_ctx,
+                                   emsabp_ctx, NULL, &ldb_recipient, recipient_attrs,
+                                   ldb_filter);
+        }
+       if (ret != 1) {
+               return NT_STATUS_NO_SUCH_USER;
+       }
+       if (ldb_res) {
+               *ldb_res = ldb_recipient[0];
+       }
+       if (!emsabp_add_entry(emsabp_ctx, instance_key, ldb_recipient[0])) {
+               /* FIXME: Change NTSTATUS value */
+               return NT_STATUS_INVALID_PARAMETER;
+       }
+
+       return NT_STATUS_OK;
+}
+
+/*
+  find the x500 attr matching the mapitag 
+  query the message and retrieve the attribute value 
+  if the attr doesn't exist, return NULL
+*/
+
+void *emsabp_query(TALLOC_CTX *mem_ctx, struct emsabp_ctx *emsabp_ctx, struct entry_id *entry, uint32_t mapitag)
+{
+       const char                      *guid_str;
+       struct GUID                     *guid;
+       struct ldb_message_element      *ldb_element;
+       struct ldb_message              *ldb_res;
+       struct SLPSTRArray              *mv_string;
+       struct SBinary                  *bin;
+       const char                      *ldb_str;
+       const char                      *x500 = NULL;
+       NTSTATUS                        status;
+       BOOL                            ismultix500 = False;
+       uint32_t                        ldb_int;
+       uint32_t                        i;
+       uint32_t                        *num;
+       uint8_t                         *instance_key;
+       void                            *data = (void *) NULL;
+
+       switch (mapitag) {
+       case PR_ADDRTYPE:
+               data = talloc_strdup(mem_ctx, EMSABP_ADDRTYPE);
+               return (data);
+       case PR_ENTRYID:
+               guid_str = lp_parm_string(-1, "exchange", "GUID");
+               guid = talloc(mem_ctx, struct GUID);
+               GUID_from_string(guid_str, guid);
+               bin = talloc(mem_ctx, struct SBinary);
+
+               bin->cb = 32;
+               bin->lpb = talloc_size(mem_ctx, sizeof(uint8_t) * bin->cb);
+               memset(bin->lpb, 0, bin->cb);
+               bin->lpb[0] = 0x87;     /* Maybe a mask of bits */
+               
+               bin->lpb[4]  = (guid->time_low & 0xFF);
+               bin->lpb[5]  = ((guid->time_low >>  8) & 0xFF);
+               bin->lpb[6]  = ((guid->time_low >> 16) & 0xFF);
+               bin->lpb[7]  = ((guid->time_low >> 24) & 0xFF);
+               bin->lpb[8]  = (guid->time_mid &0xFF);
+               bin->lpb[9]  = ((guid->time_mid >>  8) & 0xFF);
+               bin->lpb[10] = (guid->time_hi_and_version & 0xFF);
+               bin->lpb[11] = ((guid->time_hi_and_version >> 8) & 0xFF); 
+               bin->lpb[12] = (guid->clock_seq[0] & 0xFF);
+               bin->lpb[13] = (guid->clock_seq[1] & 0xFF);
+               bin->lpb[14] = guid->node[0];
+               bin->lpb[15] = guid->node[1];
+               bin->lpb[16] = guid->node[2];
+               bin->lpb[17] = guid->node[3];
+               bin->lpb[18] = guid->node[4];
+               bin->lpb[19] = guid->node[5];
+
+               bin->lpb[20] = 0x01;
+               /* 21 -> 27 0 bytes */
+               bin->lpb[28] = entry->guid.node[4];
+               bin->lpb[29] = entry->guid.node[5];
+               /* 30 -> 31 0 bytes */
+               
+               talloc_free(guid);
+               return (bin);
+       case PR_OBJECT_TYPE:
+               data = talloc(mem_ctx, uint32_t);
+               *((uint32_t *)data) = MAPI_MAILUSER;
+               return (data);
+       case PR_DISPLAY_TYPE:
+               data = talloc(mem_ctx, uint32_t);
+               *((uint32_t *)data) = DT_MAILUSER;
+               return (data);
+       case PR_INSTANCE_KEY:
+               bin = talloc(mem_ctx, struct SBinary);
+               bin->cb = 4;
+               bin->lpb = talloc_size(mem_ctx, sizeof(uint8_t) * bin->cb);
+               memcpy(bin->lpb, entry->instance_key, 4);
+               return (bin);
+       }
+
+       /* Check tag existence, otherwise return NULL */
+       for (i = 0; emsabp_single_x500_tags[i].mapitag; i++) {
+               if (emsabp_single_x500_tags[i].mapitag == mapitag) {
+                       x500 = emsabp_single_x500_tags[i].x500;
+                       break;
+               }
+       }
+       if (x500 == NULL) {
+               for (i = 0; emsabp_multi_x500_tags[i].mapitag; i++) {
+                       if (emsabp_multi_x500_tags[i].mapitag == mapitag) {
+                               ismultix500 = True;
+                               x500 = emsabp_multi_x500_tags[i].x500;
+                               break;
+                       }
+               }
+               if (x500 == NULL) {
+                       return NULL;
+               }       
+       }
+       
+       switch (mapitag & 0xFFFF) {
+       case PT_STRING8:
+       case PT_UNICODE:
+               ldb_str = ldb_msg_find_attr_as_string(entry->msg, x500, NULL);
+               if (ismultix500) {
+                       instance_key = talloc_size(mem_ctx, sizeof (uint8_t) * 4);
+                       status = emsabp_search_dn(emsabp_ctx, &ldb_res, instance_key, ldb_str);
+                       if (!NT_STATUS_IS_OK(status)) {
+                               return NULL;
+                       }
+                       ldb_str = ldb_msg_find_attr_as_string(ldb_res, "legacyExchangeDN", NULL);
+                       if (!ldb_str) {
+                               return NULL;
+                       }
+               }
+               data = talloc_strdup(mem_ctx, ldb_str);
+               break;
+       case PT_SHORT :
+       case PT_LONG :
+       case PT_BOOLEAN :
+       case PT_MV_SHORT :
+       case PT_NULL :
+       case PT_OBJECT :
+               ldb_int = ldb_msg_find_attr_as_int(entry->msg, x500, 0);
+               num = talloc(mem_ctx, uint32_t);
+               *num = ldb_int;
+               data = (void *)num;
+               break;
+       case PT_MV_STRING8:
+               mv_string = talloc(mem_ctx, struct SLPSTRArray);
+               ldb_element = ldb_msg_find_element(entry->msg, x500);
+               if (!ldb_element) {
+                       return NULL;
+               }
+               mv_string->cValues = ldb_element[0].num_values & 0xFFFFFFFF;
+               mv_string->strings = talloc_size(mem_ctx, sizeof(struct SLPSTRArray *) * mv_string->cValues);
+               for (i = 0; i < mv_string->cValues; i++) {
+                       mv_string->strings[i] = talloc(mem_ctx, struct LPSTR);
+                       mv_string->strings[i]->lppszA = talloc_strdup(mem_ctx, (char *)ldb_element->values[i].data);
+               }
+               data = mv_string;
+               break;
+       }
+       return data;
+}
+
+/*
+  point on the entry_id matching the instance_key
+  set the SRowSet with the requested information
+ */
+
+NTSTATUS emsabp_fetch_attrs(TALLOC_CTX *mem_ctx, struct emsabp_ctx *emsabp_ctx,
+                           struct SRow *SRow, uint8_t *instance_key,
+                           struct SPropTagArray *SPropTagArray)
+{
+       struct entry_id         *entry;
+       uint32_t                i;
+       struct SPropValue       *lpProps;
+       uint32_t                ulPropTag;
+       void                    *data;
+       
+       entry = emsabp_ctx->entry_ids;
+       while (entry != NULL) {
+               DEBUG(3, ("emsabp_fetch_attrs: Comparing instance_key 0x%.2x%.2x%.2x%.2x with 0x%.2x%.2x%.2x%.2x\n",
+                         instance_key[0], instance_key[1], instance_key[2], instance_key[3], entry->instance_key[0],
+                         entry->instance_key[1],entry->instance_key[2],entry->instance_key[3]));
+               if ((instance_key[0] == entry->instance_key[0]) &&
+                   (instance_key[1] == entry->instance_key[1]) &&
+                   (instance_key[2] == entry->instance_key[2]) &&
+                   (instance_key[3] == entry->instance_key[3])) {
+                       DEBUG(3, ("emsabp_fetch_attrs: INSTANCE_KEY matches\n"));
+                       break;
+               }
+               entry = entry->next;
+       }
+
+       SRow->ulAdrEntryPad = 0x0;
+       SRow->cValues = (SPropTagArray->cValues) ? (SPropTagArray->cValues - 1) : 0;
+
+       lpProps = talloc_size(mem_ctx, sizeof(*lpProps) * SRow->cValues);
+       for (i = 0; i < (SRow->cValues); i++) {
+               ulPropTag = SPropTagArray->aulPropTag[i];
+               if (entry) {
+                       data = emsabp_query(mem_ctx, emsabp_ctx, entry, SPropTagArray->aulPropTag[i]);
+               } else {
+                       data = NULL;
+               }
+                       
+               ulPropTag = SPropTagArray->aulPropTag[i];
+               if (!data) {
+                       ulPropTag &= 0xFFFF0000;
+                       ulPropTag += PT_ERROR;
+               }
+               lpProps[i].ulPropTag = ulPropTag;
+               lpProps[i].dwAlignPad = 0x0;
+               set_SPropValue(&lpProps[i], data);
+       }
+       SRow->lpProps = lpProps;
+
+       return (entry) ?  NT_STATUS_OK : NT_STATUS_INVALID_PARAMETER;
+}
+
+/*
+ * emsabp_hierarchy_get_entryID:
+ * Generate the PR_ENTRYID SBinary structure for the given recipient
+ *
+ */
+
+struct SBinary *emsabp_hierarchy_get_entryID(TALLOC_CTX *mem_ctx, struct GUID *guid, BOOL containerID)
+{
+       struct SBinary  *entryID;
+       char            *guid_str = (char *) NULL;
+       
+       if (!containerID) {
+               guid_str =  talloc_asprintf(mem_ctx,
+                                           PACKED_AB_GUID,
+                                           guid->time_low, guid->time_mid,
+                                           guid->time_hi_and_version,
+                                           guid->clock_seq[0],
+                                           guid->clock_seq[1],
+                                           guid->node[0], guid->node[1],
+                                           guid->node[2], guid->node[3],
+                                           guid->node[4], guid->node[5]);
+               entryID = generate_recipient_entryid(mem_ctx, (const char *) guid_str);
+               talloc_free(guid_str);
+       } else {
+               entryID = generate_recipient_entryid(mem_ctx, NULL);
+       }       
+       return (entryID);
+}
+
+/*
+ * emsabp_hierarchy_get_containerID:
+ * returns the containerID associated with the name passed as param
+ */
+
+uint32_t *emsabp_hierarchy_get_containerID(TALLOC_CTX *mem_ctx, const char *name)
+{
+       int             i;
+       uint32_t        *ret;
+
+       ret = talloc(mem_ctx, uint32_t);
+       *ret = 0;
+       
+       if (!name) {
+               return ret;
+       }
+       for (i = 0; emsabp_containerID[i].name; i++) {
+               if (name && emsabp_containerID[i].name && !strcmp(name, emsabp_containerID[i].name)) {
+                       *ret = emsabp_containerID[i].id;
+                       return ret;
+               }
+       }
+       return ret;
+}
+
+/*
+  
+*/
+
+void *emsabp_hierarchy_query(TALLOC_CTX *mem_ctx,
+                            struct ldb_message *ldb_recipient,
+                            struct ldb_message *ldb_recipient_parent,
+                            uint32_t mapitag)
+{
+       void            *data = (void *) NULL;
+       char            *displayName;
+       struct GUID     guid;
+
+       switch (mapitag) {
+       case PR_ENTRYID:
+               guid = samdb_result_guid(ldb_recipient, "objectGUID");
+               data = emsabp_hierarchy_get_entryID(mem_ctx,
+                                                   &guid,
+                                                   !strcmp(ldb_msg_find_attr_as_string(ldb_recipient, "displayName", NULL), "Address Lists Container"));
+               break;
+       case PR_CONTAINER_FLAGS:
+               data = talloc(mem_ctx, uint32_t);
+               if (!strcmp(ldb_msg_find_attr_as_string(ldb_recipient, "displayName", NULL), "All Address Lists")) {
+                       *((uint32_t *)data) = AB_UNMODIFIABLE | AB_SUBCONTAINERS | AB_RECIPIENTS;
+               } else {
+                       *((uint32_t *)data) = AB_UNMODIFIABLE | AB_RECIPIENTS;
+               }
+               break;
+       case PR_DEPTH:
+               data = talloc(mem_ctx, uint32_t);
+               if (ldb_recipient_parent) {
+                       *((uint32_t *)data) = 0x1;
+               } else {
+                       *((uint32_t *)data) = 0x0;
+               }
+               break;
+       case PR_EMS_AB_CONTAINERID:
+               data = emsabp_hierarchy_get_containerID(mem_ctx, ldb_msg_find_attr_as_string(ldb_recipient, "displayName", NULL));
+               break;
+       case PR_DISPLAY_NAME:
+       case PR_DISPLAY_NAME_UNICODE:
+               displayName = (void *)ldb_msg_find_attr_as_string(ldb_recipient, "displayName", NULL);
+               if (strcmp(displayName, "Address Lists Container")) {
+                       data = talloc_strdup(mem_ctx, displayName);
+               } else {
+                       data = talloc_zero(mem_ctx, char *);
+                       data = (char *) NULL;
+               }
+               break;
+       case PR_EMS_AB_IS_MASTER:
+               data = talloc(mem_ctx, uint16_t);
+               *((uint16_t *)data) = 0x0;
+               break;
+       case PR_EMS_AB_PARENT_ENTRYID:
+               guid = samdb_result_guid(ldb_recipient_parent, "objectGUID");
+               data = emsabp_hierarchy_get_entryID(mem_ctx,
+                                                   &guid,
+                                                   !strcmp(ldb_msg_find_attr_as_string(ldb_recipient_parent, "displayName", NULL), "Address Lists Container"));
+               break;
+       default:
+               return NULL;
+       }
+
+       return data;
+}
+
+/*
+  set the SRowSet with the requested information
+*/
+
+NTSTATUS emsabp_hierarchy_fetch_attrs(TALLOC_CTX *mem_ctx,
+                                     uint32_t flags,
+                                     struct SRow *SRow,
+                                     struct ldb_message *ldb_recipient,
+                                     struct ldb_message *ldb_recipient_parent)
+{
+       struct SPropTagArray    *SPropTagArray;
+       struct SPropValue       *lpProps;
+       uint32_t                ulPropTag, i;
+       void                    *data;
+       
+       SRow->ulAdrEntryPad = 0x0;
+
+       if (!strcmp(ldb_msg_find_attr_as_string(ldb_recipient, "displayName", NULL), "All Address Lists") ||
+           !strcmp(ldb_msg_find_attr_as_string(ldb_recipient, "displayName", NULL), "Address Lists Container")) {
+               SPropTagArray = set_SPropTagArray(mem_ctx, 0x6,
+                                                 PR_ENTRYID,
+                                                 PR_CONTAINER_FLAGS,
+                                                 PR_DEPTH,
+                                                 PR_EMS_AB_CONTAINERID,
+                                                 ((flags) ? PR_DISPLAY_NAME_UNICODE : PR_DISPLAY_NAME),
+                                                 PR_EMS_AB_IS_MASTER
+                       );
+       } else {
+               SPropTagArray = set_SPropTagArray(mem_ctx, 0x7,
+                                                 PR_ENTRYID,
+                                                 PR_CONTAINER_FLAGS,
+                                                 PR_DEPTH,
+                                                 PR_EMS_AB_CONTAINERID,
+                                                 ((flags) ? PR_DISPLAY_NAME_UNICODE : PR_DISPLAY_NAME),
+                                                 PR_EMS_AB_IS_MASTER,
+                                                 PR_EMS_AB_PARENT_ENTRYID
+                       );
+       }
+       
+       SRow->cValues = SPropTagArray->cValues - 1;     
+
+       lpProps = talloc_size(mem_ctx, sizeof(*lpProps) * SRow->cValues);
+
+       for (i = 0; i < (SRow->cValues); i++) {
+               ulPropTag = SPropTagArray->aulPropTag[i];
+               data = emsabp_hierarchy_query(mem_ctx, ldb_recipient, ldb_recipient_parent, SPropTagArray->aulPropTag[i]);
+               ulPropTag = SPropTagArray->aulPropTag[i];
+               if (!data && ((SPropTagArray->aulPropTag[i] != PR_DISPLAY_NAME) && (SPropTagArray->aulPropTag[i] != PR_DISPLAY_NAME_UNICODE))) {
+                       ulPropTag &= 0xFFFF0000;
+                       ulPropTag += PT_ERROR;
+               }
+               lpProps[i].ulPropTag = ulPropTag;
+               lpProps[i].dwAlignPad = 0x0;
+               if ((SPropTagArray->aulPropTag[i] == PR_DISPLAY_NAME) || (SPropTagArray->aulPropTag[i] == PR_DISPLAY_NAME_UNICODE)) {
+                           if (data) {
+                                   set_SPropValue(&lpProps[i], data);
+                           } else {
+                                   switch (SPropTagArray->aulPropTag[i]) {
+                                   case PR_DISPLAY_NAME: 
+                                           lpProps[i].value.lpszA = (char *) NULL;
+                                           break;
+                                   case PR_DISPLAY_NAME_UNICODE:
+                                           lpProps[i].value.lpszW = (char *) NULL;
+                                           break;
+                                   default:
+                                           break;
+                                   }
+                           }
+               }
+               else {
+                       set_SPropValue(&lpProps[i], data);
+               }
+       }
+
+       SRow->lpProps = lpProps;
+       
+       return NT_STATUS_OK;
+}
+
+uint32_t emsabp_get_containers(TALLOC_CTX *mem_ctx, struct emsabp_ctx *emsabp_ctx, uint32_t flags,
+                              struct SRow **SRows, struct ldb_message **ldb_recipient_parent,
+                              const char *dn, const char *filter)
+{
+       const char * const      recipient_attrs[] = { "*", NULL};
+       struct ldb_message      **ldb_recipient;
+       struct ldb_dn           *basedn;
+       uint32_t                i, count;
+
+       basedn = ldb_dn_explode(mem_ctx, dn);
+
+       /* search subcontainers */
+       count = gendb_search(emsabp_ctx->sam_ctx,
+                            emsabp_ctx, basedn, &ldb_recipient, recipient_attrs,
+                            filter);
+       if (!count) {
+               return 0;
+       }
+       
+       *SRows = talloc_array(mem_ctx, struct SRow, count);
+
+       for (i = 0; i < count; i++) {
+         emsabp_hierarchy_fetch_attrs(mem_ctx, flags, &((*SRows)[i]), ldb_recipient[i], *ldb_recipient_parent);
+       }
+
+       if (count == 1) {
+               *ldb_recipient_parent = ldb_recipient[0];
+       } else {
+               *ldb_recipient_parent = NULL;
+       }
+
+       return count;
+}
+
+NTSTATUS emsabp_get_hierarchytable(TALLOC_CTX *mem_ctx, struct emsabp_ctx *emsabp_ctx, uint32_t flags, 
+                                  struct SRowSet **RowSet)
+{
+       struct ldb_message      *ldb_recipient_parent = NULL;
+       struct SRow             *SRow_root, *SRow_subroot, *SRow_containers;
+       int                     i, count;
+       char                    *dn;
+
+       RowSet[0] = talloc(mem_ctx, struct SRowSet);
+
+       /* Set 'Address Lists Container' object */
+       count = emsabp_get_containers(mem_ctx, emsabp_ctx, flags, &SRow_root, &ldb_recipient_parent,
+                                     NULL, "(cn=Address Lists Container)");
+       if (count != 1) {
+               return NT_STATUS(MAPI_E_CORRUPT_STORE);
+       }
+
+       /* Set 'All Address Lists' object */
+
+       dn = (char *)ldb_msg_find_attr_as_string(ldb_recipient_parent, "dn", NULL);
+       ldb_recipient_parent = NULL;
+
+       count = emsabp_get_containers(mem_ctx, emsabp_ctx, flags, &SRow_subroot, &ldb_recipient_parent,
+                                     dn, "(cn=All Address Lists)");
+       if (count != 1) {
+               return NT_STATUS(MAPI_E_CORRUPT_STORE);
+       }
+
+       /* Set 'All Address Lists' subcontainers object */
+       count = emsabp_get_containers(mem_ctx, emsabp_ctx, flags, &SRow_containers, &ldb_recipient_parent,
+                                     ldb_msg_find_attr_as_string(ldb_recipient_parent, "dn", NULL), "(&(objectClass=addressbookContainer)(!(cn=All Address Lists)))");
+
+       if (count < 1) {
+               return NT_STATUS(MAPI_E_CORRUPT_STORE);
+       }
+
+       printf("emsabp_get_hierarchytable: count = %d\n", count);
+       RowSet[0]->cRows = count + 2;
+       RowSet[0]->aRow = talloc_array(mem_ctx, struct SRow, RowSet[0]->cRows);
+
+       /* Add all root SRow to the SRowSet */
+       memcpy(&(RowSet[0]->aRow[0]), &(SRow_root[0]), sizeof(struct SRow));
+
+       /* Add all subroot SRow to the SRowSet */
+       memcpy(&(RowSet[0]->aRow[1]), &(SRow_subroot[0]), sizeof(struct SRow));
+
+       /* Add all subcontainers SRow to the SRowSet */
+       for (i = 2; i < (count + 2); i++) {
+               memcpy(&(RowSet[0]->aRow[i]), &(SRow_containers[i - 2]), sizeof(struct SRow));
+       }
+       
+       return NT_STATUS_OK;
+}
diff --git a/providers/emsabp.h b/providers/emsabp.h
new file mode 100644 (file)
index 0000000..53c9e5b
--- /dev/null
@@ -0,0 +1,111 @@
+/*
+   OpenChange Project
+
+   ems address book provider implementation
+
+   Copyright (C) Julien Kerihuel 2006
+   Copyright (C) Pauline Khun 2006
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#ifndef __EMSABP_H
+#define __EMSABP_H
+
+#include "libmapi/include/property.h"
+
+/*
+ * ENTRY_ID structure for ADDRESS BOOK provider
+ * uint8_t             abFlags[4]      // bitmask of flags that provide information describing 
+ *                                     // the object set to 0 (LONGTERM?)
+ * struct MAPIUID      provider_uid;   // the address book provider guid
+ * uint8_t             entry_id_end[7]
+ * const               char *exchange_dn;
+ *
+ */
+
+#define        PACKED_AB_GUID  "guid=%08X%04X%04X%02X%02X%02X%02X%02X%02X%02X%02X"
+
+static const uint8_t AB_MAPIUID[] = {
+       0xdc, 0xa7, 0x40, 0xc8, 0xc0, 0x42, 0x10, 0x1a,
+       0xb4, 0xb9, 0x08, 0x00, 0x2b, 0x2f, 0xe1, 0x82
+};
+
+static const uint8_t ABENTRYID_END[] = {
+       0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00
+};
+
+struct entry_id {
+       uint8_t                 abFlags;        /* bitmask of flags that provide information describing the object. */
+       uint8_t                 ab;             /* specifies the binary data used by service providers */
+       struct GUID             guid;
+       uint8_t                 *instance_key;
+       struct ldb_message      *msg;
+       struct entry_id         *next;
+};
+
+struct emsabp_ctx {
+       void            *sam_ctx;
+       TALLOC_CTX      *mem_ctx;
+       struct entry_id *entry_ids;
+};
+
+struct emsabp_containerID {
+       const char      *name;
+       uint32_t        id;
+};
+
+#define        EMSABP_CTX      "emsabp context"
+#define        EMSABP_ADDRTYPE "EX"
+
+/* 
+ * Display Type values 
+ */
+
+/*  For address book contents tables */
+#define        DT_MAILUSER             0x0
+#define DT_DISTLIST            0x1
+#define DT_FORUM               0x2
+#define DT_AGENT               0x3
+#define DT_ORGANIZATION                0x4
+#define DT_PRIVATE_DISTLIST    0x5
+#define DT_REMOTE_MAILUSER     0x6
+
+/*  For address book hierarchy tables */
+#define DT_MODIFIABLE          0x10000
+#define DT_GLOBAL              0x20000
+#define DT_LOCAL               0x30000
+#define DT_WAN                 0x40000
+#define DT_NOT_SPECIFIC                0x50000
+
+/*  For folder hierarchy tables */
+#define DT_FOLDER              0x01000000
+#define DT_FOLDER_LINK         0x02000000
+#define DT_FOLDER_SPECIAL      0x04000000
+
+/* Container flags */
+#define        AB_RECIPIENTS           0x1     /* The container CAN hold recipients */
+#define        AB_SUBCONTAINERS        0x2     /* The container CAN hold child containers */
+#define        AB_MODIFIABLE           0x4     /* Entries can be added to and removed from the container */
+#define        AB_UNMODIFIABLE         0x8     /* Entries cannot be added to or removed from the container */
+#define        AB_FIND_ON_OPEN         0x10    /* Displays a dialog box to request a restriction before diplaying any contents of the container */
+#define        AB_NOT_DEFAULT          0x20    /* The container is not the default one */
+
+/* GetHierarchyInfo flags */
+#define        MAPI_UNICODE            0x80000000
+#define        MAPI_DEFERRED_ERRORS    0x00000008
+#define        CONVENIENT_DEPTH        0x00000001
+
+#endif /* __EMSABP_H */
diff --git a/script/installoc.sh b/script/installoc.sh
new file mode 100755 (executable)
index 0000000..078521a
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+# install OpenChange miscellaneous files
+
+SRCDIR="$1"
+JSDIR="$2"
+SETUPDIR="$3"
+
+cd $SRCDIR || exit 1
+
+echo "Installing OpenChange js libs.."
+cp libmapi/setup/scripting/libjs/*.js $JSDIR || exit 1
+echo "Done.."
+
+echo "Installing OpenChange setup templates.."
+cp libmapi/setup/*.ldif $SETUPDIR || exit 1
+echo "All Ok"
+
+exit 0
diff --git a/script/mkproto.pl b/script/mkproto.pl
new file mode 100755 (executable)
index 0000000..097a5cb
--- /dev/null
@@ -0,0 +1,246 @@
+#!/usr/bin/perl
+# Simple script for generating prototypes for C functions
+# Written by Jelmer Vernooij
+# based on the original mkproto.sh by Andrew Tridgell
+
+use strict;
+
+# don't use warnings module as it is not portable enough
+# use warnings;
+
+use Getopt::Long;
+
+#####################################################################
+# read a file into a string
+
+my $public_file = undef;
+my $private_file = undef;
+my $public_define = undef;
+my $private_define = undef;
+my $_public = "";
+my $_private = "";
+my $public_data = \$_public;
+my $private_data = \$_private;
+
+sub public($)
+{
+       my ($d) = @_;
+       $$public_data .= $d;
+}
+
+sub private($)
+{
+       my ($d) = @_;
+       $$private_data .= $d;
+}
+
+sub usage()
+{
+       print "Usage: mkproto.pl [options] [c files]\n";
+       print "OPTIONS:\n";
+       print "  --public=FILE          Write prototypes for public functions to FILE\n";
+       print "  --private=FILE         Write prototypes for private functions to FILE\n";
+       print "  --define=DEF           Use DEF to check whether header was already included\n";
+       print "  --public-define=DEF    Same as --define, but just for public header\n";
+       print "  --private-define=DEF   Same as --define, but just for private header\n";
+       print "  --help                 Print this help message\n\n";
+       exit 0;
+}
+
+GetOptions(
+       'public=s' => sub { my ($f,$v) = @_; $public_file = $v; },
+       'private=s' => sub { my ($f,$v) = @_; $private_file = $v; },
+       'define=s' => sub { 
+               my ($f,$v) = @_; 
+               $public_define = $v; 
+               $private_define = "$v\_PRIVATE"; 
+       },
+       'public-define=s' => \$public_define,
+       'private-define=s' => \$private_define,
+       'help' => \&usage
+) or exit(1);
+
+if (not defined($public_define) and defined($public_file)) {
+       $public_define = ".." . uc($public_file) . "__";
+       $public_define =~ tr{./}{__};
+} elsif (not defined($public_define)) {
+       $public_define = '_PROTO_H_';
+}
+
+if (not defined($private_define) and defined($private_file)) {
+       $private_define = "__" . uc($private_file) . "__";
+       $private_define =~ tr{./}{__};
+} elsif (not defined($public_define)) {
+       $public_define = '_PROTO_H_';
+}
+
+if ((defined($private_file) and defined($public_file) and ($private_file eq $public_file)) or 
+       (not defined($private_file) and not defined($public_file))) {
+       $private_data = $public_data;
+}
+
+sub file_load($)
+{
+    my($filename) = shift;
+    local(*INPUTFILE);
+    open(INPUTFILE, $filename) || return undef;
+    my($saved_delim) = $/;
+    undef $/;
+    my($data) = <INPUTFILE>;
+    close(INPUTFILE);
+    $/ = $saved_delim;
+    return $data;
+}
+
+sub print_header($$)
+{
+       my ($file, $header_name) = @_;
+       $file->("#ifndef $header_name\n");
+       $file->("#define $header_name\n\n");
+       $file->("#undef _PRINTF_ATTRIBUTE\n");
+       $file->("#define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2)\n");
+       $file->("/* This file was automatically generated by mkproto.pl. DO NOT EDIT */\n\n");
+}
+
+sub print_footer($$) 
+{
+       my ($file, $header_name) = @_;
+       $file->("#undef _PRINTF_ATTRIBUTE\n");
+       $file->("#define _PRINTF_ATTRIBUTE(a1, a2)\n");
+       $file->("\n#endif /* $header_name */\n\n");
+}
+
+sub handle_loadparm($$) 
+{
+       my ($file,$line) = @_;
+
+       if ($line =~ /^_PUBLIC_ FN_(GLOBAL|LOCAL)_(CONST_STRING|STRING|BOOL|CHAR|INTEGER|LIST)\((\w+),.*\)/o) {
+               my $scope = $1;
+               my $type = $2;
+               my $name = $3;
+
+               my %tmap = (
+                           "BOOL" => "BOOL ",
+                           "CONST_STRING" => "const char *",
+                           "STRING" => "const char *",
+                           "INTEGER" => "int ",
+                           "CHAR" => "char ",
+                           "LIST" => "const char **",
+                           );
+
+               my %smap = (
+                           "GLOBAL" => "void",
+                           "LOCAL" => "int "
+                           );
+
+               $file->("$tmap{$type}$name($smap{$scope});\n");
+       }
+}
+
+sub process_file($$$) 
+{
+       my ($public_file, $private_file, $filename) = @_;
+
+       $filename =~ s/\.o$/\.c/g;
+
+       open(FH, "< $filename") || die "Failed to open $filename";
+
+       $private_file->("\n/* The following definitions come from $filename  */\n\n");
+
+       while (my $line = <FH>) {             
+               my $target = \&private;
+               my $is_public = 0;
+
+               # these are ordered for maximum speed
+               next if ($line =~ /^\s/);
+             
+               next unless ($line =~ /\(/);
+
+               next if ($line =~ /^\/|[;]/);
+
+               if ($line =~ /^_PUBLIC_ FN_/) {
+                       handle_loadparm($public_file, $line);
+                       next;
+               }
+
+               if ($line =~ /^_PUBLIC_[\t ]/) {
+                       $target = \&public;
+                       $is_public = 1;
+               }
+
+               next unless ( $is_public || $line =~ /
+                             ^void|^BOOL|^int|^struct|^char|^const|^\w+_[tT]\s|^uint|^unsigned|^long|
+                             ^NTSTATUS|^ADS_STATUS|^enum\s.*\(|^DATA_BLOB|^WERROR|^XFILE|^FILE|^DIR|
+                             ^double|^TDB_CONTEXT|^TDB_DATA|^TALLOC_CTX|^NTTIME|^FN_|^init_module|
+                             ^GtkWidget|^GType|^smb_ucs2_t
+                             /xo);
+
+               next if ($line =~ /^int\s*main/);
+
+               if ( $line =~ /\(.*\)\s*$/o ) {
+                       chomp $line;
+                       $target->("$line;\n");
+                       next;
+               }
+
+               $target->($line);
+
+               while ($line = <FH>) {
+                       if ($line =~ /\)\s*$/o) {
+                               chomp $line;
+                               $target->("$line;\n");
+                               last;
+                       }
+                       $target->($line);
+               }
+       }
+
+       close(FH);
+}
+
+print_header(\&public, $public_define);
+if ($public_file ne $private_file) {
+       print_header(\&private, $private_define);
+
+       private("/* this file contains prototypes for functions that " .
+                       "are private \n * to this subsystem or library. These functions " .
+                       "should not be \n * used outside this particular subsystem! */\n\n");
+
+       public("/* this file contains prototypes for functions that " . 
+                       "are part of \n * the public API of this subsystem or library. */\n\n");
+
+}
+
+public("#ifndef _PUBLIC_\n#define _PUBLIC_\n#endif\n\n");
+
+process_file(\&public, \&private, $_) foreach (@ARGV);
+print_footer(\&public, $public_define);
+if ($public_file ne $private_file) {
+       print_footer(\&private, $private_define);
+}
+
+if (not defined($public_file)) {
+       print STDOUT $$public_data;
+}
+
+if (not defined($private_file) and defined($public_file)) {
+       print STDOUT $$private_data;
+}
+
+my $old_public_data = file_load($public_file);
+my $old_private_data = file_load($private_file);
+
+if (not defined($old_public_data) or ($old_public_data ne $$public_data))
+{
+       open(PUBLIC, ">$public_file") or die("Can't open `$public_file': $!"); 
+       print PUBLIC "$$public_data";
+       close(PUBLIC);
+} 
+
+if (($public_file ne $private_file) and (
+       not defined($old_private_data) or ($old_private_data ne $$private_data))) {
+
+       open(PRIVATE, ">$private_file") or die("Can't open `$private_file': $!"); 
+       print PRIVATE "$$private_data";
+       close(PRIVATE);
+}
diff --git a/scripting/libjs/oc_provision.js b/scripting/libjs/oc_provision.js
new file mode 100644 (file)
index 0000000..da81947
--- /dev/null
@@ -0,0 +1,319 @@
+/*
+       backend code for provisioning an OpenChange server
+       Copyright Andrew Tridgell 2005
+       Copyright Julien Kerihuel 2005-2006
+       Copyright Jerome Medegan  2006
+       Released under the GNU GPL v2 or later
+*/
+
+/* used to generate sequence numbers for records */
+provision_next_usn = 1;
+
+sys = sys_init();
+
+/*
+  return current time as a nt time string
+*/
+function nttime()
+{
+       return "" + sys.nttime();
+}
+
+/*
+  return first part of hostname
+*/
+function hostname()
+{
+        var s = split(".", sys.hostname());
+        return s[0];
+}
+
+/*
+  return current time as a ldap time string
+*/
+function ldaptime()
+{
+       return sys.ldaptime(sys.nttime());
+}
+
+/*
+  erase an ldb, removing all records
+*/
+function ldb_erase(ldb)
+{
+       var attrs = new Array("dn");
+
+       /* delete the specials */
+       ldb.del("@INDEXLIST");
+       ldb.del("@ATTRIBUTES");
+       ldb.del("@SUBCLASSES");
+       ldb.del("@MODULES");
+
+       /* and the rest */
+       var res = ldb.search("(|(objectclass=*)(dn=*))", attrs);
+       var i;
+       if (typeof(res) == "undefined") {
+               ldb_delete(ldb);
+               return;
+       }
+       for (i=0;i<res.length;i++) {
+               ldb.del(res[i].dn);
+       }
+       res = ldb.search("(objectclass=*)", attrs);
+       if (res.length != 0) {
+               ldb_delete(ldb);
+               return;
+       }
+       assert(res.length == 0);
+}
+
+/*
+  add new records to an existing ldb in the private dir
+ */
+function update_ldb(ldif, dbname, subobj, credentials, session_info, operation)
+{
+       var ldb = ldb_init();
+       var lp = loadparm_init();
+       ldb.session_info = session_info;
+       ldb.credentials = credentials;
+
+       var src = lp.get("setup directory") + "/" + ldif;
+       var data = sys.file_load(src);
+       data = substitute_var(data, subobj);
+
+       message("fetching info from %s\n", src);
+       message("opening dbname: %s\n", dbname);
+       message("%s\n", data);
+       ldb.filename = dbname;
+
+       var connect_ok = ldb.connect(dbname);
+       assert(connect_ok);
+
+       ldb.transaction_start();
+
+       if (operation) {
+               message("Modification\n");
+               var ok = ldb.modify(data);
+       } else {
+               message("Add\n");
+               var ok = ldb.add(data);
+       }
+       if (ok != true) {
+       info.message("ldb commit failed: " + ldb.errstring() + "\n");
+       }
+       assert(ok);
+
+       ldb.transaction_commit();
+}
+
+
+/*
+  setup a ldb in the private dir
+ */
+function setup_ldb(ldif, dbname, subobj)
+{
+       var erase = true;
+       var extra = "";
+       var ldb = ldb_init();
+       var lp = loadparm_init();
+
+       if (arguments.length >= 4) {
+               extra = arguments[3];
+       }
+
+       if (arguments.length == 5) {
+               erase = arguments[4];
+        }
+
+       var src = lp.get("setup directory") + "/" + ldif;
+       var data = sys.file_load(src);
+       data = data + extra;
+       data = substitute_var(data, subobj);
+
+       ldb.filename = dbname;
+
+       var connect_ok = ldb.connect(dbname);
+       assert(connect_ok);
+
+       if (erase) {
+               ldb_erase(ldb); 
+       }
+
+       var add_ok = ldb.add(data);
+       assert(add_ok);
+}
+
+function provision_default_paths(subobj)
+{
+       var lp = loadparm_init();
+       var paths = new Object();
+       paths.smbconf = lp.get("config file");
+       paths.store = "store.ldb";
+       paths.samdb = "sam.ldb";
+       return paths;
+}
+
+function provision_schema(subobj, message, blank, paths, creds, system_session)
+{
+       var data = "";
+       var lp = loadparm_init();
+       var sys = sys_init();
+
+       /*
+        some options need to be upper/lower case
+       */
+       subobj.DOMAIN       = strupper(subobj.DOMAIN);
+       subobj.REALM        = strupper(subobj.REALM);
+       assert(valid_netbios_name(subobj.DOMAIN));
+
+       provision_next_usn = 1;
+
+       message("[OpenChange] Adding new Active Directory classes\n");
+       update_ldb("oc_provision_schema.ldif", paths.samdb, subobj, creds, system_session, ""); 
+       message("[OpenChange] Extending existing Active Directory Schema\n");
+       update_ldb("oc_provision_schema_modify.ldif", paths.samdb, subobj, creds, system_session, "modify");
+       message("[OpenChange] Adding Configuration objects\n");
+       update_ldb("oc_provision_configuration.ldif", paths.samdb, subobj, creds, system_session, "");
+}
+
+/*
+  provision openchange - caution, this wipes all existing data!
+*/
+function provision(subobj, message, blank, paths)
+{
+       var data = "";
+       var lp = loadparm_init();
+       var sys = sys_init();
+       
+       /*
+         some options need to be upper/lower case
+       */
+       subobj.DOMAIN       = strupper(subobj.DOMAIN);
+       subobj.REALM        = strupper(subobj.REALM);
+       assert(valid_netbios_name(subobj.DOMAIN));
+
+       provision_next_usn = 1;
+
+       message("[OpenChange] Setting up store.ldb attributes\n");
+               setup_ldb("oc_provision_init.ldif", paths.store, subobj);
+
+       message("[OpenChange] Setting up store.ldb data\n");
+       setup_ldb("oc_provision.ldif", paths.store, subobj, NULL, false);
+
+       message("[OpenChange] Setting up store.ldb containers\n");
+       setup_ldb("oc_provision_containers.ldif", paths.store, subobj, NULL, false);
+}
+
+/*
+  guess reasonably default options for provisioning
+*/
+function provision_guess()
+{
+       var subobj = new Object();
+       var lp = loadparm_init();
+       random_init(local);
+
+       subobj.HOSTNAME     = hostname();
+       subobj.NETBIOSNAME  = strupper(subobj.HOSTNAME);
+       subobj.DOMAIN       = lp.get("workgroup");
+       subobj.REALM        = lp.get("realm");
+       assert(subobj.DOMAIN);
+       assert(subobj.REALM);
+       subobj.NTTIME       = nttime;
+       subobj.LDAPTIME     = ldaptime;
+       subobj.DOMAINGUID   = randguid();
+       subobj.DOMAINSID    = randsid();
+       subobj.DNSDOMAIN    = strlower(subobj.REALM);
+       subobj.DNSNAME      = sprintf("%s.%s", 
+                                     strlower(subobj.HOSTNAME), 
+                                     subobj.DNSDOMAIN);
+       var rdn_list = split(".", subobj.DNSDOMAIN);
+       subobj.BASEDN       = "DC=" + join(",DC=", rdn_list);
+       var rdns = split(",", subobj.BASEDN);
+       subobj.RDN_DC = substr(rdns[0], strlen("DC="));
+
+       return subobj;
+}
+
+/*
+  search for one attribute as a string
+ */
+function searchone(ldb, expression, attribute)
+{
+       var attrs = new Array(attribute);
+       res = ldb.search(expression, attrs);
+       if (res.length != 1 ||
+           res[0][attribute] == undefined) {
+               return undefined;
+       }
+       return res[0][attribute];
+}
+
+
+/*
+  extend user record
+*/
+function oc_newuser(username, message, session_info, credentials)
+{
+       var lp          = loadparm_init();
+       var samdb       = lp.get("sam database");
+       var dnsdomain   = strlower(lp.get("realm"));
+       var hostname    = hostname();
+       var netbiosname = strupper(hostname);
+       var ldb         = ldb_init();
+
+       random_init(local);
+       ldb.session_info = session_info;
+       ldb.credentials = credentials;
+
+       /* connect to the sam */
+       var ok = ldb.connect(samdb);
+       assert(ok);
+
+       ldb.transaction_start();
+
+       /* find the DNs for the domain and the domain users group */
+       var domain_dn = searchone(ldb, "objectClass=domainDNS", "dn");
+       assert(domain_dn != undefined);
+       var dom_users = searchone(ldb, "name=Domain Users", "dn");
+       assert(dom_users != undefined);
+
+       var user_dn = sprintf("CN=%s,CN=Users,%s", username, domain_dn);
+       var extended_user = sprintf("
+dn: %s
+changetype: modify
+add: auxiliaryClass
+displayName: %s
+auxiliaryClass: msExchBaseClass
+mailNickname: %s
+homeMDB: CN=Mailbox Store (%s),CN=First Storage Group,CN=InformationStore,CN=%s,CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,%s
+legacyExchangeDN: /o=First Organization/ou=First Administrative Group/cn=Recipients/cn=%s
+proxyAddresses: smtp:postmaster@%s
+proxyAddresses: X400:c=US;a= ;p=First Organizati;o=Exchange;s=%s;
+proxyAddresses: SMTP:%s@%s
+", user_dn, username, username, netbiosname, netbiosname, domain_dn, username, dnsdomain, username, username, dnsdomain);
+
+       message("Modify %s record\n", user_dn);
+       ok = ldb.modify(extended_user);
+       if (ok != true) {
+               message("Failed to modify %s - %s\n", user_dn, ldb.errstring());
+               return false;
+       }
+       ldb.transaction_commit();
+}
+
+// Check whether a name is valid as a NetBIOS name.
+// FIXME: There ae probably more constraints here
+function valid_netbios_name(name)
+{
+       if (strlen(name) > 13) return false;
+       if (strstr(name, ".")) return false;
+       return true;
+}
+
+function provision_validate(subobj, message)
+{
+       return true;
+}
+
+return 0;
diff --git a/server/dcesrv_exchange.c b/server/dcesrv_exchange.c
new file mode 100644 (file)
index 0000000..be0dcd4
--- /dev/null
@@ -0,0 +1,1036 @@
+/* 
+   Unix SMB/CIFS implementation.
+
+   endpoint server for the exchange_* pipes
+
+   Copyright (C) Julien Kerihuel 2005-2006
+   Copyright (C) Gregory Schiro 2006
+   Copyright (C) Pauline Khun 2006
+   
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "openchange.h"
+#include <dcerpc_server.h>
+#include <talloc.h>
+#include <core.h>
+#include <util.h>
+#include <param.h>
+#include <core/nterr.h>
+#include <dcerpc.h>
+#include "ndr_exchange.h"
+#include "server/dcesrv_exchange.h"
+#include <dcerpc_server/common.h>
+#include "ndr_mapi.h"
+#include "libmapi/include/proto.h"
+#include "libmapi/IMAPISession.h"
+#include "libmapi/include/mapi_proto.h"
+#include "libmapi/include/mapitables.h"
+#include "providers/emsabp.h"
+#include "providers/providers_proto.h"
+
+enum exchange_handle {
+       EXCHANGE_HANDLE_NSP,
+       EXCHANGE_HANDLE_EMSMDB
+};
+
+/* 
+   endpoint server for the exchange_store_admin3 pipe
+*/
+
+/* 
+  ec_store_admin3_dummy 
+*/
+static void ec_store_admin3_dummy(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct ec_store_admin3_dummy *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+   endpoint server for the exchange_store_admin2 pipe
+*/
+
+/* 
+  ec_store_admin2_dummy 
+*/
+static void ec_store_admin2_dummy(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct ec_store_admin2_dummy *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+   endpoint server for the exchange_store_admin1 pipe
+*/
+
+/* 
+  ec_store_admin1_dummy 
+*/
+static void ec_store_admin1_dummy(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct ec_store_admin1_dummy *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+   endpoint server for the exchange_ds_rfr pipe
+*/
+
+/* 
+  RfrGetNewDSA 
+*/
+static void RfrGetNewDSA(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct RfrGetNewDSA *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  RfrGetFQDNFromLegacyDN 
+*/
+static void RfrGetFQDNFromLegacyDN(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct RfrGetFQDNFromLegacyDN *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+/* 
+   endpoint server for the exchange_sysatt_cluster pipe
+*/
+
+/* 
+  sysatt_cluster_dummy 
+*/
+static void sysatt_cluster_dummy(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct sysatt_cluster_dummy *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+/* 
+   endpoint server for the exchange_system_attendant pipe
+*/
+
+/* 
+  sysatt_dummy 
+*/
+static void sysatt_dummy(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct sysatt_dummy *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+/* 
+   endpoint server for the exchange_mta pipe
+*/
+
+/* 
+  MtaBind 
+*/
+static void MtaBind(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct MtaBind *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  MtaBindAck 
+*/
+static void MtaBindAck(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct MtaBindAck *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+/* 
+   endpoint server for the exchange_drs pipe
+*/
+
+/* 
+  ds_abandon 
+*/
+static void ds_abandon(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct ds_abandon *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  ds_add_entry 
+*/
+static void ds_add_entry(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct ds_add_entry *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  ds_bind 
+*/
+static void ds_bind(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct ds_bind *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  ds_compare 
+*/
+static void ds_compare(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct ds_compare *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  ds_list 
+*/
+static void ds_list(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct ds_list *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  ds_modify_entry 
+*/
+static void ds_modify_entry(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct ds_modify_entry *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  ds_modify_rdn 
+*/
+static void ds_modify_rdn(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct ds_modify_rdn *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  ds_read 
+*/
+static void ds_read(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct ds_read *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  ds_receive_result 
+*/
+static void ds_receive_result(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct ds_receive_result *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  ds_remove_entry 
+*/
+static void ds_remove_entry(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct ds_remove_entry *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  ds_search 
+*/
+static void ds_search(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct ds_search *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  ds_unbind 
+*/
+static void ds_unbind(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct ds_unbind *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  ds_wait 
+*/
+static void ds_wait(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct ds_wait *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  dra_replica_add 
+*/
+static void dra_replica_add(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct dra_replica_add *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  dra_replica_delete 
+*/
+static void dra_replica_delete(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct dra_replica_delete *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  dra_replica_synchronize 
+*/
+static void dra_replica_synchronize(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct dra_replica_synchronize *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  dra_reference_update 
+*/
+static void dra_reference_update(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct dra_reference_update *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  dra_authorize_replica 
+*/
+static void dra_authorize_replica(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct dra_authorize_replica *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  dra_unauthorize_replica 
+*/
+static void dra_unauthorize_replica(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct dra_unauthorize_replica *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  dra_adopt 
+*/
+static void dra_adopt(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct dra_adopt *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  dra_set_status 
+*/
+static void dra_set_status(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct dra_set_status *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  dra_modify_entry 
+*/
+static void dra_modify_entry(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct dra_modify_entry *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  dra_delete_subref 
+*/
+static void dra_delete_subref(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct dra_delete_subref *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+/* 
+   endpoint server for the exchange_xds pipe
+*/
+
+/* 
+  xds_dummy 
+*/
+static void xds_dummy(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct xds_dummy *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+/* 
+   endpoint server for the exchange_mta_qadmin pipe
+*/
+
+/* 
+  exchange_mta_qadmin 
+*/
+static void exchange_mta_qadmin(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct exchange_mta_qadmin *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+/* 
+   endpoint server for the exchange_store_information pipe
+*/
+
+/* 
+  exchange_store_information_dummy 
+*/
+static void exchange_store_information_dummy(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct exchange_store_information_dummy *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+/* 
+   endpoint server for the exchange_nsp pipe
+*/
+
+/* 
+  NspiBind 
+*/
+
+static enum MAPISTATUS NspiBind(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct NspiBind *r)
+{
+       struct GUID             *guid = (struct GUID *) NULL;
+       const char              *exchange_GUID = lp_parm_string(-1, "exchange", "GUID");
+       struct emsabp_ctx       *emsabp_context;
+       struct dcesrv_handle    *handle;
+       struct policy_handle    wire_handle;
+
+       DEBUG(0, ("##### in NspiBind ####\n"));
+
+       if (!NTLM_AUTH_IS_OK(dce_call)) {
+               DEBUG(1, ("No challenge requested by client, cannot authenticate\n"));
+
+               /* Create an empty policy handle */
+               wire_handle.handle_type = EXCHANGE_HANDLE_NSP;
+               wire_handle.uuid = GUID_zero();
+               *r->out.handle = wire_handle;
+
+               r->out.mapiuid = r->in.mapiuid;
+               r->out.result = MAPI_E_LOGON_FAILED;
+               return MAPI_E_LOGON_FAILED;
+       }
+
+       emsabp_context = emsabp_init((void *)dce_call->conn, dce_call);
+       if (!emsabp_context) {
+         return MAPI_E_FAILONEPROVIDER;
+       }
+
+       /* check if a valid CPID has been provided */
+       if (valid_codepage(r->in.settings->codepage) == False) {
+               DEBUG(1, ("Invalid CPID\n"));
+               r->out.mapiuid = r->in.mapiuid;
+               r->out.result = MAPI_E_UNKNOWN_CPID;
+               return MAPI_E_UNKNOWN_CPID;
+       }
+       
+       guid = talloc(mem_ctx, struct GUID);
+       if (!NT_STATUS_IS_OK(GUID_from_string(exchange_GUID, guid))) {
+               DEBUG(1, ("No Exchange default GUID specified"));
+               r->out.mapiuid = r->in.mapiuid;
+               r->out.result = MAPI_E_LOGON_FAILED;
+               return MAPI_E_LOGON_FAILED;
+       }
+
+       handle = dcesrv_handle_new(dce_call->context, EXCHANGE_HANDLE_NSP);
+       if (!handle) {
+               /* replaces NT_STATUS_NO_MEMORY */
+               return MAPI_E_NOT_ENOUGH_RESOURCES;
+       }
+
+       handle->data = (void *) emsabp_context;
+       *r->out.handle = handle->wire_handle;
+       r->out.mapiuid = guid;
+       r->out.result = MAPI_E_SUCCESS;
+
+       DEBUG(0, ("NspiBind : Success\n"));
+
+       return MAPI_E_SUCCESS;
+}
+
+
+/* 
+  NspiUnbind 
+*/
+static enum MAPISTATUS NspiUnbind(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct NspiUnbind *r)
+{
+/*     DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR); */
+       return MAPI_E_SUCCESS;
+}
+
+
+/* 
+  NspiUpdateStat 
+*/
+static void NspiUpdateStat(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct NspiUpdateStat *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  NspiQueryRows 
+*/
+static enum MAPISTATUS NspiQueryRows(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct NspiQueryRows *r)
+{
+       struct SRowSet  *rowSet;
+       struct dcesrv_handle    *h;
+       uint8_t                 *instance_key;
+       struct emsabp_ctx       *emsabp_context;
+       NTSTATUS                status;
+
+       DEBUG(0, ("##### in NspiQueryRows ####\n"));
+
+       h = dcesrv_handle_fetch(dce_call->context, r->in.handle, DCESRV_HANDLE_ANY);
+       emsabp_context = (struct emsabp_ctx *) h->data;
+
+        /* MAPI_SETTINGS */
+       r->out.settings = r->in.settings;
+       r->out.settings->service_provider.ab[0] = (uint8_t)((*r->in.instance_key) & 0xFF);
+       r->out.settings->service_provider.ab[1] = (uint8_t)(((*r->in.instance_key) >> 8) & 0xFF);
+
+       /* Convert instance_key */
+       instance_key = talloc_size(mem_ctx, sizeof(uint8_t) * 4);
+       memcpy(instance_key, r->in.instance_key, 4);
+
+        /* RowSet */
+        rowSet = talloc(mem_ctx, struct SRowSet);
+        rowSet->cRows = 0x1;
+       rowSet->aRow = talloc_size(mem_ctx, sizeof(struct SRow));
+       status = emsabp_fetch_attrs(mem_ctx, emsabp_context, rowSet->aRow, instance_key, r->in.REQ_properties);
+       if (!NT_STATUS_IS_OK(status)) {
+               /* FIXME */
+               return MAPI_E_LOGON_FAILED;
+       }
+
+        r->out.RowSet = &rowSet;
+        r->out.result = MAPI_E_SUCCESS;
+
+       DEBUG(0, ("NspiQueryRows : Success\n"));
+
+        return MAPI_E_SUCCESS;
+}
+
+
+/* 
+  NspiSeekEntries 
+*/
+static void NspiSeekEntries(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct NspiSeekEntries *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  NspiGetMatches 
+*/
+static enum MAPISTATUS NspiGetMatches(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                                     struct NspiGetMatches *r)
+{
+       uint8_t                 *instance_key;
+       struct dcesrv_handle    *h;
+       struct emsabp_ctx       *emsabp_context;
+       NTSTATUS                status;
+
+       DEBUG(0, ("##### in NspiGetMatches ####\n"));
+
+       h = dcesrv_handle_fetch(dce_call->context, r->in.handle, DCESRV_HANDLE_ANY);
+       emsabp_context = (struct emsabp_ctx *) h->data;
+
+        /* Settings */
+        r->out.settings = r->in.settings;
+
+       /* Search the provider for the requested recipient */
+       instance_key = talloc_size(mem_ctx, sizeof (uint8_t) * 4);
+       status = emsabp_search(emsabp_context, instance_key, r->in.restrictions);
+       if (!NT_STATUS_IS_OK(status)) {
+               return MAPI_E_LOGON_FAILED;
+       }
+
+       DEBUG(0,("NspiGetMatches before set: instance_key = 0x%.2x%.2x%.2x%.2x\n", instance_key[0], instance_key[1], instance_key[2], instance_key[3]));
+
+        /* Row Set */
+        r->out.RowSet = talloc(mem_ctx, struct SRowSet *);
+       r->out.RowSet[0] = talloc(mem_ctx, struct SRowSet);
+        r->out.RowSet[0]->cRows = 0x1;
+       r->out.RowSet[0]->aRow = talloc_size(mem_ctx, sizeof(struct SRow));
+        status = emsabp_fetch_attrs(mem_ctx, emsabp_context, r->out.RowSet[0]->aRow, instance_key, r->in.REQ_properties);
+       if (!NT_STATUS_IS_OK(status)) {
+               /* FIXME */
+               return MAPI_E_LOGON_FAILED;
+       }
+
+       /* Instance key */
+        r->out.instance_key = talloc(mem_ctx, struct instance_key);
+       DEBUG(0,("%p\n", r->out.instance_key));
+        r->out.instance_key->value = talloc_size(mem_ctx, sizeof(uint32_t));
+       *(r->out.instance_key->value) = 0;
+       *(r->out.instance_key->value) |= instance_key[1];
+       *(r->out.instance_key->value) = r->out.instance_key->value[0] << 8;
+       *(r->out.instance_key->value) |= instance_key[0];
+
+       DEBUG(0,("NspiGetMatches after set: instance_key = 0x%x\n", *r->out.instance_key->value));
+
+        r->out.instance_key->cValues = 0x2;
+
+        r->out.result = MAPI_E_SUCCESS;
+       
+       DEBUG(0, ("NspiGetMatches : Success\n"));
+       
+        return MAPI_E_SUCCESS;
+}
+
+
+/* 
+  NspiResortRestriction 
+*/
+static void NspiResortRestriction(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct NspiResortRestriction *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  NspiDNToEph 
+*/
+static enum MAPISTATUS NspiDNToEph(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct NspiDNToEph *r)
+{
+       uint8_t                 *instance_key;
+       struct dcesrv_handle    *h;
+       struct emsabp_ctx       *emsabp_context;
+       NTSTATUS                status;
+
+       DEBUG(0, ("##### in NspiDNToEph ####\n"));
+
+       h = dcesrv_handle_fetch(dce_call->context, r->in.handle, DCESRV_HANDLE_ANY);
+       emsabp_context = (struct emsabp_ctx *) h->data;
+
+       /* Search the server identifier according to the given legacyExchangeDN */
+       instance_key = talloc_size(emsabp_context, sizeof (uint8_t) * 4);
+
+       /* Instance key */
+        r->out.instance_key = talloc(mem_ctx, struct instance_key);
+        r->out.instance_key->value = talloc_size(mem_ctx, sizeof (uint32_t));
+
+       status = emsabp_search_dn(emsabp_context, NULL, instance_key, r->in.server_dn->str);
+       if (!NT_STATUS_IS_OK(status)) {
+               /* Microsoft Exchange returns success even when the research failed */
+               memset(r->out.instance_key->value, 0, sizeof(uint32_t));
+               r->out.instance_key->cValues = 0x2;
+               return MAPI_E_SUCCESS;
+       }
+
+       r->out.instance_key->value[0] = 0;
+       r->out.instance_key->value[0] |= instance_key[1];
+       r->out.instance_key->value[0] = r->out.instance_key->value[0] << 8;
+       r->out.instance_key->value[0] |= instance_key[0];
+
+        r->out.instance_key->cValues = 0x2;
+
+        r->out.result = MAPI_E_SUCCESS;
+
+       DEBUG(0, ("NspiDNToEph : Success\n"));  
+
+        return MAPI_E_SUCCESS;
+}
+
+
+/* 
+  NspiGetPropList 
+*/
+static void NspiGetPropList(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct NspiGetPropList *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  NspiGetProps 
+*/
+static enum MAPISTATUS NspiGetProps(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                                   struct NspiGetProps *r)
+{
+       uint8_t                 *instance_key;
+       struct dcesrv_handle    *h;
+       struct emsabp_ctx       *emsabp_context;
+       NTSTATUS                status;
+
+       DEBUG(0, ("##### in NspiGetProps ####\n"));
+
+       h = dcesrv_handle_fetch(dce_call->context, r->in.handle, DCESRV_HANDLE_ANY);
+       emsabp_context = (struct emsabp_ctx *) h->data;
+
+       /* Convert instance_key */
+       instance_key = talloc_zero_size(mem_ctx, sizeof(uint8_t) * 4);
+       instance_key[0] = r->in.settings->service_provider.ab[0];
+       instance_key[1] = r->in.settings->service_provider.ab[1];
+
+       r->out.REPL_values = talloc_size(mem_ctx, sizeof(struct SRow *));
+       r->out.REPL_values[0] = talloc_size(mem_ctx, sizeof(struct SRow));
+
+       status = emsabp_fetch_attrs(mem_ctx, emsabp_context, &(r->out.REPL_values[0][0]), instance_key, r->in.REQ_properties);
+       if (!NT_STATUS_IS_OK(status)) {
+               r->out.result = MAPI_W_ERRORS_RETURNED;
+               return MAPI_W_ERRORS_RETURNED;
+       }
+
+        r->out.result = MAPI_E_SUCCESS;
+
+       DEBUG(0, ("NspiGetProps : Success\n")); 
+       
+       return MAPI_E_SUCCESS;
+}
+
+
+/* 
+  NspiCompareDNTs 
+*/
+static void NspiCompareDNTs(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct NspiCompareDNTs *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  NspiModProps 
+*/
+static void NspiModProps(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct NspiModProps *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  NspiGetHierarchyInfo 
+*/
+static enum MAPISTATUS NspiGetHierarchyInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct NspiGetHierarchyInfo *r)
+{
+       struct dcesrv_handle    *h;
+       struct emsabp_ctx       *emsabp_context;
+
+       DEBUG(0, ("##### in NspiGetHierarchyInfo ####\n"));
+
+       h = dcesrv_handle_fetch(dce_call->context, r->in.handle, DCESRV_HANDLE_ANY);
+        emsabp_context = (struct emsabp_ctx *) h->data;
+
+       r->out.unknown2 = talloc(mem_ctx, uint32_t);
+       *(r->out.unknown2) = 0x1;
+       emsabp_get_hierarchytable(mem_ctx, emsabp_context, r->in.unknown1, r->out.RowSet);
+
+       DEBUG(0, ("NspiGetHierarchyInfo : success\n"));
+
+       return MAPI_E_SUCCESS;
+
+}
+
+
+/* 
+  NspiGetTemplateInfo 
+*/
+static void NspiGetTemplateInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct NspiGetTemplateInfo *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  NspiModLInkAtt 
+*/
+static void NspiModLInkAtt(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct NspiModLInkAtt *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  NspiDeleteEntries 
+*/
+static void NspiDeleteEntries(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct NspiDeleteEntries *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  NspiQueryColumns 
+*/
+static void NspiQueryColumns(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct NspiQueryColumns *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  NspiGetNamesFromIDs 
+*/
+static void NspiGetNamesFromIDs(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct NspiGetNamesFromIDs *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  NspiGetIDsFromNames 
+*/
+static void NspiGetIDsFromNames(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct NspiGetIDsFromNames *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  NspiResolveNames 
+*/
+static void NspiResolveNames(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct NspiResolveNames *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  NspiResolveNamesW 
+*/
+static void NspiResolveNamesW(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct NspiResolveNamesW *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+/* 
+   endpoint server for the exchange_emsmdb pipe
+*/
+
+/* 
+  EcDoConnect 
+*/
+static enum MAPISTATUS EcDoConnect(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct EcDoConnect *r)
+{
+       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  EcDoDisconnect 
+*/
+static enum MAPISTATUS EcDoDisconnect(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct EcDoDisconnect *r)
+{
+       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  EcDoRpc 
+*/
+static enum MAPISTATUS EcDoRpc(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct EcDoRpc *r)
+{
+       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  EcGetMoreRpc 
+*/
+static void EcGetMoreRpc(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct EcGetMoreRpc *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  EcRRegisterPushNotification 
+*/
+static enum MAPISTATUS EcRRegisterPushNotification(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct EcRRegisterPushNotification *r)
+{
+       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  EcRUnregisterPushNotification 
+*/
+static enum MAPISTATUS EcRUnregisterPushNotification(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct EcRUnregisterPushNotification *r)
+{
+       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  EcDummyRpc 
+*/
+static void EcDummyRpc(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct EcDummyRpc *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  EcRGetDCName 
+*/
+static void EcRGetDCName(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct EcRGetDCName *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  EcRNetGetDCName 
+*/
+static void EcRNetGetDCName(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct EcRNetGetDCName *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* 
+  EcDoRpcExt 
+*/
+static void EcDoRpcExt(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct EcDoRpcExt *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+/* 
+   endpoint server for the exchange_unknown pipe
+*/
+
+/* 
+  unknown_dummy 
+*/
+static void unknown_dummy(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct unknown_dummy *r)
+{
+       DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+
+/* include the generated boilerplate */
+#include "ndr_exchange_s.c"
+
+NTSTATUS init_module(void)
+{
+       NTSTATUS ret;
+
+       ret = dcerpc_server_exchange_store_admin3_init(); 
+       NT_STATUS_NOT_OK_RETURN(ret); 
+
+       ret = dcerpc_server_exchange_store_admin2_init(); 
+       NT_STATUS_NOT_OK_RETURN(ret); 
+
+       ret = dcerpc_server_exchange_store_admin1_init(); 
+       NT_STATUS_NOT_OK_RETURN(ret); 
+
+       ret = dcerpc_server_exchange_ds_rfr_init(); 
+       NT_STATUS_NOT_OK_RETURN(ret); 
+
+       ret = dcerpc_server_exchange_sysatt_cluster_init(); 
+       NT_STATUS_NOT_OK_RETURN(ret); 
+
+       ret = dcerpc_server_exchange_system_attendant_init(); 
+       NT_STATUS_NOT_OK_RETURN(ret); 
+
+       ret = dcerpc_server_exchange_mta_init(); 
+       NT_STATUS_NOT_OK_RETURN(ret); 
+
+       ret = dcerpc_server_exchange_drs_init(); 
+       NT_STATUS_NOT_OK_RETURN(ret); 
+
+       ret = dcerpc_server_exchange_xds_init(); 
+       NT_STATUS_NOT_OK_RETURN(ret); 
+
+       ret = dcerpc_server_exchange_mta_qadmin_init(); 
+       NT_STATUS_NOT_OK_RETURN(ret); 
+
+       ret = dcerpc_server_exchange_store_information_init(); 
+       NT_STATUS_NOT_OK_RETURN(ret); 
+
+       ret = dcerpc_server_exchange_nsp_init();
+       NT_STATUS_NOT_OK_RETURN(ret);
+
+       ret = dcerpc_server_exchange_emsmdb_init();
+       NT_STATUS_NOT_OK_RETURN(ret);
+
+       ret = dcerpc_server_exchange_unknown_init(); 
+       NT_STATUS_NOT_OK_RETURN(ret); 
+
+       return NT_STATUS_OK;
+}
diff --git a/server/dcesrv_exchange.h b/server/dcesrv_exchange.h
new file mode 100644 (file)
index 0000000..6af9c38
--- /dev/null
@@ -0,0 +1,67 @@
+/* 
+   Unix SMB/CIFS implementation.
+
+   endpoint server for the exchange_* pipes
+
+   Copyright (C) Julien Kerihuel 2005
+   
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#ifndef _DCESRV_EXCHANGE_H_
+# define _DCESRV_EXCHANGE_H_
+
+#include <auth.h>
+
+#define        NTLM_AUTH_IS_OK(dce_call) \
+(dce_call->conn->auth_state.session_info->server_info->authenticated == True)
+
+#define        NTLM_AUTH_USERNAME(dce_call) \
+(dce_call->conn->auth_state.session_info->credentials->username)
+
+#define        NTLM_AUTH_SESSION_INFO(dce_call) \
+(dce_call->conn->auth_state.session_info)
+
+#define        NTLM_AUTH_IS_OK_RETURN(dce_call) do { \
+       if (!NTLM_AUTH_IS_OK(dce_call)) {\
+               return True;\
+       }\
+} while (0)
+
+#define LAST_INT_FROM_BINARY(bin, size, pi) \
+        if ((bin) != NULL) { \
+                uint32_t        counter = 1; \
+\
+                *(pi) = 0; \
+                do { \
+                        *(pi) |= (bin)[(size) - counter]; \
+                        *(pi) <<= (8 * (sizeof(uint32_t) - counter)); \
+                } while (++counter < sizeof(uint32_t)); \
+        }
+
+#define FIRST_INT_FROM_BINARY(bin, pi) \
+        if ((bin) != NULL) { \
+                uint32_t        counter = 1; \
+\
+                *(pi) = 0; \
+                do { \
+                        *(pi) |= (bin)[sizeof(uint32_t) - counter]; \
+                        *(pi) <<= (8 * (sizeof(uint32_t) - counter)); \
+                } while (++counter < sizeof(uint32_t)); \
+        }
+
+
+#endif /* !_DCESRV_EXCHANGE_H_ */
+
diff --git a/setup/oc_newuser b/setup/oc_newuser
new file mode 100755 (executable)
index 0000000..d763c2b
--- /dev/null
@@ -0,0 +1,62 @@
+#!/bin/sh
+exec smbscript "$0" ${1+"$@"}
+/*
+       add a new user to a Samba4 server
+       Copyright Andrew Tridgell 2005
+       Released under the GNU GPL v2 or later
+*/
+
+options = GetOptions(ARGV,
+               "POPT_AUTOHELP",
+               "POPT_COMMON_SAMBA",
+               "POPT_COMMON_VERSION",
+               "POPT_COMMON_CREDENTIALS",
+               'username=s',
+               'quiet');
+
+if (options == undefined) {
+   println("Failed to parse options");
+   return -1;
+}
+
+libinclude("base.js");
+libinclude("oc_provision.js");
+
+
+/*
+  print a message if quiet is not set
+*/
+function message() 
+{
+       if (options["quiet"] == undefined) {
+               print(vsprintf(arguments));
+       }
+}
+
+/*
+ show some help
+*/
+function ShowHelp()
+{
+       print("
+Samba4 newuser
+
+newuser [options]
+  --username  USERNAME     choose new username
+
+You must provide at least a username
+");
+       exit(1);
+}
+
+if (options['username'] == undefined) {
+       ShowHelp();
+}
+
+var creds = options.get_credentials();
+var system_session = system_session();
+
+
+oc_newuser(options.username, message, system_session, creds);
+
+return 0;
diff --git a/setup/oc_provision b/setup/oc_provision
new file mode 100755 (executable)
index 0000000..baab059
--- /dev/null
@@ -0,0 +1,80 @@
+#!/bin/sh
+exec smbscript "$0" ${1+"$@"}
+/*
+       provision an OpenChange Exchange store
+       Copyright Andrew Tridgell 2005
+       Copyright Julien Kerihuel 2005
+       Released under the GNU GPL v2 or later
+*/
+
+options = GetOptions(ARGV,
+               "POPT_AUTOHELP",
+               "POPT_COMMON_SAMBA",
+               "POPT_COMMON_VERSION",
+               "POPT_COMMON_CREDENTIALS",
+               'domain=s',
+               'realm=s',
+               'blank');
+
+if (options == undefined) {
+   println("Failed to parse options");
+   return -1;
+}
+
+libinclude("base.js");
+libinclude("oc_provision.js");
+
+function message() 
+{
+       if (options["quiet"] == undefined) {
+               print(vsprintf(arguments));
+       }
+}
+
+function ShowHelp()
+{
+       print("
+OpenChange provisioning
+
+provision [options]
+ --domain      DOMAIN          set the domain
+ --realm       REALM           set the realm
+ --quiet                       Be quiet
+ --blank                       do not add containers, just the structure
+
+You must provide at least a domain
+
+");
+       exit(1);
+}
+
+/*
+   main program
+   1- We set default values
+*/
+
+if ((options["domain"] == undefined) && (options["realm"] == undefined)) {
+       ShowHelp();
+}
+
+var subobj = provision_guess();
+for (r in options) {
+       var key = strupper(join("", split("-", r)));
+       subobj[key] = options[r];
+}
+
+var blank = (options["blank"] != undefined);
+
+if (!provision_validate(subobj, message)) {
+       return -1;
+}
+
+var creds = options.get_credentials();
+var system_session = system_session();
+
+provision_schema(subobj, message, blank, provision_default_paths(subobj), creds, system_session);
+
+message("Provisioning for Administrative Group %s\n", subobj.DOMAIN);
+provision(subobj, message, blank, provision_default_paths(subobj));
+message("All OK\n");
+return 0;
diff --git a/setup/oc_provision.ldif b/setup/oc_provision.ldif
new file mode 100644 (file)
index 0000000..7eafb1d
--- /dev/null
@@ -0,0 +1,41 @@
+###############################
+# Domain Naming Context
+###############################
+dn: ${BASEDN}
+objectClass: top
+objectClass: domain
+objectClass: domainDNS
+dnsDomain: ${DNSDOMAIN}
+dc: ${RDN_DC}
+objectGUID: ${DOMAINGUID}
+creationTime: ${NTTIME}
+forceLogoff: 0x8000000000000000
+lockoutDuration: -18000000000
+lockOutObservationWindow: -18000000000
+lockoutThreshold: 0
+uSNCreated: 1
+uSNChanged: 1
+maxPwdAge: -37108517437440
+minPwdAge: 0
+minPwdLength: 7
+modifiedCountAtLastProm: 0
+nextRid: 1001
+pwdProperties: 1
+pwdHistoryLength: 24
+objectSid: ${DOMAINSID}
+oEMInformation: Provisioned by OpenChange: ${LDAPTIME}
+serverState: 1
+nTMixedDomain: 1
+msDS-Behavior-Version: 0
+ridManagerReference: CN=RID Manager$,CN=System,${BASEDN}
+uASCompat: 1
+modifiedCount: 1
+objectCategory: CN=Domain-DNS,CN=Schema,CN=Configuration,${BASEDN}
+isCriticalSystemObject: TRUE
+
+
+dn: CN=Containers,${BASEDN}
+objectClass: top
+objectClass: container
+cn: Containers
+description: OpenChange Store Containers
diff --git a/setup/oc_provision_configuration.ldif b/setup/oc_provision_configuration.ldif
new file mode 100644 (file)
index 0000000..4271f5d
--- /dev/null
@@ -0,0 +1,272 @@
+#
+# Exchange configuration information object
+# This object stores configuration information for the Exchange Server 
+#
+
+dn: CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+adminDisplayName: Microsoft Exchange
+cn: Microsoft Exchange
+distinguishedName: CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+instanceType: 4
+objectCategory: CN=msExchConfigurationContainer,CN=Schema,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: container
+objectClass: msExchConfigurationContainer
+showInAdvancedViewOnly: TRUE
+
+
+#
+# First Organization
+#
+#
+
+dn: CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+adminDisplayName: First Organization
+cn: First Organization
+distinguishedName: CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+instanceType: 4
+legacyExchangeDN: /o=First Organization
+objectCategory: CN=msExchOrganizationContainer,CN=Schema,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: container
+objectClass: msExchOrganizationContainer
+showInAdvancedViewOnly: TRUE
+
+#
+# Administrative Groups
+#
+#
+
+dn: CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+cn: Administrative Groups
+displayName: Administrative Groups
+distinguishedName: CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+instanceType: 4
+objectCategory: CN=msExchAdminGroupContainer,CN=Schema,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: container
+objectClass: msExchAdminGroupContainer
+showInAdvancedViewOnly: TRUE
+
+#
+# First Administrative Group
+#
+#
+
+dn: CN=First Administrative Group,CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+cn: First Administrative Group
+displayName: First Administrative Group
+distinguishedName: CN=First Administrative Group,CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+instanceType: 4
+legacyExchangeDN: /o=First Organization/ou=First Administrative Group
+objectCategory: CN=msExchAdminGroup,CN=Schema,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: msExchAdminGroup
+showInAdvancedViewOnly: TRUE
+
+#
+# Servers
+#
+#
+
+dn: CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+adminDisplayName: Servers
+cn: Servers
+containerInfo: 8
+distinguishedName: CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+instanceType: 4
+objectCategory: CN=msExchServersContainer,CN=Schema,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: container
+objectClass: msExchServersContainer
+showInAdvancedViewOnly: TRUE
+
+#
+# The OpenChange Server object
+#
+#
+
+dn: CN=${NETBIOSNAME},CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+adminDisplayName: ${NETBIOSNAME}
+cn: ${NETBIOSNAME}
+distinguishedName: CN=${NETBIOSNAME},CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+instanceType: 4
+legacyExchangeDN: /o=First Organization/ou=First Administrative Group/cn=Configuration/cn=Servers/cn=${NETBIOSNAME}
+networkAddress: ncacn_vns_spp:${NETBIOSNAME}
+networkAddress: netbios:${NETBIOSNAME}
+networkAddress: ncacn_np:${NETBIOSNAME}
+networkAddress: ncacn_spx:${NETBIOSNAME}
+networkAddress: ncacn_ip_tcp:${REALM}
+networkAddress: ncalrpc:${NETBIOSNAME}
+objectCategory: CN=msExchExchangeServer,CN=Schema,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: server
+objectClass: msExchExchangeServer
+serialNumber: Version 6.5 (Build 6944.4)
+serverRole: 0
+showInAdvancedViewOnly: TRUE
+
+#
+# InformationStore
+#
+#
+
+dn: CN=InformationStore,CN=${NETBIOSNAME},CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+adminDisplayName: InformationStore
+cn: InformationStore
+distinguishedName: CN=InformationStore,CN=${NETBIOSNAME},CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+instanceType: 4
+objectCategory: CN=msExchInformationStore,CN=Schema,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: container
+objectClass: msExchInformationStore
+showInAdvancedViewOnly: TRUE
+
+#
+# First Storage Group
+#
+#
+
+dn: CN=First Storage Group,CN=InformationStore,CN=${NETBIOSNAME},CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+adminDisplayName: First Storage Group
+cn: First Storage Group
+distinguishedName: CN=First Storage Group,CN=InformationStore,CN=${NETBIOSNAME},CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+instanceType: 4
+objectCategory: CN=msExchStorageGroup,CN=Schema,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: container
+objectClass: msExchStorageGroup
+showInAdvancedViewOnly: TRUE
+systemFlags: 1610612736
+
+#
+# Mailbox Store (OPENCHANGE) (${NETBIOSNAME})
+#
+#
+
+dn: CN=Mailbox Store (${NETBIOSNAME}),CN=First Storage Group,CN=InformationStore,CN=${NETBIOSNAME},CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+adminDisplayName: Mailbox Store (${NETBIOSNAME})
+cn: Mailbox Store (${NETBIOSNAME})
+deliveryMechanism: 1
+displayName: Mailbox Store (${NETBIOSNAME})
+distinguishedName: CN=Mailbox Store (${NETBIOSNAME}),CN=First Storage Group,CN=InformationStore,CN=${NETBIOSNAME},CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+legacyExchangeDN: /o=First Organization/ou=First Administrative Group/cn=Configuration/cn=Servers/cn=${NETBIOSNAME}/cn=Microsoft Private MDB
+objectCategory: CN=msExchPrivateMDB,CN=Schema,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: msExchMDB
+objectClass: msExchPrivateMDB
+showInAdvancedViewOnly: TRUE
+systemFlags: 1610612736
+
+#
+# All Address Lists Containers
+# description: Address book root recipient
+#
+#
+
+dn: CN=Address Lists Container,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+cn: Address Lists Container
+displayName: Address Lists Container
+distinguishedName: CN=Address Lists Container,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+instanceType: 4
+objectCategory: CN=ms-Exch-Container,CN=Schema,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: container
+objectClass: msExchContainer
+showInAdvancedViewOnly: TRUE
+
+
+#
+# All Address Lists
+# description: Address book recipient
+#
+#
+
+dn: CN=All Address Lists,CN=Address Lists Container,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+objectGUID: 5ddd64bc-24a9-694b-a8f4-3d3501e25e14
+cn: All Address Lists
+displayName: All Address Lists
+distinguishedName: CN=All Address Lists,CN=Address Lists Container,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+instanceType: 4
+objectCategory: CN=Address-Book-Container,CN=Schema,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: addressBookContainer
+showInAdvancedViewOnly: TRUE
+systemFlags: 1610612736
+
+#
+# Public Folders
+# description: Address book recipient
+#
+
+dn: CN=Public Folders,CN=All Address Lists,CN=Address Lists Container,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+objectGUID: b1433d91-db2f-354d-bfbf-b0624440e2bd
+cn: Public Folders
+displayName: Public Folders
+distinguishedName: CN=Public Folders,CN=All Address Lists,CN=Address Lists Container,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+instanceType: 4
+objectCategory: CN=Address-Book-Container,CN=Schema,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: addressBookContainer
+purportedSearch: (& (mailnickname=*) (| (objectCategory=publicFolder) ))
+showInAdvancedViewOnly: TRUE
+systemFlags: 1610612736
+
+
+#
+# All Contacts
+# description: Address book recipient
+#
+#
+
+dn: CN=All Contacts,CN=All Address Lists,CN=Address Lists Container,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+objectGUID: c5d1e733-a356-c14b-a1a5-c63c15fd20bb
+cn: All Contacts
+displayName: All Contacts
+distinguishedName: CN=All Contacts,CN=All Address Lists,CN=Address Lists Container,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+instanceType: 4
+name: All Contacts
+objectCategory: CN=Address-Book-Container,CN=Schema,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: addressBookContainer
+purportedSearch: (& (mailnickname=*) (| (&(objectCategory=person)(objectClass=contact)) ))
+showInAdvancedViewOnly: TRUE
+systemFlags: 1610612736
+
+#
+# All Users
+# description: Address book recipient
+#
+
+dn: CN=All Users,CN=All Address Lists,CN=Address Lists Container,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+objectGUID: c06a9f3f-7c20-3a42-af83-02cb9a09bcf2
+cn: All Users
+displayName: All Users
+distinguishedName: CN=All Users,CN=All Address Lists,CN=Address Lists Container,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+instanceType: 4
+name: All Users
+objectCategory: CN=Address-Book-Container,CN=Schema,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: addressBookContainer
+purportedSearch: (& (mailnickname=*) (| (&(objectCategory=person)(objectClass=user)(!(homeMDB=*))(!(msExchHomeServerName=*)))(&(objectCategory=person)(objectClass=user)(|(homeMDB=*)(msExchHomeServerName=*))) ))
+showInAdvancedViewOnly: TRUE
+systemFlags: 1610612736
+
+#
+# All Groups
+# description: Address book recipient
+#
+
+dn: CN=All Groups,CN=All Address Lists,CN=Address Lists Container,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+objectGUID: 9156f1a9-e9ec-5a4f-97c9-982ebcb84e5f
+cn: All Groups
+displayName: All Groups
+distinguishedName: CN=All Groups,CN=All Address Lists,CN=Address Lists Container,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,${BASEDN}
+instanceType: 4
+name: All Groups
+objectCategory: CN=Address-Book-Container,CN=Schema,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: addressBookContainer
+purportedSearch: (& (mailnickname=*) (| (objectCategory=group) ))
+showInAdvancedViewOnly: TRUE
+systemFlags: 1610612736
diff --git a/setup/oc_provision_containers.ldif b/setup/oc_provision_containers.ldif
new file mode 100644 (file)
index 0000000..8f5bf0e
--- /dev/null
@@ -0,0 +1,64 @@
+dn: CN=Recipients,CN=${DOMAIN}
+objectClass: top
+objectClass: container
+objectClass: recipient
+cn: Recipients
+description: OpenChange Root recipient
+containerID: 0x0
+containerFlags: 0x9
+IsMaster: TRUE
+member: All Address Lists
+member: All Contacts
+member: All Groups
+member: All Users
+member: Public Folders
+
+dn: CN=All Address Lists,CN=Recipients,CN=${DOMAIN}
+entryID: guid=5DDD64BC24A9694BA8F43D3501E25E14
+objectClass: recipient
+cn: All Address Lists
+description: All Address Lists
+containerID: 0x00001b50
+containerFlags: 0xb
+IsMaster: FALSE
+memberOf: CN=Recipients,CN=${DOMAIN}
+
+dn: CN=All Contacts,CN=Recipients,CN=${DOMAIN}
+entryID: guid=C5D1E733A356C14BA1A5C63C15FD20BB
+objectClass: recipient
+cn: All Contacts
+description: OpenChange All Contacts
+containerID: 0x00001b53
+containerFlags: 0x9
+IsMaster: FALSE
+memberOf: CN=Recipients,CN=${DOMAIN}
+
+dn: CN=All Groups,CN=Recipients,CN=${DOMAIN}
+entryID: guid=9156F1A9E9EC5A4F97C9982EBCB84E5F
+objectClass: recipient
+cn: All Groups
+description: All Groups
+containerID: 0x00001b52
+containerFlags: 0x9
+IsMaster: FALSE
+memberOf: CN=Recipients,CN=${DOMAIN}
+
+dn: CN=All Users,CN=Recipients,CN=${DOMAIN}
+entryID: guid=C06A9F3F7C203A42AF8302CB9A09BCF2
+objectClass: recipient
+cn: All Users
+description: OpenChange All Users
+containerID: 0x00001b51
+containerFlags: 0x9
+IsMaster: FALSE
+memberOf: CN=Recipients,CN=${DOMAIN}
+
+dn: CN=Public Folders,CN=Recipients,CN=${DOMAIN}
+entryID: guid=B1433D91DB2F354DBFBFB0624440E2BD
+objectClass: recipient
+cn: Public Folders
+description: OpenChange Public Folders
+containerID: 0x00001b54
+containerFlags: 0x9
+IsMaster: FALSE
+memberOf: CN=Recipients,CN=${DOMAIN}
diff --git a/setup/oc_provision_init.ldif b/setup/oc_provision_init.ldif
new file mode 100644 (file)
index 0000000..01e0293
--- /dev/null
@@ -0,0 +1,23 @@
+dn: @INDEXLIST
+@IDXATTR: objectClass
+@IDXATTR: entryID
+@IDXATTR: member
+
+
+dn: @ATTRIBUTES
+objectClass: CASE_INSENSITIVE
+cn: CASE_INSENSITIVE
+entryID: CASE_INSENSITIVE
+containerID: INTEGER
+dnsDomain: CASE_INSENSITIVE
+member: CASE_INSENSITIVE
+memberOf: CASE_INSENSITIVE
+containerFlags: INTEGER
+IsMaster: CASE_INSENSITIVE
+
+dn: @SUBCLASSES
+top: domain
+top: container
+container: recipient
+
+template: containerTemplate
diff --git a/setup/oc_provision_schema.ldif b/setup/oc_provision_schema.ldif
new file mode 100644 (file)
index 0000000..e2e7ca6
--- /dev/null
@@ -0,0 +1,439 @@
+#
+# msExchBaseClass
+# description: The base auxiliary class that is applied to all classes 
+# that are extended by CDO for Exchange 2000 Server (CDOEX) and the base 
+# Microsoft Windows classes that are used.
+#
+
+dn: CN=msExchBaseClass,CN=Schema,CN=Configuration,${BASEDN}
+cn: msExchBaseClass
+objectClass: top
+objectClass: classSchema
+lDAPDisplayName: msExchBaseClass
+adminDescription: msExchBaseClass
+adminDisplayName: msExchBaseClass
+defaultHidingValue: TRUE
+defaultObjectCategory: CN=msExchBaseClass,CN=Schema,CN=Configuration,${BASEDN}
+governsID: 1.2.840.113556.1.5.7000.62.14
+instanceType: 4
+mayContain: legacyExchangeDN
+distinguishedName: CN=msExchBaseClass,CN=Schema,CN=Configuration,${BASEDN}
+objectClassCategory: 3
+objectCategory: CN=ClassSchema,CN=Schema,CN=Configuration,${BASEDN}
+rDNAttID: cn
+schemaIDGUID: d8782c34-46ca-11d3-aa72-00c04f8eedd8 
+showInAdvancedViewOnly: TRUE
+subClassOf: top
+systemOnly: FALSE
+
+#
+# msExchAdminGroupContainer
+# description: An administrative group container. Used for extended rights and roles.
+#
+
+dn: CN=msExchAdminGroupContainer,CN=Schema,CN=Configuration,${BASEDN}
+adminDescription: msExchAdminGroupContainer
+adminDisplayName: msExchAdminGroupContainer
+auxiliaryClass: msExchBaseClass
+cn: msExchAdminGroupContainer
+defaultHidingValue: TRUE
+defaultObjectCategory: CN=msExchAdminGroupContainer,CN=Schema,CN=Configuration,${BASEDN}
+defaultSecurityDescriptor: D:S:
+governsID: 1.2.840.113556.1.5.7000.62.50019
+instanceType: 4
+lDAPDisplayName: msExchAdminGroupContainer
+distinguishedName: CN=msExchAdminGroupContainer,CN=Schema,CN=Configuration,${BASEDN}
+objectCategory: CN=ClassSchema,CN=Schema,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: classSchema
+objectClassCategory: 1
+rDNAttID: cn
+schemaIDGUID:: e7a44058-a980-11d2-a9ff-00c04f8eedd8
+showInAdvancedViewOnly: TRUE
+subClassOf: container
+systemOnly: FALSE
+
+
+#
+# msExchAdminGroup
+# objectCategory for cn=First Administrative Group
+# description: An administrative group.
+#
+
+dn: CN=msExchAdminGroup,CN=Schema,CN=Configuration,${BASEDN}
+cn: msExchAdminGroup
+objectClass: top
+objectClass: classSchema
+lDAPDisplayName: msExchAdminGroup
+adminDescription: msExchAdminGroup
+adminDisplayName: msExchAdminGroup
+objectCategory: CN=ClassSchema,CN=Schema,CN=Configuration,${BASEDN}
+objectClassCategory: 1
+governsID: 1.2.840.113556.1.5.7000.62.50011
+instanceType: 4
+distinguishedName: CN=msExchAdminGroup,CN=Schema,CN=Configuration,${BASEDN}
+defaultObjectCategory: CN=msExchAdminGroup,CN=Schema,CN=Configuration,${BASEDN}
+defaultHidingValue: TRUE
+defaultSecurityDescriptor: D:S:
+auxiliaryClass: msExchBaseClass
+possSuperiors: msExchAdminGroupContainer
+rDNAttID: cn
+schemaIDGUID: e768a58e-a980-11d2-a9ff-00c04f8eedd8 
+showInAdvancedViewOnly: TRUE
+subClassOf: top
+systemOnly: FALSE
+
+#
+# msExchOrganizationContainer
+# objectCategory for cn=First Organization (/o=MyCompany)
+# description: An organization container. Used for extended rights and roles.
+#
+
+dn: CN=msExchOrganizationContainer,CN=Schema,CN=Configuration,${BASEDN}
+cn: msExchOrganizationContainer
+objectClass: top
+objectClass: classSchema
+lDAPDisplayName: msExchOrganizationContainer
+adminDescription: msExchOrganizationContainer
+adminDisplayName: msExchOrganizationContainer
+objectCategory: CN=ClassSchema,CN=Schema,CN=Configuration,${BASEDN}
+objectClassCategory: 1
+governsID: 1.2.840.113556.1.5.7000.62.50020
+instanceType: 4
+distinguishedName: CN=msExchOrganizationContainer,CN=Schema,CN=Configuration,${BASEDN}
+defaultObjectCategory: CN=msExchOrganizationContainer,CN=Schema,CN=Configuration,${BASEDN}
+defaultHidingValue: TRUE
+defaultSecurityDescriptor: D:S:
+auxiliaryClass: msExchBaseClass
+rDNAttID: cn
+schemaIDGUID: 366a319c-a982-11d2-a9ff-00c04f8eedd8 
+showInAdvancedViewOnly: TRUE
+subClassOf: container
+systemOnly: FALSE
+
+#
+# msExchConfigurationContainer
+# description: This container stores configuration information for the Exchange server.
+#
+
+# msExchConfigurationContainer, Schema, Configuration, openchange.local
+dn: CN=msExchConfigurationContainer,CN=Schema,CN=Configuration,${BASEDN}
+adminDescription: msExchConfigurationContainer
+adminDisplayName: msExchConfigurationContainer
+auxiliaryClass: msExchBaseClass
+cn: msExchConfigurationContainer
+defaultHidingValue: TRUE
+defaultObjectCategory: CN=msExchConfigurationContainer,CN=Schema,CN=Configuration,${BASEDN}
+defaultSecurityDescriptor: D:S:
+governsID: 1.2.840.113556.1.5.176
+instanceType: 4
+lDAPDisplayName: msExchConfigurationContainer
+distinguishedName: CN=msExchConfigurationContainer,CN=Schema,CN=Configuration,${BASEDN}
+objectCategory: CN=ClassSchema,CN=Schema,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: classSchema
+objectClassCategory: 1
+rDNAttID: cn
+schemaIDGUID: d03d6858-06f4-11d2-aa53-00c04fd7d83a
+showInAdvancedViewOnly: TRUE
+subClassOf: container
+systemFlags: 16
+systemOnly: FALSE
+
+#
+# msExchServersContainer
+# description: A container used to hold servers. Used for extended
+# rights and roles.
+#
+
+dn: CN=msExchServersContainer,CN=Schema,CN=Configuration,${BASEDN}
+cn: msExchServersContainer
+objectClass: top
+objectClass: classSchema
+lDAPDisplayName: msExchServersContainer
+adminDescription: msExchServersContainer
+adminDisplayName: msExchServersContainer
+objectCategory: CN=ClassSchema,CN=Schema,CN=Configuration,${BASEDN}
+objectClassCategory: 1
+governsID: 1.2.840.113556.1.5.7000.62.50013
+instanceType: 4
+distinguishedName: CN=msExchServersContainer,CN=Schema,CN=Configuration,${BASEDN}
+defaultObjectCategory: CN=msExchServersContainer,CN=Schema,CN=Configuration,${BASEDN}
+defaultHidingValue: TRUE
+defaultSecurityDescriptor: D:(A;;LC;;;AU)
+auxiliaryClass: msExchBaseClass
+possSuperiors: msExchAdminGroup
+rDNAttID: cn
+schemaIDGUID: 346e5cba-a982-11d2-a9ff-00c04f8eedd8
+showInAdvancedViewOnly: TRUE
+subClassOf: container
+systemOnly: FALSE
+
+#
+# msExchExchangeServer
+# description: A representation of an Exchange server object
+#
+
+dn: CN=msExchExchangeServer,CN=Schema,CN=Configuration,${BASEDN}
+cn: msExchExchangeServer
+objectClass: top
+objectClass: classSchema
+lDAPDisplayName: msExchExchangeServer
+adminDescription: msExchExchangeServer
+adminDisplayName: msExchExchangeServer
+objectCategory: CN=ClassSchema,CN=Schema,CN=Configuration,${BASEDN}
+objectClassCategory: 1
+governsID: 1.2.840.113556.1.5.7000.62.50009
+instanceType: 4
+distinguishedName: CN=msExchExchangeServer,CN=Schema,CN=Configuration,${BASEDN}
+defaultObjectCategory: CN=msExchExchangeServer,CN=Schema,CN=Configuration,${BASEDN}
+defaultHidingValue: TRUE
+defaultSecurityDescriptor: D:(A;;RP;;;AU)
+auxiliaryClass: msExchBaseClass
+possSuperiors: msExchServersContainer
+rDNAttID: cn
+schemaIDGUID: 01a9aa9c-a981-11d2-a9ff-00c04f8eedd8
+showInAdvancedViewOnly: TRUE
+subClassOf: server
+systemOnly: FALSE
+
+#
+# msExchMailNickname
+# description: Exchange mailbox nickname for users
+#
+
+dn: CN=msExchMailNickname,CN=Schema,CN=Configuration,${BASEDN}
+adminDescription: msExchMailNickname
+adminDisplayName: msExchMailNickname
+attributeID: 1.2.840.113556.1.2.447
+attributeSyntax: 2.5.5.12
+cn: msExchMailNickname
+instanceType: 4
+isSingleValued: TRUE
+lDAPDisplayName: mailNickname
+distinguishedName: CN=msExchMailNickname,CN=Schema,CN=Configuration,${BASEDN}
+objectCategory: CN=AttributeSchema,CN=Schema,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: attributeSchema
+schemaIDGUID:: bf9679b3-0de6-11d0-a285-00aa003049e2
+showInAdvancedViewOnly: TRUE
+
+#
+# msExchStorageGroup
+# description: The list of stores for this Microsoft Jet instance
+#
+
+dn: CN=msExchStorageGroup,CN=Schema,CN=Configuration,${BASEDN}
+adminDescription: msExchStorageGroup
+adminDisplayName: msExchStorageGroup
+auxiliaryClass: msExchBaseClass
+cn: msExchStorageGroup
+defaultHidingValue: TRUE
+defaultObjectCategory: CN=msExchStorageGroup,CN=Schema,CN=Configuration,${BASEDN}
+defaultSecurityDescriptor: D:S:
+governsID: 1.2.840.113556.1.5.7000.62.11006
+instanceType: 4
+lDAPDisplayName: msExchStorageGroup
+mayContain: displayName
+mustContain: cn
+distinguishedName: CN=msExchStorageGroup,CN=Schema,CN=Configuration,${BASEDN}
+objectCategory: CN=ClassSchema,CN=Schema,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: classSchema
+objectClassCategory: 1
+possSuperiors: computer
+rDNAttID: cn
+schemaIDGUID: 3435244a-a982-11d2-a9ff-00c04f8eedd8
+showInAdvancedViewOnly: TRUE
+subClassOf: container
+systemOnly: FALSE
+
+#
+# msExchDeliveryMechanism
+# description:         
+#
+
+dn: CN=msExchDeliveryMechanism,CN=Schema,CN=Configuration,${BASEDN}
+adminDescription: msExchDeliveryMechanism
+adminDisplayName: msExchDeliveryMechanism
+attributeID: 1.2.840.113556.1.2.241
+attributeSyntax: 2.5.5.9
+cn: msExchDeliveryMechanism
+instanceType: 4
+isSingleValued: TRUE
+lDAPDisplayName: deliveryMechanism
+distinguishedName: CN=msExchDeliveryMechanism,CN=Schema,CN=Configuration,${BASEDN}
+objectCategory: CN=AttributeSchema,CN=Schema,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: attributeSchema
+schemaIDGUID: bf96794e-0de6-11d0-a285-00aa003049e2
+showInAdvancedViewOnly: TRUE
+
+#
+# msExchMDB
+# description: Used for generic database configuration.
+#
+
+dn: CN=msExchMDB,CN=Schema,CN=Configuration,${BASEDN}
+adminDescription: msExchMDB
+adminDisplayName: msExchMDB
+auxiliaryClass: msExchBaseClass
+cn: msExchMDB
+defaultHidingValue: TRUE
+defaultObjectCategory: CN=msExchMDB,CN=Schema,CN=Configuration,${BASEDN}
+defaultSecurityDescriptor: D:S:
+governsID: 1.2.840.113556.1.5.7000.62.11002
+instanceType: 4
+lDAPDisplayName: msExchMDB
+mayContain: displayName
+mustContain: deliveryMechanism
+mustContain: cn
+distinguishedName: CN=msExchMDB,CN=Schema,CN=Configuration,${BASEDN}
+objectCategory: CN=ClassSchema,CN=Schema,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: classSchema
+objectClassCategory: 1
+possSuperiors: msExchStorageGroup
+possSuperiors: msExchExchangeServer
+possSuperiors: container
+possSuperiors: computer
+rDNAttID: cn
+schemaIDGUID: 03d069d2-a981-11d2-a9ff-00c04f8eedd8
+showInAdvancedViewOnly: TRUE
+subClassOf: top
+systemOnly: FALSE
+
+#
+# msExchPrivateMDB
+# description: A private database configuration
+#
+
+dn: CN=msExchPrivateMDB,CN=Schema,CN=Configuration,${BASEDN}
+adminDescription: msExchPrivateMDB
+adminDisplayName: msExchPrivateMDB
+auxiliaryClass: msExchBaseClass
+cn: msExchPrivateMDB
+defaultHidingValue: TRUE
+defaultObjectCategory: CN=msExchPrivateMDB,CN=Schema,CN=Configuration,${BASEDN}
+defaultSecurityDescriptor: D:S:
+governsID: 1.2.840.113556.1.5.7000.62.11004
+instanceType: 4
+lDAPDisplayName: msExchPrivateMDB
+distinguishedName: CN=msExchPrivateMDB,CN=Schema,CN=Configuration,${BASEDN}
+objectCategory: CN=ClassSchema,CN=Schema,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: classSchema
+objectClassCategory: 1
+possSuperiors: container
+possSuperiors: computer
+rDNAttID: cn
+schemaIDGUID: 36145cf4-a982-11d2-a9ff-00c04f8eedd8
+showInAdvancedViewOnly: TRUE
+subClassOf: msExchMDB
+systemOnly: FALSE
+
+#
+# msExchMailStorage
+# description: The auxiliary class for objects that require store-specific information.
+#
+
+dn: CN=msExchMailStorage,CN=Schema,CN=Configuration,${BASEDN}
+adminDescription: msExchMailStorage
+adminDisplayName: msExchMailStorage
+cn: msExchMailStorage
+defaultHidingValue: TRUE
+defaultObjectCategory: CN=msExchMailStorage,CN=Schema,CN=Configuration,${BASEDN}
+governsID: 1.2.840.113556.1.5.7000.62.5
+instanceType: 4
+lDAPDisplayName: msExchMailStorage
+mayContain: homeMDB
+distinguishedName: CN=msExchMailStorage,CN=Schema,CN=Configuration,${BASEDN}
+objectCategory: CN=ClassSchema,CN=Schema,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: classSchema
+objectClassCategory: 3
+rDNAttID: cn
+schemaIDGUID: 03652000-a981-11d2-a9ff-00c04f8eedd8
+showInAdvancedViewOnly: TRUE
+subClassOf: top
+systemOnly: FALSE
+
+#
+# msExchInformationStore
+# description: The Information Store configuration
+#
+
+dn: CN=msExchInformationStore,CN=Schema,CN=Configuration,${BASEDN}
+adminDescription: msExchInformationStore
+adminDisplayName: msExchInformationStore
+auxiliaryClass: msExchBaseClass
+cn: msExchInformationStore
+defaultObjectCategory: CN=msExchInformationStore,CN=Schema,CN=Configuration,${BASEDN}
+defaultSecurityDescriptor: D:S:
+governsID: 1.2.840.113556.1.5.7000.62.11001
+instanceType: 4
+lDAPDisplayName: msExchInformationStore
+mustContain: cn
+distinguishedName: CN=msExchInformationStore,CN=Schema,CN=Configuration,${BASEDN}
+objectCategory: CN=ClassSchema,CN=Schema,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: classSchema
+objectClassCategory: 1
+possSuperiors: msExchExchangeServer
+rDNAttID: cn
+schemaIDGUID: 031b371a-a981-11d2-a9ff-00c04f8eedd8
+showInAdvancedViewOnly: TRUE
+subClassOf: container
+systemOnly: FALSE
+
+#
+# PurportedSearch
+# description: search argument for an address book view
+#
+
+dn: CN=PurportedSearch,CN=Schema,CN=Configuration,${BASEDN}
+adminDescription: PurportedSearch
+adminDisplayName: PurportedSearch
+attributeID: 1.2.840.113556.1.4.886
+attributeSyntax: 2.5.5.12
+cn: PurportedSearch
+instanceType: 4
+lDAPDisplayName: purportedSearch
+distinguishedName: CN=PurportedSearch,CN=Schema,CN=Configuration,${BASEDN}
+objectCategory: CN=AttributeSchema,CN=Schema,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: attributeSchema
+schemaIDGUID: b4b54e50-943a-11d1-aebd-0000f80367c1
+showInAdvancedViewOnly: TRUE
+systemOnly: FALSE
+
+#
+# AddressBookContainer
+# description: holding members of an address book view
+#
+
+dn: CN=AddressBookContainer,CN=Schema,CN=Configuration,${BASEDN}
+adminDescription: AddressBookContainer
+adminDisplayName: AddressBookContainer
+cn: AddressBookContainer
+defaultHidingValue: TRUE
+defaultObjectCategory: CN=AddressBookContainer,CN=Schema,CN=Configuration,${BASEDN}
+governsID: 1.2.840.113556.1.5.125
+instanceType: 4
+lDAPDisplayName: addressBookContainer
+distinguishedName: CN=AddressBookContainer,CN=Schema,CN=Configuration,${BASEDN}
+objectCategory: CN=ClassSchema,CN=Schema,CN=Configuration,${BASEDN}
+objectClass: top
+objectClass: classSchema
+objectClassCategory: 1
+possSuperiors: msExchConfigurationContainer
+possSuperiors: container
+rDNAttID: cn
+schemaIDGUID: 3e74f60f-3e73-11d1-a9c0-0000f80367c1
+showInAdvancedViewOnly: TRUE
+subClassOf: top
+systemMayContain: purportedSearch
+systemMustContain: displayName
+systemOnly: FALSE
+systemPossSuperiors: addressBookContainer
+systemPossSuperiors: configuration
diff --git a/setup/oc_provision_schema_modify.ldif b/setup/oc_provision_schema_modify.ldif
new file mode 100644 (file)
index 0000000..a891aa6
--- /dev/null
@@ -0,0 +1,10 @@
+dn: CN=User,CN=Schema,CN=Configuration,${BASEDN}
+changetype: modify
+add: auxiliaryClass
+auxiliaryClass: msExchBaseClass
+auxiliaryClass: msExchMailStorage
+
+dn: CN=server,CN=Schema,CN=Configuration,${BASEDN}
+changetype: modify
+add: mayContain
+mayContain: networkAddress
diff --git a/torture/emsmdb.c b/torture/emsmdb.c
new file mode 100644 (file)
index 0000000..7354401
--- /dev/null
@@ -0,0 +1,119 @@
+/* 
+   Unix EMSMDB implementation
+
+   test suite for emsmdb rpc operations
+
+   Copyright (C) Julien Kerihuel 2005
+   
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "openchange.h"
+#include <torture.h>
+#include "ndr_exchange.h"
+#include "ndr_exchange_c.h"
+#include "libmapi/mapicode.h"
+#include "libmapi/include/proto.h"
+
+/* FIXME: Should be part of Samba's data: */
+NTSTATUS torture_rpc_connection(TALLOC_CTX *parent_ctx, 
+                               struct dcerpc_pipe **p, 
+                               const struct dcerpc_interface_table *table);
+
+
+#define TEST_NAME      "/o=OpenChange Organization/ou=First Administrative Group/cn=Recipients/cn=Administrator"
+#define TEST_NAME_0    ""
+#define TEST_NAME_1    "/o=fo Organization/ou=First Administrative Group/cn=Recipients/cn=Administrator"
+#define TEST_NAME_2    "/o=OpenChange Organization/ou=Third Administrative Group/cn=Recipients/cn=Administrator"
+#define TEST_NAME_3    "/o=OpenChange Organization/ou=First Administrative Group/cn=Recipients_foooo/cn=Administrator"
+#define TEST_NAME_4    "/o=OpenChange Organization/ou=First Administrative Group/cn=Recipients/cn="
+#define TEST_NAME_5    "/o=OpenChange Organization/ou=First Administrative Group/cn=Recipients/cn=foobar"
+
+
+BOOL test_EcDoConnect(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
+{
+       struct EcDoConnect      r;
+       NTSTATUS                status;
+       BOOL                    ret = True;
+       int                     n = 0;
+       struct ndr_print        *ndr_print;
+
+       for (n = 0; n < 0xFFFF; n++)
+       {
+               r.in.name = TEST_NAME;
+               r.in.unknown1[0] = 0x0;
+               r.in.unknown1[1] = 0xf99dfde6;
+               r.in.unknown1[2] = 0x0;
+
+               r.in.code_page = 0x4e4;
+               r.in.input_locale.language = 0x40c;
+               r.in.input_locale.method = 0x409;
+
+               r.in.unknown2 = 0xffffffff;
+               r.in.unknown3 = 0x1;
+
+               r.in.emsmdb_client_version[0] = 0xa;
+               r.in.emsmdb_client_version[1] = 0x0;
+               r.in.emsmdb_client_version[2] = 0x1013;
+               *r.in.alloc_space = 0x0163000;
+
+               r.out.unknown4[0] = talloc(mem_ctx, uint32_t);
+               r.out.unknown4[1] = talloc(mem_ctx, uint32_t);
+               r.out.unknown4[2] = talloc(mem_ctx, uint32_t);
+               r.out.session_nb = talloc(mem_ctx, uint16_t);
+               r.out.handle = talloc(mem_ctx, struct policy_handle);
+
+               status = dcerpc_EcDoConnect(p, mem_ctx, &r);
+
+               if (!MAPI_STATUS_IS_OK(NT_STATUS_V(status))) {
+                       mapi_errstr("EcDoConnect", r.out.result);
+                       ret = False;
+                       return ret;
+               }
+               else {
+                       ndr_print = talloc(mem_ctx, struct ndr_print);
+                       ndr_print->depth = 1;
+                       ndr_print->print = ndr_print_debug_helper;
+                       ndr_print_EcDoConnect(ndr_print, "EcDoConnect", NDR_OUT, &r);
+                       
+                       ret = True;
+               }
+}
+       return ret;
+}
+
+BOOL torture_rpc_emsmdb(struct torture_context *torture)
+{
+       NTSTATUS                status;
+       struct dcerpc_pipe      *p;
+       TALLOC_CTX              *mem_ctx;
+       BOOL                    ret = True;
+
+       mem_ctx = talloc_init("torture_rpc_emsmdb");
+
+       status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_exchange_emsmdb);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               talloc_free(mem_ctx);
+
+               return False;
+       }
+
+       ret &= test_EcDoConnect(p, mem_ctx);
+
+       talloc_free(mem_ctx);
+
+       return ret;
+}
diff --git a/torture/exchange.c b/torture/exchange.c
new file mode 100644 (file)
index 0000000..672be7f
--- /dev/null
@@ -0,0 +1,271 @@
+/* 
+   Outlook to Exchange connection
+
+   test suite for emsmdb rpc operations
+
+   Copyright (C) Julien Kerihuel 2005
+   
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+/*
+   We simulate a complete connection to Exchange:
+   1- MapiLogonEx(): only NspiBind - not mandatory here
+                     use RPC-NSPI test instead
+   2- OpenMessageStore:
+      2.1 EcDoConnect: establish the connection on the emsmdb endpoint 
+                       and send some values to Exchange such as the 
+                       locale_id.
+      2.2 EcDoRpc
+      2.3 EcRRegisterPushNotification: Register client to Exchange
+ */
+
+#include "openchange.h"
+#include <torture.h>
+#include "ndr_exchange.h"
+#include "libmapi/include/emsmdb.h"
+#include "libmapi/include/mapi_proto.h"
+
+/* FIXME: Should be part of Samba's data: */
+NTSTATUS torture_rpc_connection(TALLOC_CTX *parent_ctx, 
+                               struct dcerpc_pipe **p, 
+                               const struct dcerpc_interface_table *table);
+
+
+
+#define ECDOCONNECT_FORMAT       "/o=%s Organization/ou=First Administrative Group/cn=Recipients/cn=%s"
+
+struct GUID    uuid;
+const char     *user;
+const char     *org;
+char           *session;
+
+
+/*
+  Open Message Store:
+  EcDoRpc_1_data is sent when Opening the default message store (Mailbox)
+ */
+
+#define EcDoRpc_1_mapilen 108
+#define EcDoRpc_1_length 102
+#define        EcDoRpc_1_opnum 0x00FE
+uint8_t EcDoRpc_1_content[] = "\x00\x01\x0C\x04\x00\x00\x00\x00\x00\x00\x58\x00\x2F\x6F\x3D\x4F\x70\x65\x6E\x43\x68\x61\x6E\x67\x65\x20\x4F\x72\x67\x61\x6E\x69\x7A\x61\x74\x69\x6F\x6E\x2F\x6F\x75\x3D\x46\x69\x72\x73\x74\x20\x41\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x76\x65\x20\x47\x72\x6F\x75\x70\x2F\x63\x6E\x3D\x52\x65\x63\x69\x70\x69\x65\x6E\x74\x73\x2F\x63\x6E\x3D\x41\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x6F\x72\x00";
+uint8_t EcDoRpc_1_remaining[] = "\xFF\xFF\xFF\xFF";
+
+uint8_t EcRRegisterPushNotification_1_data[] = "\x28\x29\x63\x01\x00\x00\x00\x00";
+#define EcRRegisterPushNotification_1_length 8;
+
+/* 02 00 is an argument: changing its value cause a E_INVALIDARG (0x80070057) error */
+
+uint8_t EcRRegisterPushNotification_2_data[] = "\x02\x00\x04\xDC\xC0\xA8\x01\x02\x00\x00\x00\x00\x00\x00\x00\x00";
+#define EcRRegisterPushNotification_2_length 16;
+
+/*
+  Open Root Folder:
+ */
+
+uint8_t EcDoRpc_2_content[] = "\x00\x01\x02\x00\x01\x29\x00\x00\x02\x06\x00\x01\x01\x00\x01\x29\x00\x00\x03\x0E\x00\x01\x01\x00\x02\x29\x00\x00\x04\x1E\x00\x01\x01\x00\x03\x29\x00\x00\x05\x3E\x00\x01\x01\x00\x04\x29\x00\x00\x06\x7E\x00\x01\x01\x00\x05\x29\x00\x00\x07\x7F\x00\x01\x01\x00\x06\x02\x00\x00\x08\x01\x00\x00\x00\x00\x00\x28\x19\x00";
+
+uint8_t EcDoRpc_3_content[] = "\x00\x01\x01\x00\x00\x01\x00\x00\x00\x00\x00\x28\x19\x00\x00\x00\x00\x00\x00\x00\x00\x29\x00\x00\x02\x05\x00\x00\x01\x00\x00\x00\x00\x00\x28\x19\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x01\x29\x00\x00\x03\x0D\x00\x00\x01\x00\x00\x00\x00\x00\x28\x19\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x02\x29\x00\x00\x04\x1D\x00\x00\x01\x00\x00\x00\x00\x00\x28\x19\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x03\x29\x00\x00\x05\x3D\x00\x00\x01\x00\x00\x00\x00\x00\x28\x19\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x04\x29\x00\x00\x06\x7D\x00\x00\x01\x00\x00\x00\x00\x00\x28\x19\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x05\x07\x00\x07\x00\x00\x00\x00\x01\x00\x03\x00\x01\x36";
+
+uint8_t EcDoRpc_4_content[] = "\x00\x01\x00";
+
+uint8_t EcDoRpc_5_content[] = "\x00\x00\x02\x00\x14\x00\x48\x67\x1E\x00\x01\x30\x15\x00\x00\x00\x01\x32\x00";
+
+uint8_t EcDoRpc_6_content[] = "\x00\x01\x00";
+
+uint8_t EcDoRpc_7_content[] = "\x00\x00\x08\x00\x14\x00\x48\x67\x14\x00\x4A\x67\x14\x00\x4D\x67\x03\x00\x4E\x67\x1E\x00\x37\x00\x1E\x00\x1A\x00\x1E\x00\xEB\x65\x1E\x00\xEC\x65\x05\x00\x01\x02\x02";
+
+uint8_t EcDoRpc_8_content[] = "\x00\x00\x08\x00\x14\x00\x48\x67\x14\x00\x4A\x67\x14\x00\x4D\x67\x03\x00\x4E\x67\x1E\x00\x37\x00\x1E\x00\x1A\x00\x1E\x00\xEB\x65\x1E\x00\xEC\x65\x08\x00\x01\x00\x00\x00\x00";
+
+struct MAPI_DATA RootFolder[] = {
+       { 118,  80,     0x0029, EcDoRpc_2_content, 0 },
+       { 200,  166,    0x0029, EcDoRpc_3_content, 0 },
+       { 15,   5,      0x0004, EcDoRpc_4_content, 0 },
+       { 27,   21,     0x0012, EcDoRpc_5_content, 0 },
+       { 15,   5,      0x0005, EcDoRpc_6_content, 0 },
+       { 57,   43,     0x0012, EcDoRpc_7_content, 0 },
+       { 55,   45,     0x0012, EcDoRpc_8_content, 0 },
+       {0,     0,      0,                 0 }
+};
+
+
+
+/*
+  OpenIPMSubTree()
+
+ */
+
+uint8_t EcDoRpc_9_content[] = "\x00\x01\x02\x00\x01\x29\x00\x00\x02\x06\x00\x01\x01\x00\x01\x29\x00\x00\x03\x0E\x00\x01\x01\x00\x02\x29\x00\x00\x04\x1E\x00\x01\x01\x00\x03\x29\x00\x00\x05\x3E\x00\x01\x01\x00\x04\x29\x00\x00\x06\x7E\x00\x01\x01\x00\x05\x29\x00\x00\x07\x7F\x00\x01\x01\x00\x06\x02\x00\x00\x08\x01\x00\x00\x00\x00\x00\x28\x1A\x00";
+
+uint8_t EcDoRpc_10_content[] = "\x00\x01\x01\x00\x00\x01\x00\x00\x00\x00\x00\x28\x1A\x00\x00\x00\x00\x00\x00\x00\x00\x29\x00\x00\x02\x05\x00\x00\x01\x00\x00\x00\x00\x00\x28\x1A\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x01\x29\x00\x00\x03\x0D\x00\x00\x01\x00\x00\x00\x00\x00\x28\x1A\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x02\x29\x00\x00\x04\x1D\x00\x00\x01\x00\x00\x00\x00\x00\x28\x1A\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x03\x29\x00\x00\x05\x3D\x00\x00\x01\x00\x00\x00\x00\x00\x28\x1A\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x04\x29\x00\x00\x06\x7D\x00\x00\x01\x00\x00\x00\x00\x00\x28\x1A\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x05\x07\x00\x07\x00\x00\x00\x00\x01\x00\x03\x00\x01\x36";
+
+uint8_t EcDoRpc_11_content[] = "\x00\x01\x00";
+
+uint8_t EcDoRpc_12_content[] = "\x00\x00\x02\x00\x14\x00\x48\x67\x1E\x00\x01\x30\x15\x00\x00\x00\x01\x32\x00";
+
+uint8_t EcDoRpc_13_content[] = "\x00\x01\x00";
+
+uint8_t EcDoRpc_14_content[] = "\x00\x00\x08\x00\x14\x00\x48\x67\x14\x00\x4A\x67\x14\x00\x4D\x67\x03\x00\x4E\x67\x1E\x00\x37\x00\x1E\x00\x1A\x00\x1E\x00\xEB\x65\x1E\x00\xEC\x65\x05\x00\x01\x02\x02";
+
+uint8_t EcDoRpc_15_content[] = "\x00\x00\x08\x00\x14\x00\x48\x67\x14\x00\x4A\x67\x14\x00\x4D\x67\x03\x00\x4E\x67\x1E\x00\x37\x00\x1E\x00\x1A\x00\x1E\x00\xEB\x65\x1E\x00\xEC\x65\x08\x00\x01\x00\x00\x00\x00";
+
+struct MAPI_DATA       IPMSubTree[] = {
+       { 118,  80,     0x0029, EcDoRpc_9_content,      0 },
+       { 200,  166,    0x0029, EcDoRpc_10_content,     0 },
+       { 15,   5,      0x0004, EcDoRpc_11_content,     0 },
+       { 27,   21,     0x0012, EcDoRpc_12_content,     0 },
+       { 15,   5,      0x0005, EcDoRpc_13_content,     0 },
+       { 57,   43,     0x0012, EcDoRpc_14_content,     0 },
+       { 55,   45,     0x0012, EcDoRpc_15_content,     0 },
+       { 0,    0,      0,                      0 }
+
+};
+
+/*
+  OpenInbox()
+ */
+
+#define        OpenInbox_EcDoRpc_1_mapilen     22
+#define        OpenInbox_EcDoRpc_1_length      18
+#define        OpenInbox_EcDoRpc_1_opnum       0x0018
+uint8_t OpenInbox_EcDoRpc_1_content[] = "\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x01\x01\x00";
+
+BOOL OpenMessageStore(struct emsmdb_context *emsmdb)
+{
+       struct MAPI_DATA                blob;
+       DATA_BLOB               blob1;
+       DATA_BLOB               blob2;
+       NTSTATUS                status;
+       struct MAPI_REQ         req;
+       BOOL                    ret = True;
+
+       DEBUG(0, ("\nStep 2: OpenMessageStore\n"));
+
+       req.opcode = op_OpenMsgStore;
+       req.u.openmsgstore.col = 0x0;
+       req.u.openmsgstore.row = 0x1;
+       req.u.openmsgstore.locale_id = 0x40c;
+       req.u.openmsgstore.padding = 0x0;
+       req.u.openmsgstore.profile_info = "/o=OpenChange Organization/ou=First Administrative Group/cn=Recipients/cn=Administrator";
+       
+       blob.mapi_len = EcDoRpc_1_mapilen;
+
+       status = emsmdb_transaction(emsmdb, blob, &req);
+       if (NT_STATUS_IS_ERR(status)) {
+               return False;
+       }
+
+       blob1.data = EcRRegisterPushNotification_1_data;
+       blob1.length = EcRRegisterPushNotification_1_length;
+
+       blob2.data = EcRRegisterPushNotification_2_data;
+       blob2.length = EcRRegisterPushNotification_2_length;
+
+       ret &= emsmdb_registernotify(emsmdb, blob1, blob2);
+
+       return True;
+}
+
+BOOL OpenRootFolder(struct emsmdb_context *emsmdb)
+{
+       BOOL            ret = True;
+       struct MAPI_DATA        blob;
+       int             c;
+
+       DEBUG(0, ("\nStep 3 - OpenRootFolder\n"));
+
+       for (c = 0; RootFolder[c].mapi_len; c++) {
+               blob.mapi_len = RootFolder[c].mapi_len;
+               blob.length = RootFolder[c].length;
+               blob.opnum = RootFolder[c].opnum;
+               blob.content = RootFolder[c].content;
+               
+               ret &= NT_STATUS_IS_OK(emsmdb_transaction_unknown(emsmdb, blob));
+       };
+
+       return ret;
+}
+
+BOOL OpenIPMSubTree(struct emsmdb_context *emsmdb)
+{
+        BOOL            ret = True;
+        struct MAPI_DATA       blob;
+       int             c;
+
+       DEBUG(0, ("\nStep 4 - OpenIPMSubtree\n"));
+
+       for (c = 0; IPMSubTree[c].mapi_len; c++) {
+               blob.mapi_len = IPMSubTree[c].mapi_len;
+               blob.length = IPMSubTree[c].length;
+               blob.opnum = IPMSubTree[c].opnum;
+               blob.content = IPMSubTree[c].content;
+
+               ret &= NT_STATUS_IS_OK(emsmdb_transaction_unknown(emsmdb, blob));
+       };
+
+       return ret;
+}
+
+BOOL OpenInbox(struct emsmdb_context *emsmdb)
+{
+        BOOL            ret = True;
+        struct MAPI_DATA       blob;
+
+       DEBUG(0, ("\nStep 5 - OpenInbox\n"));
+
+       blob.mapi_len = OpenInbox_EcDoRpc_1_mapilen;
+       blob.length = OpenInbox_EcDoRpc_1_length;
+       blob.opnum = OpenInbox_EcDoRpc_1_opnum;
+        blob.content = OpenInbox_EcDoRpc_1_content;
+
+       ret &= NT_STATUS_IS_OK(emsmdb_transaction_unknown(emsmdb, blob));
+
+       return ret;
+}
+
+
+BOOL torture_rpc_exchange(struct torture_context *torture)
+{
+       NTSTATUS                status;
+       struct dcerpc_pipe      *p;
+       TALLOC_CTX              *mem_ctx;
+       BOOL                    ret = True;
+       struct emsmdb_context   *emsmdb;
+
+       mem_ctx = talloc_init("torture_rpc_emsmdb");
+       status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_exchange_emsmdb);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               talloc_free(mem_ctx);
+               return False;
+       }
+
+       emsmdb = emsmdb_connect(mem_ctx, p, cmdline_credentials);
+       if (!emsmdb) {
+               return False;
+       }
+
+       emsmdb->mem_ctx = mem_ctx;
+       ret &= OpenMessageStore(emsmdb);
+       ret &= OpenRootFolder(emsmdb);
+       ret &= OpenIPMSubTree(emsmdb);
+       ret &= OpenInbox(emsmdb);
+
+
+       talloc_free(mem_ctx);
+
+       return ret;
+}
diff --git a/torture/nspi.c b/torture/nspi.c
new file mode 100644 (file)
index 0000000..8c9ccf3
--- /dev/null
@@ -0,0 +1,66 @@
+/* 
+   Unix NSPI implementation
+
+   test suite for nspi rpc operations
+
+   Copyright (C) Julien Kerihuel 2005
+   
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "openchange.h"
+#include <torture.h>
+#include "ndr_exchange.h"
+#include "libmapi/IMAPISession.h"
+#include "libmapi/include/nspi.h"
+#include "libmapi/include/mapi_proto.h"
+
+/* FIXME: Should be part of Samba's data: */
+NTSTATUS torture_rpc_connection(TALLOC_CTX *parent_ctx, 
+                               struct dcerpc_pipe **p, 
+                               const struct dcerpc_interface_table *table);
+
+
+
+BOOL torture_rpc_nspi(struct torture_context *torture)
+{
+       NTSTATUS                status;
+       struct dcerpc_pipe      *p;
+       TALLOC_CTX              *mem_ctx;
+       BOOL                    ret = True;
+       struct nspi_context     *nspi;
+
+       mem_ctx = talloc_init("torture_rpc_nspi");
+       
+       status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_exchange_nsp);
+       if (!NT_STATUS_IS_OK(status)) {
+               talloc_free(mem_ctx);
+
+               return False;
+       }
+
+       nspi = nspi_bind(mem_ctx, p, cmdline_credentials);
+       if (!nspi) {
+               return False;
+       }
+
+       nspi->mem_ctx = mem_ctx;
+
+       ret &= nspi_unbind(nspi);
+
+       talloc_free(mem_ctx);
+
+       return ret;
+}
diff --git a/torture/nspi_profile.c b/torture/nspi_profile.c
new file mode 100644 (file)
index 0000000..9488627
--- /dev/null
@@ -0,0 +1,104 @@
+/* 
+   OpenChange NSPI Profile implementation
+
+   create a MAPI profile
+
+   Copyright (C) Julien Kerihuel 2005
+   
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "openchange.h"
+#include <torture.h>
+#include "ndr_exchange.h"
+#include "libmapi/include/nspi.h"
+#include "libmapi/IMAPISession.h"
+#include "libmapi/include/mapi_proto.h"
+
+/* FIXME: Should be part of Samba's data: */
+NTSTATUS torture_rpc_connection(TALLOC_CTX *parent_ctx, 
+                               struct dcerpc_pipe **p, 
+                               const struct dcerpc_interface_table *table);
+
+
+
+BOOL torture_rpc_nspi_profile(struct torture_context *torture)
+{
+       NTSTATUS                status;
+       struct dcerpc_pipe      *p;
+       TALLOC_CTX              *mem_ctx;
+       BOOL                    ret = True;
+       struct nspi_context     *nspi;
+       struct SPropTagArray    *SPropTagArray;
+
+       mem_ctx = talloc_init("torture_rpc_nspi_profile");
+       
+       status = torture_rpc_connection(mem_ctx, &p, &dcerpc_table_exchange_nsp);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               talloc_free(mem_ctx);
+
+               return False;
+       }
+
+       nspi = nspi_bind(mem_ctx, p, cmdline_credentials);
+       if (!nspi) {
+               return False;
+       }
+
+       nspi->mem_ctx = mem_ctx;
+
+       ret &= nspi_GetHierarchyInfo(nspi);
+
+       SPropTagArray = set_SPropTagArray(nspi->mem_ctx, 0xc,
+                                         PR_DISPLAY_NAME,
+                                         PR_OFFICE_TELEPHONE_NUMBER,
+                                         PR_OFFICE_LOCATION,
+                                         PR_TITLE,
+                                         PR_COMPANY_NAME,
+                                         PR_ACCOUNT,
+                                         PR_ADDRTYPE,
+                                         PR_ENTRYID,
+                                         PR_OBJECT_TYPE,
+                                         PR_DISPLAY_TYPE,
+                                         PR_INSTANCE_KEY,
+                                         PR_EMAIL_ADDRESS);
+       ret &= nspi_GetMatches(nspi, SPropTagArray);
+
+       SPropTagArray = set_SPropTagArray(nspi->mem_ctx, 9,
+                                         PR_ACCOUNT,
+                                         PR_EMS_AB_EXPIRATION_TIME,
+                                         PR_DISPLAY_NAME,
+                                         PR_EMAIL_ADDRESS,
+                                         PR_DISPLAY_TYPE,
+                                         PR_EMS_AB_HOME_MDB,
+                                         PR_ATTACH_NUM,
+                                         PR_PROFILE_HOME_SERVER_ADDRS,
+                                         PR_EMS_AB_PROXY_ADDRESSES
+                                         );
+       ret &= nspi_QueryRows(nspi, SPropTagArray);
+
+       ret &= nspi_DNToEph(nspi);
+
+       SPropTagArray = set_SPropTagArray(nspi->mem_ctx, 0x1,
+                                         PR_EMS_AB_NETWORK_ADDRESS);
+       ret &= nspi_GetProps(nspi, SPropTagArray);
+
+       ret &= nspi_unbind(nspi);
+
+       talloc_free(mem_ctx);
+
+       return ret;
+}
diff --git a/torture/nspi_scantags.c b/torture/nspi_scantags.c
new file mode 100644 (file)
index 0000000..ed3d1d9
--- /dev/null
@@ -0,0 +1,344 @@
+/* 
+   OpenChange NSPI implementation
+
+   Check supported MAPI Property Tags for each Nspi functions
+
+   Copyright (C) Pauline Khun 2006
+   Copyright (C) Julien Kerihuel 2006
+   
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+/**  Nspi functions Torture test  **/
+
+/**  Torture Test  (Second version)
+ ** The purpose of this new torture test is to filter the property tags which
+ ** function or not with the function choosed. The test first creates a new
+ ** directory tree organized by the exchange server version tested, the Nspi
+ ** functions and the property tags (failing or succeeding).
+ ** Each file (scenario) then represents a property tag behavior according to
+ ** the Exchange version and the function tested, and contains an test output
+ ** formatted in XML.
+ */
+
+/**  How to
+ ** 1 - Set the smb.conf file :
+ **     - Add to the globals section :
+ **       PR_TAGS:tags_conf_path = [your_path]/openchange/trunk/source/torture/conf/nspi_scantags.conf
+ **       PR_TAGS:tags_path = [your_path]/openchange/trunk/source/torture/conf/proptags.conf
+ **
+ ** 2 - Change the nspi_scantags.conf file :
+ **     - Set the scenarios_path to the path you've choosen to nest the
+ **       scenarios.
+ **     - Set the function to test : function = [GetMatches | GetProps | QueryRows]
+ **
+ ** 3 - Torture test name : RPC-NSPI_SCANTAGS
+ **
+ */
+
+#include "openchange.h"
+#include <torture.h>
+#include "torture_proto.h"
+#include "libmapi/include/nspi.h"
+#include "exchange.h"
+#include "ndr_exchange.h"
+#include "libmapi/include/mapidefs.h"
+#include "libmapi/include/proto.h"
+#include "libmapi/IMAPISession.h"
+#include "libmapi/include/mapi_proto.h"
+
+#define FAILED                 "Failed"
+#define SUCCEEDED              "Succeeded"
+#define PARENT                 ".."
+#define XMLPATTERNBEGIN                "<exchange version='%s'>\n\t<function name='Nspi_%s'>\n\t\t<tag name='%s' value='0x%x'>"
+#define XMLPATTERNEND          "\n\t\t</tag>\n\t</function>\n</exchange>\n"
+
+/* Global vars */
+FILE   *stream;
+
+BOOL get_special_props(struct nspi_context *);
+
+struct tagsScenarios
+{
+       const char      *server;
+       const char      *path;
+       const char      *nspiFct;
+};
+
+struct NspiFunction
+{
+       const char      *name;
+       BOOL            (*fctPointer)(struct nspi_context *nspi, struct SPropTagArray *SPropTagArray);
+       BOOL            (*fctAux)(struct nspi_context *nspi);
+};
+
+BOOL nspi_QueryRows(struct nspi_context *, struct SPropTagArray *);
+BOOL nspi_GetMatches(struct nspi_context *, struct SPropTagArray *);
+BOOL nspi_GetProps(struct nspi_context *, struct SPropTagArray *);
+
+struct NspiFunction    gl_NspiFunctions[] =
+{
+       {"QueryRows", &nspi_QueryRows, &get_special_props},
+       {"GetMatches", &nspi_GetMatches, NULL},
+       {"GetProps", &nspi_GetProps, &get_special_props},
+       {0, 0}
+};
+
+static void ndr_print_scantags_helper(struct ndr_print *ndr, const char *format, ...) _PRINTF_ATTRIBUTE(2,3)
+{
+        va_list ap;
+        char *s = NULL;
+        int i;
+
+        va_start(ap, format);
+        vasprintf(&s, format, ap);
+        va_end(ap);
+
+        for (i=0;i<ndr->depth;i++) {
+                fprintf(stream, "    ");
+        }
+
+       fprintf(stream, "%s\n", s);
+        free(s);
+}
+
+BOOL   get_special_props(struct nspi_context *nspi)
+{
+       BOOL                            ret = True;
+       struct SPropTagArray            *SPropTagArray;
+       
+       SPropTagArray = set_SPropTagArray(nspi->mem_ctx, 2, PR_INSTANCE_KEY, PR_EMAIL_ADDRESS);
+       ret &= nspi_GetMatches(nspi, SPropTagArray);
+       return (ret);
+}
+
+BOOL   do_nspi_function(const char *nspiFunction, struct nspi_context *nspi, struct SPropTagArray *SPropTagArray)
+{
+       int     i;
+       
+       for (i = 0; gl_NspiFunctions[i].name; i++)
+               if (!strcmp(nspiFunction, gl_NspiFunctions[i].name))
+                       return (gl_NspiFunctions[i].fctPointer(nspi, SPropTagArray));
+       DEBUG(0, ("%s: Not a Nspi funtion", nspiFunction));
+       exit(EXIT_FAILURE);
+}
+
+void   chdir_scenarios(const char *path)
+{
+       if (chdir(path) < 0)
+       {
+               DEBUG(0, ("%s : Scenarios setup failed\n", path));
+               exit(EXIT_FAILURE);
+       }
+}
+
+BOOL   start_process(const char *section, void *other)
+{
+       DEBUG(0, ("-------------------------------\n- Scenarios creation -\n"));
+       return (True);
+}
+
+BOOL   init_scenarios(const char *param, const char *value, void *other)
+{
+       struct tagsScenarios    *scenarios;
+       
+       scenarios = (struct tagsScenarios *)other;
+       if (!strcmp(param, "server_version")) {
+               scenarios->server = talloc_strdup(scenarios, value);
+               DEBUG(0, ("[Server] :\t\t%s\n", scenarios->server));
+       }
+       else if (!strcmp(param, "scenarios_path")) {
+               scenarios->path = talloc_strdup(scenarios, value);
+               DEBUG(0, ("[Scenarios path] :\t%s\n", scenarios->path));
+       }
+       else if (!strcmp(param, "function")) {
+               scenarios->nspiFct = talloc_strdup(scenarios, value);
+               DEBUG(0, ("[Nspi Function] :\t%s\n", scenarios->nspiFct));
+       }
+       else
+               return (False);
+       return (True);
+}
+
+BOOL   setup_directory(const char *path)
+{
+       DIR     *dir;
+       
+       if ((dir = opendir(path)) == NULL)
+       {
+               DEBUG(0, ("%s : Not found\nMake directory...\n", path));
+               if (mkdir(path, 0700) < 0)
+               {
+                       DEBUG(0, ("%s : Directory creation failed", path));
+                       exit(EXIT_FAILURE);
+               }
+               DEBUG(0, ("%s : Creation succeed\n", path));
+       }
+       else
+               DEBUG(0, ("%s : Already exists\n", path));
+       return (True);
+}
+
+struct tagsScenarios   *setupScenarios(TALLOC_CTX *mem_ctx)
+{
+       struct tagsScenarios    *scenarios;
+       const char              *conf_path =
+               (const char *)lp_parm_string(-1, "PR_TAGS", "tags_conf_path");
+       
+       scenarios = talloc(mem_ctx, struct tagsScenarios);
+       if (pm_process(conf_path, start_process, init_scenarios, scenarios) == False)
+       {
+               DEBUG(0, ("pm_process: %s: Failed\n", conf_path));
+               exit(EXIT_FAILURE);
+       }
+       setup_directory(scenarios->path);
+       chdir_scenarios(scenarios->path);
+       setup_directory(scenarios->server);
+       chdir_scenarios(scenarios->server);
+       setup_directory(scenarios->nspiFct);
+       chdir_scenarios(scenarios->nspiFct);
+       setup_directory("Failed");
+       setup_directory("Succeeded");
+  return (scenarios);
+}
+
+BOOL   torture_rpc_scantags(struct torture_context *torture)
+{
+       uint32_t                proptag;
+       BOOL                    ret = True;
+       NTSTATUS                status;
+       TALLOC_CTX              *mem_ctx;
+       struct dcerpc_pipe      *p;
+       struct nspi_context     *nspi;
+       struct SPropTagArray    *SPropTagArray;
+       struct tagsScenarios    *scenarios;
+       const char              *tags_path = lp_parm_string(-1, "PR_TAGS", "tags_path");
+       const char              *binding = lp_parm_string(-1, "torture", "binding");
+       struct cli_credentials  *nspi_credentials;
+       struct test_join        *user_ctx = (struct test_join *) NULL;
+       char                    *user_password = (char *) NULL;
+       const char              *userdomain;
+       
+       mem_ctx = talloc_init("torture_rpc_scantags");
+       
+       /* We add the user in the AD () */
+       userdomain = lp_parm_string(-1, "torture", "userdomain");
+       if (!userdomain) {
+               userdomain = lp_workgroup();
+       }
+
+#if 0 /* FIXME */
+       user_ctx = torture_create_testuser(TEST_USER_NAME,
+                                          userdomain,
+                                          ACB_NORMAL, 
+                                          (const char **)&user_password);
+#endif
+       if (!user_ctx) {
+               printf("Failed to create the user\n");
+               return False;
+       }
+
+       /* We extend the user with Exchange attributes */
+#if 0 /* FIXME */
+       status = torture_create_exchangeuser(mem_ctx, torture_join_user_sid(user_ctx));
+       if (!NT_STATUS_IS_OK(status)) {
+               torture_leave_domain(user_ctx);
+               talloc_free(mem_ctx);
+               return False;
+       }
+#endif
+
+       /* We now setup and play the scenario */
+       nspi_credentials = cli_credentials_init(mem_ctx);
+       cli_credentials_set_conf(nspi_credentials);
+       cli_credentials_set_workstation(nspi_credentials, TEST_MACHINE_NAME, CRED_SPECIFIED);
+       cli_credentials_set_domain(nspi_credentials, userdomain, CRED_SPECIFIED);
+       cli_credentials_set_username(nspi_credentials, TEST_USER_NAME, CRED_SPECIFIED);
+       cli_credentials_set_password(nspi_credentials, user_password, CRED_SPECIFIED);
+
+       status = dcerpc_pipe_connect(mem_ctx, &p, binding,
+                                    &dcerpc_table_exchange_nsp,
+                                    nspi_credentials, NULL);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               talloc_free(mem_ctx);
+               return False;
+       }
+
+       scenarios = setupScenarios(mem_ctx);
+       
+       nspi = nspi_bind(mem_ctx, p, nspi_credentials);
+       if (!nspi) {
+               torture_leave_domain(user_ctx);
+               return False;
+       }
+       nspi->mem_ctx = mem_ctx;
+       
+       ret &= nspi_GetHierarchyInfo(nspi);
+
+       if (strcmp(scenarios->nspiFct, "GetMatches"))
+               get_special_props(nspi);
+       
+       
+       while ((SPropTagArray = set_SPropTagFile(mem_ctx, tags_path, "proptags")))
+       {
+               const char      *tagname;
+               
+               ret &= do_nspi_function(scenarios->nspiFct, nspi, SPropTagArray);
+               if (nspi->rowSet->cRows)
+               {
+                       proptag = nspi->rowSet->aRow[0].lpProps[0].ulPropTag;
+                       tagname = get_proptag_name(proptag);
+                       if (tagname)
+                       {
+                               if ((proptag & 0xFFFF) == PT_ERROR) {
+                                       chdir_scenarios(FAILED);
+                               } else {
+                                       chdir_scenarios(SUCCEEDED);
+                               }
+                               stream = fopen(tagname, "w");
+                               if (stream != NULL)
+                               {
+                                       struct ndr_print *ndr_print;
+
+                                       ndr_print = talloc_zero(mem_ctx, struct ndr_print);
+                                       ndr_print->print = ndr_print_scantags_helper;
+                                       ndr_print->depth = 1;
+                                       
+
+                                       fprintf(stream, XMLPATTERNBEGIN, scenarios->server, scenarios->nspiFct, tagname, proptag);
+                                       ndr_print_SRow(ndr_print, tagname, &nspi->rowSet->aRow[0]);
+                                       fprintf(stream, XMLPATTERNEND);
+                                       fclose(stream);
+                               }
+                               chdir_scenarios(PARENT);
+                               if (tagname && ((proptag & 0xFFFF) != 0xa))
+                               DEBUG(0, ("%s\n", tagname));
+                       }
+                       else {
+                               printf("proptag = 0x%.8x doesn't exist\n", proptag);
+                       }
+               }
+       }
+
+       /* We clean up the AD: remove test user */
+       DEBUG(0, ("Cleaning up the AD."));
+#if 0  /* FIXME */
+       torture_leave_domain(user_ctx);
+#endif
+
+       talloc_free(mem_ctx);
+       return (True);
+}
diff --git a/torture/openchange.c b/torture/openchange.c
new file mode 100644 (file)
index 0000000..352421c
--- /dev/null
@@ -0,0 +1,40 @@
+/* 
+   Unix EMSMDB implementation
+
+   test suite for openchange
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "openchange.h"
+#include <torture.h>
+
+BOOL torture_rpc_emsmdb(struct torture_context *);
+BOOL torture_rpc_exchange(struct torture_context *);
+BOOL torture_rpc_nspi(struct torture_context *);
+BOOL torture_rpc_nspi_profile(struct torture_context *);
+BOOL torture_rpc_scantags(struct torture_context *);
+
+NTSTATUS init_module(void)
+{
+       DEBUG(0, ("Loading openchange torture test\n"));
+       register_torture_op("RPC-EMSMDB", torture_rpc_emsmdb);
+       register_torture_op("RPC-EXCHANGE", torture_rpc_exchange);
+       register_torture_op("RPC-NSPI", torture_rpc_nspi);
+       register_torture_op("RPC-NSPI-PROFILE", torture_rpc_nspi_profile);
+       register_torture_op("RPC-NSPI-SCANTAGS", torture_rpc_scantags);
+
+       return NT_STATUS_OK;
+}
diff --git a/torture/scantags/nspi_scantags.conf b/torture/scantags/nspi_scantags.conf
new file mode 100644 (file)
index 0000000..0c88491
--- /dev/null
@@ -0,0 +1,4 @@
+[globals]
+       server_version = Exchange2000
+       scenarios_path = /home/kerihu_j/OpenChange/openchange/trunk/OpenChange/torture/scantags
+       function = GetMatches
diff --git a/torture/scantags/proptags.conf b/torture/scantags/proptags.conf
new file mode 100644 (file)
index 0000000..2b78995
--- /dev/null
@@ -0,0 +1,3000 @@
+[proptags]
+PR_ACKNOWLEDGEMENT_MODE = 0x00010003
+[proptags]
+PR_ALTERNATE_RECIPIENT_ALLOWED = 0x0002000b
+[proptags]
+PR_AUTHORIZING_USERS = 0x00030102
+[proptags]
+PR_AUTO_FORWARD_COMMENT = 0x0004001e
+[proptags]
+PR_AUTO_FORWARDED = 0x0005000b
+[proptags]
+PR_CONTENT_CONFIDENTIALITY_ALGORITHM_ID = 0x00060102
+[proptags]
+PR_CONTENT_CORRELATOR = 0x00070102
+[proptags]
+PR_CONTENT_IDENTIFIER = 0x0008001e
+[proptags]
+PR_CONTENT_LENGTH = 0x00090003
+[proptags]
+PR_CONTENT_RETURN_REQUESTED = 0x000a000b
+[proptags]
+PR_CONVERSATION_KEY = 0x000b0102
+[proptags]
+PR_CONVERSION_EITS = 0x000c0102
+[proptags]
+PR_CONVERSION_WITH_LOSS_PROHIBITED = 0x000d000b
+[proptags]
+PR_CONVERTED_EITS = 0x000e0102
+[proptags]
+PR_DEFERRED_DELIVERY_TIME = 0x000f0040
+[proptags]
+PR_DELIVER_TIME = 0x00100040
+[proptags]
+PR_DISCARD_REASON = 0x00110003
+[proptags]
+PR_DISCLOSURE_OF_RECIPIENTS = 0x0012000b
+[proptags]
+PR_DL_EXPANSION_HISTORY = 0x00130102
+[proptags]
+PR_DL_EXPANSION_PROHIBITED = 0x0014000b
+[proptags]
+PR_EXPIRY_TIME = 0x00150040
+[proptags]
+PR_IMPLICIT_CONVERSION_PROHIBITED = 0x0016000b
+[proptags]
+PR_IMPORTANCE = 0x00170003
+[proptags]
+PR_IPM_ID = 0x00180102
+[proptags]
+PR_LATEST_DELIVERY_TIME = 0x00190040
+[proptags]
+PR_MESSAGE_CLASS = 0x001a001e
+[proptags]
+PR_MESSAGE_DELIVERY_ID = 0x001b0102
+[proptags]
+PR_MESSAGE_SECURITY_LABEL = 0x001e0102
+[proptags]
+PR_OBSOLETED_IPMS = 0x001f0102
+[proptags]
+PR_ORIGINALLY_INTENDED_RECIPIENT_NAME = 0x00200102
+[proptags]
+PR_ORIGINAL_EITS = 0x00210102
+[proptags]
+PR_ORIGINATOR_CERTIFICATE = 0x00220102
+[proptags]
+PR_ORIGINATOR_DELIVERY_REPORT_REQUESTED = 0x0023000b
+[proptags]
+PR_ORIGINATOR_RETURN_ADDRESS = 0x00240102
+[proptags]
+PR_PARENT_KEY = 0x00250102
+[proptags]
+PR_PRIORITY = 0x00260003
+[proptags]
+PR_ORIGIN_CHECK = 0x00270102
+[proptags]
+PR_PROOF_OF_SUBMISSION_REQUESTED = 0x0028000b
+[proptags]
+PR_READ_RECEIPT_REQUESTED = 0x0029000b
+[proptags]
+PR_RECEIPT_TIME = 0x002a0040
+[proptags]
+PR_RECIPIENT_REASSIGNMENT_PROHIBITED = 0x002b000b
+[proptags]
+PR_REDIRECTION_HISTORY = 0x002c0102
+[proptags]
+PR_RELATED_IPMS = 0x002d0102
+[proptags]
+PR_ORIGINAL_SENSITIVITY = 0x002e0003
+[proptags]
+PR_LANGUAGES = 0x002f001e
+[proptags]
+PR_REPLY_TIME = 0x00300040
+[proptags]
+PR_REPORT_TAG = 0x00310102
+[proptags]
+PR_REPORT_TIME = 0x00320040
+[proptags]
+PR_RETURNED_IPM = 0x0033000b
+[proptags]
+PR_SECURITY = 0x00340003
+[proptags]
+PR_INCOMPLETE_COPY = 0x0035000b
+[proptags]
+PR_SENSITIVITY = 0x00360003
+[proptags]
+PR_SUBJECT = 0x0037001e
+[proptags]
+PR_SUBJECT_IPM = 0x00380102
+[proptags]
+PR_CLIENT_SUBMIT_TIME = 0x00390040
+[proptags]
+PR_REPORT_NAME = 0x003a001e
+[proptags]
+PR_SENT_REPRESENTING_SEARCH_KEY = 0x003b0102
+[proptags]
+PR_X400_CONTENT_TYPE = 0x003c0102
+[proptags]
+PR_SUBJECT_PREFIX = 0x003d001e
+[proptags]
+PR_NON_RECEIPT_REASON = 0x003e0003
+[proptags]
+PR_RECEIVED_BY_ENTRYID = 0x003f0102
+[proptags]
+PR_RECEIVED_BY_NAME = 0x0040001e
+[proptags]
+PR_SENT_REPRESENTING_ENTRYID = 0x00410102
+[proptags]
+PR_SENT_REPRESENTING_NAME = 0x0042001e
+[proptags]
+PR_RCVD_REPRESENTING_ENTRYID = 0x00430102
+[proptags]
+PR_RCVD_REPRESENTING_NAME = 0x0044001e
+[proptags]
+PR_REPORT_ENTRYID = 0x00450102
+[proptags]
+PR_READ_RECEIPT_ENTRYID = 0x00460102
+[proptags]
+PR_MESSAGE_SUBMISSION_ID = 0x00470102
+[proptags]
+PR_PROVIDER_SUBMIT_TIME = 0x00480040
+[proptags]
+PR_ORIGINAL_SUBJECT = 0x0049001e
+[proptags]
+PR_DISC_VAL = 0x004a000b
+[proptags]
+PR_ORIG_MESSAGE_CLASS = 0x004b001e
+[proptags]
+PR_ORIGINAL_AUTHOR_ENTRYID = 0x004c0102
+[proptags]
+PR_ORIGINAL_AUTHOR_NAME = 0x004d001e
+[proptags]
+PR_ORIGINAL_SUBMIT_TIME = 0x004e0040
+[proptags]
+PR_REPLY_RECIPIENT_ENTRIES = 0x004f0102
+[proptags]
+PR_REPLY_RECIPIENT_NAMES = 0x0050001e
+[proptags]
+PR_RECEIVED_BY_SEARCH_KEY = 0x00510102
+[proptags]
+PR_RCVD_REPRESENTING_SEARCH_KEY = 0x00520102
+[proptags]
+PR_READ_RECEIPT_SEARCH_KEY = 0x00530102
+[proptags]
+PR_REPORT_SEARCH_KEY = 0x00540102
+[proptags]
+PR_ORIGINAL_DELIVERY_TIME = 0x00550040
+[proptags]
+PR_ORIGINAL_AUTHOR_SEARCH_KEY = 0x00560102
+[proptags]
+PR_MESSAGE_TO_ME = 0x0057000b
+[proptags]
+PR_MESSAGE_CC_ME = 0x0058000b
+[proptags]
+PR_MESSAGE_RECIP_ME = 0x0059000b
+[proptags]
+PR_ORIGINAL_SENDER_NAME = 0x005a001e
+[proptags]
+PR_ORIGINAL_SENDER_ENTRYID = 0x005b0102
+[proptags]
+PR_ORIGINAL_SENDER_SEARCH_KEY = 0x005c0102
+[proptags]
+PR_ORIGINAL_SENT_REPRESENTING_NAME = 0x005d001e
+[proptags]
+PR_ORIGINAL_SENT_REPRESENTING_ENTRYID = 0x005e0102
+[proptags]
+PR_ORIGINAL_SENT_REPRESENTING_SEARCH_KEY = 0x005f0102
+[proptags]
+PR_START_DATE = 0x00600040
+[proptags]
+PR_END_DATE = 0x00610040
+[proptags]
+PR_OWNER_APPT_ID = 0x00620003
+[proptags]
+PR_RESPONSE_REQUESTED = 0x0063000b
+[proptags]
+PR_SENT_REPRESENTING_ADDRTYPE = 0x0064001e
+[proptags]
+PR_SENT_REPRESENTING_EMAIL_ADDRESS = 0x0065001e
+[proptags]
+PR_ORIGINAL_SENDER_ADDRTYPE = 0x0066001e
+[proptags]
+PR_ORIGINAL_SENDER_EMAIL_ADDRESS = 0x0067001e
+[proptags]
+PR_ORIGINAL_SENT_REPRESENTING_ADDRTYPE = 0x0068001e
+[proptags]
+PR_ORIGINAL_SENT_REPRESENTING_EMAIL_ADDRESS = 0x0069001e
+[proptags]
+PR_CONVERSATION_TOPIC = 0x0070001e
+[proptags]
+PR_CONVERSATION_INDEX = 0x00710102
+[proptags]
+PR_ORIGINAL_DISPLAY_BCC = 0x0072001e
+[proptags]
+PR_ORIGINAL_DISPLAY_CC = 0x0073001e
+[proptags]
+PR_ORIGINAL_DISPLAY_TO = 0x0074001e
+[proptags]
+PR_RECEIVED_BY_ADDRTYPE = 0x0075001e
+[proptags]
+PR_RECEIVED_BY_EMAIL_ADDRESS = 0x0076001e
+[proptags]
+PR_RCVD_REPRESENTING_ADDRTYPE = 0x0077001e
+[proptags]
+PR_RCVD_REPRESENTING_EMAIL_ADDRESS = 0x0078001e
+[proptags]
+PR_ORIGINAL_AUTHOR_ADDRTYPE = 0x0079001e
+[proptags]
+PR_ORIGINAL_AUTHOR_EMAIL_ADDRESS = 0x007a001e
+[proptags]
+PR_ORIGINALLY_INTENDED_RECIP_ADDRTYPE = 0x007b001e
+[proptags]
+PR_ORIGINALLY_INTENDED_RECIP_EMAIL_ADDRESS = 0x007c001e
+[proptags]
+PR_TRANSPORT_MESSAGE_HEADERS = 0x007d001e
+[proptags]
+PR_DELEGATION = 0x007e0102
+[proptags]
+PR_TNEF_CORRELATION_KEY = 0x007f0102
+[proptags]
+PR_CONTENT_INTEGRITY_CHECK = 0x0c000102
+[proptags]
+PR_EXPLICIT_CONVERSION = 0x0c010003
+[proptags]
+PR_IPM_RETURN_REQUESTED = 0x0c02000b
+[proptags]
+PR_MESSAGE_TOKEN = 0x0c030102
+[proptags]
+PR_NDR_REASON_CODE = 0x0c040003
+[proptags]
+PR_NDR_DIAG_CODE = 0x0c050003
+[proptags]
+PR_NON_RECEIPT_NOTIFICATION_REQUESTED = 0x0c06000b
+[proptags]
+PR_DELIVERY_POINT = 0x0c070003
+[proptags]
+PR_ORIGINATOR_NON_DELIVERY_REPORT_REQUESTED = 0x0c08000b
+[proptags]
+PR_ORIGINATOR_REQUESTED_ALTERNATE_RECIPIENT = 0x0c090102
+[proptags]
+PR_PHYSICAL_DELIVERY_BUREAU_FAX_DELIVERY = 0x0c0a000b
+[proptags]
+PR_PHYSICAL_DELIVERY_MODE = 0x0c0b0003
+[proptags]
+PR_PHYSICAL_DELIVERY_REPORT_REQUEST = 0x0c0c0003
+[proptags]
+PR_PHYSICAL_FORWARDING_ADDRESS = 0x0c0d0102
+[proptags]
+PR_PHYSICAL_FORWARDING_ADDRESS_REQUESTED = 0x0c0e000b
+[proptags]
+PR_PHYSICAL_FORWARDING_PROHIBITED = 0x0c0f000b
+[proptags]
+PR_PHYSICAL_RENDITION_ATTRIBUTES = 0x0c100102
+[proptags]
+PR_PROOF_OF_DELIVERY = 0x0c110102
+[proptags]
+PR_PROOF_OF_DELIVERY_REQUESTED = 0x0c12000b
+[proptags]
+PR_RECIPIENT_CERTIFICATE = 0x0c130102
+[proptags]
+PR_RECIPIENT_NUMBER_FOR_ADVICE = 0x0c14001e
+[proptags]
+PR_RECIPIENT_TYPE = 0x0c150003
+[proptags]
+PR_REGISTERED_MAIL_TYPE = 0x0c160003
+[proptags]
+PR_REPLY_REQUESTED = 0x0c17000b
+[proptags]
+PR_REQUESTED_DELIVERY_METHOD = 0x0c180003
+[proptags]
+PR_SENDER_ENTRYID = 0x0c190102
+[proptags]
+PR_SENDER_NAME = 0x0c1a001e
+[proptags]
+PR_SUPPLEMENTARY_INFO = 0x0c1b001e
+[proptags]
+PR_TYPE_OF_MTS_USER = 0x0c1c0003
+[proptags]
+PR_SENDER_SEARCH_KEY = 0x0c1d0102
+[proptags]
+PR_SENDER_ADDRTYPE = 0x0c1e001e
+[proptags]
+PR_SENDER_EMAIL_ADDRESS = 0x0c1f001e
+[proptags]
+PR_CURRENT_VERSION = 0x0e000014
+[proptags]
+PR_DELETE_AFTER_SUBMIT = 0x0e01000b
+[proptags]
+PR_DISPLAY_BCC = 0x0e02001e
+[proptags]
+PR_DISPLAY_CC = 0x0e03001e
+[proptags]
+PR_DISPLAY_TO = 0x0e04001e
+[proptags]
+PR_PARENT_DISPLAY = 0x0e05001e
+[proptags]
+PR_MESSAGE_DELIVERY_TIME = 0x0e060040
+[proptags]
+PR_MESSAGE_FLAGS = 0x0e070003
+[proptags]
+PR_MESSAGE_SIZE = 0x0e080003
+[proptags]
+PR_MESSAGE_SIZE_EXTENDED = 0x0e080014
+[proptags]
+PR_PARENT_ENTRYID = 0x0e090102
+[proptags]
+PR_SENTMAIL_ENTRYID = 0x0e0a0102
+[proptags]
+PR_CORRELATE = 0x0e0c000b
+[proptags]
+PR_CORRELATE_MTSID = 0x0e0d0102
+[proptags]
+PR_DISCRETE_VALUES = 0x0e0e000b
+[proptags]
+PR_RESPONSIBILITY = 0x0e0f000b
+[proptags]
+PR_SPOOLER_STATUS = 0x0e100003
+[proptags]
+PR_TRANSPORT_STATUS = 0x0e110003
+[proptags]
+PR_MESSAGE_RECIPIENTS = 0x0e12000d
+[proptags]
+PR_MESSAGE_ATTACHMENTS = 0x0e13000d
+[proptags]
+PR_SUBMIT_FLAGS = 0x0e140003
+[proptags]
+PR_RECIPIENT_STATUS = 0x0e150003
+[proptags]
+PR_TRANSPORT_KEY = 0x0e160003
+[proptags]
+PR_MSG_STATUS = 0x0e170003
+[proptags]
+PR_MESSAGE_DOWNLOAD_TIME = 0x0e180003
+[proptags]
+PR_CREATION_VERSION = 0x0e190014
+[proptags]
+PR_MODIFY_VERSION = 0x0e1a0014
+[proptags]
+PR_HASATTACH = 0x0e1b000b
+[proptags]
+PR_BODY_CRC = 0x0e1c0003
+[proptags]
+PR_NORMALIZED_SUBJECT = 0x0e1d001e
+[proptags]
+PR_RTF_IN_SYNC = 0x0e1f000b
+[proptags]
+PR_ATTACH_SIZE = 0x0e200003
+[proptags]
+PR_ATTACH_NUM = 0x0e210003
+[proptags]
+PR_PREPROCESS = 0x0e22000b
+[proptags]
+PR_INTERNET_ARTICLE_NUMBER = 0x0e230003
+[proptags]
+PR_NEWSGROUP_NAME = 0x0e24001e
+[proptags]
+PR_ORIGINATING_MTA_CERTIFICATE = 0x0e250102
+[proptags]
+PR_PROOF_OF_SUBMISSION = 0x0e260102
+[proptags]
+PR_NT_SECURITY_DESCRIPTOR = 0x0e270102
+[proptags]
+PR_CREATOR_SID = 0x0e580102
+[proptags]
+PR_LAST_MODIFIER_SID = 0x0e590102
+[proptags]
+PR_MIME_HANDLER_CLASSIDS = 0x0e5e0048
+[proptags]
+PR_URL_COMP_NAME_POSTFIX = 0x0e610003
+[proptags]
+PR_URL_COMP_NAME_SET = 0x0e62000b
+[proptags]
+PR_SUBFOLDER_CT = 0x0e630003
+[proptags]
+PR_DELETED_SUBFOLDER_CT = 0x0e640003
+[proptags]
+PR_DELETE_TIME = 0x0e660040
+[proptags]
+PR_AGE_LIMIT = 0x0e670102
+[proptags]
+PR_TRUST_SENDER = 0x0e790003
+[proptags]
+PR_ATTACH_VIRUS_SCAN_INFO = 0x0e960102
+[proptags]
+PR_ACCESS = 0x0ff40003
+[proptags]
+PR_ROW_TYPE = 0x0ff50003
+[proptags]
+PR_INSTANCE_KEY = 0x0ff60102
+[proptags]
+PR_ACCESS_LEVEL = 0x0ff70003
+[proptags]
+PR_MAPPING_SIGNATURE = 0x0ff80102
+[proptags]
+PR_RECORD_KEY = 0x0ff90102
+[proptags]
+PR_STORE_RECORD_KEY = 0x0ffa0102
+[proptags]
+PR_STORE_ENTRYID = 0x0ffb0102
+[proptags]
+PR_MINI_ICON = 0x0ffc0102
+[proptags]
+PR_ICON = 0x0ffd0102
+[proptags]
+PR_OBJECT_TYPE = 0x0ffe0003
+[proptags]
+PR_ENTRYID = 0x0fff0102
+[proptags]
+PR_BODY = 0x1000001e
+[proptags]
+PR_REPORT_TEXT = 0x1001001e
+[proptags]
+PR_ORIGINATOR_AND_DL_EXPANSION_HISTORY = 0x10020102
+[proptags]
+PR_REPORTING_DL_NAME = 0x10030102
+[proptags]
+PR_REPORTING_MTA_CERTIFICATE = 0x10040102
+[proptags]
+PR_RTF_SYNC_BODY_CRC = 0x10060003
+[proptags]
+PR_RTF_SYNC_BODY_COUNT = 0x10070003
+[proptags]
+PR_RTF_SYNC_BODY_TAG = 0x1008001e
+[proptags]
+PR_RTF_COMPRESSED = 0x10090102
+[proptags]
+PR_RTF_SYNC_PREFIX_COUNT = 0x10100003
+[proptags]
+PR_RTF_SYNC_TRAILING_COUNT = 0x10110003
+[proptags]
+PR_ORIGINALLY_INTENDED_RECIP_ENTRYID = 0x10120102
+[proptags]
+PR_HTML = 0x10130102
+[proptags]
+PR_INTERNET_APPROVED = 0x1030001e
+[proptags]
+PR_INTERNET_CONTROL = 0x1031001e
+[proptags]
+PR_INTERNET_DISTRIBUTION = 0x1032001e
+[proptags]
+PR_INTERNET_FOLLOWUP_TO = 0x1033001e
+[proptags]
+PR_INTERNET_LINES = 0x10340003
+[proptags]
+PR_INTERNET_MESSAGE_ID = 0x1035001e
+[proptags]
+PR_INTERNET_NEWSGROUPS = 0x1036001e
+[proptags]
+PR_INTERNET_ORGANIZATION = 0x1037001e
+[proptags]
+PR_INTERNET_NNTP_PATH = 0x1038001e
+[proptags]
+PR_INTERNET_REFERENCES = 0x1039001e
+[proptags]
+PR_SUPERSEDES = 0x103a001e
+[proptags]
+PR_POST_FOLDER_ENTRIES = 0x103b0102
+[proptags]
+PR_POST_FOLDER_NAMES = 0x103c001e
+[proptags]
+PR_POST_REPLY_FOLDER_ENTRIES = 0x103d0102
+[proptags]
+PR_POST_REPLY_FOLDER_NAMES = 0x103e001e
+[proptags]
+PR_POST_REPLY_DENIED = 0x103f0102
+[proptags]
+PR_NNTP_XREF = 0x1040001e
+[proptags]
+PR_INTERNET_PRECEDENCE = 0x1041001e
+[proptags]
+PR_IN_REPLY_TO_ID = 0x1042001e
+[proptags]
+PR_LIST_HELP = 0x1043001e
+[proptags]
+PR_LIST_SUBSCRIBE = 0x1044001e
+[proptags]
+PR_LIST_UNSUBSCRIBE = 0x1045001e
+[proptags]
+PR_ACTION = 0x10800003
+[proptags]
+PR_ACTION_FLAG = 0x10810003
+[proptags]
+PR_ACTION_DATE = 0x10820040
+[proptags]
+PR_FLAG_STATUS = 0x10900003
+[proptags]
+PR_FLAG_COMPLETE = 0x10910040
+[proptags]
+PR_SMTP_TEMP_TBL_DATA = 0x10c00102
+[proptags]
+PR_SMTP_TEMP_TBL_DATA_2 = 0x10c10003
+[proptags]
+PR_SMTP_TEMP_TBL_DATA_3 = 0x10c20102
+[proptags]
+PR_CAL_START_TIME = 0x10c30040
+[proptags]
+PR_CAL_END_TIME = 0x10c40040
+[proptags]
+PR_CAL_RECURRING_ID = 0x10c50040
+[proptags]
+PR_DAV_SUBMIT_DATA = 0x10c6001e
+[proptags]
+PR_CDO_EXPANSION_INDEX = 0x10c70003
+[proptags]
+PR_IFS_INTERNAL_DATA = 0x10c80102
+[proptags]
+PR_CAL_REMINDER_NEXT_TIME = 0x10ca0040
+[proptags]
+PR_OWA_URL = 0x10f1001e
+[proptags]
+PR_DISABLE_FULL_FIDELITY = 0x10f2000b
+[proptags]
+PR_URL_COMP_NAME = 0x10f3001e
+[proptags]
+PR_ATTR_HIDDEN = 0x10f4000b
+[proptags]
+PR_ATTR_SYSTEM = 0x10f5000b
+[proptags]
+PR_ATTR_READONLY = 0x10f6000b
+[proptags]
+PR_P1_CONTENT = 0x11000102
+[proptags]
+PR_P1_CONTENT_TYPE = 0x11010102
+[proptags]
+PR_ROWID = 0x30000003
+[proptags]
+PR_DISPLAY_NAME = 0x3001001e
+[proptags]
+PR_ADDRTYPE = 0x3002001e
+[proptags]
+PR_EMAIL_ADDRESS = 0x3003001e
+[proptags]
+PR_COMMENT = 0x3004001e
+[proptags]
+PR_DEPTH = 0x30050003
+[proptags]
+PR_PROVIDER_DISPLAY = 0x3006001e
+[proptags]
+PR_CREATION_TIME = 0x30070040
+[proptags]
+PR_LAST_MODIFICATION_TIME = 0x30080040
+[proptags]
+PR_RESOURCE_FLAGS = 0x30090003
+[proptags]
+PR_PROVIDER_DLL_NAME = 0x300a001e
+[proptags]
+PR_SEARCH_KEY = 0x300b0102
+[proptags]
+PR_PROVIDER_UID = 0x300c0102
+[proptags]
+PR_PROVIDER_ORDINAL = 0x300d0003
+[proptags]
+PR_FORM_VERSION = 0x3301001e
+[proptags]
+PR_FORM_CLSID = 0x33020048
+[proptags]
+PR_FORM_CONTACT_NAME = 0x3303001e
+[proptags]
+PR_FORM_CATEGORY = 0x3304001e
+[proptags]
+PR_FORM_CATEGORY_SUB = 0x3305001e
+[proptags]
+PR_FORM_HOST_MAP = 0x33061003
+[proptags]
+PR_FORM_HIDDEN = 0x3307000b
+[proptags]
+PR_FORM_DESIGNER_NAME = 0x3308001e
+[proptags]
+PR_FORM_DESIGNER_GUID = 0x33090048
+[proptags]
+PR_FORM_MESSAGE_BEHAVIOR = 0x330a0003
+[proptags]
+PR_DEFAULT_STORE = 0x3400000b
+[proptags]
+PR_STORE_SUPPORT_MASK = 0x340d0003
+[proptags]
+PR_STORE_STATE = 0x340e0003
+[proptags]
+PR_IPM_SUBTREE_SEARCH_KEY = 0x34100102
+[proptags]
+PR_IPM_OUTBOX_SEARCH_KEY = 0x34110102
+[proptags]
+PR_IPM_WASTEBASKET_SEARCH_KEY = 0x34120102
+[proptags]
+PR_IPM_SENTMAIL_SEARCH_KEY = 0x34130102
+[proptags]
+PR_MDB_PROVIDER = 0x34140102
+[proptags]
+PR_RECEIVE_FOLDER_SETTINGS = 0x3415000d
+[proptags]
+PR_VALID_FOLDER_MASK = 0x35df0003
+[proptags]
+PR_IPM_SUBTREE_ENTRYID = 0x35e00102
+[proptags]
+PR_IPM_OUTBOX_ENTRYID = 0x35e20102
+[proptags]
+PR_IPM_WASTEBASKET_ENTRYID = 0x35e30102
+[proptags]
+PR_IPM_SENTMAIL_ENTRYID = 0x35e40102
+[proptags]
+PR_VIEWS_ENTRYID = 0x35e50102
+[proptags]
+PR_COMMON_VIEWS_ENTRYID = 0x35e60102
+[proptags]
+PR_FINDER_ENTRYID = 0x35e70102
+[proptags]
+PR_CONTAINER_FLAGS = 0x36000003
+[proptags]
+PR_FOLDER_TYPE = 0x36010003
+[proptags]
+PR_CONTENT_COUNT = 0x36020003
+[proptags]
+PR_CONTENT_UNREAD = 0x36030003
+[proptags]
+PR_CREATE_TEMPLATES = 0x3604000d
+[proptags]
+PR_DETAILS_TABLE = 0x3605000d
+[proptags]
+PR_SEARCH = 0x3607000d
+[proptags]
+PR_SELECTABLE = 0x3609000b
+[proptags]
+PR_SUBFOLDERS = 0x360a000b
+[proptags]
+PR_STATUS = 0x360b0003
+[proptags]
+PR_ANR = 0x360c001e
+[proptags]
+PR_CONTENTS_SORT_ORDER = 0x360d1003
+[proptags]
+PR_CONTAINER_HIERARCHY = 0x360e000d
+[proptags]
+PR_CONTAINER_CONTENTS = 0x360f000d
+[proptags]
+PR_FOLDER_ASSOCIATED_CONTENTS = 0x3610000d
+[proptags]
+PR_DEF_CREATE_DL = 0x36110102
+[proptags]
+PR_DEF_CREATE_MAILUSER = 0x36120102
+[proptags]
+PR_CONTAINER_CLASS = 0x3613001e
+[proptags]
+PR_CONTAINER_MODIFY_VERSION = 0x36140014
+[proptags]
+PR_AB_PROVIDER_ID = 0x36150102
+[proptags]
+PR_DEFAULT_VIEW_ENTRYID = 0x36160102
+[proptags]
+PR_ASSOC_CONTENT_COUNT = 0x36170003
+[proptags]
+PR_PACKED_NAME_PROPS = 0x361c0102
+[proptags]
+PR_IPM_APPOINTMENT_ENTRYID = 0x36d00102
+[proptags]
+PR_IPM_CONTACT_ENTRYID = 0x36d10102
+[proptags]
+PR_IPM_JOURNAL_ENTRYID = 0x36d20102
+[proptags]
+PR_IPM_NOTE_ENTRYID = 0x36d30102
+[proptags]
+PR_IPM_TASK_ENTRYID = 0x36d40102
+[proptags]
+PR_REMINDERS_ONLINE_ENTRYID = 0x36d50102
+[proptags]
+PR_REMINDERS_OFFLINE_ENTRYID = 0x36d60102
+[proptags]
+PR_IPM_DRAFTS_ENTRYID = 0x36d70102
+[proptags]
+PR_OUTLOOK_2003_ENTRYIDS = 0x36d81102
+[proptags]
+PR_FOLDER_WEBVIEWINFO = 0x36df0102
+[proptags]
+PR_FOLDER_XVIEWINFO_E = 0x36e00102
+[proptags]
+PR_FOLDER_VIEWS_ONLY = 0x36e10003
+[proptags]
+PR_FREEBUSY_ENTRYIDS = 0x36e41102
+[proptags]
+PR_DEF_MSG_CLASS = 0x36e5001e
+[proptags]
+PR_DEF_FORM_NAME = 0x36e6001e
+[proptags]
+PR_GENERATE_EXCHANGE_VIEWS = 0x36e9000b
+[proptags]
+PR_AGING_PERIOD = 0x36ec0003
+[proptags]
+PR_AGING_GRANULARITY = 0x36ee0003
+[proptags]
+PR_ATTACHMENT_X400_PARAMETERS = 0x37000102
+[proptags]
+PR_ATTACH_DATA_OBJ = 0x3701000d
+[proptags]
+PR_ATTACH_DATA_BIN = 0x37010102
+[proptags]
+PR_ATTACH_ENCODING = 0x37020102
+[proptags]
+PR_ATTACH_EXTENSION = 0x3703001e
+[proptags]
+PR_ATTACH_FILENAME = 0x3704001e
+[proptags]
+PR_ATTACH_METHOD = 0x37050003
+[proptags]
+PR_ATTACH_LONG_FILENAME = 0x3707001e
+[proptags]
+PR_ATTACH_PATHNAME = 0x3708001e
+[proptags]
+PR_ATTACH_RENDERING = 0x37090102
+[proptags]
+PR_ATTACH_TAG = 0x370a0102
+[proptags]
+PR_RENDERING_POSITION = 0x370b0003
+[proptags]
+PR_ATTACH_TRANSPORT_NAME = 0x370c001e
+[proptags]
+PR_ATTACH_LONG_PATHNAME = 0x370d001e
+[proptags]
+PR_ATTACH_MIME_TAG = 0x370e001e
+[proptags]
+PR_ATTACH_ADDITIONAL_INFO = 0x370f0102
+[proptags]
+PR_ATTACH_CONTENT_ID = 0x3712001e
+[proptags]
+PR_ATTACH_CONTENT_LOCATION = 0x3713001e
+[proptags]
+PR_ATTACH_FLAGS = 0x37140003
+[proptags]
+PR_ATTACH_CONTENT_DISPOSITION = 0x3716001e
+[proptags]
+PR_SYNCEVENT_SUPPRESS_GUID = 0x38800102
+[proptags]
+PR_DISPLAY_TYPE = 0x39000003
+[proptags]
+PR_TEMPLATEID = 0x39020102
+[proptags]
+PR_PRIMARY_CAPABILITY = 0x39040102
+[proptags]
+PR_SMTP_ADDRESS = 0x39fe001e
+[proptags]
+PR_7BIT_DISPLAY_NAME = 0x39ff001e
+[proptags]
+PR_ACCOUNT = 0x3a00001e
+[proptags]
+PR_ALTERNATE_RECIPIENT = 0x3a010102
+[proptags]
+PR_CALLBACK_TELEPHONE_NUMBER = 0x3a02001e
+[proptags]
+PR_CONVERSION_PROHIBITED = 0x3a03000b
+[proptags]
+PR_DISCLOSE_RECIPIENTS = 0x3a04000b
+[proptags]
+PR_GENERATION = 0x3a05001e
+[proptags]
+PR_GIVEN_NAME = 0x3a06001e
+[proptags]
+PR_GOVERNMENT_ID_NUMBER = 0x3a07001e
+[proptags]
+PR_OFFICE_TELEPHONE_NUMBER = 0x3a08001e
+[proptags]
+PR_HOME_TELEPHONE_NUMBER = 0x3a09001e
+[proptags]
+PR_INITIALS = 0x3a0a001e
+[proptags]
+PR_KEYWORD = 0x3a0b001e
+[proptags]
+PR_LANGUAGE = 0x3a0c001e
+[proptags]
+PR_LOCATION = 0x3a0d001e
+[proptags]
+PR_MAIL_PERMISSION = 0x3a0e000b
+[proptags]
+PR_MHS_COMMON_NAME = 0x3a0f001e
+[proptags]
+PR_ORGANIZATIONAL_ID_NUMBER = 0x3a10001e
+[proptags]
+PR_SURNAME = 0x3a11001e
+[proptags]
+PR_ORIGINAL_ENTRYID = 0x3a120102
+[proptags]
+PR_ORIGINAL_DISPLAY_NAME = 0x3a13001e
+[proptags]
+PR_ORIGINAL_SEARCH_KEY = 0x3a140102
+[proptags]
+PR_POSTAL_ADDRESS = 0x3a15001e
+[proptags]
+PR_COMPANY_NAME = 0x3a16001e
+[proptags]
+PR_TITLE = 0x3a17001e
+[proptags]
+PR_DEPARTMENT_NAME = 0x3a18001e
+[proptags]
+PR_OFFICE_LOCATION = 0x3a19001e
+[proptags]
+PR_PRIMARY_TELEPHONE_NUMBER = 0x3a1a001e
+[proptags]
+PR_OFFICE2_TELEPHONE_NUMBER = 0x3a1b001e
+[proptags]
+PR_MOBILE_TELEPHONE_NUMBER = 0x3a1c001e
+[proptags]
+PR_RADIO_TELEPHONE_NUMBER = 0x3a1d001e
+[proptags]
+PR_CAR_TELEPHONE_NUMBER = 0x3a1e001e
+[proptags]
+PR_OTHER_TELEPHONE_NUMBER = 0x3a1f001e
+[proptags]
+PR_TRANSMITTABLE_DISPLAY_NAME = 0x3a20001e
+[proptags]
+PR_PAGER_TELEPHONE_NUMBER = 0x3a21001e
+[proptags]
+PR_USER_CERTIFICATE = 0x3a220102
+[proptags]
+PR_PRIMARY_FAX_NUMBER = 0x3a23001e
+[proptags]
+PR_HOME_FAX_NUMBER = 0x3a25001e
+[proptags]
+PR_COUNTRY = 0x3a26001e
+[proptags]
+PR_LOCALITY = 0x3a27001e
+[proptags]
+PR_STATE_OR_PROVINCE = 0x3a28001e
+[proptags]
+PR_STREET_ADDRESS = 0x3a29001e
+[proptags]
+PR_POSTAL_CODE = 0x3a2a001e
+[proptags]
+PR_POST_OFFICE_BOX = 0x3a2b001e
+[proptags]
+PR_TELEX_NUMBER = 0x3a2c001e
+[proptags]
+PR_ISDN_NUMBER = 0x3a2d001e
+[proptags]
+PR_ASSISTANT_TELEPHONE_NUMBER = 0x3a2e001e
+[proptags]
+PR_HOME2_TELEPHONE_NUMBER = 0x3a2f001e
+[proptags]
+PR_ASSISTANT = 0x3a30001e
+[proptags]
+PR_SEND_RICH_INFO = 0x3a40000b
+[proptags]
+PR_WEDDING_ANNIVERSARY = 0x3a410040
+[proptags]
+PR_BIRTHDAY = 0x3a420040
+[proptags]
+PR_HOBBIES = 0x3a43001e
+[proptags]
+PR_MIDDLE_NAME = 0x3a44001e
+[proptags]
+PR_DISPLAY_NAME_PREFIX = 0x3a45001e
+[proptags]
+PR_PROFESSION = 0x3a46001e
+[proptags]
+PR_PREFERRED_BY_NAME = 0x3a47001e
+[proptags]
+PR_SPOUSE_NAME = 0x3a48001e
+[proptags]
+PR_COMPUTER_NETWORK_NAME = 0x3a49001e
+[proptags]
+PR_CUSTOMER_ID = 0x3a4a001e
+[proptags]
+PR_TTYTDD_PHONE_NUMBER = 0x3a4b001e
+[proptags]
+PR_FTP_SITE = 0x3a4c001e
+[proptags]
+PR_GENDER = 0x3a4d0002
+[proptags]
+PR_MANAGER_NAME = 0x3a4e001e
+[proptags]
+PR_NICKNAME = 0x3a4f001e
+[proptags]
+PR_PERSONAL_HOME_PAGE = 0x3a50001e
+[proptags]
+PR_BUSINESS_HOME_PAGE = 0x3a51001e
+[proptags]
+PR_CONTACT_VERSION = 0x3a520048
+[proptags]
+PR_CONTACT_ENTRYIDS = 0x3a531102
+[proptags]
+PR_CONTACT_ADDRTYPES = 0x3a54101e
+[proptags]
+PR_CONTACT_DEFAULT_ADDRESS_INDEX = 0x3a550003
+[proptags]
+PR_CONTACT_EMAIL_ADDRESSES = 0x3a56101e
+[proptags]
+PR_COMPANY_MAIN_PHONE_NUMBER = 0x3a57001e
+[proptags]
+PR_CHILDRENS_NAMES = 0x3a58101e
+[proptags]
+PR_HOME_ADDRESS_CITY = 0x3a59001e
+[proptags]
+PR_HOME_ADDRESS_COUNTRY = 0x3a5a001e
+[proptags]
+PR_HOME_ADDRESS_POSTAL_CODE = 0x3a5b001e
+[proptags]
+PR_HOME_ADDRESS_STATE_OR_PROVINCE = 0x3a5c001e
+[proptags]
+PR_HOME_ADDRESS_STREET = 0x3a5d001e
+[proptags]
+PR_HOME_ADDRESS_POST_OFFICE_BOX = 0x3a5e001e
+[proptags]
+PR_OTHER_ADDRESS_CITY = 0x3a5f001e
+[proptags]
+PR_OTHER_ADDRESS_COUNTRY = 0x3a60001e
+[proptags]
+PR_OTHER_ADDRESS_POSTAL_CODE = 0x3a61001e
+[proptags]
+PR_OTHER_ADDRESS_STATE_OR_PROVINCE = 0x3a62001e
+[proptags]
+PR_OTHER_ADDRESS_STREET = 0x3a63001e
+[proptags]
+PR_OTHER_ADDRESS_POST_OFFICE_BOX = 0x3a64001e
+[proptags]
+PR_USER_X509_CERTIFICATE = 0x3a701102
+[proptags]
+PR_SEND_INTERNET_ENCODING = 0x3a710003
+[proptags]
+PR_STORE_PROVIDERS = 0x3d000102
+[proptags]
+PR_AB_PROVIDERS = 0x3d010102
+[proptags]
+PR_TRANSPORT_PROVIDERS = 0x3d020102
+[proptags]
+PR_DEFAULT_PROFILE = 0x3d04000b
+[proptags]
+PR_AB_SEARCH_PATH = 0x3d051102
+[proptags]
+PR_AB_DEFAULT_DIR = 0x3d060102
+[proptags]
+PR_AB_DEFAULT_PAB = 0x3d070102
+[proptags]
+PR_FILTERING_HOOKS = 0x3d080102
+[proptags]
+PR_SERVICE_NAME = 0x3d09001e
+[proptags]
+PR_SERVICE_DLL_NAME = 0x3d0a001e
+[proptags]
+PR_SERVICE_ENTRY_NAME = 0x3d0b001e
+[proptags]
+PR_SERVICE_UID = 0x3d0c0102
+[proptags]
+PR_SERVICE_EXTRA_UIDS = 0x3d0d0102
+[proptags]
+PR_SERVICES = 0x3d0e0102
+[proptags]
+PR_SERVICE_SUPPORT_FILES = 0x3d0f101e
+[proptags]
+PR_SERVICE_DELETE_FILES = 0x3d10101e
+[proptags]
+PR_AB_SEARCH_PATH_UPDATE = 0x3d110102
+[proptags]
+PR_PROFILE_NAME = 0x3d12001e
+[proptags]
+PR_SERVICE_INSTALL_ID = 0x3d13001e
+[proptags]
+PR_ADMIN_SECURITY_DESCRIPTOR = 0x3d210102
+[proptags]
+PR_IDENTITY_DISPLAY = 0x3e00001e
+[proptags]
+PR_IDENTITY_ENTRYID = 0x3e010102
+[proptags]
+PR_RESOURCE_METHODS = 0x3e020003
+[proptags]
+PR_RESOURCE_TYPE = 0x3e030003
+[proptags]
+PR_STATUS_CODE = 0x3e040003
+[proptags]
+PR_IDENTITY_SEARCH_KEY = 0x3e050102
+[proptags]
+PR_OWN_STORE_ENTRYID = 0x3e060102
+[proptags]
+PR_RESOURCE_PATH = 0x3e07001e
+[proptags]
+PR_STATUS_STRING = 0x3e08001e
+[proptags]
+PR_X400_DEFERRED_DELIVERY_CANCEL = 0x3e09000b
+[proptags]
+PR_HEADER_FOLDER_ENTRYID = 0x3e0a0102
+[proptags]
+PR_REMOTE_PROGRESS = 0x3e0b0003
+[proptags]
+PR_REMOTE_PROGRESS_TEXT = 0x3e0c001e
+[proptags]
+PR_REMOTE_VALIDATE_OK = 0x3e0d000b
+[proptags]
+PR_CONTROL_FLAGS = 0x3f000003
+[proptags]
+PR_CONTROL_STRUCTURE = 0x3f010102
+[proptags]
+PR_CONTROL_TYPE = 0x3f020003
+[proptags]
+PR_DELTAX = 0x3f030003
+[proptags]
+PR_DELTAY = 0x3f040003
+[proptags]
+PR_XPOS = 0x3f050003
+[proptags]
+PR_YPOS = 0x3f060003
+[proptags]
+PR_CONTROL_ID = 0x3f070102
+[proptags]
+PR_INITIAL_DETAILS_PANE = 0x3f080003
+[proptags]
+PR_DID = 0x3f800014
+[proptags]
+PR_SEQID = 0x3f810014
+[proptags]
+PR_DRAFTID = 0x3f820014
+[proptags]
+PR_CHECK_IN_TIME = 0x3f830040
+[proptags]
+PR_CHECK_IN_COMMENT = 0x3f84001e
+[proptags]
+PR_VERSION_OP_CODE = 0x3f850003
+[proptags]
+PR_VERSION_OP_DATA = 0x3f860102
+[proptags]
+PR_VERSION_SEQUENCE_NUMBER = 0x3f870003
+[proptags]
+PR_ATTACH_ID = 0x3f880014
+[proptags]
+PR_PKM_DOC_STATUS = 0x3f8d001e
+[proptags]
+PR_MV_PKM_OPERATION_REQ = 0x3f8e101e
+[proptags]
+PR_PKM_DOC_INTERNAL_STATE = 0x3f8f001e
+[proptags]
+PR_VERSIONING_FLAGS = 0x3f900002
+[proptags]
+PR_PKM_LAST_UNAPPROVED_VID = 0x3f910102
+[proptags]
+PR_MV_PKM_VERSION_LABELS = 0x3f92101e
+[proptags]
+PR_MV_PKM_VERSION_STATUS = 0x3f93101e
+[proptags]
+PR_PKM_INTERNAL_DATA = 0x3f940102
+[proptags]
+PR_LAST_CONFLICT = 0x3fc90102
+[proptags]
+PR_CONFLICT_MSG_KEY = 0x3fca0102
+[proptags]
+PR_REPL_HEADER = 0x3fd00102
+[proptags]
+PR_REPL_STATUS = 0x3fd10102
+[proptags]
+PR_REPL_CHANGES = 0x3fd20102
+[proptags]
+PR_REPL_RGM = 0x3fd30102
+[proptags]
+PR_RMI = 0x3fd40102
+[proptags]
+PR_INTERNAL_POST_REPLY = 0x3fd50102
+[proptags]
+PR_NTSD_MODIFICATION_TIME = 0x3fd60040
+[proptags]
+PR_PREVIEW_UNREAD = 0x3fd8001e
+[proptags]
+PR_PREVIEW = 0x3fd9001e
+[proptags]
+PR_ABSTRACT = 0x3fda001e
+[proptags]
+PR_DL_REPORT_FLAGS = 0x3fdb0003
+[proptags]
+PR_BILATERAL_INFO = 0x3fdc0102
+[proptags]
+PR_MSG_BODY_ID = 0x3fdd0003
+[proptags]
+PR_INTERNET_CPID = 0x3fde0003
+[proptags]
+PR_AUTO_RESPONSE_SUPPRESS = 0x3fdf0003
+[proptags]
+PR_ACL_TABLE = 0x3fe0000d
+[proptags]
+PR_ACL_DATA = 0x3fe00102
+[proptags]
+PR_RULES_TABLE = 0x3fe1000d
+[proptags]
+PR_RULES_DATA = 0x3fe10102
+[proptags]
+PR_FOLDER_DESIGN_FLAGS = 0x3fe20003
+[proptags]
+PR_DELEGATED_BY_RULE = 0x3fe3000b
+[proptags]
+PR_DESIGN_IN_PROGRESS = 0x3fe4000b
+[proptags]
+PR_SECURE_ORIGINATION = 0x3fe5000b
+[proptags]
+PR_PUBLISH_IN_ADDRESS_BOOK = 0x3fe6000b
+[proptags]
+PR_RESOLVE_METHOD = 0x3fe70003
+[proptags]
+PR_ADDRESS_BOOK_DISPLAY_NAME = 0x3fe8001e
+[proptags]
+PR_EFORMS_LOCALE_ID = 0x3fe90003
+[proptags]
+PR_HAS_DAMS = 0x3fea000b
+[proptags]
+PR_DEFERRED_SEND_NUMBER = 0x3feb0003
+[proptags]
+PR_DEFERRED_SEND_UNITS = 0x3fec0003
+[proptags]
+PR_EXPIRY_NUMBER = 0x3fed0003
+[proptags]
+PR_EXPIRY_UNITS = 0x3fee0003
+[proptags]
+PR_DEFERRED_SEND_TIME = 0x3fef0040
+[proptags]
+PR_CONFLICT_ENTRYID = 0x3ff00102
+[proptags]
+PR_MESSAGE_LOCALE_ID = 0x3ff10003
+[proptags]
+PR_RULE_TRIGGER_HISTORY = 0x3ff20102
+[proptags]
+PR_MOVE_TO_STORE_ENTRYID = 0x3ff30102
+[proptags]
+PR_MOVE_TO_FOLDER_ENTRYID = 0x3ff40102
+[proptags]
+PR_STORAGE_QUOTA_LIMIT = 0x3ff50003
+[proptags]
+PR_EXCESS_STORAGE_USED = 0x3ff60003
+[proptags]
+PR_SVR_GENERATING_QUOTA_MSG = 0x3ff7001e
+[proptags]
+PR_CREATOR_NAME = 0x3ff8001e
+[proptags]
+PR_CREATOR_ENTRYID = 0x3ff90102
+[proptags]
+PR_LAST_MODIFIER_NAME = 0x3ffa001e
+[proptags]
+PR_LAST_MODIFIER_ENTRYID = 0x3ffb0102
+[proptags]
+PR_REPLY_RECIPIENT_SMTP_PROXIES = 0x3ffc001e
+[proptags]
+PR_MESSAGE_CODEPAGE = 0x3ffd0003
+[proptags]
+PR_EXTENDED_ACL_DATA = 0x3ffe0102
+[proptags]
+PR_FROM_I_HAVE = 0x3fff000b
+[proptags]
+PR_NEW_ATTACH = 0x40000003
+[proptags]
+PR_START_EMBED = 0x40010003
+[proptags]
+PR_END_EMBED = 0x40020003
+[proptags]
+PR_START_RECIP = 0x40030003
+[proptags]
+PR_END_RECIP = 0x40040003
+[proptags]
+PR_END_CC_RECIP = 0x40050003
+[proptags]
+PR_END_BCC_RECIP = 0x40060003
+[proptags]
+PR_END_P1_RECIP = 0x40070003
+[proptags]
+PR_START_TOP_FLD = 0x40090003
+[proptags]
+PR_START_SUB_FLD = 0x400a0003
+[proptags]
+PR_END_FOLDER = 0x400b0003
+[proptags]
+PR_START_MESSAGE = 0x400c0003
+[proptags]
+PR_END_MESSAGE = 0x400d0003
+[proptags]
+PR_END_ATTACH = 0x400e0003
+[proptags]
+PR_EC_WARNING = 0x400f0003
+[proptags]
+PR_START_FAI_MSG = 0x40100003
+[proptags]
+PR_NEW_FX_FOLDER = 0x40110102
+[proptags]
+PR_INCR_SYNC_CHG = 0x40120003
+[proptags]
+PR_INCR_SYNC_DEL = 0x40130003
+[proptags]
+PR_INCR_SYNC_END = 0x40140003
+[proptags]
+PR_INCR_SYNC_MSG = 0x40150003
+[proptags]
+PR_FX_DEL_PROP = 0x40160003
+[proptags]
+PR_IDSET_GIVEN = 0x40170003
+[proptags]
+PR_SENDER_FLAGS = 0x40190003
+[proptags]
+PR_SENT_REPRESENTING_FLAGS = 0x401a0003
+[proptags]
+PR_RCVD_BY_FLAGS = 0x401b0003
+[proptags]
+PR_RCVD_REPRESENTING_FLAGS = 0x401c0003
+[proptags]
+PR_ORIGINAL_SENDER_FLAGS = 0x401d0003
+[proptags]
+PR_ORIGINAL_SENT_REPRESENTING_FLAGS = 0x401e0003
+[proptags]
+PR_REPORT_FLAGS = 0x401f0003
+[proptags]
+PR_READ_RECEIPT_FLAGS = 0x40200003
+[proptags]
+PR_SOFT_DELETES = 0x4021000b
+[proptags]
+PR_MESSAGE_SUBMISSION_ID_FROM_CLIENT = 0x402c0102
+[proptags]
+PR_SENDER_SIMPLE_DISP_NAME = 0x4030001e
+[proptags]
+PR_SENT_REPRESENTING_SIMPLE_DISP_NAME = 0x4031001e
+[proptags]
+PR_CREATOR_SIMPLE_DISP_NAME = 0x4038001e
+[proptags]
+PR_ORG_ADDR_TYPE = 0x403d001e
+[proptags]
+PR_ORG_EMAIL_ADDR = 0x403e001e
+[proptags]
+PR_CREATOR_FLAGS = 0x40590003
+[proptags]
+PR_MODIFIER_FLAGS = 0x405a0003
+[proptags]
+PR_ORIGINATOR_FLAGS = 0x405b0003
+[proptags]
+PR_REPORT_DESTINATION_FLAGS = 0x405c0003
+[proptags]
+PR_ORIGINAL_AUTHOR_FLAGS = 0x405d0003
+[proptags]
+PR_ORIGINATOR_SEARCH_KEY = 0x40610102
+[proptags]
+PR_REPORT_DESTINATION_SEARCH_KEY = 0x40640102
+[proptags]
+PR_ER_FLAG = 0x40650003
+[proptags]
+PR_INTERNET_SUBJECT = 0x40680102
+[proptags]
+PR_INTERNET_SENT_REPRESENTING_NAME = 0x40690102
+[proptags]
+PR_INET_MAIL_OVERRIDE_FORMAT = 0x59020003
+[proptags]
+PR_MSG_EDITOR_FORMAT = 0x59090003
+[proptags]
+PR_DOTSTUFF_STATE = 0x60010003
+[proptags]
+PR_RULE_SERVER_RULE_ID = 0x65a00014
+[proptags]
+PR_REPLY_TEMPLATE_ID = 0x65c20102
+[proptags]
+PR_SOURCE_KEY = 0x65e00102
+[proptags]
+PR_PARENT_SOURCE_KEY = 0x65e10102
+[proptags]
+PR_CHANGE_KEY = 0x65e20102
+[proptags]
+PR_PREDECESSOR_CHANGE_LIST = 0x65e30102
+[proptags]
+PR_SYNCHRONIZE_FLAGS = 0x65e40003
+[proptags]
+PR_AUTO_ADD_NEW_SUBS = 0x65e5000b
+[proptags]
+PR_NEW_SUBS_GET_AUTO_ADD = 0x65e6000b
+[proptags]
+PR_MESSAGE_SITE_NAME = 0x65e7001e
+[proptags]
+PR_MESSAGE_PROCESSED = 0x65e8000b
+[proptags]
+PR_RULE_MSG_STATE = 0x65e90003
+[proptags]
+PR_RULE_MSG_USER_FLAGS = 0x65ea0003
+[proptags]
+PR_RULE_MSG_PROVIDER = 0x65eb001e
+[proptags]
+PR_RULE_MSG_NAME = 0x65ec001e
+[proptags]
+PR_RULE_MSG_LEVEL = 0x65ed0003
+[proptags]
+PR_RULE_MSG_PROVIDER_DATA = 0x65ee0102
+[proptags]
+PR_RULE_MSG_ACTIONS = 0x65ef0102
+[proptags]
+PR_RULE_MSG_CONDITION = 0x65f00102
+[proptags]
+PR_RULE_MSG_CONDITION_LCID = 0x65f10003
+[proptags]
+PR_RULE_MSG_VERSION = 0x65f20002
+[proptags]
+PR_RULE_MSG_SEQUENCE = 0x65f30003
+[proptags]
+PR_PREVENT_MSG_CREATE = 0x65f4000b
+[proptags]
+PR_IMAP_INTERNAL_DATE = 0x65f50040
+[proptags]
+PR_PROFILE_VERSION = 0x66000003
+[proptags]
+PR_PROFILE_CONFIG_FLAGS = 0x66010003
+[proptags]
+PR_PROFILE_HOME_SERVER = 0x6602001e
+[proptags]
+PR_PROFILE_USER = 0x6603001e
+[proptags]
+PR_PROFILE_CONNECT_FLAGS = 0x66040003
+[proptags]
+PR_PROFILE_TRANSPORT_FLAGS = 0x66050003
+[proptags]
+PR_PROFILE_UI_STATE = 0x66060003
+[proptags]
+PR_PROFILE_UNRESOLVED_NAME = 0x6607001e
+[proptags]
+PR_PROFILE_UNRESOLVED_SERVER = 0x6608001e
+[proptags]
+PR_PROFILE_OPEN_FLAGS = 0x66090003
+[proptags]
+PR_PROFILE_BINDING_ORDER = 0x6609001e
+[proptags]
+PR_PROFILE_TYPE = 0x660a0003
+[proptags]
+PR_PROFILE_MAILBOX = 0x660b001e
+[proptags]
+PR_PROFILE_SERVER = 0x660c001e
+[proptags]
+PR_PROFILE_MAX_RESTRICT = 0x660d0003
+[proptags]
+PR_PROFILE_AB_FILES_PATH = 0x660e001e
+[proptags]
+PR_PROFILE_FAVFLD_DISPLAY_NAME = 0x660f001e
+[proptags]
+PR_PROFILE_OFFLINE_STORE_PATH = 0x6610001e
+[proptags]
+PR_PROFILE_OFFLINE_INFO = 0x66110102
+[proptags]
+PR_PROFILE_HOME_SERVER_DN = 0x6612001e
+[proptags]
+PR_PROFILE_HOME_SERVER_ADDRS = 0x6613101e
+[proptags]
+PR_PROFILE_SERVER_DN = 0x6614001e
+[proptags]
+PR_PROFILE_FAVFLD_COMMENT = 0x6615001e
+[proptags]
+PR_PROFILE_ALLPUB_DISPLAY_NAME = 0x6616001e
+[proptags]
+PR_PROFILE_ALLPUB_COMMENT = 0x6617001e
+[proptags]
+PR_DISABLE_WINSOCK = 0x66180003
+[proptags]
+PR_IN_TRANSIT = 0x6618000b
+[proptags]
+PR_PROFILE_AUTH_PACKAGE = 0x66190003
+[proptags]
+PR_USER_ENTRYID = 0x66190102
+[proptags]
+PR_USER_NAME = 0x661a001e
+[proptags]
+PR_MAILBOX_OWNER_ENTRYID = 0x661b0102
+[proptags]
+PR_MAILBOX_OWNER_NAME = 0x661c001e
+[proptags]
+PR_OOF_STATE = 0x661d000b
+[proptags]
+PR_SCHEDULE_FOLDER_ENTRYID = 0x661e0102
+[proptags]
+PR_IPM_DAF_ENTRYID = 0x661f0102
+[proptags]
+PR_NON_IPM_SUBTREE_ENTRYID = 0x66200102
+[proptags]
+PR_EFORMS_REGISTRY_ENTRYID = 0x66210102
+[proptags]
+PR_SPLUS_FREE_BUSY_ENTRYID = 0x66220102
+[proptags]
+PR_HIERARCHY_SERVER = 0x6623001e
+[proptags]
+PR_OFFLINE_ADDRBOOK_ENTRYID = 0x66230102
+[proptags]
+PR_EFORMS_FOR_LOCALE_ENTRYID = 0x66240102
+[proptags]
+PR_FREE_BUSY_FOR_LOCAL_SITE_ENTRYID = 0x66250102
+[proptags]
+PR_ADDRBOOK_FOR_LOCAL_SITE_ENTRYID = 0x66260102
+[proptags]
+PR_OFFLINE_MESSAGE_ENTRYID = 0x66270102
+[proptags]
+PR_GW_MTSIN_ENTRYID = 0x66280102
+[proptags]
+PR_GW_MTSOUT_ENTRYID = 0x66290102
+[proptags]
+PR_TRANSFER_ENABLED = 0x662a000b
+[proptags]
+PR_TEST_LINE_SPEED = 0x662b0102
+[proptags]
+PR_HIERARCHY_SYNCHRONIZER = 0x662c000d
+[proptags]
+PR_CONTENTS_SYNCHRONIZER = 0x662d000d
+[proptags]
+PR_COLLECTOR = 0x662e000d
+[proptags]
+PR_FAST_TRANSFER = 0x662f000d
+[proptags]
+PR_IPM_FAVORITES_ENTRYID = 0x66300102
+[proptags]
+PR_IPM_PUBLIC_FOLDERS_ENTRYID = 0x66310102
+[proptags]
+PR_STORE_OFFLINE = 0x6632000b
+[proptags]
+PR_CHANGE_ADVISOR = 0x6634000d
+[proptags]
+PR_FAVORITES_DEFAULT_NAME = 0x6635001e
+[proptags]
+PR_SYS_CONFIG_FOLDER_ENTRYID = 0x66360102
+[proptags]
+PR_CHANGE_NOTIFICATION_GUID = 0x66370048
+[proptags]
+PR_FOLDER_CHILD_COUNT = 0x66380003
+[proptags]
+PR_RIGHTS = 0x66390003
+[proptags]
+PR_HAS_RULES = 0x663a000b
+[proptags]
+PR_ADDRESS_BOOK_ENTRYID = 0x663b0102
+[proptags]
+PR_PUBLIC_FOLDER_ENTRYID = 0x663c0102
+[proptags]
+PR_OFFLINE_FLAGS = 0x663d0003
+[proptags]
+PR_HIERARCHY_CHANGE_NUM = 0x663e0003
+[proptags]
+PR_HAS_MODERATOR_RULES = 0x663f000b
+[proptags]
+PR_DELETED_MSG_COUNT = 0x66400003
+[proptags]
+PR_DELETED_FOLDER_COUNT = 0x66410003
+[proptags]
+PR_OLDEST_DELETED_ON = 0x66420040
+[proptags]
+PR_DELETED_ASSOC_MSG_COUNT = 0x66430003
+[proptags]
+PR_REPLICA_SERVER = 0x6644001e
+[proptags]
+PR_CLIENT_ACTIONS = 0x66450102
+[proptags]
+PR_DAM_ORIGINAL_ENTRYID = 0x66460102
+[proptags]
+PR_DAM_BACK_PATCHED = 0x6647000b
+[proptags]
+PR_RULE_ERROR = 0x66480003
+[proptags]
+PR_RULE_ACTION_TYPE = 0x66490003
+[proptags]
+PR_HAS_NAMED_PROPERTIES = 0x664a000b
+[proptags]
+PR_REPLICA_VERSION = 0x664b0014
+[proptags]
+PR_RULE_ACTION_NUMBER = 0x66500003
+[proptags]
+PR_RULE_FOLDER_ENTRYID = 0x66510102
+[proptags]
+PR_ACTIVE_USER_ENTRYID = 0x66520102
+[proptags]
+PR_0X400_ENVELOPE_TYPE = 0x66530003
+[proptags]
+PR_MSG_FOLD_TIME = 0x66540040
+[proptags]
+PR_ICS_CHANGE_KEY = 0x66550102
+[proptags]
+PR_GW_ADMIN_OPERATIONS = 0x66580003
+[proptags]
+PR_INTERNET_CONTENT = 0x66590102
+[proptags]
+PR_HAS_ATTACH_FROM_IMAIL = 0x665a000b
+[proptags]
+PR_ORIGINATOR_NAME = 0x665b001e
+[proptags]
+PR_ORIGINATOR_ADDR = 0x665c001e
+[proptags]
+PR_ORIGINATOR_ADDRTYPE = 0x665d001e
+[proptags]
+PR_ORIGINATOR_ENTRYID = 0x665e0102
+[proptags]
+PR_ARRIVAL_TIME = 0x665f0040
+[proptags]
+PR_TRACE_INFO = 0x66600102
+[proptags]
+PR_SUBJECT_TRACE_INFO = 0x66610102
+[proptags]
+PR_RECIPIENT_NUMBER = 0x66620003
+[proptags]
+PR_MTS_SUBJECT_ID = 0x66630102
+[proptags]
+PR_REPORT_DESTINATION_NAME = 0x6664001e
+[proptags]
+PR_REPORT_DESTINATION_ENTRYID = 0x66650102
+[proptags]
+PR_CONTENT_SEARCH_KEY = 0x66660102
+[proptags]
+PR_FOREIGN_ID = 0x66670102
+[proptags]
+PR_FOREIGN_REPORT_ID = 0x66680102
+[proptags]
+PR_FOREIGN_SUBJECT_ID = 0x66690102
+[proptags]
+PR_INTERNAL_TRACE_INFO = 0x666a0102
+[proptags]
+PR_IN_CONFLICT = 0x666c000b
+[proptags]
+PR_LONGTERM_ENTRYID_FROM_TABLE = 0x66700102
+[proptags]
+PR_MEMBER_ID = 0x66710014
+[proptags]
+PR_MEMBER_NAME = 0x6672001e
+[proptags]
+PR_MEMBER_RIGHTS = 0x66730003
+[proptags]
+PR_RULE_ID = 0x66740014
+[proptags]
+PR_RULE_IDS = 0x66750102
+[proptags]
+PR_RULE_SEQUENCE = 0x66760003
+[proptags]
+PR_RULE_STATE = 0x66770003
+[proptags]
+PR_RULE_USER_FLAGS = 0x66780003
+[proptags]
+PR_RULE_CONDITION = 0x667900fd
+[proptags]
+PR_PROFILE_MOAB = 0x667b001e
+[proptags]
+PR_PROFILE_MOAB_GUID = 0x667c001e
+[proptags]
+PR_PROFILE_MOAB_SEQ = 0x667d0003
+[proptags]
+PR_IMPLIED_RESTRICTIONS = 0x667f1102
+[proptags]
+PR_RULE_ACTIONS = 0x668000fe
+[proptags]
+PR_RULE_PROVIDER = 0x6681001e
+[proptags]
+PR_RULE_NAME = 0x6682001e
+[proptags]
+PR_RULE_LEVEL = 0x66830003
+[proptags]
+PR_RULE_PROVIDER_DATA = 0x66840102
+[proptags]
+PR_LAST_FULL_BACKUP = 0x66850040
+[proptags]
+PR_PROFILE_ADDR_INFO = 0x66870102
+[proptags]
+PR_PROFILE_OPTIONS_DATA = 0x66890102
+[proptags]
+PR_EVENTS_ROOT_FOLDER_ENTRYID = 0x668a0102
+[proptags]
+PR_INBOUND_NEWSFEED_DN = 0x668d001e
+[proptags]
+PR_OUTBOUND_NEWSFEED_DN = 0x668e001e
+[proptags]
+PR_DELETED_ON = 0x668f0040
+[proptags]
+PR_REPLICATION_STYLE = 0x66900003
+[proptags]
+PR_REPLICATION_SCHEDULE = 0x66910102
+[proptags]
+PR_REPLICATION_MESSAGE_PRIORITY = 0x66920003
+[proptags]
+PR_OVERALL_MSG_AGE_LIMIT = 0x66930003
+[proptags]
+PR_REPLICATION_ALWAYS_INTERVAL = 0x66940003
+[proptags]
+PR_REPLICATION_MSG_SIZE = 0x66950003
+[proptags]
+PR_IS_NEWSGROUP_ANCHOR = 0x6696000b
+[proptags]
+PR_IS_NEWSGROUP = 0x6697000b
+[proptags]
+PR_REPLICA_LIST = 0x66980102
+[proptags]
+PR_OVERALL_AGE_LIMIT = 0x66990003
+[proptags]
+PR_INTERNET_CHARSET = 0x669a001e
+[proptags]
+PR_DELETED_MESSAGE_SIZE_EXTENDED = 0x669b0014
+[proptags]
+PR_DELETED_NORMAL_MESSAGE_SIZE_EXTENDED = 0x669c0014
+[proptags]
+PR_DELETED_ASSOC_MESSAGE_SIZE_EXTENDED = 0x669d0014
+[proptags]
+PR_SECURE_IN_SITE = 0x669e000b
+[proptags]
+PR_NT_USER_NAME = 0x66a0001e
+[proptags]
+PR_LOCALE_ID = 0x66a10003
+[proptags]
+PR_LAST_LOGON_TIME = 0x66a20040
+[proptags]
+PR_LAST_LOGOFF_TIME = 0x66a30040
+[proptags]
+PR_STORAGE_LIMIT_INFORMATION = 0x66a40003
+[proptags]
+PR_NEWSGROUP_COMPONENT = 0x66a5001e
+[proptags]
+PR_NEWSFEED_INFO = 0x66a60102
+[proptags]
+PR_INTERNET_NEWSGROUP_NAME = 0x66a7001e
+[proptags]
+PR_FOLDER_FLAGS = 0x66a80003
+[proptags]
+PR_LAST_ACCESS_TIME = 0x66a90040
+[proptags]
+PR_RESTRICTION_COUNT = 0x66aa0003
+[proptags]
+PR_CATEG_COUNT = 0x66ab0003
+[proptags]
+PR_CACHED_COLUMN_COUNT = 0x66ac0003
+[proptags]
+PR_NORMAL_MSG_W_ATTACH_COUNT = 0x66ad0003
+[proptags]
+PR_ASSOC_MSG_W_ATTACH_COUNT = 0x66ae0003
+[proptags]
+PR_RECIPIENT_ON_NORMAL_MSG_COUNT = 0x66af0003
+[proptags]
+PR_RECIPIENT_ON_ASSOC_MSG_COUNT = 0x66b00003
+[proptags]
+PR_ATTACH_ON_NORMAL_MSG_COUNT = 0x66b10003
+[proptags]
+PR_ATTACH_ON_ASSOC_MSG_COUNT = 0x66b20003
+[proptags]
+PR_NORMAL_MESSAGE_SIZE = 0x66b30003
+[proptags]
+PR_NORMAL_MESSAGE_SIZE_EXTENDED = 0x66b30014
+[proptags]
+PR_ASSOC_MESSAGE_SIZE = 0x66b40003
+[proptags]
+PR_ASSOC_MESSAGE_SIZE_EXTENDED = 0x66b40014
+[proptags]
+PR_FOLDER_PATHNAME = 0x66b5001e
+[proptags]
+PR_OWNER_COUNT = 0x66b60003
+[proptags]
+PR_CONTACT_COUNT = 0x66b70003
+[proptags]
+PR_CODE_PAGE_ID = 0x66c30003
+[proptags]
+PR_RETENTION_AGE_LIMIT = 0x66c40003
+[proptags]
+PR_DISABLE_PERUSER_READ = 0x66c5000b
+[proptags]
+PR_INTERNET_PARSE_STATE = 0x66c60102
+[proptags]
+PR_INTERNET_MESSAGE_INFO = 0x66c70102
+[proptags]
+PR_PST_PATH = 0x6700001e
+[proptags]
+PR_PST_REMEMBER_PW = 0x6701000b
+[proptags]
+PR_OST_ENCRYPTION = 0x67020003
+[proptags]
+PR_PST_PW_SZ_OLD = 0x6703001e
+[proptags]
+PR_PST_PW_SZ_NEW = 0x6704001e
+[proptags]
+PR_SORT_LOCALE_ID = 0x67050003
+[proptags]
+PR_URL_NAME = 0x6707001e
+[proptags]
+PR_LOCAL_COMMIT_TIME = 0x67090040
+[proptags]
+PR_LOCAL_COMMIT_TIME_MAX = 0x670a0040
+[proptags]
+PR_DELETED_COUNT_TOTAL = 0x670b0003
+[proptags]
+PR_AUTO_RESET = 0x670c0048
+[proptags]
+PR_URL_COMP_NAME_HASH = 0x67100003
+[proptags]
+PR_MSG_FOLDER_TEMPLATE_RES_2 = 0x67110003
+[proptags]
+PR_RANK = 0x67120003
+[proptags]
+PR_MSG_FOLDER_TEMPLATE_RES_4 = 0x6713000b
+[proptags]
+PR_MSG_FOLDER_TEMPLATE_RES_5 = 0x6714000b
+[proptags]
+PR_MSG_FOLDER_TEMPLATE_RES_6 = 0x6715000b
+[proptags]
+PR_MSG_FOLDER_TEMPLATE_RES_7 = 0x67160102
+[proptags]
+PR_MSG_FOLDER_TEMPLATE_RES_8 = 0x67170102
+[proptags]
+PR_MSG_FOLDER_TEMPLATE_RES_9 = 0x67180102
+[proptags]
+PR_MSG_FOLDER_TEMPLATE_RES_10 = 0x6719001e
+[proptags]
+PR_MSG_FOLDER_TEMPLATE_RES_11 = 0x671a001e
+[proptags]
+PR_MSG_FOLDER_TEMPLATE_RES_12 = 0x671b001e
+[proptags]
+PR_PF_PLATINUM_HOME_MDB = 0x671e000b
+[proptags]
+PR_PF_PROXY_REQUIRED = 0x671f000b
+[proptags]
+PR_INTERNET_FREE_DOC_INFO = 0x67200102
+[proptags]
+PR_PF_OVER_HARD_QUOTA_LIMIT = 0x67210003
+[proptags]
+PR_PF_MSG_SIZE_LIMIT = 0x67220003
+[proptags]
+PR_CONNECTION_MODULUS = 0x67430003
+[proptags]
+PR_DELIVER_TO_DN = 0x6744001e
+[proptags]
+PR_MIME_SIZE = 0x67460003
+[proptags]
+PR_FILE_SIZE_EXTENDED = 0x67470014
+[proptags]
+PR_FID = 0x67480014
+[proptags]
+PR_PARENT_FID = 0x67490014
+[proptags]
+PR_MID = 0x674a0014
+[proptags]
+PR_CATEG_ID = 0x674b0014
+[proptags]
+PR_PARENT_CATEG_ID = 0x674c0014
+[proptags]
+PR_INST_ID = 0x674d0014
+[proptags]
+PR_INSTANCE_NUM = 0x674e0003
+[proptags]
+PR_ADDRBOOK_MID = 0x674f0014
+[proptags]
+PR_ICS_NOTIF = 0x67500003
+[proptags]
+PR_ARTICLE_NUM_NEXT = 0x67510003
+[proptags]
+PR_IMAP_LAST_ARTICLE_ID = 0x67520003
+[proptags]
+PR_NOT_822_RENDERABLE = 0x6753000b
+[proptags]
+PR_LTID = 0x67580102
+[proptags]
+PR_CN_EXPORT = 0x67590102
+[proptags]
+PR_PCL_EXPORT = 0x675a0102
+[proptags]
+PR_CN_MV_EXPORT = 0x675b1102
+[proptags]
+PR_PF_QUOTA_STYLE = 0x67790003
+[proptags]
+PR_PF_STORAGE_QUOTA = 0x677b0003
+[proptags]
+PR_SEARCH_FLAGS = 0x67830003
+[proptags]
+PR_ASSOCIATED = 0x67aa000b
+[proptags]
+PR_PROFILE_SECURE_MAILBOX = 0x67f00102
+[proptags]
+PR_MAILBEAT_BOUNCE_SERVER = 0x6800001e
+[proptags]
+PR_MAILBEAT_REQUEST_SENT = 0x68010040
+[proptags]
+PR_USENET_SITE_NAME = 0x6802001e
+[proptags]
+PR_MAILBEAT_REQUEST_RECEIVED = 0x68030040
+[proptags]
+PR_MAILBEAT_REQUEST_PROCESSED = 0x68040040
+[proptags]
+PR_MAILBEAT_REPLY_SENT = 0x68060040
+[proptags]
+PR_MAILBEAT_REPLY_SUBMIT = 0x68070040
+[proptags]
+PR_MAILBEAT_REPLY_RECEIVED = 0x68080040
+[proptags]
+PR_MAILBEAT_REPLY_PROCESSED = 0x68090040
+[proptags]
+PR_DELEGATES_DISPLAY_NAMES = 0x6844101e
+[proptags]
+PR_DELEGATES_ENTRYIDS = 0x68451102
+[proptags]
+PR_FREEBUSY_START_RANGE = 0x68470003
+[proptags]
+PR_FREEBUSY_END_RANGE = 0x68480003
+[proptags]
+PR_FREEBUSY_EMAIL_ADDRESS = 0x6849001e
+[proptags]
+PR_FREEBUSY_ALL_MONTHS = 0x684f1003
+[proptags]
+PR_FREEBUSY_ALL_EVENTS = 0x68501102
+[proptags]
+PR_FREEBUSY_TENTATIVE_MONTHS = 0x68511003
+[proptags]
+PR_FREEBUSY_TENTATIVE_EVENTS = 0x68521102
+[proptags]
+PR_FREEBUSY_BUSY_MONTHS = 0x68531003
+[proptags]
+PR_FREEBUSY_BUSY_EVENTS = 0x68541102
+[proptags]
+PR_FREEBUSY_OOF_MONTHS = 0x68551003
+[proptags]
+PR_FREEBUSY_OOF_EVENTS = 0x68561102
+[proptags]
+PR_FREEBUSY_LAST_MODIFIED = 0x68680040
+[proptags]
+PR_FREEBUSY_NUM_MONTHS = 0x68690003
+[proptags]
+PR_DELEGATES_SEE_PRIVATE = 0x686b1003
+[proptags]
+PR_PERSONAL_FREEBUSY = 0x686c0102
+[proptags]
+PR_PROCESS_MEETING_REQUESTS = 0x686d000b
+[proptags]
+PR_DECLINE_RECURRING_MEETING_REQUESTS = 0x686e000b
+[proptags]
+PR_DECLINE_CONFLICTING_MEETING_REQUESTS = 0x686f000b
+[proptags]
+PR_VD_BINARY = 0x70010102
+[proptags]
+PR_VD_STRINGS = 0x7002001e
+[proptags]
+PR_VD_FLAGS = 0x70030003
+[proptags]
+PR_VD_LINK_TO = 0x70040102
+[proptags]
+PR_VD_VIEW_FOLDER = 0x70050102
+[proptags]
+PR_VD_NAME = 0x7006001e
+[proptags]
+PR_VD_VERSION = 0x70070003
+[proptags]
+PR_FAV_DISPLAY_NAME_A = 0x7c00001e
+[proptags]
+PR_FAV_PUBLIC_SOURCE_KEY = 0x7c020102
+[proptags]
+PR_OST_OSTID = 0x7c040102
+[proptags]
+PR_STORE_SLOWLINK = 0x7c0a000b
+[proptags]
+PR_FAV_AUTOSUBFOLDERS = 0x7d010003
+[proptags]
+PR_FAV_PARENT_SOURCE_KEY = 0x7d020102
+[proptags]
+PR_FAV_LEVEL_MASK = 0x7d030003
+[proptags]
+PR_FAV_INHERIT_AUTO = 0x7d070003
+[proptags]
+PR_FAV_DEL_SUBS = 0x7d080102
+[proptags]
+PR_ATTACHMENT_LINKID = 0x7ffa0003
+[proptags]
+PR_EXCEPTION_STARTTIME = 0x7ffb0040
+[proptags]
+PR_EXCEPTION_ENDTIME = 0x7ffc0040
+[proptags]
+PR_ATTACHMENT_FLAGS = 0x7ffd0003
+[proptags]
+PR_ATTACHMENT_HIDDEN = 0x7ffe000b
+[proptags]
+PR_EMS_AB_DISPLAY_NAME_OVERRIDE = 0x8001000b
+[proptags]
+PR_EMS_AB_CA_CERTIFICATE = 0x80031102
+[proptags]
+PR_EMS_AB_FOLDER_PATHNAME = 0x8004001e
+[proptags]
+PR_EMS_AB_MANAGER = 0x8005000d
+[proptags]
+PR_EMS_AB_MANAGER_T = 0x8005001e
+[proptags]
+PR_EMS_AB_HOME_MDB_O = 0x8006000d
+[proptags]
+PR_EMS_AB_HOME_MDB = 0x8006001e
+[proptags]
+PR_EMS_AB_HOME_MTA_O = 0x8007000d
+[proptags]
+PR_EMS_AB_HOME_MTA = 0x8007001e
+[proptags]
+PR_EMS_AB_IS_MEMBER_OF_DL = 0x8008000d
+[proptags]
+PR_EMS_AB_IS_MEMBER_OF_DL_T = 0x8008001e
+[proptags]
+PR_EMS_AB_MEMBER = 0x8009000d
+[proptags]
+PR_EMS_AB_MEMBER_T = 0x8009001e
+[proptags]
+PR_EMS_AB_AUTOREPLY_MESSAGE = 0x800a001e
+[proptags]
+PR_EMS_AB_AUTOREPLY = 0x800b000b
+[proptags]
+PR_EMS_AB_OWNER_O = 0x800c000d
+[proptags]
+PR_EMS_AB_OWNER = 0x800c001e
+[proptags]
+PR_EMS_AB_KM_SERVER_O = 0x800d000d
+[proptags]
+PR_EMS_AB_KM_SERVER = 0x800d001e
+[proptags]
+PR_EMS_AB_REPORTS = 0x800e000d
+[proptags]
+PR_EMS_AB_PROXY_ADDRESSES = 0x800f101e
+[proptags]
+PR_EMS_AB_HELP_DATA32 = 0x80100102
+[proptags]
+PR_EMS_AB_TARGET_ADDRESS = 0x8011001e
+[proptags]
+PR_EMS_AB_TELEPHONE_NUMBER = 0x8012101e
+[proptags]
+PR_EMS_AB_NT_SECURITY_DESCRIPTOR = 0x80130102
+[proptags]
+PR_EMS_AB_HOME_MDB_BL_O = 0x8014000d
+[proptags]
+PR_EMS_AB_HOME_MDB_BL = 0x8014101e
+[proptags]
+PR_EMS_AB_PUBLIC_DELEGATES = 0x8015000d
+[proptags]
+PR_EMS_AB_PUBLIC_DELEGATES_T = 0x8015001e
+[proptags]
+PR_EMS_AB_CERTIFICATE_REVOCATION_LIST = 0x80160102
+[proptags]
+PR_EMS_AB_ADDRESS_ENTRY_DISPLAY_TABLE = 0x80170102
+[proptags]
+PR_EMS_AB_ADDRESS_SYNTAX = 0x80180102
+[proptags]
+PR_EMS_AB_BUSINESS_ROLES = 0x80230102
+[proptags]
+PR_EMS_AB_OWNER_BL_O = 0x8024000d
+[proptags]
+PR_EMS_AB_OWNER_BL = 0x8024101e
+[proptags]
+PR_EMS_AB_CROSS_CERTIFICATE_PAIR = 0x80251102
+[proptags]
+PR_EMS_AB_AUTHORITY_REVOCATION_LIST = 0x80261102
+[proptags]
+PR_EMS_AB_ASSOC_NT_ACCOUNT = 0x80270102
+[proptags]
+PR_EMS_AB_EXPIRATION_TIME = 0x80280040
+[proptags]
+PR_EMS_AB_USN_CHANGED = 0x80290003
+[proptags]
+PR_EMS_AB_EXTENSION_ATTRIBUTE_1 = 0x802d001e
+[proptags]
+PR_EMS_AB_EXTENSION_ATTRIBUTE_2 = 0x802e001e
+[proptags]
+PR_EMS_AB_EXTENSION_ATTRIBUTE_3 = 0x802f001e
+[proptags]
+PR_EMS_AB_EXTENSION_ATTRIBUTE_4 = 0x8030001e
+[proptags]
+PR_EMS_AB_EXTENSION_ATTRIBUTE_5 = 0x8031001e
+[proptags]
+PR_EMS_AB_EXTENSION_ATTRIBUTE_6 = 0x8032001e
+[proptags]
+PR_EMS_AB_EXTENSION_ATTRIBUTE_7 = 0x8033001e
+[proptags]
+PR_EMS_AB_EXTENSION_ATTRIBUTE_8 = 0x8034001e
+[proptags]
+PR_EMS_AB_EXTENSION_ATTRIBUTE_9 = 0x8035001e
+[proptags]
+PR_EMS_AB_EXTENSION_ATTRIBUTE_10 = 0x8036001e
+[proptags]
+PR_EMS_AB_SECURITY_PROTOCOL = 0x80371102
+[proptags]
+PR_EMS_AB_PF_CONTACTS_O = 0x8038000d
+[proptags]
+PR_EMS_AB_PF_CONTACTS = 0x8038101e
+[proptags]
+PR_EMS_AB_HELP_DATA16 = 0x803a0102
+[proptags]
+PR_EMS_AB_HELP_FILE_NAME = 0x803b001e
+[proptags]
+PR_EMS_AB_OBJ_DIST_NAME_O = 0x803c000d
+[proptags]
+PR_EMS_AB_OBJ_DIST_NAME = 0x803c001e
+[proptags]
+PR_EMS_AB_ENCRYPT_ALG_SELECTED_OTHER = 0x803d001e
+[proptags]
+PR_EMS_AB_AUTOREPLY_SUBJECT = 0x803e001e
+[proptags]
+PR_EMS_AB_HOME_PUBLIC_SERVER_O = 0x803f000d
+[proptags]
+PR_EMS_AB_HOME_PUBLIC_SERVER = 0x803f001e
+[proptags]
+PR_EMS_AB_ENCRYPT_ALG_LIST_NA = 0x8040101e
+[proptags]
+PR_EMS_AB_ENCRYPT_ALG_LIST_OTHER = 0x8041101e
+[proptags]
+PR_EMS_AB_IMPORTED_FROM = 0x8042001e
+[proptags]
+PR_EMS_AB_ENCRYPT_ALG_SELECTED_NA = 0x8043001e
+[proptags]
+PR_EMS_AB_ACCESS_CATEGORY = 0x80440003
+[proptags]
+PR_EMS_AB_ACTIVATION_SCHEDULE = 0x80450102
+[proptags]
+PR_EMS_AB_ACTIVATION_STYLE = 0x80460003
+[proptags]
+PR_EMS_AB_ADDRESS_ENTRY_DISPLAY_TABLE_MSDOS = 0x80470102
+[proptags]
+PR_EMS_AB_ADDRESS_TYPE = 0x8048001e
+[proptags]
+PR_EMS_AB_ADMD = 0x8049001e
+[proptags]
+PR_EMS_AB_ADMIN_DESCRIPTION = 0x804a001e
+[proptags]
+PR_EMS_AB_ADMIN_DISPLAY_NAME = 0x804b001e
+[proptags]
+PR_EMS_AB_ADMIN_EXTENSION_DLL = 0x804c001e
+[proptags]
+PR_EMS_AB_ALIASED_OBJECT_NAME_O = 0x804d000d
+[proptags]
+PR_EMS_AB_ALIASED_OBJECT_NAME = 0x804d001e
+[proptags]
+PR_EMS_AB_ALT_RECIPIENT_O = 0x804e000d
+[proptags]
+PR_EMS_AB_ALT_RECIPIENT = 0x804e001e
+[proptags]
+PR_EMS_AB_ALT_RECIPIENT_BL_O = 0x804f000d
+[proptags]
+PR_EMS_AB_ALT_RECIPIENT_BL = 0x804f101e
+[proptags]
+PR_EMS_AB_ANCESTOR_ID = 0x80500102
+[proptags]
+PR_EMS_AB_ASSOC_REMOTE_DXA_O = 0x8051000d
+[proptags]
+PR_EMS_AB_ASSOC_REMOTE_DXA = 0x8051101e
+[proptags]
+PR_EMS_AB_ASSOCIATION_LIFETIME = 0x80520003
+[proptags]
+PR_EMS_AB_AUTH_ORIG_BL_O = 0x8053000d
+[proptags]
+PR_EMS_AB_AUTH_ORIG_BL = 0x8053101e
+[proptags]
+PR_EMS_AB_AUTHORIZED_DOMAIN = 0x8054001e
+[proptags]
+PR_EMS_AB_AUTHORIZED_PASSWORD = 0x80550102
+[proptags]
+PR_EMS_AB_AUTHORIZED_USER = 0x8056001e
+[proptags]
+PR_EMS_AB_BUSINESS_CATEGORY = 0x8057101e
+[proptags]
+PR_EMS_AB_CAN_CREATE_PF_O = 0x8058000d
+[proptags]
+PR_EMS_AB_CAN_CREATE_PF = 0x8058101e
+[proptags]
+PR_EMS_AB_CAN_CREATE_PF_BL_O = 0x8059000d
+[proptags]
+PR_EMS_AB_CAN_CREATE_PF_BL = 0x8059101e
+[proptags]
+PR_EMS_AB_CAN_CREATE_PF_DL_O = 0x805a000d
+[proptags]
+PR_EMS_AB_CAN_CREATE_PF_DL = 0x805a101e
+[proptags]
+PR_EMS_AB_CAN_CREATE_PF_DL_BL_O = 0x805b000d
+[proptags]
+PR_EMS_AB_CAN_CREATE_PF_DL_BL = 0x805b101e
+[proptags]
+PR_EMS_AB_CAN_NOT_CREATE_PF_O = 0x805c000d
+[proptags]
+PR_EMS_AB_CAN_NOT_CREATE_PF = 0x805c101e
+[proptags]
+PR_EMS_AB_CAN_NOT_CREATE_PF_BL_O = 0x805d000d
+[proptags]
+PR_EMS_AB_CAN_NOT_CREATE_PF_BL = 0x805d101e
+[proptags]
+PR_EMS_AB_CAN_NOT_CREATE_PF_DL_O = 0x805e000d
+[proptags]
+PR_EMS_AB_CAN_NOT_CREATE_PF_DL = 0x805e101e
+[proptags]
+PR_EMS_AB_CAN_NOT_CREATE_PF_DL_BL_O = 0x805f000d
+[proptags]
+PR_EMS_AB_CAN_NOT_CREATE_PF_DL_BL = 0x805f101e
+[proptags]
+PR_EMS_AB_CAN_PRESERVE_DNS = 0x8060000b
+[proptags]
+PR_EMS_AB_CLOCK_ALERT_OFFSET = 0x80610003
+[proptags]
+PR_EMS_AB_CLOCK_ALERT_REPAIR = 0x8062000b
+[proptags]
+PR_EMS_AB_CLOCK_WARNING_OFFSET = 0x80630003
+[proptags]
+PR_EMS_AB_CLOCK_WARNING_REPAIR = 0x8064000b
+[proptags]
+PR_EMS_AB_COMPUTER_NAME = 0x8065001e
+[proptags]
+PR_EMS_AB_CONNECTED_DOMAINS = 0x8066101e
+[proptags]
+PR_EMS_AB_CONTAINER_INFO = 0x80670003
+[proptags]
+PR_EMS_AB_COST = 0x80680003
+[proptags]
+PR_EMS_AB_COUNTRY_NAME = 0x8069001e
+[proptags]
+PR_EMS_AB_DELIV_CONT_LENGTH = 0x806a0003
+[proptags]
+PR_EMS_AB_DELIV_EITS = 0x806b1102
+[proptags]
+PR_EMS_AB_DELIV_EXT_CONT_TYPES = 0x806c1102
+[proptags]
+PR_EMS_AB_DELIVER_AND_REDIRECT = 0x806d000b
+[proptags]
+PR_EMS_AB_DELIVERY_MECHANISM = 0x806e0003
+[proptags]
+PR_EMS_AB_DESCRIPTION = 0x806f101e
+[proptags]
+PR_EMS_AB_DESTINATION_INDICATOR = 0x8070101e
+[proptags]
+PR_EMS_AB_DIAGNOSTIC_REG_KEY = 0x8071001e
+[proptags]
+PR_EMS_AB_DL_MEM_REJECT_PERMS_BL_O = 0x8072000d
+[proptags]
+PR_EMS_AB_DL_MEM_REJECT_PERMS_BL = 0x8072101e
+[proptags]
+PR_EMS_AB_DL_MEM_SUBMIT_PERMS_BL_O = 0x8073000d
+[proptags]
+PR_EMS_AB_DL_MEM_SUBMIT_PERMS_BL = 0x8073101e
+[proptags]
+PR_EMS_AB_DL_MEMBER_RULE = 0x80741102
+[proptags]
+PR_EMS_AB_DOMAIN_DEF_ALT_RECIP_O = 0x8075000d
+[proptags]
+PR_EMS_AB_DOMAIN_DEF_ALT_RECIP = 0x8075001e
+[proptags]
+PR_EMS_AB_DOMAIN_NAME = 0x8076001e
+[proptags]
+PR_EMS_AB_DSA_SIGNATURE = 0x80770102
+[proptags]
+PR_EMS_AB_DXA_ADMIN_COPY = 0x8078000b
+[proptags]
+PR_EMS_AB_DXA_ADMIN_FORWARD = 0x8079000b
+[proptags]
+PR_EMS_AB_DXA_ADMIN_UPDATE = 0x807a0003
+[proptags]
+PR_EMS_AB_DXA_APPEND_REQCN = 0x807b000b
+[proptags]
+PR_EMS_AB_DXA_CONF_CONTAINER_LIST_O = 0x807c000d
+[proptags]
+PR_EMS_AB_DXA_CONF_CONTAINER_LIST = 0x807c101e
+[proptags]
+PR_EMS_AB_DXA_CONF_REQ_TIME = 0x807d0040
+[proptags]
+PR_EMS_AB_DXA_CONF_SEQ = 0x807e001e
+[proptags]
+PR_EMS_AB_DXA_CONF_SEQ_USN = 0x807f0003
+[proptags]
+PR_EMS_AB_DXA_EXCHANGE_OPTIONS = 0x80800003
+[proptags]
+PR_EMS_AB_DXA_EXPORT_NOW = 0x8081000b
+[proptags]
+PR_EMS_AB_DXA_FLAGS = 0x80820003
+[proptags]
+PR_EMS_AB_DXA_IMP_SEQ = 0x8083001e
+[proptags]
+PR_EMS_AB_DXA_IMP_SEQ_TIME = 0x80840040
+[proptags]
+PR_EMS_AB_DXA_IMP_SEQ_USN = 0x80850003
+[proptags]
+PR_EMS_AB_DXA_IMPORT_NOW = 0x8086000b
+[proptags]
+PR_EMS_AB_DXA_IN_TEMPLATE_MAP = 0x8087101e
+[proptags]
+PR_EMS_AB_DXA_LOCAL_ADMIN_O = 0x8088000d
+[proptags]
+PR_EMS_AB_DXA_LOCAL_ADMIN = 0x8088001e
+[proptags]
+PR_EMS_AB_DXA_LOGGING_LEVEL = 0x80890003
+[proptags]
+PR_EMS_AB_DXA_NATIVE_ADDRESS_TYPE = 0x808a001e
+[proptags]
+PR_EMS_AB_DXA_OUT_TEMPLATE_MAP = 0x808b101e
+[proptags]
+PR_EMS_AB_DXA_PASSWORD = 0x808c001e
+[proptags]
+PR_EMS_AB_DXA_PREV_EXCHANGE_OPTIONS = 0x808d0003
+[proptags]
+PR_EMS_AB_DXA_PREV_EXPORT_NATIVE_ONLY = 0x808e000b
+[proptags]
+PR_EMS_AB_DXA_PREV_IN_EXCHANGE_SENSITIVITY = 0x808f0003
+[proptags]
+PR_EMS_AB_DXA_PREV_REMOTE_ENTRIES_O = 0x8090000d
+[proptags]
+PR_EMS_AB_DXA_PREV_REMOTE_ENTRIES = 0x8090001e
+[proptags]
+PR_EMS_AB_DXA_PREV_REPLICATION_SENSITIVITY = 0x80910003
+[proptags]
+PR_EMS_AB_DXA_PREV_TEMPLATE_OPTIONS = 0x80920003
+[proptags]
+PR_EMS_AB_DXA_PREV_TYPES = 0x80930003
+[proptags]
+PR_EMS_AB_DXA_RECIPIENT_CP = 0x8094001e
+[proptags]
+PR_EMS_AB_DXA_REMOTE_CLIENT_O = 0x8095000d
+[proptags]
+PR_EMS_AB_DXA_REMOTE_CLIENT = 0x8095001e
+[proptags]
+PR_EMS_AB_DXA_REQ_SEQ = 0x8096001e
+[proptags]
+PR_EMS_AB_DXA_REQ_SEQ_TIME = 0x80970040
+[proptags]
+PR_EMS_AB_DXA_REQ_SEQ_USN = 0x80980003
+[proptags]
+PR_EMS_AB_DXA_REQNAME = 0x8099001e
+[proptags]
+PR_EMS_AB_DXA_SVR_SEQ = 0x809a001e
+[proptags]
+PR_EMS_AB_DXA_SVR_SEQ_TIME = 0x809b0040
+[proptags]
+PR_EMS_AB_DXA_SVR_SEQ_USN = 0x809c0003
+[proptags]
+PR_EMS_AB_DXA_TASK = 0x809d0003
+[proptags]
+PR_EMS_AB_DXA_TEMPLATE_OPTIONS = 0x809e0003
+[proptags]
+PR_EMS_AB_DXA_TEMPLATE_TIMESTAMP = 0x809f0040
+[proptags]
+PR_EMS_AB_DXA_TYPES = 0x80a00003
+[proptags]
+PR_EMS_AB_DXA_UNCONF_CONTAINER_LIST_O = 0x80a1000d
+[proptags]
+PR_EMS_AB_DXA_UNCONF_CONTAINER_LIST = 0x80a1101e
+[proptags]
+PR_EMS_AB_ENCAPSULATION_METHOD = 0x80a20003
+[proptags]
+PR_EMS_AB_ENCRYPT = 0x80a3000b
+[proptags]
+PR_EMS_AB_EXPAND_DLS_LOCALLY = 0x80a4000b
+[proptags]
+PR_EMS_AB_EXPORT_CONTAINERS_O = 0x80a5000d
+[proptags]
+PR_EMS_AB_EXPORT_CONTAINERS = 0x80a5101e
+[proptags]
+PR_EMS_AB_EXPORT_CUSTOM_RECIPIENTS = 0x80a6000b
+[proptags]
+PR_EMS_AB_EXTENDED_CHARS_ALLOWED = 0x80a7000b
+[proptags]
+PR_EMS_AB_EXTENSION_DATA = 0x80a81102
+[proptags]
+PR_EMS_AB_EXTENSION_NAME = 0x80a9101e
+[proptags]
+PR_EMS_AB_EXTENSION_NAME_INHERITED = 0x80aa101e
+[proptags]
+PR_EMS_AB_FACSIMILE_TELEPHONE_NUMBER = 0x80ab1102
+[proptags]
+PR_EMS_AB_FILE_VERSION = 0x80ac0102
+[proptags]
+PR_EMS_AB_FILTER_LOCAL_ADDRESSES = 0x80ad000b
+[proptags]
+PR_EMS_AB_FOLDERS_CONTAINER_O = 0x80ae000d
+[proptags]
+PR_EMS_AB_FOLDERS_CONTAINER = 0x80ae001e
+[proptags]
+PR_EMS_AB_GARBAGE_COLL_PERIOD = 0x80af0003
+[proptags]
+PR_EMS_AB_GATEWAY_LOCAL_CRED = 0x80b0001e
+[proptags]
+PR_EMS_AB_GATEWAY_LOCAL_DESIG = 0x80b1001e
+[proptags]
+PR_EMS_AB_GATEWAY_PROXY = 0x80b2101e
+[proptags]
+PR_EMS_AB_GATEWAY_ROUTING_TREE = 0x80b30102
+[proptags]
+PR_EMS_AB_GWART_LAST_MODIFIED = 0x80b40040
+[proptags]
+PR_EMS_AB_HAS_FULL_REPLICA_NCS_O = 0x80b5000d
+[proptags]
+PR_EMS_AB_HAS_FULL_REPLICA_NCS = 0x80b5101e
+[proptags]
+PR_EMS_AB_HAS_MASTER_NCS_O = 0x80b6000d
+[proptags]
+PR_EMS_AB_HAS_MASTER_NCS = 0x80b6101e
+[proptags]
+PR_EMS_AB_HEURISTICS = 0x80b70003
+[proptags]
+PR_EMS_AB_HIDE_DL_MEMBERSHIP = 0x80b8000b
+[proptags]
+PR_EMS_AB_HIDE_FROM_ADDRESS_BOOK = 0x80b9000b
+[proptags]
+PR_EMS_AB_IMPORT_CONTAINER_O = 0x80ba000d
+[proptags]
+PR_EMS_AB_IMPORT_CONTAINER = 0x80ba001e
+[proptags]
+PR_EMS_AB_IMPORT_SENSITIVITY = 0x80bb0003
+[proptags]
+PR_EMS_AB_INBOUND_SITES_O = 0x80bc000d
+[proptags]
+PR_EMS_AB_INBOUND_SITES = 0x80bc101e
+[proptags]
+PR_EMS_AB_INSTANCE_TYPE = 0x80bd0003
+[proptags]
+PR_EMS_AB_INTERNATIONAL_ISDN_NUMBER = 0x80be101e
+[proptags]
+PR_EMS_AB_INVOCATION_ID = 0x80bf0102
+[proptags]
+PR_EMS_AB_IS_DELETED = 0x80c0000b
+[proptags]
+PR_EMS_AB_IS_SINGLE_VALUED = 0x80c1000b
+[proptags]
+PR_EMS_AB_KCC_STATUS = 0x80c21102
+[proptags]
+PR_EMS_AB_KNOWLEDGE_INFORMATION = 0x80c3101e
+[proptags]
+PR_EMS_AB_LINE_WRAP = 0x80c40003
+[proptags]
+PR_EMS_AB_LINK_ID = 0x80c50003
+[proptags]
+PR_EMS_AB_LOCAL_BRIDGE_HEAD = 0x80c6001e
+[proptags]
+PR_EMS_AB_LOCAL_BRIDGE_HEAD_ADDRESS = 0x80c7001e
+[proptags]
+PR_EMS_AB_LOCAL_INITIAL_TURN = 0x80c8000b
+[proptags]
+PR_EMS_AB_LOCAL_SCOPE_O = 0x80c9000d
+[proptags]
+PR_EMS_AB_LOCAL_SCOPE = 0x80c9101e
+[proptags]
+PR_EMS_AB_LOG_FILENAME = 0x80ca001e
+[proptags]
+PR_EMS_AB_LOG_ROLLOVER_INTERVAL = 0x80cb0003
+[proptags]
+PR_EMS_AB_MAINTAIN_AUTOREPLY_HISTORY = 0x80cc000b
+[proptags]
+PR_EMS_AB_MAPI_DISPLAY_TYPE = 0x80cd0003
+[proptags]
+PR_EMS_AB_MAPI_ID = 0x80ce0003
+[proptags]
+PR_EMS_AB_MDB_BACKOFF_INTERVAL = 0x80cf0003
+[proptags]
+PR_EMS_AB_MDB_MSG_TIME_OUT_PERIOD = 0x80d00003
+[proptags]
+PR_EMS_AB_MDB_OVER_QUOTA_LIMIT = 0x80d10003
+[proptags]
+PR_EMS_AB_MDB_STORAGE_QUOTA = 0x80d20003
+[proptags]
+PR_EMS_AB_MDB_UNREAD_LIMIT = 0x80d30003
+[proptags]
+PR_EMS_AB_MDB_USE_DEFAULTS = 0x80d4000b
+[proptags]
+PR_EMS_AB_MESSAGE_TRACKING_ENABLED = 0x80d5000b
+[proptags]
+PR_EMS_AB_MONITOR_CLOCK = 0x80d6000b
+[proptags]
+PR_EMS_AB_MONITOR_SERVERS = 0x80d7000b
+[proptags]
+PR_EMS_AB_MONITOR_SERVICES = 0x80d8000b
+[proptags]
+PR_EMS_AB_MONITORED_CONFIGURATIONS_O = 0x80d9000d
+[proptags]
+PR_EMS_AB_MONITORED_CONFIGURATIONS = 0x80d9101e
+[proptags]
+PR_EMS_AB_MONITORED_SERVERS_O = 0x80da000d
+[proptags]
+PR_EMS_AB_MONITORED_SERVERS = 0x80da101e
+[proptags]
+PR_EMS_AB_MONITORED_SERVICES = 0x80db101e
+[proptags]
+PR_EMS_AB_MONITORING_ALERT_DELAY = 0x80dc0003
+[proptags]
+PR_EMS_AB_MONITORING_ALERT_UNITS = 0x80dd0003
+[proptags]
+PR_EMS_AB_MONITORING_AVAILABILITY_STYLE = 0x80de0003
+[proptags]
+PR_EMS_AB_MONITORING_AVAILABILITY_WINDOW = 0x80df0102
+[proptags]
+PR_EMS_AB_MONITORING_CACHED_VIA_MAIL_O = 0x80e0000d
+[proptags]
+PR_EMS_AB_MONITORING_CACHED_VIA_MAIL = 0x80e0101e
+[proptags]
+PR_EMS_AB_MONITORING_CACHED_VIA_RPC_O = 0x80e1000d
+[proptags]
+PR_EMS_AB_MONITORING_CACHED_VIA_RPC = 0x80e1101e
+[proptags]
+PR_EMS_AB_MONITORING_ESCALATION_PROCEDURE = 0x80e21102
+[proptags]
+PR_EMS_AB_MONITORING_HOTSITE_POLL_INTERVAL = 0x80e30003
+[proptags]
+PR_EMS_AB_MONITORING_HOTSITE_POLL_UNITS = 0x80e40003
+[proptags]
+PR_EMS_AB_MONITORING_MAIL_UPDATE_INTERVAL = 0x80e50003
+[proptags]
+PR_EMS_AB_MONITORING_MAIL_UPDATE_UNITS = 0x80e60003
+[proptags]
+PR_EMS_AB_MONITORING_NORMAL_POLL_INTERVAL = 0x80e70003
+[proptags]
+PR_EMS_AB_MONITORING_NORMAL_POLL_UNITS = 0x80e80003
+[proptags]
+PR_EMS_AB_MONITORING_RECIPIENTS_O = 0x80e9000d
+[proptags]
+PR_EMS_AB_MONITORING_RECIPIENTS = 0x80e9101e
+[proptags]
+PR_EMS_AB_MONITORING_RECIPIENTS_NDR_O = 0x80ea000d
+[proptags]
+PR_EMS_AB_MONITORING_RECIPIENTS_NDR = 0x80ea101e
+[proptags]
+PR_EMS_AB_MONITORING_RPC_UPDATE_INTERVAL = 0x80eb0003
+[proptags]
+PR_EMS_AB_MONITORING_RPC_UPDATE_UNITS = 0x80ec0003
+[proptags]
+PR_EMS_AB_MONITORING_WARNING_DELAY = 0x80ed0003
+[proptags]
+PR_EMS_AB_MONITORING_WARNING_UNITS = 0x80ee0003
+[proptags]
+PR_EMS_AB_MTA_LOCAL_CRED = 0x80ef001e
+[proptags]
+PR_EMS_AB_MTA_LOCAL_DESIG = 0x80f0001e
+[proptags]
+PR_EMS_AB_N_ADDRESS = 0x80f10102
+[proptags]
+PR_EMS_AB_N_ADDRESS_TYPE = 0x80f20003
+[proptags]
+PR_EMS_AB_NT_MACHINE_NAME = 0x80f3001e
+[proptags]
+PR_EMS_AB_NUM_OF_OPEN_RETRIES = 0x80f40003
+[proptags]
+PR_EMS_AB_NUM_OF_TRANSFER_RETRIES = 0x80f50003
+[proptags]
+PR_EMS_AB_OBJECT_CLASS_CATEGORY = 0x80f60003
+[proptags]
+PR_EMS_AB_OBJECT_VERSION = 0x80f70003
+[proptags]
+PR_EMS_AB_OFF_LINE_AB_CONTAINERS_O = 0x80f8000d
+[proptags]
+PR_EMS_AB_OFF_LINE_AB_CONTAINERS = 0x80f8101e
+[proptags]
+PR_EMS_AB_OFF_LINE_AB_SCHEDULE = 0x80f90102
+[proptags]
+PR_EMS_AB_OFF_LINE_AB_SERVER_O = 0x80fa000d
+[proptags]
+PR_EMS_AB_OFF_LINE_AB_SERVER = 0x80fa001e
+[proptags]
+PR_EMS_AB_OFF_LINE_AB_STYLE = 0x80fb0003
+[proptags]
+PR_EMS_AB_OID_TYPE = 0x80fc0003
+[proptags]
+PR_EMS_AB_OM_OBJECT_CLASS = 0x80fd0102
+[proptags]
+PR_EMS_AB_OM_SYNTAX = 0x80fe0003
+[proptags]
+PR_EMS_AB_OOF_REPLY_TO_ORIGINATOR = 0x80ff000b
+[proptags]
+PR_EMS_AB_OPEN_RETRY_INTERVAL = 0x81000003
+[proptags]
+PR_EMS_AB_ORGANIZATION_NAME = 0x8101101e
+[proptags]
+PR_EMS_AB_ORGANIZATIONAL_UNIT_NAME = 0x8102101e
+[proptags]
+PR_EMS_AB_ORIGINAL_DISPLAY_TABLE = 0x81030102
+[proptags]
+PR_EMS_AB_ORIGINAL_DISPLAY_TABLE_MSDOS = 0x81040102
+[proptags]
+PR_EMS_AB_OUTBOUND_SITES_O = 0x8105000d
+[proptags]
+PR_EMS_AB_OUTBOUND_SITES = 0x8105101e
+[proptags]
+PR_EMS_AB_P_SELECTOR = 0x81060102
+[proptags]
+PR_EMS_AB_P_SELECTOR_INBOUND = 0x81070102
+[proptags]
+PR_EMS_AB_PER_MSG_DIALOG_DISPLAY_TABLE = 0x81080102
+[proptags]
+PR_EMS_AB_PER_RECIP_DIALOG_DISPLAY_TABLE = 0x81090102
+[proptags]
+PR_EMS_AB_PERIOD_REP_SYNC_TIMES = 0x810a0102
+[proptags]
+PR_EMS_AB_PERIOD_REPL_STAGGER = 0x810b0003
+[proptags]
+PR_EMS_AB_POSTAL_ADDRESS = 0x810c1102
+[proptags]
+PR_EMS_AB_PREFERRED_DELIVERY_METHOD = 0x810d1003
+[proptags]
+PR_EMS_AB_PRMD = 0x810e001e
+[proptags]
+PR_EMS_AB_PROXY_GENERATOR_DLL = 0x810f001e
+[proptags]
+PR_EMS_AB_PUBLIC_DELEGATES_BL_O = 0x8110000d
+[proptags]
+PR_EMS_AB_PUBLIC_DELEGATES_BL = 0x8110101e
+[proptags]
+PR_EMS_AB_QUOTA_NOTIFICATION_SCHEDULE = 0x81110102
+[proptags]
+PR_EMS_AB_QUOTA_NOTIFICATION_STYLE = 0x81120003
+[proptags]
+PR_EMS_AB_RANGE_LOWER = 0x81130003
+[proptags]
+PR_EMS_AB_RANGE_UPPER = 0x81140003
+[proptags]
+PR_EMS_AB_RAS_CALLBACK_NUMBER = 0x8115001e
+[proptags]
+PR_EMS_AB_RAS_PHONE_NUMBER = 0x8116001e
+[proptags]
+PR_EMS_AB_RAS_PHONEBOOK_ENTRY_NAME = 0x8117001e
+[proptags]
+PR_EMS_AB_RAS_REMOTE_SRVR_NAME = 0x8118001e
+[proptags]
+PR_EMS_AB_REGISTERED_ADDRESS = 0x81191102
+[proptags]
+PR_EMS_AB_REMOTE_BRIDGE_HEAD = 0x811a001e
+[proptags]
+PR_EMS_AB_REMOTE_BRIDGE_HEAD_ADDRESS = 0x811b001e
+[proptags]
+PR_EMS_AB_REMOTE_OUT_BH_SERVER_O = 0x811c000d
+[proptags]
+PR_EMS_AB_REMOTE_OUT_BH_SERVER = 0x811c001e
+[proptags]
+PR_EMS_AB_REMOTE_SITE_O = 0x811d000d
+[proptags]
+PR_EMS_AB_REMOTE_SITE = 0x811d001e
+[proptags]
+PR_EMS_AB_REPLICATION_SENSITIVITY = 0x811e0003
+[proptags]
+PR_EMS_AB_REPLICATION_STAGGER = 0x811f0003
+[proptags]
+PR_EMS_AB_REPORT_TO_ORIGINATOR = 0x8120000b
+[proptags]
+PR_EMS_AB_REPORT_TO_OWNER = 0x8121000b
+[proptags]
+PR_EMS_AB_REQ_SEQ = 0x81220003
+[proptags]
+PR_EMS_AB_RESPONSIBLE_LOCAL_DXA_O = 0x8123000d
+[proptags]
+PR_EMS_AB_RESPONSIBLE_LOCAL_DXA = 0x8123001e
+[proptags]
+PR_EMS_AB_RID_SERVER_O = 0x8124000d
+[proptags]
+PR_EMS_AB_RID_SERVER = 0x8124001e
+[proptags]
+PR_EMS_AB_ROLE_OCCUPANT_O = 0x8125000d
+[proptags]
+PR_EMS_AB_ROLE_OCCUPANT = 0x8125101e
+[proptags]
+PR_EMS_AB_ROUTING_LIST = 0x8126101e
+[proptags]
+PR_EMS_AB_RTS_CHECKPOINT_SIZE = 0x81270003
+[proptags]
+PR_EMS_AB_RTS_RECOVERY_TIMEOUT = 0x81280003
+[proptags]
+PR_EMS_AB_RTS_WINDOW_SIZE = 0x81290003
+[proptags]
+PR_EMS_AB_RUNS_ON_O = 0x812a000d
+[proptags]
+PR_EMS_AB_RUNS_ON = 0x812a101e
+[proptags]
+PR_EMS_AB_S_SELECTOR = 0x812b0102
+[proptags]
+PR_EMS_AB_S_SELECTOR_INBOUND = 0x812c0102
+[proptags]
+PR_EMS_AB_SEARCH_FLAGS = 0x812d0003
+[proptags]
+PR_EMS_AB_SEARCH_GUIDE = 0x812e1102
+[proptags]
+PR_EMS_AB_SEE_ALSO_O = 0x812f000d
+[proptags]
+PR_EMS_AB_SEE_ALSO = 0x812f101e
+[proptags]
+PR_EMS_AB_SERIAL_NUMBER = 0x8130101e
+[proptags]
+PR_EMS_AB_SERVICE_ACTION_FIRST = 0x81310003
+[proptags]
+PR_EMS_AB_SERVICE_ACTION_OTHER = 0x81320003
+[proptags]
+PR_EMS_AB_SERVICE_ACTION_SECOND = 0x81330003
+[proptags]
+PR_EMS_AB_SERVICE_RESTART_DELAY = 0x81340003
+[proptags]
+PR_EMS_AB_SERVICE_RESTART_MESSAGE = 0x8135001e
+[proptags]
+PR_EMS_AB_SESSION_DISCONNECT_TIMER = 0x81360003
+[proptags]
+PR_EMS_AB_SITE_AFFINITY = 0x8137101e
+[proptags]
+PR_EMS_AB_SITE_PROXY_SPACE = 0x8138101e
+[proptags]
+PR_EMS_AB_SPACE_LAST_COMPUTED = 0x81390040
+[proptags]
+PR_EMS_AB_STREET_ADDRESS = 0x813a001e
+[proptags]
+PR_EMS_AB_SUB_REFS_O = 0x813b000d
+[proptags]
+PR_EMS_AB_SUB_REFS = 0x813b101e
+[proptags]
+PR_EMS_AB_SUBMISSION_CONT_LENGTH = 0x813c0003
+[proptags]
+PR_EMS_AB_SUPPORTED_APPLICATION_CONTEXT = 0x813d1102
+[proptags]
+PR_EMS_AB_SUPPORTING_STACK_O = 0x813e000d
+[proptags]
+PR_EMS_AB_SUPPORTING_STACK = 0x813e101e
+[proptags]
+PR_EMS_AB_SUPPORTING_STACK_BL_O = 0x813f000d
+[proptags]
+PR_EMS_AB_SUPPORTING_STACK_BL = 0x813f101e
+[proptags]
+PR_EMS_AB_T_SELECTOR = 0x81400102
+[proptags]
+PR_EMS_AB_T_SELECTOR_INBOUND = 0x81410102
+[proptags]
+PR_EMS_AB_TARGET_MTAS = 0x8142101e
+[proptags]
+PR_EMS_AB_TELETEX_TERMINAL_IDENTIFIER = 0x81431102
+[proptags]
+PR_EMS_AB_TEMP_ASSOC_THRESHOLD = 0x81440003
+[proptags]
+PR_EMS_AB_TOMBSTONE_LIFETIME = 0x81450003
+[proptags]
+PR_EMS_AB_TRACKING_LOG_PATH_NAME = 0x8146001e
+[proptags]
+PR_EMS_AB_TRANS_RETRY_MINS = 0x81470003
+[proptags]
+PR_EMS_AB_TRANS_TIMEOUT_MINS = 0x81480003
+[proptags]
+PR_EMS_AB_TRANSFER_RETRY_INTERVAL = 0x81490003
+[proptags]
+PR_EMS_AB_TRANSFER_TIMEOUT_NON_URGENT = 0x814a0003
+[proptags]
+PR_EMS_AB_TRANSFER_TIMEOUT_NORMAL = 0x814b0003
+[proptags]
+PR_EMS_AB_TRANSFER_TIMEOUT_URGENT = 0x814c0003
+[proptags]
+PR_EMS_AB_TRANSLATION_TABLE_USED = 0x814d0003
+[proptags]
+PR_EMS_AB_TRANSPORT_EXPEDITED_DATA = 0x814e000b
+[proptags]
+PR_EMS_AB_TRUST_LEVEL = 0x814f0003
+[proptags]
+PR_EMS_AB_TURN_REQUEST_THRESHOLD = 0x81500003
+[proptags]
+PR_EMS_AB_TWO_WAY_ALTERNATE_FACILITY = 0x8151000b
+[proptags]
+PR_EMS_AB_UNAUTH_ORIG_BL_O = 0x8152000d
+[proptags]
+PR_EMS_AB_UNAUTH_ORIG_BL = 0x8152101e
+[proptags]
+PR_EMS_AB_USER_PASSWORD = 0x81531102
+[proptags]
+PR_EMS_AB_USN_CREATED = 0x81540003
+[proptags]
+PR_EMS_AB_USN_DSA_LAST_OBJ_REMOVED = 0x81550003
+[proptags]
+PR_EMS_AB_USN_LAST_OBJ_REM = 0x81560003
+[proptags]
+PR_EMS_AB_USN_SOURCE = 0x81570003
+[proptags]
+PR_EMS_AB_X121_ADDRESS = 0x8158101e
+[proptags]
+PR_EMS_AB_X25_CALL_USER_DATA_INCOMING = 0x81590102
+[proptags]
+PR_EMS_AB_X25_CALL_USER_DATA_OUTGOING = 0x815a0102
+[proptags]
+PR_EMS_AB_X25_FACILITIES_DATA_INCOMING = 0x815b0102
+[proptags]
+PR_EMS_AB_X25_FACILITIES_DATA_OUTGOING = 0x815c0102
+[proptags]
+PR_EMS_AB_X25_LEASED_LINE_PORT = 0x815d0102
+[proptags]
+PR_EMS_AB_X25_LEASED_OR_SWITCHED = 0x815e000b
+[proptags]
+PR_EMS_AB_X25_REMOTE_MTA_PHONE = 0x815f001e
+[proptags]
+PR_EMS_AB_X400_ATTACHMENT_TYPE = 0x81600102
+[proptags]
+PR_EMS_AB_X400_SELECTOR_SYNTAX = 0x81610003
+[proptags]
+PR_EMS_AB_X500_ACCESS_CONTROL_LIST = 0x81620102
+[proptags]
+PR_EMS_AB_XMIT_TIMEOUT_NON_URGENT = 0x81630003
+[proptags]
+PR_EMS_AB_XMIT_TIMEOUT_NORMAL = 0x81640003
+[proptags]
+PR_EMS_AB_XMIT_TIMEOUT_URGENT = 0x81650003
+[proptags]
+PR_EMS_AB_SITE_FOLDER_GUID = 0x81660102
+[proptags]
+PR_EMS_AB_SITE_FOLDER_SERVER_O = 0x8167000d
+[proptags]
+PR_EMS_AB_SITE_FOLDER_SERVER = 0x8167001e
+[proptags]
+PR_EMS_AB_REPLICATION_MAIL_MSG_SIZE = 0x81680003
+[proptags]
+PR_EMS_AB_MAXIMUM_OBJECT_ID = 0x81690102
+[proptags]
+PR_EMS_AB_NETWORK_ADDRESS = 0x8170101e
+[proptags]
+PR_EMS_AB_LDAP_DISPLAY_NAME = 0x8171101e
+[proptags]
+PR_EMS_AB_SCHEMA_FLAGS = 0x81730003
+[proptags]
+PR_EMS_AB_BRIDGEHEAD_SERVERS_O = 0x8174000d
+[proptags]
+PR_EMS_AB_BRIDGEHEAD_SERVERS = 0x8174101e
+[proptags]
+PR_EMS_AB_WWW_HOME_PAGE = 0x8175001e
+[proptags]
+PR_EMS_AB_NNTP_CONTENT_FORMAT = 0x8176001e
+[proptags]
+PR_EMS_AB_POP_CONTENT_FORMAT = 0x8177001e
+[proptags]
+PR_EMS_AB_LANGUAGE = 0x81780003
+[proptags]
+PR_EMS_AB_POP_CHARACTER_SET = 0x8179001e
+[proptags]
+PR_EMS_AB_USN_INTERSITE = 0x817a0003
+[proptags]
+PR_EMS_AB_SUB_SITE = 0x817b001e
+[proptags]
+PR_EMS_AB_SCHEMA_VERSION = 0x817c1003
+[proptags]
+PR_EMS_AB_NNTP_CHARACTER_SET = 0x817d001e
+[proptags]
+PR_EMS_AB_USE_SERVER_VALUES = 0x817e000b
+[proptags]
+PR_EMS_AB_ENABLED_PROTOCOLS = 0x817f0003
+[proptags]
+PR_EMS_AB_CONNECTION_LIST_FILTER = 0x81800102
+[proptags]
+PR_EMS_AB_AVAILABLE_AUTHORIZATION_PACKAGES = 0x8181101e
+[proptags]
+PR_EMS_AB_CHARACTER_SET_LIST = 0x8182101e
+[proptags]
+PR_EMS_AB_USE_SITE_VALUES = 0x8183000b
+[proptags]
+PR_EMS_AB_ENABLED_AUTHORIZATION_PACKAGES = 0x8184101e
+[proptags]
+PR_EMS_AB_CHARACTER_SET = 0x8185001e
+[proptags]
+PR_EMS_AB_CONTENT_TYPE = 0x81860003
+[proptags]
+PR_EMS_AB_ANONYMOUS_ACCESS = 0x8187000b
+[proptags]
+PR_EMS_AB_CONTROL_MSG_FOLDER_ID = 0x81880102
+[proptags]
+PR_EMS_AB_USENET_SITE_NAME = 0x8189001e
+[proptags]
+PR_EMS_AB_CONTROL_MSG_RULES = 0x818a0102
+[proptags]
+PR_EMS_AB_AVAILABLE_DISTRIBUTIONS = 0x818b001e
+[proptags]
+PR_EMS_AB_OUTBOUND_HOST = 0x818d0102
+[proptags]
+PR_EMS_AB_INBOUND_HOST = 0x818e101e
+[proptags]
+PR_EMS_AB_OUTGOING_MSG_SIZE_LIMIT = 0x818f0003
+[proptags]
+PR_EMS_AB_INCOMING_MSG_SIZE_LIMIT = 0x81900003
+[proptags]
+PR_EMS_AB_SEND_TNEF = 0x8191000b
+[proptags]
+PR_EMS_AB_AUTHORIZED_PASSWORD_CONFIRM = 0x81920102
+[proptags]
+PR_EMS_AB_INBOUND_NEWSFEED = 0x8193001e
+[proptags]
+PR_EMS_AB_NEWSFEED_TYPE = 0x81940003
+[proptags]
+PR_EMS_AB_OUTBOUND_NEWSFEED = 0x8195001e
+[proptags]
+PR_EMS_AB_NEWSGROUP_LIST = 0x81960102
+[proptags]
+PR_EMS_AB_NNTP_DISTRIBUTIONS = 0x8197101e
+[proptags]
+PR_EMS_AB_NEWSGROUP = 0x8198001e
+[proptags]
+PR_EMS_AB_MODERATOR = 0x8199001e
+[proptags]
+PR_EMS_AB_AUTHENTICATION_TO_USE = 0x819a001e
+[proptags]
+PR_EMS_AB_HTTP_PUB_GAL = 0x819b000b
+[proptags]
+PR_EMS_AB_HTTP_PUB_GAL_LIMIT = 0x819c0003
+[proptags]
+PR_EMS_AB_HTTP_PUB_PF = 0x819e1102
+[proptags]
+PR_EMS_AB_X500_RDN = 0x81a1001e
+[proptags]
+PR_EMS_AB_X500_NC = 0x81a2001e
+[proptags]
+PR_EMS_AB_REFERRAL_LIST = 0x81a3101e
+[proptags]
+PR_EMS_AB_NNTP_DISTRIBUTIONS_FLAG = 0x81a4000b
+[proptags]
+PR_EMS_AB_ASSOC_PROTOCOL_CFG_NNTP_O = 0x81a5000d
+[proptags]
+PR_EMS_AB_ASSOC_PROTOCOL_CFG_NNTP = 0x81a5001e
+[proptags]
+PR_EMS_AB_NNTP_NEWSFEEDS_O = 0x81a6000d
+[proptags]
+PR_EMS_AB_NNTP_NEWSFEEDS = 0x81a6101e
+[proptags]
+PR_EMS_AB_ENABLED_PROTOCOL_CFG = 0x81a8000b
+[proptags]
+PR_EMS_AB_HTTP_PUB_AB_ATTRIBUTES = 0x81a9101e
+[proptags]
+PR_EMS_AB_HTTP_SERVERS = 0x81ab101e
+[proptags]
+PR_EMS_AB_MODERATED = 0x81ac000b
+[proptags]
+PR_EMS_AB_RAS_ACCOUNT = 0x81ad001e
+[proptags]
+PR_EMS_AB_RAS_PASSWORD = 0x81ae0102
+[proptags]
+PR_EMS_AB_INCOMING_PASSWORD = 0x81af0102
+[proptags]
+PR_EMS_AB_OUTBOUND_HOST_TYPE = 0x81b0000b
+[proptags]
+PR_EMS_AB_PROXY_GENERATION_ENABLED = 0x81b1000b
+[proptags]
+PR_EMS_AB_ROOT_NEWSGROUPS_FOLDER_ID = 0x81b20102
+[proptags]
+PR_EMS_AB_CONNECTION_TYPE = 0x81b3000b
+[proptags]
+PR_EMS_AB_CONNECTION_LIST_FILTER_TYPE = 0x81b40003
+[proptags]
+PR_EMS_AB_PORT_NUMBER = 0x81b50003
+[proptags]
+PR_EMS_AB_PROTOCOL_SETTINGS = 0x81b6101e
+[proptags]
+PR_EMS_AB_GROUP_BY_ATTR_1 = 0x81b7001e
+[proptags]
+PR_EMS_AB_GROUP_BY_ATTR_2 = 0x81b8001e
+[proptags]
+PR_EMS_AB_GROUP_BY_ATTR_3 = 0x81b9001e
+[proptags]
+PR_EMS_AB_GROUP_BY_ATTR_4 = 0x81ba001e
+[proptags]
+PR_EMS_AB_VIEW_SITE = 0x81be001e
+[proptags]
+PR_EMS_AB_VIEW_CONTAINER_1 = 0x81bf001e
+[proptags]
+PR_EMS_AB_VIEW_CONTAINER_2 = 0x81c0001e
+[proptags]
+PR_EMS_AB_VIEW_CONTAINER_3 = 0x81c1001e
+[proptags]
+PR_EMS_AB_PROMO_EXPIRATION = 0x81c20040
+[proptags]
+PR_EMS_AB_DISABLED_GATEWAY_PROXY = 0x81c3101e
+[proptags]
+PR_EMS_AB_COMPROMISED_KEY_LIST = 0x81c40102
+[proptags]
+PR_EMS_AB_INSADMIN_O = 0x81c5000d
+[proptags]
+PR_EMS_AB_INSADMIN = 0x81c5001e
+[proptags]
+PR_EMS_AB_OVERRIDE_NNTP_CONTENT_FORMAT = 0x81c6000b
+[proptags]
+PR_EMS_AB_OBJ_VIEW_CONTAINERS_O = 0x81c7000d
+[proptags]
+PR_EMS_AB_OBJ_VIEW_CONTAINERS = 0x81c7101e
+[proptags]
+PR_EMS_AB_VIEW_FLAGS = 0x8c180003
+[proptags]
+PR_EMS_AB_GROUP_BY_ATTR_VALUE_STR = 0x8c19001e
+[proptags]
+PR_EMS_AB_GROUP_BY_ATTR_VALUE_DN_O = 0x8c1a000d
+[proptags]
+PR_EMS_AB_GROUP_BY_ATTR_VALUE_DN = 0x8c1a001e
+[proptags]
+PR_EMS_AB_VIEW_DEFINITION = 0x8c1b1102
+[proptags]
+PR_EMS_AB_MIME_TYPES = 0x8c1c0102
+[proptags]
+PR_EMS_AB_LDAP_SEARCH_CFG = 0x8c1d0003
+[proptags]
+PR_EMS_AB_INBOUND_DN_O = 0x8c1e000d
+[proptags]
+PR_EMS_AB_INBOUND_DN = 0x8c1e001e
+[proptags]
+PR_EMS_AB_INBOUND_NEWSFEED_TYPE = 0x8c1f000b
+[proptags]
+PR_EMS_AB_INBOUND_ACCEPT_ALL = 0x8c20000b
+[proptags]
+PR_EMS_AB_ENABLED = 0x8c21000b
+[proptags]
+PR_EMS_AB_PRESERVE_INTERNET_CONTENT = 0x8c22000b
+[proptags]
+PR_EMS_AB_DISABLE_DEFERRED_COMMIT = 0x8c23000b
+[proptags]
+PR_EMS_AB_CLIENT_ACCESS_ENABLED = 0x8c24000b
+[proptags]
+PR_EMS_AB_REQUIRE_SSL = 0x8c25000b
+[proptags]
+PR_EMS_AB_ANONYMOUS_ACCOUNT = 0x8c26001e
+[proptags]
+PR_EMS_AB_CERTIFICATE_CHAIN_V3 = 0x8c270102
+[proptags]
+PR_EMS_AB_CERTIFICATE_REVOCATION_LIST_V3 = 0x8c280102
+[proptags]
+PR_EMS_AB_CERTIFICATE_REVOCATION_LIST_V1 = 0x8c290102
+[proptags]
+PR_EMS_AB_CROSS_CERTIFICATE_CRL = 0x8c301102
+[proptags]
+PR_EMS_AB_SEND_EMAIL_MESSAGE = 0x8c31000b
+[proptags]
+PR_EMS_AB_ENABLE_COMPATIBILITY = 0x8c32000b
+[proptags]
+PR_EMS_AB_SMIME_ALG_LIST_NA = 0x8c33101e
+[proptags]
+PR_EMS_AB_SMIME_ALG_LIST_OTHER = 0x8c34101e
+[proptags]
+PR_EMS_AB_SMIME_ALG_SELECTED_NA = 0x8c35001e
+[proptags]
+PR_EMS_AB_SMIME_ALG_SELECTED_OTHER = 0x8c36001e
+[proptags]
+PR_EMS_AB_DEFAULT_MESSAGE_FORMAT = 0x8c37000b
+[proptags]
+PR_EMS_AB_TYPE = 0x8c38001e
+[proptags]
+PR_EMS_AB_DO_OAB_VERSION = 0x8c3a0003
+[proptags]
+PR_EMS_AB_VOICE_MAIL_SYSTEM_GUID = 0x8c3b0102
+[proptags]
+PR_EMS_AB_VOICE_MAIL_USER_ID = 0x8c3c001e
+[proptags]
+PR_EMS_AB_VOICE_MAIL_PASSWORD = 0x8c3d001e
+[proptags]
+PR_EMS_AB_VOICE_MAIL_RECORDED_NAME = 0x8c3e0102
+[proptags]
+PR_EMS_AB_VOICE_MAIL_GREETINGS = 0x8c3f101e
+[proptags]
+PR_EMS_AB_VOICE_MAIL_FLAGS = 0x8c401102
+[proptags]
+PR_EMS_AB_VOICE_MAIL_VOLUME = 0x8c410003
+[proptags]
+PR_EMS_AB_VOICE_MAIL_SPEED = 0x8c420003
+[proptags]
+PR_EMS_AB_VOICE_MAIL_RECORDING_LENGTH = 0x8c431003
+[proptags]
+PR_EMS_AB_DISPLAY_NAME_SUFFIX = 0x8c44001e
+[proptags]
+PR_EMS_AB_ATTRIBUTE_CERTIFICATE = 0x8c451102
+[proptags]
+PR_EMS_AB_DELTA_REVOCATION_LIST = 0x8c461102
+[proptags]
+PR_EMS_AB_SECURITY_POLICY = 0x8c471102
+[proptags]
+PR_EMS_AB_SUPPORT_SMIME_SIGNATURES = 0x8c48000b
+[proptags]
+PR_EMS_AB_DELEGATE_USER = 0x8c49000b
+[proptags]
+PR_EMS_AB_LIST_PUBLIC_FOLDERS = 0x8c50000b
+[proptags]
+PR_EMS_AB_LABELEDURI = 0x8c51001e
+[proptags]
+PR_EMS_AB_RETURN_EXACT_MSG_SIZE = 0x8c52000b
+[proptags]
+PR_EMS_AB_GENERATION_QUALIFIER = 0x8c53001e
+[proptags]
+PR_EMS_AB_HOUSE_IDENTIFIER = 0x8c54001e
+[proptags]
+PR_EMS_AB_SUPPORTED_ALGORITHMS = 0x8c550102
+[proptags]
+PR_EMS_AB_DMD_NAME = 0x8c56001e
+[proptags]
+PR_EMS_AB_EXTENSION_ATTRIBUTE_11 = 0x8c57001e
+[proptags]
+PR_EMS_AB_EXTENSION_ATTRIBUTE_12 = 0x8c58001e
+[proptags]
+PR_EMS_AB_EXTENSION_ATTRIBUTE_13 = 0x8c59001e
+[proptags]
+PR_EMS_AB_EXTENSION_ATTRIBUTE_14 = 0x8c60001e
+[proptags]
+PR_EMS_AB_EXTENSION_ATTRIBUTE_15 = 0x8c61001e
+[proptags]
+PR_EMS_AB_REPLICATED_OBJECT_VERSION = 0x8c620003
+[proptags]
+PR_EMS_AB_MAIL_DROP = 0x8c63001e
+[proptags]
+PR_EMS_AB_FORWARDING_ADDRESS = 0x8c64001e
+[proptags]
+PR_EMS_AB_FORM_DATA = 0x8c650102
+[proptags]
+PR_EMS_AB_OWA_SERVER = 0x8c66001e
+[proptags]
+PR_EMS_AB_EMPLOYEE_NUMBER = 0x8c67001e
+[proptags]
+PR_EMS_AB_TELEPHONE_PERSONAL_PAGER = 0x8c68001e
+[proptags]
+PR_EMS_AB_EMPLOYEE_TYPE = 0x8c69001e
+[proptags]
+PR_EMS_AB_TAGGED_X509_CERT = 0x8c6a1102
+[proptags]
+PR_EMS_AB_PERSONAL_TITLE = 0x8c6b001e
+[proptags]
+PR_EMS_AB_LANGUAGE_ISO639 = 0x8c6c001e
+[proptags]
+PR_EMS_AB_OTHER_RECIPS = 0xf000000d
+[proptags]
+PR_EMS_AB_CHILD_RDNS = 0xfff8101e
+[proptags]
+PR_EMS_AB_HIERARCHY_PATH = 0xfff9001e
+[proptags]
+PR_EMS_AB_OBJECT_OID = 0xfffa0102
+[proptags]
+PR_EMS_AB_IS_MASTER = 0xfffb000b
+[proptags]
+PR_EMS_AB_PARENT_ENTRYID = 0xfffc0102
+[proptags]
+PR_EMS_AB_CONTAINERID = 0xfffd0003
+[proptags]
+PR_EMS_AB_SERVER = 0xfffe001e
diff --git a/torture/testjoin_exchange.c b/torture/testjoin_exchange.c
new file mode 100644 (file)
index 0000000..d8f4460
--- /dev/null
@@ -0,0 +1,302 @@
+/* 
+   OpenChange NSPI implementation
+
+   Create an Exchange user
+
+   Copyright (C) Julien Kerihuel 2006
+   
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "openchange.h"
+
+struct tce_async_context {
+       int found;
+};
+
+static int tce_search_callback(struct ldb_context *ldb, void *context, struct ldb_reply *ares)
+{
+        struct tce_async_context *actx = talloc_get_type(context, struct tce_async_context);
+       int ret;
+
+        switch (ares->type) {
+
+        case LDB_REPLY_ENTRY:
+               if (ldb_msg_find_element(ares->message, "msExchMailboxGuid") != NULL) {
+                       actx->found = 1;
+               }
+                break;
+
+        case LDB_REPLY_DONE:
+                ret = 0;
+                break;
+
+        default:
+                fprintf(stderr, "unknown Reply Type ignore it\n");
+                return LDB_ERR_OTHER;
+        }
+
+        if (talloc_free(ares) == -1) {
+                fprintf(stderr, "talloc_free failed\n");
+                return LDB_ERR_OPERATIONS_ERROR;
+        }
+
+        return LDB_SUCCESS;
+}
+
+NTSTATUS       torture_create_exchangeuser(TALLOC_CTX *mem_ctx, const struct dom_sid *sid)
+{
+       NTSTATUS                status;
+       TALLOC_CTX              *tmp_ctx = (TALLOC_CTX *) NULL;
+       struct ldb_context      *remote_ldb;
+       struct ldb_message      **res;
+       struct ldb_message      *msg;
+       struct tce_async_context *tce_ctx = talloc_zero(tmp_ctx, struct tce_async_context);
+       char                    *remote_ldb_url;
+       struct dcerpc_binding   *b;
+       const char              *dc_binding = lp_parm_string(-1, "torture", "dc_binding");
+       const char              *binding = lp_parm_string(-1, "torture", "binding");
+       const char * const      dom_attrs[] = { "objectSid", NULL};
+       int                     ret;
+
+/*     struct ldb_request req; */
+/*     struct ldb_control **ctrl = talloc_array(tmp_ctx, struct ldb_control *, 2); */
+
+       struct ldb_control **ctrl;
+       struct ldb_paged_control *control;
+       struct ldb_request *req;
+       struct tce_async_context *actx = talloc_zero(tmp_ctx, struct tce_async_context);
+/*     struct test_schema_ctx *actx; */
+
+       tmp_ctx = talloc_named(mem_ctx, 0, "torture_create_exchangeuser temp context");
+       if (!tmp_ctx) {
+               return  NT_STATUS_NO_MEMORY;
+       }
+
+       /* parse the binding string so we can retrieve the host */
+       if (dc_binding) {
+               status = dcerpc_parse_binding(tmp_ctx, dc_binding, &b);
+       } else {
+               status = dcerpc_parse_binding(tmp_ctx, binding, &b);
+       }
+
+       if (!NT_STATUS_IS_OK(status)) {
+               printf("Failed to parse dcerpc binding\n");
+       }
+
+       /* open with LDAP */
+       remote_ldb_url = talloc_asprintf(tmp_ctx, "ldap://%s", b->host);
+       if (!remote_ldb_url) {
+               talloc_free(tmp_ctx);
+               return NT_STATUS_NO_MEMORY;
+       }
+
+       remote_ldb = ldb_wrap_connect(tmp_ctx, remote_ldb_url, NULL,
+                                     cmdline_credentials, 0, NULL);
+       if (!remote_ldb) {
+               talloc_free(tmp_ctx);
+               return NT_STATUS_UNSUCCESSFUL;
+       }
+
+       /* search the user's record using the user dom_sid */
+       ret = gendb_search(remote_ldb, tmp_ctx, NULL, &res, 
+                          dom_attrs, "(objectSid=%s)", 
+                          ldap_encode_ndr_dom_sid(tmp_ctx, sid));
+       if (ret != 1) {
+         return NT_STATUS_NO_SUCH_USER;
+       }
+
+       /* Prepare a new message, for the modify */
+       msg = ldb_msg_new(tmp_ctx);
+       if (!msg) {
+         talloc_free(tmp_ctx);
+         return NT_STATUS_NO_MEMORY;
+       }
+       msg->dn = res[0]->dn;
+
+       {
+               int rtn;
+               const char *exchange_attributes[7];
+
+               exchange_attributes[0] = talloc_asprintf(tmp_ctx, "OpenChange");
+               rtn = samdb_msg_add_string(remote_ldb, tmp_ctx, msg, "givenName", exchange_attributes[0]);
+               if (rtn == -1) {
+                       talloc_free(tmp_ctx);
+                       return NT_STATUS_NO_MEMORY;
+               }
+
+               exchange_attributes[1] = talloc_asprintf(tmp_ctx, "513");
+               rtn = samdb_msg_add_string(remote_ldb, tmp_ctx, msg, "userAccountControl", exchange_attributes[1]);
+               if (rtn == -1) {
+                       talloc_free(tmp_ctx);
+                       return NT_STATUS_NO_MEMORY;
+               }
+               
+               exchange_attributes[2] = talloc_asprintf(tmp_ctx, "%s@openchange.info", TEST_USER_NAME);
+               rtn = samdb_msg_add_string(remote_ldb, tmp_ctx, msg, "mail", exchange_attributes[2]);
+               if (rtn == -1) {
+                       talloc_free(tmp_ctx);
+                       return NT_STATUS_NO_MEMORY;
+               }
+
+               exchange_attributes[3] = talloc_asprintf(tmp_ctx, "%s", TEST_USER_NAME);
+               rtn = samdb_msg_add_string(remote_ldb, tmp_ctx, msg, "mailNickname", exchange_attributes[3]);
+               if (rtn == -1) {
+                       talloc_free(tmp_ctx);
+                       return NT_STATUS_NO_MEMORY;
+               }
+
+               exchange_attributes[4] = talloc_asprintf(tmp_ctx, "TRUE");
+               rtn = samdb_msg_add_string(remote_ldb, tmp_ctx, msg, "mDBUseDefaults", exchange_attributes[4]);
+               if (rtn == -1) {
+                       talloc_free(tmp_ctx);
+                       return NT_STATUS_NO_MEMORY;
+               }
+
+               exchange_attributes[5] = talloc_asprintf(tmp_ctx, "/o=OpenChange Organization/ou=first administrative group/cn=Recipients/cn=%s", 
+                                                        TEST_USER_NAME);
+               rtn = samdb_msg_add_string(remote_ldb, tmp_ctx, msg, "legacyExchangeDN", exchange_attributes[5]);
+               if (rtn == -1) {
+                       talloc_free(tmp_ctx);
+                       return NT_STATUS_NO_MEMORY;
+               }
+
+               exchange_attributes[6] = talloc_asprintf(tmp_ctx, "CN=Mailbox Store (EXCHANGE),CN=First Storage Group,CN=InformationStore,CN=EXCHANGE,CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=OpenChange Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=openchange,DC=info");
+               rtn = samdb_msg_add_string(remote_ldb, tmp_ctx, msg, "homeMDB", exchange_attributes[6]);
+               if (rtn == -1) {
+                       talloc_free(tmp_ctx);
+                       return NT_STATUS_NO_MEMORY;
+               }
+
+               /* Prior we call ldb_modify, we set up the async ldb request on msExchMailboxGuid */
+/*             ctrl[1] = NULL; */
+/*             ctrl[0] = talloc(ctrl, struct ldb_control); */
+/*             ctrl[0]->oid = LDB_CONTROL_NOTIFICATION_OID; */
+/*             ctrl[0]->critical = 1; */
+/*             ctrl[0]->data = NULL; */
+
+/*             req.operation = LDB_ASYNC_SEARCH; */
+/*             req.op.search.base = res[0]->dn; */
+/*             req.op.search.scope = LDB_SCOPE_BASE; */
+/*             req.op.search.tree = ldb_parse_tree(remote_ldb, "(objectclass=*)"); */
+/*             req.op.search.attrs = NULL; */
+/*             req.controls = ctrl; */
+/*             req.async.context = tce_ctx; */
+/*             req.async.callback = &tce_search_callback; */
+/*             req.async.timeout = 60; /\* 60 sec. timeout FIX: bug in timeout callback *\/ */
+
+       req = talloc(tmp_ctx, struct ldb_request);
+/*     actx = talloc(req, struct test_schema_ctx); */
+               
+       ctrl = talloc_array(req, struct ldb_control *, 2);
+       ctrl[1] = NULL;
+       ctrl[0] = talloc(ctrl, struct ldb_control);
+       ctrl[0]->oid = LDB_CONTROL_NOTIFICATION_OID;
+       ctrl[0]->critical = True;
+       ctrl[0]->data = NULL;
+/*     control = talloc(ctrl[0], struct ldb_paged_control); */
+/*     control->size = 1000; */
+/*     control->cookie = NULL; */
+/*     control->cookie_len = 0; */
+/*     ctrl[0]->data = control; */
+
+       req->operation = LDB_SEARCH;
+       req->op.search.base = res[0]->dn;
+       req->op.search.scope = LDB_SCOPE_BASE;
+       req->op.search.tree = ldb_parse_tree(remote_ldb, "(objectclass=*)");
+       if (req->op.search.tree == NULL) return -1;
+       req->op.search.attrs = NULL;
+       req->controls = ctrl;
+       req->context = tce_ctx;
+       req->callback = &tce_search_callback;
+       ldb_set_timeout(tmp_ctx, req, 60);
+
+/*     actx->count             = 0; */
+/*     actx->ctrl              = control; */
+/*     actx->callback          = callback; */
+/*     actx->private_data      = private_data; */
+/* again: */
+/*     actx->pending           = True; */
+
+               rtn = ldb_request(remote_ldb, req);
+               if (rtn!= LDB_SUCCESS) {
+                       talloc_free(tmp_ctx);
+                       return NT_STATUS_UNSUCCESSFUL;
+               }
+               DEBUG(0, ("Async ldb request on msExchMailboxGuid attribute sent\n"));
+
+               /* We modify the user record with the Exchange attributes */
+               rtn = samdb_modify(remote_ldb, tmp_ctx, msg);
+               if (rtn != 0) {
+                       talloc_free(tmp_ctx);
+                       return NT_STATUS_INTERNAL_DB_CORRUPTION;
+               }
+               DEBUG(0, ("Extending AD user record with Exchange attributes\n"));
+       }
+       
+       /* We now wait for Exchange to modify the AD and auto-generate mailbox related attributes */
+
+       {
+               int rtn;
+
+               DEBUG(0, ("Waiting for Exchange to create the mailbox and modify the AD user record\n"));
+               while ((tce_ctx->found == 0) && (req->handle->state != LDB_ASYNC_DONE)) {
+                       rtn = ldb_wait(req->handle, LDB_WAIT_NONE);
+/*                     rtn = ldb_async_wait(req->handle, LDB_WAIT_NONE); */
+                       if (rtn!= LDB_SUCCESS) {
+                               talloc_free(tmp_ctx);
+                               return NT_STATUS_UNSUCCESSFUL;
+                       }
+               }
+               
+               if ( ! tce_ctx->found) { /* timed out */
+                       talloc_free(tmp_ctx);
+                       return NT_STATUS_UNSUCCESSFUL;
+               }
+               DEBUG(0, ("User mailbox and AD record generated\n"));
+       }
+
+       /* We now replace the UserAccountControl attr in the user record with*/
+       talloc_free(msg);
+       
+       /* Prepare a new message, for the replace */
+       msg = ldb_msg_new(tmp_ctx);
+       if (!msg) {
+         talloc_free(tmp_ctx);
+         return NT_STATUS_NO_MEMORY;
+       }
+       msg->dn = res[0]->dn;
+       
+       {
+               const char *UserAccountControl;
+               int rtn;
+               
+               UserAccountControl = talloc_asprintf(tmp_ctx, "66048");
+               rtn = samdb_msg_add_string(remote_ldb, tmp_ctx, msg, "UserAccountControl", UserAccountControl);
+               if (rtn == -1) {
+                       talloc_free(tmp_ctx);
+                       return NT_STATUS_NO_MEMORY;
+               }
+               
+               rtn = samdb_replace(remote_ldb, tmp_ctx, msg);
+               if (rtn != 0) {
+                       talloc_free(tmp_ctx);
+                       return NT_STATUS_INTERNAL_DB_CORRUPTION;
+               }
+               DEBUG(0, ("Resetting ACB flags, pw never expires\n"));
+       }
+
+       return NT_STATUS_OK;
+}
diff --git a/utils/schemaIDGUID.c b/utils/schemaIDGUID.c
new file mode 100644 (file)
index 0000000..a763c36
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+   MAPI Implementation
+
+   OpenChange Project
+
+   Copyright (C) Julien Kerihuel 2006
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "openchange.h"
+
+static void usage()
+{
+       printf("schemaIDGUID <base64 string>\n");
+       exit(0);
+}
+
+int main(int argc, char *argv[])
+{
+       TALLOC_CTX      *mem_ctx;
+       DATA_BLOB       blob;
+       struct GUID     *guid;
+       char            *schemaIDGUID;
+
+       if (argc != 2) {
+               usage();
+       }
+
+       mem_ctx = talloc_init("SchemaIDGUID");
+
+       blob = data_blob_talloc(mem_ctx, argv[1], strlen(argv[1])+1);
+       blob.length = ldb_base64_decode((char *)blob.data);
+       guid = (struct GUID *) blob.data;
+       schemaIDGUID = GUID_string(mem_ctx, guid);
+       printf("%s\n", schemaIDGUID);
+       return (0);
+}