summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-05-27 21:55:10 +0000
committerJeremy Allison <jra@samba.org>2003-05-27 21:55:10 +0000
commita11797cda2c1b81771edfdbd467ab36af121b6eb (patch)
treeac318314106d114e97c2953f9ec648027e2efbad /source3
parent4dc5419f8b66c29ea5f9f3c85118716d9fb7e114 (diff)
downloadsamba-a11797cda2c1b81771edfdbd467ab36af121b6eb.tar.gz
samba-a11797cda2c1b81771edfdbd467ab36af121b6eb.tar.bz2
samba-a11797cda2c1b81771edfdbd467ab36af121b6eb.zip
Correct (?) handling for VC = 0. Trying to fix XP logoff leaving resources
around. Jeremy. (This used to be commit bf0916e1da442606311c74ac73ccec2e9710d663)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/sesssetup.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 64984d4809..15d816bd6d 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -493,6 +493,16 @@ static int reply_sesssetup_and_X_spnego(connection_struct *conn, char *inbuf,
return ERROR_NT(NT_STATUS_LOGON_FAILURE);
}
+/****************************************************************************
+ On new VC == 0, shutdown *all* old connections and users.
+****************************************************************************/
+
+static void setup_new_vc_session(void)
+{
+ DEBUG(2,("setup_new_vc_session: New VC == 0, closing all old resources.\n"));
+ conn_close_all();
+ invalidate_all_vuids();
+}
/****************************************************************************
reply to a session setup command
@@ -541,6 +551,9 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,
return ERROR_NT(NT_STATUS_UNSUCCESSFUL);
}
+ if (SVAL(inbuf,smb_vwv4) == 0) {
+ setup_new_vc_session();
+ }
return reply_sesssetup_and_X_spnego(conn, inbuf, outbuf, length, bufsize);
}
@@ -562,7 +575,7 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,
srvstr_pull_buf(inbuf, user, smb_buf(inbuf)+passlen1, sizeof(user), STR_TERMINATE);
*domain = 0;
-
+
} else {
uint16 passlen1 = SVAL(inbuf,smb_vwv7);
uint16 passlen2 = SVAL(inbuf,smb_vwv8);
@@ -641,6 +654,10 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,
}
+ if (SVAL(inbuf,smb_vwv4) == 0) {
+ setup_new_vc_session();
+ }
+
DEBUG(3,("sesssetupX:name=[%s]\\[%s]@[%s]\n", domain, user, get_remote_machine_name()));
if (*user) {