summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-12-16 08:33:32 +0100
committerAndrew Bartlett <abartlet@samba.org>2008-12-17 12:29:25 +1100
commitf7c53e0addb13dd085ed102b8afaec2122e078ea (patch)
tree564abdc72b615b22e674b335a30ee0f6633de811 /source4
parent30ae74d39957b56f7ad893275fc7704b5b923332 (diff)
downloadsamba-f7c53e0addb13dd085ed102b8afaec2122e078ea.tar.gz
samba-f7c53e0addb13dd085ed102b8afaec2122e078ea.tar.bz2
samba-f7c53e0addb13dd085ed102b8afaec2122e078ea.zip
s4:ldb: use try to print the extended dn in the ldif output
This allows searches with the extended DN control to still print the extended DN in ldif output (it would otherwise be parsed and hidden in the structure). Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/ldb/common/ldb_ldif.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/lib/ldb/common/ldb_ldif.c b/source4/lib/ldb/common/ldb_ldif.c
index 69490e670b..619c10e11e 100644
--- a/source4/lib/ldb/common/ldb_ldif.c
+++ b/source4/lib/ldb/common/ldb_ldif.c
@@ -278,13 +278,15 @@ int ldb_ldif_write(struct ldb_context *ldb,
TALLOC_CTX *mem_ctx;
unsigned int i, j;
int total=0, ret;
+ char *p;
const struct ldb_message *msg;
mem_ctx = talloc_named_const(NULL, 0, "ldb_ldif_write");
msg = ldif->msg;
-
- ret = fprintf_fn(private_data, "dn: %s\n", ldb_dn_get_linearized(msg->dn));
+ p = ldb_dn_get_extended_linearized(mem_ctx, msg->dn, 1);
+ ret = fprintf_fn(private_data, "dn: %s\n", p);
+ talloc_free(p);
CHECK_RET;
if (ldif->changetype != LDB_CHANGETYPE_NONE) {