summaryrefslogtreecommitdiff
path: root/source4/auth/gensec
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-09-29 15:16:38 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:07:31 -0500
commit98038f71a7b072912c974d131012335ca22c5259 (patch)
treeff092ffa845b426f8df25ee82f846ef08f634c02 /source4/auth/gensec
parent59f43d2b58271c4beeab14104014dcd1ae059997 (diff)
downloadsamba-98038f71a7b072912c974d131012335ca22c5259.tar.gz
samba-98038f71a7b072912c974d131012335ca22c5259.tar.bz2
samba-98038f71a7b072912c974d131012335ca22c5259.zip
r25428: forward declarations of enums are not portable,
so pass struct cli_credentials *cred instead of enum credentials_use_kerberos use_kerberos. metze (This used to be commit b945aaa9dadc4c0595340d35725b49bac8e5778e)
Diffstat (limited to 'source4/auth/gensec')
-rw-r--r--source4/auth/gensec/gensec.c11
-rw-r--r--source4/auth/gensec/gensec.h3
2 files changed, 8 insertions, 6 deletions
diff --git a/source4/auth/gensec/gensec.c b/source4/auth/gensec/gensec.c
index 052eed1363..114969966e 100644
--- a/source4/auth/gensec/gensec.c
+++ b/source4/auth/gensec/gensec.c
@@ -47,10 +47,15 @@ struct gensec_security_ops **gensec_security_all(void)
struct gensec_security_ops **gensec_use_kerberos_mechs(TALLOC_CTX *mem_ctx,
struct gensec_security_ops **old_gensec_list,
- enum credentials_use_kerberos use_kerberos)
+ struct cli_credentials *creds)
{
struct gensec_security_ops **new_gensec_list;
int i, j, num_mechs_in;
+ enum credentials_use_kerberos use_kerberos = CRED_AUTO_USE_KERBEROS;
+
+ if (creds) {
+ use_kerberos = cli_credentials_get_kerberos_state(creds);
+ }
if (use_kerberos == CRED_AUTO_USE_KERBEROS) {
if (!talloc_reference(mem_ctx, old_gensec_list)) {
@@ -112,7 +117,6 @@ struct gensec_security_ops **gensec_security_mechs(struct gensec_security *gense
}
return backends;
} else {
- enum credentials_use_kerberos use_kerberos;
struct cli_credentials *creds = gensec_get_credentials(gensec_security);
if (!creds) {
if (!talloc_reference(mem_ctx, backends)) {
@@ -120,8 +124,7 @@ struct gensec_security_ops **gensec_security_mechs(struct gensec_security *gense
}
return backends;
}
- use_kerberos = cli_credentials_get_kerberos_state(creds);
- return gensec_use_kerberos_mechs(mem_ctx, backends, use_kerberos);
+ return gensec_use_kerberos_mechs(mem_ctx, backends, creds);
}
}
diff --git a/source4/auth/gensec/gensec.h b/source4/auth/gensec/gensec.h
index 48a2903513..bda740cc86 100644
--- a/source4/auth/gensec/gensec.h
+++ b/source4/auth/gensec/gensec.h
@@ -39,8 +39,6 @@ enum gensec_priority {
GENSEC_OTHER = 0
};
-enum credentials_use_kerberos;
-
struct gensec_security;
struct gensec_target {
const char *principal;
@@ -63,6 +61,7 @@ enum gensec_role
};
struct auth_session_info;
+struct cli_credentials;
struct gensec_update_request {
struct gensec_security *gensec_security;