From cc7c572b3d87d2bd16cd7ec939a2d8a81bf36ef9 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 23 Jun 2010 21:15:43 +1000 Subject: s4:secrets Ensure secrets.ldb uses the same hooks as the rest of Samba This ensures that, for example, the utf8 functions are the same, the GUID handler is the same and the NOSYNC flag is applied. Andrew Bartlett --- source4/lib/ldb-samba/ldb_wrap.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'source4/lib/ldb-samba/ldb_wrap.c') diff --git a/source4/lib/ldb-samba/ldb_wrap.c b/source4/lib/ldb-samba/ldb_wrap.c index d7503829b1..80256c9a94 100644 --- a/source4/lib/ldb-samba/ldb_wrap.c +++ b/source4/lib/ldb-samba/ldb_wrap.c @@ -168,14 +168,18 @@ static int ldb_wrap_destructor(struct ldb_wrap *w) "%s/ldb", lp_modulesdir(lp_ctx))); - if (ldb_set_opaque(ldb, "sessionInfo", session_info)) { - talloc_free(ldb); - return NULL; + if (session_info) { + if (ldb_set_opaque(ldb, "sessionInfo", session_info)) { + talloc_free(ldb); + return NULL; + } } - if (ldb_set_opaque(ldb, "credentials", credentials)) { - talloc_free(ldb); - return NULL; + if (credentials) { + if (ldb_set_opaque(ldb, "credentials", credentials)) { + talloc_free(ldb); + return NULL; + } } if (ldb_set_opaque(ldb, "loadparm", lp_ctx)) { -- cgit