summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-07-08 16:31:13 +0200
committerJeremy Allison <jra@samba.org>2013-07-09 14:20:08 -0700
commitc52e61f7ba215da28cbb7b8e328aea110ad79b11 (patch)
treeaeefd2417f565195695ceb5f08f2ff9f8f83659a /source3
parent53aa069b97070c73b782e2868b9b9686abe353cc (diff)
downloadsamba-c52e61f7ba215da28cbb7b8e328aea110ad79b11.tar.gz
samba-c52e61f7ba215da28cbb7b8e328aea110ad79b11.tar.bz2
samba-c52e61f7ba215da28cbb7b8e328aea110ad79b11.zip
s3-lib: hide incomplete smbXsrv_tcon_global records
Part of fix for bug #10003 Pair-programmed-with: Björn Baumbach <bb@sernet.de> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/conn_tdb.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/lib/conn_tdb.c b/source3/lib/conn_tdb.c
index bb7618f0d4..b218831d19 100644
--- a/source3/lib/conn_tdb.c
+++ b/source3/lib/conn_tdb.c
@@ -91,6 +91,19 @@ static int traverse_tcon_fn(struct smbXsrv_tcon_global0 *global,
TDB_DATA val = tdb_null;
+ /*
+ * Note: that share_name is defined as array without a pointer.
+ * that's why it's always a valid pointer here.
+ */
+ if (strlen(global->share_name) == 0) {
+ /*
+ * when a smbXsrv_tcon is created it's created
+ * with emtpy share_name first in order to allocate
+ * an id, before filling in the details.
+ */
+ return 0;
+ }
+
status = dbwrap_fetch(state->session_by_pid, state,
make_tdb_data((void*)&sess_id, sizeof(sess_id)),
&val);