From 0a1b8f58a212ed2ed2814b2e8a4845790f5f23e4 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 1 Dec 2005 04:52:54 +0000 Subject: r11988: Setup the sessionInfo just before the connect, rather than earlier when we havn't finished popt. Andrew Bartlett (This used to be commit e5c5eb97a0ab841442b2c3fb5ea67f0d21b42932) --- source4/lib/ldb/tools/cmdline.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source4/lib/ldb/tools/cmdline.c') diff --git a/source4/lib/ldb/tools/cmdline.c b/source4/lib/ldb/tools/cmdline.c index ca9d3847e8..0be8951b9f 100644 --- a/source4/lib/ldb/tools/cmdline.c +++ b/source4/lib/ldb/tools/cmdline.c @@ -76,10 +76,6 @@ struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb, int argc, const goto failed; } - if (ldb_set_opaque(ldb, "sessionInfo", system_session(ldb))) { - goto failed; - } - #endif ret = talloc_zero(ldb, struct ldb_cmdline); @@ -169,6 +165,12 @@ struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb, int argc, const if (options.nosync) { flags |= LDB_FLG_NOSYNC; } + +#ifdef _SAMBA_BUILD_ + if (ldb_set_opaque(ldb, "sessionInfo", system_session(ldb))) { + goto failed; + } +#endif if (ldb_connect(ldb, ret->url, flags, ret->options) != 0) { fprintf(stderr, "Failed to connect to %s - %s\n", ret->url, ldb_errstring(ldb)); -- cgit