diff options
author | Andrew Bartlett <abartlet@samba.org> | 2003-02-02 05:22:37 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2003-02-02 05:22:37 +0000 |
commit | 3719bfd1a0d15c7c17d86bc049634063434ba8ca (patch) | |
tree | 0552ebbb36d6062e89a745c35c58ef3831e5cf80 /source3/rpc_server | |
parent | 39e0b72728ce5f027e38677f080dcc161de6e6fc (diff) | |
download | samba-3719bfd1a0d15c7c17d86bc049634063434ba8ca.tar.gz samba-3719bfd1a0d15c7c17d86bc049634063434ba8ca.tar.bz2 samba-3719bfd1a0d15c7c17d86bc049634063434ba8ca.zip |
Merge from HEAD: Send the session key to the client, allowing it to perform SMB
signing.
Andrew Bartlett
(This used to be commit 9bcdb869e53ee8048dd69053b804bdaf55db7b91)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_netlog_nt.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c index c3d48a6527..8070cdd984 100644 --- a/source3/rpc_server/srv_netlog_nt.c +++ b/source3/rpc_server/srv_netlog_nt.c @@ -666,6 +666,8 @@ NTSTATUS _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON * pstring my_name; fstring user_sid_string; fstring group_sid_string; + uchar user_sess_key[16]; + uchar netlogon_sess_key[16]; sampw = server_info->sam_account; @@ -697,6 +699,12 @@ NTSTATUS _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON * return status; } + ZERO_STRUCT(netlogon_sess_key); + memcpy(netlogon_sess_key, p->dc.sess_key, 8); + memcpy(user_sess_key, server_info->session_key, sizeof(user_sess_key)); + SamOEMhash(user_sess_key, netlogon_sess_key, 16); + ZERO_STRUCT(netlogon_sess_key); + init_net_user_info3(p->mem_ctx, usr_info, user_rid, group_rid, @@ -719,13 +727,14 @@ NTSTATUS _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON * num_gids, /* uint32 num_groups */ gids , /* DOM_GID *gids */ 0x20 , /* uint32 user_flgs (?) */ - NULL, /* uchar sess_key[16] */ + user_sess_key, my_name , /* char *logon_srv */ pdb_get_domain(sampw), &domain_sid, /* DOM_SID *dom_sid */ /* Should be users domain sid, not servers - for trusted domains */ NULL); /* char *other_sids */ + ZERO_STRUCT(user_sess_key); } free_server_info(&server_info); return status; |