diff options
author | Stefan Metzmacher <metze@samba.org> | 2013-08-05 11:20:21 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2013-08-10 09:19:04 +0200 |
commit | 966faef9c61d2ec02d75fc3ccc82a61524fb77e4 (patch) | |
tree | 7650f21b43653e0f49291332e93a1269bbcd99d6 /source3/utils | |
parent | c81b6f7448d7f945635784de645bea4f7f2e230f (diff) | |
download | samba-966faef9c61d2ec02d75fc3ccc82a61524fb77e4.tar.gz samba-966faef9c61d2ec02d75fc3ccc82a61524fb77e4.tar.bz2 samba-966faef9c61d2ec02d75fc3ccc82a61524fb77e4.zip |
auth/gensec: treat struct gensec_security_ops as const if possible.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/ntlm_auth.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c index 9e0d7b812b..751f49cdc2 100644 --- a/source3/utils/ntlm_auth.c +++ b/source3/utils/ntlm_auth.c @@ -1035,7 +1035,7 @@ static NTSTATUS ntlm_auth_start_ntlmssp_server(TALLOC_CTX *mem_ctx, NTSTATUS nt_status; TALLOC_CTX *tmp_ctx; - + const struct gensec_security_ops **backends; struct gensec_settings *gensec_settings; size_t idx = 0; struct cli_credentials *server_credentials; @@ -1079,26 +1079,26 @@ static NTSTATUS ntlm_auth_start_ntlmssp_server(TALLOC_CTX *mem_ctx, gensec_settings->server_dns_name = strlower_talloc(gensec_settings, get_mydnsfullname()); - gensec_settings->backends = talloc_zero_array(gensec_settings, - struct gensec_security_ops *, 4); + backends = talloc_zero_array(gensec_settings, + const struct gensec_security_ops *, 4); - if (gensec_settings->backends == NULL) { + if (backends == NULL) { TALLOC_FREE(tmp_ctx); return NT_STATUS_NO_MEMORY; } - + gensec_settings->backends = backends; + gensec_init(); /* These need to be in priority order, krb5 before NTLMSSP */ #if defined(HAVE_KRB5) - gensec_settings->backends[idx++] = &gensec_gse_krb5_security_ops; + backends[idx++] = &gensec_gse_krb5_security_ops; #endif - - gensec_settings->backends[idx++] = gensec_security_by_oid(NULL, GENSEC_OID_NTLMSSP); - gensec_settings->backends[idx++] = gensec_security_by_oid(NULL, - GENSEC_OID_SPNEGO); - + backends[idx++] = gensec_security_by_oid(NULL, GENSEC_OID_NTLMSSP); + + backends[idx++] = gensec_security_by_oid(NULL, GENSEC_OID_SPNEGO); + /* * This is anonymous for now, because we just use it * to set the kerberos state at the moment |