summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tools/cmdline.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-12-01 04:52:54 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:46:55 -0500
commit0a1b8f58a212ed2ed2814b2e8a4845790f5f23e4 (patch)
treebca2071f458fa3cc24de14bbea7392f4cd09253a /source4/lib/ldb/tools/cmdline.c
parent36b21c951debf43b95ae9166a5eb63ed610db2b1 (diff)
downloadsamba-0a1b8f58a212ed2ed2814b2e8a4845790f5f23e4.tar.gz
samba-0a1b8f58a212ed2ed2814b2e8a4845790f5f23e4.tar.bz2
samba-0a1b8f58a212ed2ed2814b2e8a4845790f5f23e4.zip
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)
Diffstat (limited to 'source4/lib/ldb/tools/cmdline.c')
-rw-r--r--source4/lib/ldb/tools/cmdline.c10
1 files changed, 6 insertions, 4 deletions
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));