summaryrefslogtreecommitdiff
path: root/source3/libads
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-08-05 11:20:21 +0200
committerStefan Metzmacher <metze@samba.org>2013-08-10 09:19:04 +0200
commit966faef9c61d2ec02d75fc3ccc82a61524fb77e4 (patch)
tree7650f21b43653e0f49291332e93a1269bbcd99d6 /source3/libads
parentc81b6f7448d7f945635784de645bea4f7f2e230f (diff)
downloadsamba-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/libads')
-rw-r--r--source3/libads/authdata.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source3/libads/authdata.c b/source3/libads/authdata.c
index 582917da01..801e551edb 100644
--- a/source3/libads/authdata.c
+++ b/source3/libads/authdata.c
@@ -111,7 +111,7 @@ NTSTATUS kerberos_return_pac(TALLOC_CTX *mem_ctx,
const char *cc = "MEMORY:kerberos_return_pac";
struct auth_session_info *session_info;
struct gensec_security *gensec_server_context;
-
+ const struct gensec_security_ops **backends;
struct gensec_settings *gensec_settings;
size_t idx = 0;
struct auth4_context *auth_context;
@@ -230,16 +230,17 @@ NTSTATUS kerberos_return_pac(TALLOC_CTX *mem_ctx,
goto out;
}
- gensec_settings->backends = talloc_zero_array(gensec_settings,
- struct gensec_security_ops *, 2);
- if (gensec_settings->backends == NULL) {
+ backends = talloc_zero_array(gensec_settings,
+ const struct gensec_security_ops *, 2);
+ if (backends == NULL) {
status = NT_STATUS_NO_MEMORY;
goto out;
}
+ gensec_settings->backends = backends;
gensec_init();
- gensec_settings->backends[idx++] = &gensec_gse_krb5_security_ops;
+ backends[idx++] = &gensec_gse_krb5_security_ops;
status = gensec_server_start(tmp_ctx, gensec_settings,
auth_context, &gensec_server_context);