summaryrefslogtreecommitdiff
path: root/source3/smbd/connection.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2002-08-17 15:27:10 +0000
committerJelmer Vernooij <jelmer@samba.org>2002-08-17 15:27:10 +0000
commit127e77e6e334fdc33086bffcbe00d340c0ba0097 (patch)
treee89eafc0372f7ef4e88903b202c79ecf74161c3e /source3/smbd/connection.c
parent287d49bb5da3a0eece5501910aef30328f63e30a (diff)
downloadsamba-127e77e6e334fdc33086bffcbe00d340c0ba0097.tar.gz
samba-127e77e6e334fdc33086bffcbe00d340c0ba0097.tar.bz2
samba-127e77e6e334fdc33086bffcbe00d340c0ba0097.zip
Sync 3.0 branch with head
(This used to be commit 42615b945e2e48e53a21ea47f2e45407913a6a1e)
Diffstat (limited to 'source3/smbd/connection.c')
-rw-r--r--source3/smbd/connection.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/smbd/connection.c b/source3/smbd/connection.c
index c9815dbf8c..5609c2963d 100644
--- a/source3/smbd/connection.c
+++ b/source3/smbd/connection.c
@@ -20,7 +20,6 @@
#include "includes.h"
-extern fstring remote_machine;
static TDB_CONTEXT *tdb;
/****************************************************************************
@@ -29,6 +28,11 @@ static TDB_CONTEXT *tdb;
TDB_CONTEXT *conn_tdb_ctx(void)
{
+ if (!tdb) {
+ tdb = tdb_open_log(lock_path("connections.tdb"), 0, TDB_CLEAR_IF_FIRST|TDB_DEFAULT,
+ O_RDWR | O_CREAT, 0644);
+ }
+
return tdb;
}
@@ -173,7 +177,7 @@ BOOL claim_connection(connection_struct *conn,char *name,int max_connections,BOO
}
crec.start = time(NULL);
- StrnCpy(crec.machine,remote_machine,sizeof(crec.machine)-1);
+ StrnCpy(crec.machine,get_remote_machine_name(),sizeof(crec.machine)-1);
StrnCpy(crec.addr,conn?conn->client_address:client_addr(),sizeof(crec.addr)-1);
dbuf.dptr = (char *)&crec;