oxcmsg: Implementation for partial UserDNs in ModifyRecipients call

When Outlook passes some value in RecipientRow.prefix_size, then
we should restore the full legacyExchangeDN in recipient_x500name
using szDNPrefix we supplied to Outlook during Connect op.

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
build: Don't rmdir on setup/mapistore, just remove mapistore_namedprops_v2.ldif

mapistore_namedprops_v2.ldif is generated by script/makepropslist.py script

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
setup: Move enable/disable account handlers after create account

This would allow executing the script as:
openchange_newuser --create --enable newName

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
oxcfxics: Fail RopSyncImportHierarchyChange if we can't open perent folder
for SyncContext

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
oxcfxics/RopSyncImportHierarchyChange: use parent_folder var to open underlying folder

todo: commit message is not very good - need to elaborate more on that

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
Create commandline tool to list Mapistore contexts in JSON

I used this into Python script to enum somehow all folders
Mapistore backend knows about. This is due to the fact that
currently Python bindings are not working (and quite outdated)

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
exchange_emsmdb/dcesrv_EcDoRpcExt2: Fix use-after free in

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
mapistore_replica: ensure the user mapistore directory exists before any mapistore operation occurs

This fixes a regression introduced by moving Indexing code to MqSQL land.
Previously this code relied on indexing_tdb for precreating
directory strcture.

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
mapistore_replica: Initialize replica database if it freshly created

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
Merge pull request #55 from Zentyal/kamenim/zen-master

Various implementation and stability patches
mapistore/backend_get_path: Check return value from backend.get_path for != NULL

Backend may return MAPISTORE_SUCCESS and dbpath = NULL, in which
case are going to make a fake url like:
  sogo://(null)
Such broken URLs quickly polute both indexing and openchangedb databases.

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
Revert "Various implementation and stability patches"
Merge pull request #60 from Zentyal/revert-55-kamenim/zen-master

Revert "Various implementation and stability patches"
Merge pull request #59 from Zentyal/kamenim/zen-master

mapistore/backend_get_path: Check return value from backend.get_path for != NULL
Fix get_user_calendar for MySQL backend

It now returns a list of str instead of tuples
Add context from mapistore use username and not cn
Manage no MySQL connections in the OpenChange db wrapper
Send FreeBusy Response even when the FreeBusyOptions are not sent

This is the behaviour Outlook 2007 has. It sends back as TimeWindow
from server side time now up to 42 days later.
Sequential selects on multithreaded environment

* Makes multiple requests at once work as expected
Set proper error codes in each case