diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/conn_tdb.c | 13 |
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); |