From a0db5202670225c79dd41f711fde33311a565570 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sat, 27 Jan 2007 12:38:02 +0100 Subject: [PATCH] smb: remember the username and the password given in the uri. [ This is half of commit c7f6f769518916dd76ba1707506be602c61cb011 from the witekfl branch. The FSP half will come later. --KON ] --- src/protocol/smb/smb2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/protocol/smb/smb2.c b/src/protocol/smb/smb2.c index 20fc1e14..cc46444a 100644 --- a/src/protocol/smb/smb2.c +++ b/src/protocol/smb/smb2.c @@ -252,7 +252,7 @@ do_smb(struct connection *conn) unsigned char *url; int dir; - if ((uri->userlen && uri->passwordlen) || !auth || !auth->valid) { + if ((uri->userlen && uri->passwordlen) || !auth) { url = get_uri_string(uri, URI_BASE); } else { unsigned char *uri_string = get_uri_string(uri, URI_HOST | URI_PORT | URI_DATA); @@ -448,6 +448,7 @@ smb_protocol_handler(struct connection *conn) } conn->from = 0; conn->unrestartable = 1; + find_auth(conn->uri); /* remember useranme and password */ cpid = fork(); if (cpid == -1) {