From 1e09ab3774892a868f14f944127c8d5980487011 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 22 Sep 2004 12:45:33 +0000 Subject: r2521: fixed two uninitialised data errors found with valgrind when negotiating a old style session setup (eg. LANMAN1) (This used to be commit 04f68f481c49102411b168593adaddf5e97b7d4d) --- source4/smb_server/negprot.c | 1 + source4/smb_server/sesssetup.c | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'source4') diff --git a/source4/smb_server/negprot.c b/source4/smb_server/negprot.c index fa5553b5ce..e7fdc303a2 100644 --- a/source4/smb_server/negprot.c +++ b/source4/smb_server/negprot.c @@ -131,6 +131,7 @@ static void reply_lanman1(struct smbsrv_request *req, uint16_t choice) SIVAL(req->out.vwv, VWV(6), req->smb_conn->pid); srv_push_dos_date(req->smb_conn, req->out.vwv, VWV(8), t); SSVAL(req->out.vwv, VWV(10), req->smb_conn->negotiate.zone_offset/60); + SIVAL(req->out.vwv, VWV(11), 0); /* reserved */ /* Create a token value and add it to the outgoing packet. */ if (req->smb_conn->negotiate.encrypted_passwords) { diff --git a/source4/smb_server/sesssetup.c b/source4/smb_server/sesssetup.c index 47b8082f3b..88777d9673 100644 --- a/source4/smb_server/sesssetup.c +++ b/source4/smb_server/sesssetup.c @@ -44,18 +44,15 @@ static NTSTATUS sesssetup_old(struct smbsrv_request *req, union smb_sesssetup *s struct auth_usersupplied_info *user_info = NULL; struct auth_serversupplied_info *server_info = NULL; struct auth_session_info *session_info; - DATA_BLOB null_blob; if (!req->smb_conn->negotiate.done_sesssetup) { req->smb_conn->negotiate.max_send = sess->old.in.bufsize; } - null_blob.length = 0; - status = make_user_info_for_reply_enc(&user_info, sess->old.in.user, sess->old.in.domain, sess->old.in.password, - null_blob); + data_blob(NULL, 0)); if (!NT_STATUS_IS_OK(status)) { return NT_STATUS_ACCESS_DENIED; } -- cgit