diff options
author | Luke Leighton <lkcl@samba.org> | 1999-10-14 18:49:24 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-10-14 18:49:24 +0000 |
commit | 57f95a01988fb4035b2e4448f4fd3ef0d652c106 (patch) | |
tree | c6fa6301a894feb3ce2c5586aab66acdfab0ee42 /source/libsmb/smbencrypt.c | |
parent | e5b80bd2f76fda70e41e4a9007eb035dab92ed8e (diff) | |
download | samba-57f95a01988fb4035b2e4448f4fd3ef0d652c106.tar.gz samba-57f95a01988fb4035b2e4448f4fd3ef0d652c106.tar.xz samba-57f95a01988fb4035b2e4448f4fd3ef0d652c106.zip |
adding CAP_EXTENDED_SECURITY support in a hurry last week. forgot to
deal with linking issues in other binaries
Diffstat (limited to 'source/libsmb/smbencrypt.c')
-rw-r--r-- | source/libsmb/smbencrypt.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/source/libsmb/smbencrypt.c b/source/libsmb/smbencrypt.c index b833cbd3770..b4f2cb1601f 100644 --- a/source/libsmb/smbencrypt.c +++ b/source/libsmb/smbencrypt.c @@ -400,3 +400,32 @@ BOOL nt_decrypt_string2(STRING2 *out, const STRING2 *in, char nt_hash[16]) return True; } + +/******************************************************************* + creates a DCE/RPC bind authentication response + + - initialises the parse structure. + - dynamically allocates the header data structure + - caller is expected to free the header data structure once used. + + ********************************************************************/ +void create_ntlmssp_resp(struct pwd_info *pwd, + char *domain, char *user_name, char *my_name, + uint32 ntlmssp_cli_flgs, + prs_struct *auth_resp) +{ + RPC_AUTH_NTLMSSP_RESP ntlmssp_resp; + unsigned char lm_owf[24]; + unsigned char nt_owf[128]; + size_t nt_owf_len; + + pwd_get_lm_nt_owf(pwd, lm_owf, nt_owf, &nt_owf_len); + + make_rpc_auth_ntlmssp_resp(&ntlmssp_resp, + lm_owf, nt_owf, nt_owf_len, + domain, user_name, my_name, + ntlmssp_cli_flgs); + + smb_io_rpc_auth_ntlmssp_resp("ntlmssp_resp", &ntlmssp_resp, auth_resp, 0); + mem_realloc_data(auth_resp->data, auth_resp->offset); +} |