diff options
author | Kai Blin <kai@samba.org> | 2007-12-12 11:08:32 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:49:46 +0100 |
commit | 5db23bce227b909b9577501f733e733023a2daa8 (patch) | |
tree | 20bb28c7e3672b56fd04daae02ad19941db8c4f8 /source4 | |
parent | 69e61fc15354e96db4e851ef3e5067670522f859 (diff) | |
download | samba-5db23bce227b909b9577501f733e733023a2daa8.tar.gz samba-5db23bce227b909b9577501f733e733023a2daa8.tar.bz2 samba-5db23bce227b909b9577501f733e733023a2daa8.zip |
r26416: Janitorial: Fix warnings in auth/gensec/
As per metze's suggestion, the "unused variables" warning is left in to remind
us to fix the #else part of the #if 1
(This used to be commit e9ef98b06466486d3b8a68a76a29728b9bffbe29)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/auth/gensec/cyrus_sasl.c | 20 | ||||
-rw-r--r-- | source4/auth/gensec/gensec_gssapi.c | 6 |
2 files changed, 15 insertions, 11 deletions
diff --git a/source4/auth/gensec/cyrus_sasl.c b/source4/auth/gensec/cyrus_sasl.c index 0bce35e1c5..64a0b2f0c7 100644 --- a/source4/auth/gensec/cyrus_sasl.c +++ b/source4/auth/gensec/cyrus_sasl.c @@ -101,7 +101,7 @@ static int gensec_sasl_get_password(sasl_conn_t *conn, void *context, int id, return SASL_NOMEM; } secret->len = strlen(password); - safe_strcpy(secret->data, password, secret->len+1); + safe_strcpy((char*)secret->data, password, secret->len+1); *psecret = secret; return SASL_OK; } @@ -213,8 +213,9 @@ static NTSTATUS gensec_sasl_update(struct gensec_security *gensec_security, sasl_ret = sasl_client_start(gensec_sasl_state->conn, gensec_security->ops->sasl_name, NULL, &out_data, &out_len, &mech); } else { - sasl_ret = sasl_client_step(gensec_sasl_state->conn, - in.data, in.length, NULL, &out_data, &out_len); + sasl_ret = sasl_client_step(gensec_sasl_state->conn, + (char*)in.data, in.length, NULL, + &out_data, &out_len); } if (sasl_ret == SASL_OK || sasl_ret == SASL_CONTINUE) { *out = data_blob_talloc(out_mem_ctx, out_data, out_len); @@ -237,8 +238,9 @@ static NTSTATUS gensec_sasl_unwrap_packets(struct gensec_security *gensec_securi const char *out_data; unsigned int out_len; - int sasl_ret = sasl_decode(gensec_sasl_state->conn, - in->data, in->length, &out_data, &out_len); + int sasl_ret = sasl_decode(gensec_sasl_state->conn, + (char*)in->data, in->length, &out_data, + &out_len); if (sasl_ret == SASL_OK) { *out = data_blob_talloc(out_mem_ctx, out_data, out_len); *len_processed = in->length; @@ -260,8 +262,9 @@ static NTSTATUS gensec_sasl_wrap_packets(struct gensec_security *gensec_security const char *out_data; unsigned int out_len; - int sasl_ret = sasl_encode(gensec_sasl_state->conn, - in->data, in->length, &out_data, &out_len); + int sasl_ret = sasl_encode(gensec_sasl_state->conn, + (char*)in->data, in->length, &out_data, + &out_len); if (sasl_ret == SASL_OK) { *out = data_blob_talloc(out_mem_ctx, out_data, out_len); *len_processed = in->length; @@ -278,7 +281,8 @@ static bool gensec_sasl_have_feature(struct gensec_security *gensec_security, struct gensec_sasl_state *gensec_sasl_state = talloc_get_type(gensec_security->private_data, struct gensec_sasl_state); sasl_ssf_t ssf; - int sasl_ret = sasl_getprop(gensec_sasl_state->conn, SASL_SSF, &ssf); + int sasl_ret = sasl_getprop(gensec_sasl_state->conn, SASL_SSF, + (const void**)&ssf); if (sasl_ret != SASL_OK) { return false; } diff --git a/source4/auth/gensec/gensec_gssapi.c b/source4/auth/gensec/gensec_gssapi.c index a0b42db141..bb71a55073 100644 --- a/source4/auth/gensec/gensec_gssapi.c +++ b/source4/auth/gensec/gensec_gssapi.c @@ -54,7 +54,7 @@ struct gensec_gssapi_state { gss_name_t server_name; gss_name_t client_name; OM_uint32 want_flags, got_flags; - const gss_OID_desc *gss_oid; + gss_OID gss_oid; DATA_BLOB session_key; DATA_BLOB pac; @@ -82,7 +82,7 @@ static size_t gensec_gssapi_max_wrapped_size(struct gensec_security *gensec_secu static char *gssapi_error_string(TALLOC_CTX *mem_ctx, OM_uint32 maj_stat, OM_uint32 min_stat, - const gss_OID_desc *mech) + const gss_OID mech) { OM_uint32 disp_min_stat, disp_maj_stat; gss_buffer_desc maj_error_message; @@ -448,7 +448,7 @@ static NTSTATUS gensec_gssapi_update(struct gensec_security *gensec_security, gensec_gssapi_state->client_cred->creds, &gensec_gssapi_state->gssapi_context, gensec_gssapi_state->server_name, - discard_const_p(gss_OID_desc, gensec_gssapi_state->gss_oid), + gensec_gssapi_state->gss_oid, gensec_gssapi_state->want_flags, 0, gensec_gssapi_state->input_chan_bindings, |