sync 3.0 into HEAD for the last time
[vlendec/samba-autobuild/.git] / source3 / libads / sasl.c
index 910ff3f4dc6682e1fcdcc619b43ec4796a859e5f..51228035974b1036bb1c8486c6edf4ebff5ea1a5 100644 (file)
@@ -60,7 +60,7 @@ static ADS_STATUS ads_sasl_spnego_ntlmssp_bind(ADS_STRUCT *ads)
        msg1 = gen_negTokenTarg(mechs, blob);
        data_blob_free(&blob);
 
-       cred.bv_val = msg1.data;
+       cred.bv_val = (char *)msg1.data;
        cred.bv_len = msg1.length;
 
        rc = ldap_sasl_bind_s(ads->ld, NULL, "GSS-SPNEGO", &cred, NULL, NULL, &scred);
@@ -106,7 +106,7 @@ static ADS_STATUS ads_sasl_spnego_ntlmssp_bind(ADS_STRUCT *ads)
        data_blob_free(&blob);
 
        /* now send the auth packet and we should be done */
-       cred.bv_val = auth.data;
+       cred.bv_val = (char *)auth.data;
        cred.bv_len = auth.length;
 
        rc = ldap_sasl_bind_s(ads->ld, NULL, "GSS-SPNEGO", &cred, NULL, NULL, &scred);
@@ -134,7 +134,7 @@ static ADS_STATUS ads_sasl_spnego_krb5_bind(ADS_STRUCT *ads, const char *princip
        }
 
        /* now send the auth packet and we should be done */
-       cred.bv_val = blob.data;
+       cred.bv_val = (char *)blob.data;
        cred.bv_len = blob.length;
 
        rc = ldap_sasl_bind_s(ads->ld, NULL, "GSS-SPNEGO", &cred, NULL, NULL, &scred);
@@ -227,13 +227,13 @@ failed:
 */
 static ADS_STATUS ads_sasl_gssapi_bind(ADS_STRUCT *ads)
 {
-       int minor_status;
+       uint32 minor_status;
        gss_name_t serv_name;
        gss_buffer_desc input_name;
        gss_ctx_id_t context_handle;
        gss_OID mech_type = GSS_C_NULL_OID;
        gss_buffer_desc output_token, input_token;
-       OM_uint32 ret_flags, conf_state;
+       uint32 ret_flags, conf_state;
        struct berval cred;
        struct berval *scred;
        int i=0;
@@ -328,7 +328,7 @@ static ADS_STATUS ads_sasl_gssapi_bind(ADS_STRUCT *ads)
        gss_release_name(&minor_status, &serv_name);
 
        gss_rc = gss_unwrap(&minor_status,context_handle,&input_token,&output_token,
-                           &conf_state,NULL);
+                           (int *)&conf_state,NULL);
        if (gss_rc) {
                status = ADS_ERROR_GSS(gss_rc, minor_status);
                goto failed;
@@ -353,13 +353,13 @@ static ADS_STATUS ads_sasl_gssapi_bind(ADS_STRUCT *ads)
        *p++ = max_msg_size>>16;
        *p++ = max_msg_size>>8;
        *p++ = max_msg_size;
-       snprintf(p, strlen(ads->config.bind_path)+4, "dn:%s", ads->config.bind_path);
-       p += strlen(p);
+       snprintf((char *)p, strlen(ads->config.bind_path)+4, "dn:%s", ads->config.bind_path);
+       p += strlen((const char *)p);
 
        output_token.length = PTR_DIFF(p, output_token.value);
 
        gss_rc = gss_wrap(&minor_status, context_handle,0,GSS_C_QOP_DEFAULT,
-                         &output_token, &conf_state,
+                         &output_token, (int *)&conf_state,
                          &input_token);
        if (gss_rc) {
                status = ADS_ERROR_GSS(gss_rc, minor_status);