#include "includes.h"
#include "winbindd.h"
+#include "../libcli/auth/libcli_auth.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
uid = state->request.data.auth.uid;
if (uid < 0) {
- DEBUG(1,("invalid uid: '%d'\n", uid));
+ DEBUG(1,("invalid uid: '%u'\n", (unsigned int)uid));
return -1;
}
return uid;
the server's domain at this point. The 'server name' is also
dodgy...
*/
- names_blob = NTLMv2_generate_names_blob(global_myname(), lp_workgroup());
+ names_blob = NTLMv2_generate_names_blob(state->mem_ctx, global_myname(), lp_workgroup());
- if (!SMBNTLMv2encrypt(name_user, name_domain,
+ if (!SMBNTLMv2encrypt(NULL, name_user, name_domain,
state->request.data.auth.pass,
&server_chal,
&names_blob,
- &lm_response, &nt_response, NULL)) {
+ &lm_response, &nt_response, NULL, NULL)) {
data_blob_free(&names_blob);
data_blob_free(&server_chal);
DEBUG(0, ("winbindd_pam_auth: SMBNTLMv2encrypt() failed!\n"));
if (state->request.data.auth_crap.lm_resp_len > sizeof(state->request.data.auth_crap.lm_resp)
|| state->request.data.auth_crap.nt_resp_len > sizeof(state->request.data.auth_crap.nt_resp)) {
- if (!state->request.flags & WBFLAG_BIG_NTLMV2_BLOB ||
+ if (!(state->request.flags & WBFLAG_BIG_NTLMV2_BLOB) ||
state->request.extra_len != state->request.data.auth_crap.nt_resp_len) {
DEBUG(0, ("winbindd_pam_auth_crap: invalid password length %u/%u\n",
state->request.data.auth_crap.lm_resp_len,