2
OpenChange Storage Abstraction Layer library
6
Copyright (C) Julien Kerihuel 2011
8
This program is free software; you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation; either version 3 of the License, or
11
(at your option) any later version.
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
GNU General Public License for more details.
18
You should have received a copy of the GNU General Public License
19
along with this program. If not, see <http://www.gnu.org/licenses/>.
24
#include "mapistore_errors.h"
25
#include "mapistore.h"
26
#include "mapistore_private.h"
27
#include "mapistore_common.h"
30
\file mapistoredb_namedprops.c
32
\brief MAPIStore named properties database provisioning interface
36
\details Provision the default named properties database for mapistore
38
\param mdb_ctx pointer to the mapistore database context
40
\return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
42
enum MAPISTORE_ERROR mapistoredb_namedprops_provision(struct mapistoredb_context *mdb_ctx)
44
enum MAPISTORE_ERROR retval;
51
MAPISTORE_RETVAL_IF(!mdb_ctx, MAPISTORE_ERR_NOT_INITIALIZED, NULL);
52
MAPISTORE_RETVAL_IF(!mdb_ctx->mstore_ctx, MAPISTORE_ERR_NOT_INITIALIZED, NULL);
53
MAPISTORE_RETVAL_IF(!mdb_ctx->mstore_ctx->mapistore_nprops_ctx, MAPISTORE_ERR_NOT_INITIALIZED, NULL);
55
ret = stat(mapistore_get_named_properties_database_path(), &sb);
56
MAPISTORE_RETVAL_IF(ret == -1, MAPISTORE_ERR_DATABASE_INIT, NULL);
58
mem_ctx = talloc_named(NULL, 0, __FUNCTION__);
59
MAPISTORE_RETVAL_IF(!mem_ctx, MAPISTORE_ERR_NO_MEMORY, NULL);
61
/* Step 1. Retrieve the path to the LDIF file */
62
ldif = talloc_asprintf(mem_ctx, "%s/%s", mapistore_get_named_properties_ldif_path(), MAPISTORE_DB_NAMED_V2_LDIF);
63
ret = stat(ldif, &sb);
64
MAPISTORE_RETVAL_IF(ret == -1, MAPISTORE_ERR_DATABASE_INIT, mem_ctx);
66
/* Step 2. Add database schema */
67
retval = mapistore_ldb_write_ldif_string_to_store(mdb_ctx->mstore_ctx->mapistore_nprops_ctx,
68
MDB_NPROPS_INIT_LDIF_TMPL);
69
MAPISTORE_RETVAL_IF(retval, retval, mem_ctx);
71
/* Step 3. Add RootDSE schema */
72
retval = mapistore_ldb_write_ldif_string_to_store(mdb_ctx->mstore_ctx->mapistore_nprops_ctx,
73
MDB_NPROPS_ROOTDSE_LDIF_TMPL);
74
MAPISTORE_RETVAL_IF(retval, retval, mem_ctx);
76
/* Step 2. Commit the database structure and default set of named properties */
77
retval = mapistore_ldb_write_ldif_file_to_store(mdb_ctx->mstore_ctx->mapistore_nprops_ctx, ldif);
78
MAPISTORE_RETVAL_IF(retval, retval, mem_ctx);
83
return MAPISTORE_SUCCESS;
86
static enum MAPISTORE_ERROR mapistoredb_namedprops_provision_backend_set(TALLOC_CTX *mem_ctx,
87
struct mapistore_context *mstore_ctx,
88
struct ldb_ldif *ldif,
90
uint32_t *ext_index, uint32_t *int_index)
92
enum MAPISTORE_ERROR retval;
93
struct ldb_context *ldb_ctx;
94
struct ldb_message *normalized_msg;
95
struct ldb_message_element *ldb_element;
96
const char *objectClass;
97
bool oclass_external = false;
98
bool oclass_internal = false;
99
enum MAPISTORE_NAMEDPROPS_TYPE ntype;
100
bool mnidstring = false;
107
MAPISTORE_RETVAL_IF(!mstore_ctx, MAPISTORE_ERR_NOT_INITIALIZED, NULL);
108
MAPISTORE_RETVAL_IF(!mstore_ctx->mapistore_nprops_ctx, MAPISTORE_ERR_NOT_INITIALIZED, NULL);
109
MAPISTORE_RETVAL_IF(!ldif, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
111
ldb_ctx = mstore_ctx->mapistore_nprops_ctx;
113
/* Step 1. Normalize the message */
114
ret = ldb_msg_normalize(ldb_ctx, mem_ctx, ldif->msg, &normalized_msg);
115
MAPISTORE_RETVAL_IF(ret != LDB_SUCCESS, MAPISTORE_ERR_DATABASE_OPS, NULL);
117
/* Step 2. Ensure the record has a DN */
118
dn = ldb_dn_get_linearized(normalized_msg->dn);
120
MSTORE_DEBUG_ERROR(MSTORE_LEVEL_CRITICAL, "Missing %s!\n", "dn");
121
return MAPISTORE_ERR_DATABASE_OPS;
124
/* Step 3. Search for the objectClass attribute */
125
ldb_element = ldb_msg_find_element(normalized_msg, "objectClass");
126
MAPISTORE_RETVAL_IF(!ldb_element, MAPISTORE_ERR_DATABASE_OPS, NULL);
128
oclass_external = false;
129
oclass_internal = false;
131
for (i = 0; i < ldb_element->num_values; i++) {
132
if (ldb_element->values[i].length) {
133
objectClass = (const char *)ldb_element->values[i].data;
134
if (!strncmp(objectClass, "External", strlen(objectClass))) {
135
oclass_external = true;
136
} else if (!strncmp(objectClass, "Internal", strlen(objectClass))) {
137
oclass_internal = true;
138
} else if (!strncmp(objectClass, "MNID_ID", strlen(objectClass)) ||
139
!strncmp(objectClass, "MNID_STRING", strlen(objectClass))) {
143
MSTORE_DEBUG_ERROR(MSTORE_LEVEL_CRITICAL, "Invalid objectClass for dn: %s\n", dn);
144
return MAPISTORE_ERR_DATABASE_OPS;
148
/* Step 4. Perform sanity checks on objectClass */
150
/* Step 4.1. Record can't have both External and Internal set for objectClass attribute */
151
if (oclass_external == true && oclass_internal == true) {
152
MSTORE_DEBUG_ERROR(MSTORE_LEVEL_CRITICAL, "External and Internal objectClass set for dn: %s\n", dn);
153
return MAPISTORE_ERR_DATABASE_OPS;
156
/* Step 4.2. Neither can they be both unset */
157
if (oclass_external == false && oclass_internal == false && mnidstring == true) {
158
MSTORE_DEBUG_ERROR(MSTORE_LEVEL_CRITICAL, "objectClass must be set to External or Internal for dn: %s\n", dn);
159
return MAPISTORE_ERR_DATABASE_OPS;
162
/* Step 5. Set index to appropriate value */
163
if (oclass_external == true) {
164
ntype = MAPISTORE_NAMEDPROPS_EXTERNAL;
167
ntype = MAPISTORE_NAMEDPROPS_INTERNAL;
171
/* Ensure the index doesn't equal a reserved value */
172
while ((retval = mapistore_namedprops_check_id(mstore_ctx, ntype, index)) != MAPISTORE_SUCCESS) {
176
/* Step 6. Add the mapped_id attribute to the record */
177
if (mnidstring == true) {
178
ret = ldb_msg_add_fmt(normalized_msg, "mapped_id", "0x%.4x", index);
179
if (ret != LDB_SUCCESS) {
180
MSTORE_DEBUG_ERROR(MSTORE_LEVEL_CRITICAL, "Failed to add attribute mapped_id for dn: %s\n", dn);
181
return MAPISTORE_ERR_DATABASE_OPS;
184
/* Step 7. Update the appropriate index */
186
if (oclass_external == true) {
193
/* Step 8. Add the new msg to our LDIF buffer */
194
*ldif_record = ldb_ldif_message_string(ldb_ctx, mem_ctx, LDB_CHANGETYPE_ADD, normalized_msg);
196
MSTORE_DEBUG_ERROR(MSTORE_LEVEL_CRITICAL, "Failed to save intermediary LDIF record: %s\n", dn);
197
return MAPISTORE_ERR_DATABASE_OPS;
200
return MAPISTORE_SUCCESS;
204
static enum MAPISTORE_ERROR mapistoredb_namedprops_provision_backend_ldif_file(TALLOC_CTX *mem_ctx,
205
struct mapistore_context *mstore_ctx,
206
char *filename, char **ldif_buffer,
209
enum MAPISTORE_ERROR retval;
211
struct ldb_context *ldb_ctx;
212
struct ldb_ldif *ldif;
219
MAPISTORE_RETVAL_IF(!mstore_ctx, MAPISTORE_ERR_NOT_INITIALIZED, NULL);
220
MAPISTORE_RETVAL_IF(!mstore_ctx->mapistore_nprops_ctx, MAPISTORE_ERR_NOT_INITIALIZED, NULL);
221
MAPISTORE_RETVAL_IF(!filename, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
222
MAPISTORE_RETVAL_IF(!ldif_buffer, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
223
MAPISTORE_RETVAL_IF(!mod_ldif, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
225
ldb_ctx = mstore_ctx->mapistore_nprops_ctx;
227
/* Step 1. Retrieve mapped index for CN=External and CN=Internal */
228
retval = mapistore_namedprops_get_default_id(mstore_ctx, MAPISTORE_NAMEDPROPS_INTERNAL, &int_index);
229
MAPISTORE_RETVAL_IF(retval, retval, NULL);
231
retval = mapistore_namedprops_get_default_id(mstore_ctx, MAPISTORE_NAMEDPROPS_EXTERNAL, &ext_index);
232
MAPISTORE_RETVAL_IF(retval, retval, NULL);
234
/* Step 2. Ensure the file exists */
235
if (stat(filename, &sb) == -1) {
236
MSTORE_DEBUG_ERROR(MSTORE_LEVEL_CRITICAL, "Invalid LDIF file: %s\n", filename);
237
return MAPISTORE_ERR_NOT_FOUND;
240
f = fopen(filename, "r");
241
MAPISTORE_RETVAL_IF(!f, MAPISTORE_ERR_DATABASE_INIT, NULL);
243
/* Step 3. Process the LDIF file */
244
while ((ldif = ldb_ldif_read_file(ldb_ctx, f))) {
245
retval = mapistoredb_namedprops_provision_backend_set(mem_ctx, mstore_ctx, ldif, &ldif_record,
246
&ext_index, &int_index);
249
talloc_free(*ldif_buffer);
256
*ldif_buffer = talloc_strdup(mem_ctx, ldif_record);
258
*ldif_buffer = talloc_asprintf_append(*ldif_buffer, "%s", ldif_record);
260
talloc_free(ldif_record);
265
/* Step 4. Update mapped_index attributes for CN=External and CN=Internal records */
266
*mod_ldif = talloc_asprintf(mem_ctx, MDB_NPROPS_MAPPED_INDEX_CHANGE_LDIF,
267
"External", ext_index);
268
*mod_ldif = talloc_asprintf_append(*mod_ldif, MDB_NPROPS_MAPPED_INDEX_CHANGE_LDIF,
269
"Internal", int_index);
278
static enum MAPISTORE_ERROR mapistoredb_namedprops_provision_backend_ldif_buffer(TALLOC_CTX *mem_ctx,
279
struct mapistore_context *mstore_ctx,
280
char *buffer, char **ldif_buffer,
283
enum MAPISTORE_ERROR retval;
284
struct ldb_context *ldb_ctx;
285
struct ldb_ldif *ldif;
291
MAPISTORE_RETVAL_IF(!mstore_ctx, MAPISTORE_ERR_NOT_INITIALIZED, NULL);
292
MAPISTORE_RETVAL_IF(!mstore_ctx->mapistore_nprops_ctx, MAPISTORE_ERR_NOT_INITIALIZED, NULL);
293
MAPISTORE_RETVAL_IF(!buffer, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
294
MAPISTORE_RETVAL_IF(!ldif_buffer, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
295
MAPISTORE_RETVAL_IF(!mod_ldif, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
297
ldb_ctx = mstore_ctx->mapistore_nprops_ctx;
299
/* Step 1. Retrieved mapped index for CN=External and CN=Internal */
300
retval = mapistore_namedprops_get_default_id(mstore_ctx, MAPISTORE_NAMEDPROPS_INTERNAL, &int_index);
301
MAPISTORE_RETVAL_IF(retval, retval, NULL);
303
retval = mapistore_namedprops_get_default_id(mstore_ctx, MAPISTORE_NAMEDPROPS_EXTERNAL, &ext_index);
304
MAPISTORE_RETVAL_IF(retval, retval, NULL);
306
/* Step 2. Process the LDIF buffer */
307
while ((ldif = ldb_ldif_read_string(ldb_ctx, (const char **)&buffer))) {
308
retval = mapistoredb_namedprops_provision_backend_set(mem_ctx, mstore_ctx, ldif, &ldif_record,
309
&ext_index, &int_index);
312
talloc_free(*ldif_buffer);
319
*ldif_buffer = talloc_strdup(mem_ctx, ldif_record);
321
*ldif_buffer = talloc_asprintf_append(*ldif_buffer, "%s", ldif_record);
323
talloc_free(ldif_record);
326
retval = MAPISTORE_SUCCESS;
328
/* Step 4. Update mapped_index attributes for CN=External and CN=Internal records */
329
*mod_ldif = talloc_asprintf(mem_ctx, MDB_NPROPS_MAPPED_INDEX_CHANGE_LDIF,
330
"External", ext_index);
331
*mod_ldif = talloc_asprintf_append(*mod_ldif, MDB_NPROPS_MAPPED_INDEX_CHANGE_LDIF,
332
"Internal", int_index);
339
\details Provision mapistore named properties database with a LDIF
340
file from a backend. This internal function also adds a mapped_id
341
to Internal/External records and finally update the mapped_index
344
\param mdb_ctx pointer to the mapistore database context
345
\param ldif_data pointer to the LDIF data
346
\param ntype the type of ldif_data
348
\return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
350
static enum MAPISTORE_ERROR mapistoredb_namedprops_provision_backend(struct mapistoredb_context *mdb_ctx,
352
enum MAPISTORE_NAMEDPROPS_PROVISION_TYPE ntype)
354
enum MAPISTORE_ERROR retval;
358
struct ldb_context *ldb_ctx;
359
struct ldb_ldif *ldif;
360
char *ldif_buffer = NULL;
361
char *ldif_mod = NULL;
365
MAPISTORE_RETVAL_IF(!mdb_ctx, MAPISTORE_ERR_NOT_INITIALIZED, NULL);
366
MAPISTORE_RETVAL_IF(!mdb_ctx->mstore_ctx, MAPISTORE_ERR_NOT_INITIALIZED, NULL);
367
MAPISTORE_RETVAL_IF(!mdb_ctx->mstore_ctx->mapistore_nprops_ctx, MAPISTORE_ERR_NOT_INITIALIZED, NULL);
368
MAPISTORE_RETVAL_IF(!ldif_data, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
369
MAPISTORE_RETVAL_IF(ntype == MAPISTORE_NAMEDPROPS_PROVISION_NONE, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
371
ldb_ctx = mdb_ctx->mstore_ctx->mapistore_nprops_ctx;
373
/* Step 1. Retrieve mapped index for CN=External and CN=Internal */
374
retval = mapistore_namedprops_get_default_id(mdb_ctx->mstore_ctx, MAPISTORE_NAMEDPROPS_INTERNAL, &int_index);
375
MAPISTORE_RETVAL_IF(retval, retval, NULL);
377
retval = mapistore_namedprops_get_default_id(mdb_ctx->mstore_ctx, MAPISTORE_NAMEDPROPS_EXTERNAL, &ext_index);
378
MAPISTORE_RETVAL_IF(retval, retval, NULL);
380
mem_ctx = talloc_named(NULL, 0, __FUNCTION__);
381
MAPISTORE_RETVAL_IF(!mem_ctx, MAPISTORE_ERR_NO_MEMORY, NULL);
383
/* Step 2. Process and retrieved updated LDIF data */
384
if (ntype == MAPISTORE_NAMEDPROPS_PROVISION_FILE) {
385
retval = mapistoredb_namedprops_provision_backend_ldif_file(mem_ctx, mdb_ctx->mstore_ctx,
386
ldif_data, &ldif_buffer, &ldif_mod);
387
} else if (ntype == MAPISTORE_NAMEDPROPS_PROVISION_BUFFER) {
388
retval = mapistoredb_namedprops_provision_backend_ldif_buffer(mem_ctx, mdb_ctx->mstore_ctx,
389
ldif_data, &ldif_buffer, &ldif_mod);
391
MAPISTORE_RETVAL_IF(retval, retval, mem_ctx);
393
/* Step 3. Do the LDB transaction */
394
retval = MAPISTORE_SUCCESS;
395
trans = ldb_transaction_start(ldb_ctx);
396
if (trans != LDB_SUCCESS) {
397
retval = MAPISTORE_ERR_DATABASE_OPS;
401
/* Add LDIF data from backend */
402
while ((ldif = ldb_ldif_read_string(ldb_ctx, (const char **)&ldif_buffer))) {
403
trans = ldb_msg_normalize(ldb_ctx, ldif, ldif->msg, &ldif->msg);
404
if (trans != LDB_SUCCESS) {
405
ldb_ldif_read_free(ldb_ctx, ldif);
406
MSTORE_DEBUG_ERROR(MSTORE_LEVEL_CRITICAL, "Unable to normalize %s\n", "ldif");
407
retval = MAPISTORE_ERR_DATABASE_OPS;
411
trans = ldb_add(ldb_ctx, ldif->msg);
412
if (trans != LDB_SUCCESS) {
413
ldb_ldif_read_free(ldb_ctx, ldif);
414
MSTORE_DEBUG_ERROR(MSTORE_LEVEL_CRITICAL, "Unable to add ldb msg: %s\n", ldb_errstring(ldb_ctx));
415
retval = MAPISTORE_ERR_DATABASE_OPS;
420
/* Update record from mapistore named properties database */
421
while ((ldif = ldb_ldif_read_string(ldb_ctx, (const char **)&ldif_mod))) {
422
trans = ldb_msg_normalize(ldb_ctx, ldif, ldif->msg, &ldif->msg);
423
if (trans != LDB_SUCCESS) {
424
ldb_ldif_read_free(ldb_ctx, ldif);
425
MSTORE_DEBUG_ERROR(MSTORE_LEVEL_CRITICAL, "Unable to normalize %s\n", "ldif");
426
retval = MAPISTORE_ERR_DATABASE_OPS;
430
trans = ldb_modify(ldb_ctx, ldif->msg);
431
if (trans != LDB_SUCCESS) {
432
ldb_ldif_read_free(ldb_ctx, ldif);
433
MSTORE_DEBUG_ERROR(MSTORE_LEVEL_CRITICAL, "Unable to modify ldb %s\n", "msg");
434
retval = MAPISTORE_ERR_DATABASE_OPS;
439
trans = ldb_transaction_commit(ldb_ctx);
440
if (trans != LDB_SUCCESS) {
441
MSTORE_DEBUG_ERROR(MSTORE_LEVEL_CRITICAL, "Transaction failed: %s\n", ldb_errstring(ldb_ctx));
442
retval = MAPISTORE_ERR_DATABASE_OPS;
447
talloc_free(mem_ctx);
453
\details Let registered backends provision additional Internal or
454
External properties within the named properties database
456
\param mdb_ctx pointer to the mapistore database context
458
\return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
460
enum MAPISTORE_ERROR mapistoredb_namedprops_provision_backends(struct mapistoredb_context *mdb_ctx)
462
enum MAPISTORE_ERROR retval;
463
enum MAPISTORE_ERROR retval2;
465
enum MAPISTORE_NAMEDPROPS_PROVISION_TYPE ntype;
467
const char *bname = NULL;
468
const char *bns = NULL;
469
const char *bdesc = NULL;
472
MAPISTORE_RETVAL_IF(!mdb_ctx, MAPISTORE_ERR_NOT_INITIALIZED, NULL);
473
MAPISTORE_RETVAL_IF(!mdb_ctx->mstore_ctx, MAPISTORE_ERR_NOT_INITIALIZED, NULL);
474
MAPISTORE_RETVAL_IF(!mdb_ctx->mstore_ctx->mapistore_nprops_ctx, MAPISTORE_ERR_NOT_INITIALIZED, NULL);
476
/* Step 1. Loop over all the different registered backends */
478
retval = mapistore_get_next_backend(&bname, &bns, &bdesc, &bindex);
479
if (retval == MAPISTORE_SUCCESS) {
480
MSTORE_DEBUG_INFO(MSTORE_LEVEL_DEBUG, "Looking for LDIF data for backend '%s'\n", bname);
481
/* Step 2. Try to fetch LDIF information from each backend */
482
retval2 = mapistore_get_backend_ldif(mdb_ctx->mstore_ctx, bname, &ldif, &ntype);
483
if (retval2 == MAPISTORE_SUCCESS) {
484
/* Step 3. Upon success, try to register LDIF data within the database */
485
retval2 = mapistoredb_namedprops_provision_backend(mdb_ctx, ldif, ntype);
487
MSTORE_DEBUG_ERROR(MSTORE_LEVEL_CRITICAL,
488
"Unable to provision LDIF data for backend '%s': %s\n",
489
bname, mapistore_errstr(retval2));
495
} while (retval != MAPISTORE_ERR_NOT_FOUND);
497
return MAPISTORE_SUCCESS;
501
\details Add an entry for the user within the named properties
502
database and retrieve the default mapped index that can be used for
503
custom named properties
505
\param mdb_ctx pointer to the mapistore database context
506
\param username pointer to the username entry to create
508
\return MAPISTORE_SUCCESS on success, otherwise MAPISTORE error
510
enum MAPISTORE_ERROR mapistoredb_namedprops_provision_user(struct mapistoredb_context *mdb_ctx,
511
const char *username)
513
enum MAPISTORE_ERROR retval;
516
uint32_t mapped_index;
519
MAPISTORE_RETVAL_IF(!mdb_ctx, MAPISTORE_ERR_NOT_INITIALIZED, NULL);
520
MAPISTORE_RETVAL_IF(!mdb_ctx->mstore_ctx, MAPISTORE_ERR_NOT_INITIALIZED, NULL);
521
MAPISTORE_RETVAL_IF(!mdb_ctx->mstore_ctx->mapistore_nprops_ctx, MAPISTORE_ERR_NOT_INITIALIZED, NULL);
522
MAPISTORE_RETVAL_IF(!username, MAPISTORE_ERR_INVALID_PARAMETER, NULL);
524
/* Step 1. Check if the username already exists */
525
retval = mapistore_namedprops_user_exist(mdb_ctx->mstore_ctx, username);
526
MAPISTORE_RETVAL_IF(retval == MAPISTORE_ERR_EXIST, retval, NULL);
528
/* Step 2. Retrieve the first default available id */
529
retval = mapistore_namedprops_get_default_id(mdb_ctx->mstore_ctx, MAPISTORE_NAMEDPROPS_EXTERNAL, &mapped_index);
530
MAPISTORE_RETVAL_IF(retval, retval, NULL);
532
/* Step 3. Create the LDIF */
533
mem_ctx = talloc_named(NULL, 0, __FUNCTION__);
534
MAPISTORE_RETVAL_IF(!mem_ctx, MAPISTORE_ERR_NO_MEMORY, NULL);
536
ldif = talloc_asprintf(mem_ctx, MDB_NPROPS_USER_LDIF, username, mapped_index, username);
537
MAPISTORE_RETVAL_IF(!ldif, MAPISTORE_ERR_NO_MEMORY, mem_ctx);
539
/* Step 4. Commit the LDIF */
540
retval = mapistore_ldb_write_ldif_string_to_store(mdb_ctx->mstore_ctx->mapistore_nprops_ctx, ldif);
542
MAPISTORE_RETVAL_IF(retval, retval, mem_ctx);
544
talloc_free(mem_ctx);
546
return MAPISTORE_SUCCESS;
549
enum MAPISTORE_ERROR mapistoredb_namedprops_register_application(struct mapistoredb_context *mdb_ctx,
550
const char *username,
551
const char *app_name,
552
const char *app_GUID,
555
return MAPISTORE_SUCCESS;
558
enum MAPISTORE_ERROR mapistoredb_namedprops_unregister_application(struct mapistoredb_context *mdb_ctx,
559
const char *username,
560
const char *app_name,
561
const char *app_GUID,
564
return MAPISTORE_SUCCESS;