summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-10-07 22:10:29 +0000
committerLuke Leighton <lkcl@samba.org>1999-10-07 22:10:29 +0000
commitcba7662da1fd9ed8bd9f9969417adf1fe5f0d33b (patch)
treeeae7890b1c9c03c86e86dd86a2966fc5a585b99a /source3/rpc_parse
parenteb9268550f2330d4a9a3381f560bd7d70743e19a (diff)
downloadsamba-cba7662da1fd9ed8bd9f9969417adf1fe5f0d33b.tar.gz
samba-cba7662da1fd9ed8bd9f9969417adf1fe5f0d33b.tar.bz2
samba-cba7662da1fd9ed8bd9f9969417adf1fe5f0d33b.zip
- added rudimentary CAP_UNICODE support because i thought it was part of
a problem i was having. - added rudimentary CAP_STATUS32 support for same reason. - added hard-coded, copy-the-same-data-from-over-the-wire version of CAP_EXTENDED_SECURITY, which is a security-blob to encapsulate GSSAPI which encodes SPNEGO which is used to negotiate Kerberos or NTLMSSP. i have implemented NTLMSSP which negotiates NTLMv1 or NTLMv2 and 40-bit or 128-bit etc. i have implemented NTLMv1 / 40-bit. *whew*. (This used to be commit e5b80bd2f76fda70e41e4a9007eb035dab92ed8e)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_rpc.c30
1 files changed, 25 insertions, 5 deletions
diff --git a/source3/rpc_parse/parse_rpc.c b/source3/rpc_parse/parse_rpc.c
index 138dbd90b1..19cb4dfa4b 100644
--- a/source3/rpc_parse/parse_rpc.c
+++ b/source3/rpc_parse/parse_rpc.c
@@ -702,7 +702,7 @@ void make_rpc_auth_ntlmssp_resp(RPC_AUTH_NTLMSSP_RESP *rsp,
int dom_len = strlen(domain);
int wks_len = strlen(wks );
int usr_len = strlen(user );
- int lm_len = lm_resp != NULL ? 24 : 0;
+ int lm_len = nt_len != 0 ? (lm_resp != NULL ? 24 : 0) : 1;
DEBUG(5,("make_rpc_auth_ntlmssp_resp\n"));
@@ -710,9 +710,15 @@ void make_rpc_auth_ntlmssp_resp(RPC_AUTH_NTLMSSP_RESP *rsp,
#ifdef DEBUG_PASSWORD
DEBUG(100,("lm_resp\n"));
- dump_data(100, lm_resp, lm_len);
+ if (lm_resp != NULL)
+ {
+ dump_data(100, lm_resp, lm_len);
+ }
DEBUG(100,("nt_resp\n"));
- dump_data(100, nt_resp, nt_len);
+ if (nt_resp != NULL)
+ {
+ dump_data(100, nt_resp, nt_len);
+ }
#endif
DEBUG(6,("dom: %s user: %s wks: %s neg_flgs: 0x%x\n",
@@ -746,8 +752,22 @@ void make_rpc_auth_ntlmssp_resp(RPC_AUTH_NTLMSSP_RESP *rsp,
rsp->neg_flags = neg_flags;
- memcpy(rsp->lm_resp, lm_resp, lm_len);
- memcpy(rsp->nt_resp, nt_resp, nt_len);
+ if (lm_resp != NULL && lm_len != 1)
+ {
+ memcpy(rsp->lm_resp, lm_resp, lm_len);
+ }
+ else
+ {
+ rsp->lm_resp[0] = 0;
+ }
+ if (nt_resp != NULL)
+ {
+ memcpy(rsp->nt_resp, nt_resp, nt_len);
+ }
+ else
+ {
+ rsp->nt_resp[0] = 0;
+ }
if (IS_BITS_SET_ALL(neg_flags, NTLMSSP_NEGOTIATE_UNICODE))
{