diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2002-08-17 15:27:10 +0000 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2002-08-17 15:27:10 +0000 |
commit | 42615b945e2e48e53a21ea47f2e45407913a6a1e (patch) | |
tree | 9e84a17cc57368de704b7fc225bc093b6ff36840 /source/smbd/connection.c | |
parent | d3599b446ed1c8ccd7c9e161ecfa5d52d6066c22 (diff) | |
download | samba-42615b945e2e48e53a21ea47f2e45407913a6a1e.tar.gz samba-42615b945e2e48e53a21ea47f2e45407913a6a1e.tar.xz samba-42615b945e2e48e53a21ea47f2e45407913a6a1e.zip |
Sync 3.0 branch with head
Diffstat (limited to 'source/smbd/connection.c')
-rw-r--r-- | source/smbd/connection.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/smbd/connection.c b/source/smbd/connection.c index c9815dbf8c0..5609c2963d8 100644 --- a/source/smbd/connection.c +++ b/source/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; |