lm_session_key is only 8 bytes. Don't confuse developers (ie. me :-)
authorJeremy Allison <jra@samba.org>
Thu, 15 May 2008 02:05:26 +0000 (19:05 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 15 May 2008 02:05:26 +0000 (19:05 -0700)
by passing around 16 bytes, 8 of which end up unused.
Jeremy.

source/rpc_parse/parse_net.c
source/rpc_server/srv_netlog_nt.c

index 5837ee6fd8406fc43dbf53315fe68a1887f7cc1b..693de2d584d259e833740ffe506ccd7d3324199e 100644 (file)
@@ -1430,7 +1430,7 @@ void init_net_user_info3(TALLOC_CTX *ctx, NET_USER_INFO_3 *usr,
                         uint32 num_groups, const DOM_GID *gids,
                         uint32 user_flgs, uint32 acct_flags,
                         uchar user_session_key[16],
-                        uchar lm_session_key[16],
+                        uchar lm_session_key[8],
                         const char *logon_srv, const char *logon_dom,
                         const DOM_SID *dom_sid)
 {
index b8c776964e9070d3201f208623c88b429332f225..605fae71279443a7003b66d185b8bdb8d34a69c2 100644 (file)
@@ -973,7 +973,7 @@ static NTSTATUS _net_sam_logon_internal(pipes_struct *p,
                fstring user_sid_string;
                fstring group_sid_string;
                unsigned char user_session_key[16];
-               unsigned char lm_session_key[16];
+               unsigned char lm_session_key[8];
                unsigned char pipe_session_key[16];
 
                sampw = server_info->sam_account;
@@ -1054,7 +1054,7 @@ static NTSTATUS _net_sam_logon_internal(pipes_struct *p,
                                }
                                memcpy(pipe_session_key, p->auth.a_u.schannel_auth->sess_key, 16);
                        }
-                       SamOEMhash(lm_session_key, pipe_session_key, 16);
+                       SamOEMhash(lm_session_key, pipe_session_key, 8);
                        memset(pipe_session_key, '\0', 16);
                }