diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-04-05 14:41:27 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-04-21 14:41:12 +0200 |
commit | a3b952288987e2b62693bdece8c6bd0246f57262 (patch) | |
tree | d072164d0811e52e5b90ada84828605b1694c9a2 /source4/lib/ldb/include | |
parent | c7073f8b545976719bfdba7b7bbd460d595041d5 (diff) | |
download | samba-a3b952288987e2b62693bdece8c6bd0246f57262.tar.gz samba-a3b952288987e2b62693bdece8c6bd0246f57262.tar.bz2 samba-a3b952288987e2b62693bdece8c6bd0246f57262.zip |
s4:ldb/ldif: add support for "modrdn"
This add a ldb_ldif_parse_modrdn() helper function to parse
the information out of a ldb_message structure.
Signed-off-by: Simo Sorce <idra@samba.org>
metze
Diffstat (limited to 'source4/lib/ldb/include')
-rw-r--r-- | source4/lib/ldb/include/ldb.h | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h index f5d5940ae3..d745f377b6 100644 --- a/source4/lib/ldb/include/ldb.h +++ b/source4/lib/ldb/include/ldb.h @@ -183,7 +183,8 @@ enum ldb_changetype { LDB_CHANGETYPE_NONE=0, LDB_CHANGETYPE_ADD, LDB_CHANGETYPE_DELETE, - LDB_CHANGETYPE_MODIFY + LDB_CHANGETYPE_MODIFY, + LDB_CHANGETYPE_MODRDN }; /** @@ -1621,6 +1622,31 @@ struct ldb_ldif *ldb_ldif_read_file(struct ldb_context *ldb, FILE *f); struct ldb_ldif *ldb_ldif_read_string(struct ldb_context *ldb, const char **s); /** + Parse a modrdn LDIF message from a struct ldb_message + + \param ldb the ldb context (from ldb_init()) + \param ldif the preparsed LDIF chunk (from ldb_ldif_read()) + + \param mem_ctx the memory context that's used for return values + + \param olddn the old dn as struct ldb_dn, if not needed pass NULL + \param newrdn the new rdn as struct ldb_dn, if not needed pass NULL + \param deleteoldrdn the deleteoldrdn value as bool, if not needed pass NULL + \param newsuperior the newsuperior dn as struct ldb_dn, if not needed pass NULL + *newsuperior can be NULL as it is optional in the LDIF + \param newdn the full constructed new dn as struct ldb_dn, if not needed pass NULL + +*/ +int ldb_ldif_parse_modrdn(struct ldb_context *ldb, + const struct ldb_ldif *ldif, + TALLOC_CTX *mem_ctx, + struct ldb_dn **olddn, + struct ldb_dn **newrdn, + bool *deleteoldrdn, + struct ldb_dn **newsuperior, + struct ldb_dn **newdn); + +/** Write an LDIF message to a file \param ldb the ldb context (from ldb_init()) |