*/
#include "includes.h"
-#include "../utils/ntlm_auth.h"
+#include "utils/ntlm_auth.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
DATA_BLOB nt_response = data_blob(NULL, 0);
DATA_BLOB lm_response = data_blob(NULL, 0);
char *password;
+ smb_ucs2_t *nt_response_ucs2;
uchar user_session_key[16];
uchar lm_key[16];
flags |= WBFLAG_PAM_LMKEY;
flags |= WBFLAG_PAM_USER_SESSION_KEY;
- if ((push_ucs2_allocate((smb_ucs2_t **)&nt_response.data, opt_password)) == -1) {
+ if ((push_ucs2_allocate(&nt_response_ucs2, opt_password)) == -1) {
DEBUG(0, ("push_ucs2_allocate failed!\n"));
exit(1);
}
- nt_response.length = strlen_w(((void *)nt_response.data))*sizeof(smb_ucs2_t);
+ nt_response.data = (unsigned char *)nt_response_ucs2;
+ nt_response.length = strlen_w(nt_response_ucs2)*sizeof(smb_ucs2_t);
- password = strdup_upper(opt_password);
+ if ((password = strdup_upper(opt_password)) == NULL) {
+ DEBUG(0, ("strdup_upper failed!\n"));
+ exit(1);
+ }
if ((convert_string_allocate(NULL, CH_UNIX,
CH_DOS, password,
strlen(password)+1,
- (void**)&lm_response.data,True)) == -1) {
- DEBUG(0, ("push_ascii_allocate failed!\n"));
+ &lm_response.data,True)) == -1) {
+ DEBUG(0, ("convert_string_allocate failed!\n"));
exit(1);
}
SAFE_FREE(password);
- lm_response.length = strlen(lm_response.data);
+ lm_response.length = strlen((const char *)lm_response.data);
switch (break_which) {
case BREAK_NONE:
{test_plaintext_lm_broken, "Plaintext LM broken"},
{test_plaintext_nt_broken, "Plaintext NT broken"},
{test_plaintext_nt_only, "Plaintext NT only"},
- {test_plaintext_lm_only, "Plaintext LM only"}
+ {test_plaintext_lm_only, "Plaintext LM only"},
+ {NULL, NULL}
};
BOOL diagnose_ntlm_auth(void)