https://bugzilla.novell.com/show_bug.cgi?id=680169
https://bugzilla.novell.com/show_bug.cgi?id=680169#c2
--- Comment #2 from David Disseldorp 2011-03-18 18:18:33 UTC ---
The following change avoids the smbclient segfault by ensuring strings are
marshalled as unicode:
diff --git a/source3/libsmb/ntlmssp.c b/source3/libsmb/ntlmssp.c
index 7a006a3..764f007 100644
--- a/source3/libsmb/ntlmssp.c
+++ b/source3/libsmb/ntlmssp.c
@@ -377,10 +377,14 @@ static NTSTATUS ntlmssp_client_initial(struct
ntlmssp_state *ntlmssp_state,
TALLOC_CTX *out_mem_ctx, /* Unused at this
time */
DATA_BLOB reply, DATA_BLOB *next_request)
{
+ const char *format;
+
if (ntlmssp_state->unicode) {
ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_UNICODE;
+ format = "CddUU";
} else {
ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_OEM;
+ format = "CddAA";
}
if (ntlmssp_state->use_ntlmv2) {
@@ -388,7 +392,7 @@ static NTSTATUS ntlmssp_client_initial(struct ntlmssp_state
*ntlmssp_state,
}
/* generate the ntlmssp negotiate packet */
- msrpc_gen(ntlmssp_state, next_request, "CddAA",
+ msrpc_gen(ntlmssp_state, next_request, format,
"NTLMSSP",
NTLMSSP_NEGOTIATE,
ntlmssp_state->neg_flags,
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.