From e34d646f1a26ca656f60197005e02dc98239e5ec Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sat, 27 Jan 2007 12:38:02 +0100 Subject: [PATCH] fsp: remember the username and the password given in the uri. [ This is half of commit c7f6f769518916dd76ba1707506be602c61cb011 from the witekfl branch. The SMB half is in commit a0db5202670225c79dd41f711fde33311a565570. --KON ] --- src/protocol/fsp/fsp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/protocol/fsp/fsp.c b/src/protocol/fsp/fsp.c index 6ac998991..6329ca323 100644 --- a/src/protocol/fsp/fsp.c +++ b/src/protocol/fsp/fsp.c @@ -193,7 +193,7 @@ do_fsp(struct connection *conn) FSP_SESSION *ses; struct stat sb; struct uri *uri = conn->uri; - struct auth_entry *auth = find_auth(uri); + struct auth_entry *auth; unsigned char *host = get_uri_string(uri, URI_HOST); unsigned char *data = get_uri_string(uri, URI_DATA); unsigned short port = (unsigned short)get_uri_port(uri); @@ -203,7 +203,8 @@ do_fsp(struct connection *conn) if (uri->passwordlen) { password = get_uri_string(uri, URI_PASSWORD); } else { - if (auth && auth->valid) password = auth->password; + auth = find_auth(uri); + if (auth) password = auth->password; } ses = fsp_open_session(host, port, password); @@ -378,6 +379,7 @@ fsp_protocol_handler(struct connection *conn) } conn->from = 0; conn->unrestartable = 1; + find_auth(conn->uri); /* remember username and password */ cpid = fork(); if (cpid == -1) {