r2521: fixed two uninitialised data errors found with valgrind when
authorAndrew Tridgell <tridge@samba.org>
Wed, 22 Sep 2004 12:45:33 +0000 (12:45 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:59:01 +0000 (12:59 -0500)
negotiating a old style session setup (eg. LANMAN1)
(This used to be commit 04f68f481c49102411b168593adaddf5e97b7d4d)

source4/smb_server/negprot.c
source4/smb_server/sesssetup.c

index fa5553b5ceca6dcbbac55ee3be3ac6476aef2576..e7fdc303a2c20c642742f27fa270051d45f7e771 100644 (file)
@@ -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) {
index 47b8082f3b4c6ee2aa84678a7e4351182f3cf81e..88777d9673c1fa5b5c37d8dd0efe212f5702fa79 100644 (file)
@@ -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;
        }