Remove iconv_convenience parameter from simple string push/pull
[amitay/samba.git] / source4 / auth / ntlmssp / ntlmssp_client.c
index e07c64befbcd026b19b68c37d2205451b35d128a..0ef40200fe5eb3f5c1fc7edb1798e2f4bffa59b4 100644 (file)
@@ -24,7 +24,7 @@
 #include "includes.h"
 #include "auth/ntlmssp/ntlmssp.h"
 #include "auth/ntlmssp/msrpc_parse.h"
-#include "lib/crypto/crypto.h"
+#include "../lib/crypto/crypto.h"
 #include "libcli/auth/libcli_auth.h"
 #include "auth/credentials/credentials.h"
 #include "auth/gensec/gensec.h"
@@ -49,6 +49,17 @@ NTSTATUS ntlmssp_client_initial(struct gensec_security *gensec_security,
                                DATA_BLOB in, DATA_BLOB *out) 
 {
        struct gensec_ntlmssp_state *gensec_ntlmssp_state = (struct gensec_ntlmssp_state *)gensec_security->private_data;
+       const char *domain = gensec_ntlmssp_state->domain;
+       const char *workstation = cli_credentials_get_workstation(gensec_security->credentials);
+
+       /* These don't really matter in the initial packet, so don't panic if they are not set */
+       if (!domain) {
+               domain = "";
+       }
+
+       if (!workstation) {
+               workstation = "";
+       }
 
        if (gensec_ntlmssp_state->unicode) {
                gensec_ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_UNICODE;
@@ -62,13 +73,12 @@ NTSTATUS ntlmssp_client_initial(struct gensec_security *gensec_security,
 
        /* generate the ntlmssp negotiate packet */
        msrpc_gen(out_mem_ctx, 
-                 lp_iconv_convenience(gensec_security->lp_ctx),
                  out, "CddAA",
                  "NTLMSSP",
                  NTLMSSP_NEGOTIATE,
                  gensec_ntlmssp_state->neg_flags,
-                 gensec_ntlmssp_state->domain, 
-                 cli_credentials_get_workstation(gensec_security->credentials));
+                 domain, 
+                 workstation);
 
        gensec_ntlmssp_state->expected_state = NTLMSSP_CHALLENGE;
 
@@ -247,7 +257,6 @@ NTSTATUS ntlmssp_client_challenge(struct gensec_security *gensec_security,
 
        /* this generates the actual auth packet */
        if (!msrpc_gen(mem_ctx, 
-                      lp_iconv_convenience(gensec_security->lp_ctx),
                       out, auth_gen_string, 
                       "NTLMSSP", 
                       NTLMSSP_AUTH,