summaryrefslogtreecommitdiff
path: root/source3/param
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
commit1bfb5b734b0d5e1bc093bb43513729ed458fe372 (patch)
treee6315c8309c3ee1330813a9a1530050df1825b9a /source3/param
parented6936598ef73f1fc46801fd5dc7765d65032fa1 (diff)
downloadsamba-1bfb5b734b0d5e1bc093bb43513729ed458fe372.tar.gz
samba-1bfb5b734b0d5e1bc093bb43513729ed458fe372.tar.bz2
samba-1bfb5b734b0d5e1bc093bb43513729ed458fe372.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 (This used to be commit 5629ca16235f0aa21fea3afd9e414309e4e1374e)
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index f45d8cf952..86a5353dca 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -301,6 +301,7 @@ typedef struct
int name_cache_timeout;
int client_signing;
int server_signing;
+ BOOL bResetOnZeroVC;
param_opt_struct *param_opt;
}
global;
@@ -951,6 +952,7 @@ static struct parm_struct parm_table[] = {
{"read raw", P_BOOL, P_GLOBAL, &Globals.bReadRaw, NULL, NULL, FLAG_ADVANCED},
{"write raw", P_BOOL, P_GLOBAL, &Globals.bWriteRaw, NULL, NULL, FLAG_ADVANCED},
{"disable netbios", P_BOOL, P_GLOBAL, &Globals.bDisableNetbios, NULL, NULL, FLAG_ADVANCED},
+ {"reset on zero vc", P_BOOL, P_GLOBAL, &Globals.bResetOnZeroVC, NULL, NULL, FLAG_ADVANCED},
{"acl compatibility", P_STRING, P_GLOBAL, &Globals.szAclCompat, handle_acl_compatibility, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL},
{"defer sharing violations", P_BOOL, P_GLOBAL, &Globals.bDeferSharingViolations, NULL, NULL, FLAG_ADVANCED | FLAG_GLOBAL},
@@ -1522,6 +1524,7 @@ static void init_globals(void)
Globals.bUseMmap = True;
#endif
Globals.bUnixExtensions = True;
+ Globals.bResetOnZeroVC = False;
/* hostname lookups can be very expensive and are broken on
a large number of sites (tridge) */
@@ -1809,6 +1812,7 @@ FN_GLOBAL_STRING(lp_delete_share_cmd, &Globals.szDeleteShareCommand)
FN_GLOBAL_LIST(lp_eventlog_list, &Globals.szEventLogs)
FN_GLOBAL_BOOL(lp_disable_netbios, &Globals.bDisableNetbios)
+FN_GLOBAL_BOOL(lp_reset_on_zero_vc, &Globals.bResetOnZeroVC)
FN_GLOBAL_BOOL(lp_ms_add_printer_wizard, &Globals.bMsAddPrinterWizard)
FN_GLOBAL_BOOL(lp_dns_proxy, &Globals.bDNSproxy)
FN_GLOBAL_BOOL(lp_wins_support, &Globals.bWINSsupport)