Fix a bunch of compiler warnings about wrong format types.
[ira/wip.git] / source3 / winbindd / winbindd_pam.c
index 15d1b7e2bf342c534fec63c420e20c8567eefae4..bbf3526fd04f847ed81ee2b3bf95b4843d4a164d 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "includes.h"
 #include "winbindd.h"
+#include "../libcli/auth/libcli_auth.h"
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_WINBIND
 
@@ -543,7 +544,7 @@ static uid_t get_uid_from_state(struct winbindd_cli_state *state)
        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;
@@ -1238,13 +1239,13 @@ NTSTATUS winbindd_dual_pam_auth_samlogon(struct winbindd_domain *domain,
                   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"));
@@ -1854,7 +1855,7 @@ enum winbindd_result winbindd_dual_pam_auth_crap(struct winbindd_domain *domain,
 
        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,