summaryrefslogtreecommitdiffstats
path: root/source/smbd/session.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2005-11-25 12:31:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:05:34 -0500
commit5629ca16235f0aa21fea3afd9e414309e4e1374e (patch)
treeb56c85c89153fa7917c0ad43be2070fdcda71b5e /source/smbd/session.c
parentefb7576d4e970e3cbb4621ebd754d329eec58b5a (diff)
downloadsamba-5629ca16235f0aa21fea3afd9e414309e4e1374e.tar.gz
samba-5629ca16235f0aa21fea3afd9e414309e4e1374e.tar.xz
samba-5629ca16235f0aa21fea3afd9e414309e4e1374e.zip
r11909: Implement 'reset on zero vc'. This kills other connections when a session
setup comes in with the vc (virtual connection) field set to zero. This is done by Windows, probably you can tweak that by some registry key. This boolean option controls whether an incoming session setup should kill other connections coming from the same IP. This matches the default Windows 2003 behaviour. Setting this parameter to yes becomes necessary when you have a flaky network and windows decides to reconnect while the old connection still has files with share modes open. These files become inaccessible over the new connection. The client sends a zero VC on the new connection, and Windows 2003 kills all other connections coming from the same IP. This way the locked files are accessible again. Please be aware that enabling this option will kill connections behind a masquerading router. Volker
Diffstat (limited to 'source/smbd/session.c')
-rw-r--r--source/smbd/session.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/smbd/session.c b/source/smbd/session.c
index 9a9a0d90b24..27f760a088e 100644
--- a/source/smbd/session.c
+++ b/source/smbd/session.c
@@ -198,7 +198,8 @@ void session_yield(user_struct *vuser)
tdb_delete(tdb, key);
}
-static BOOL session_traverse(int (*fn)(TDB_CONTEXT *, TDB_DATA, TDB_DATA, void *), void *state)
+BOOL session_traverse(int (*fn)(TDB_CONTEXT *, TDB_DATA, TDB_DATA, void *),
+ void *state)
{
if (!session_init()) {
DEBUG(3, ("No tdb opened\n"));