diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-12-05 03:20:40 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:47:02 -0500 |
commit | 61bd60957418b872688dc22ec41f7a7ec4f267b2 (patch) | |
tree | 33fdeea53b9aafa01b91a56ca24451e674767e49 /source4/auth/gensec/spnego.c | |
parent | 42f2bfbd9b13f0abec00d046f5e0b60fcaf343ef (diff) | |
download | samba-61bd60957418b872688dc22ec41f7a7ec4f267b2.tar.gz samba-61bd60957418b872688dc22ec41f7a7ec4f267b2.tar.bz2 samba-61bd60957418b872688dc22ec41f7a7ec4f267b2.zip |
r12060: Work towards allowing the credentials system to allow/deny certain
GENSEC mechansims. This will allow a machine join to an NT4 domain to
avoid even trying kerberos, or a sensitive operation to require it.
Andrew Bartlett
(This used to be commit 11c7a89e523f85afd728d5e5f03bb084dc620244)
Diffstat (limited to 'source4/auth/gensec/spnego.c')
-rw-r--r-- | source4/auth/gensec/spnego.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/source4/auth/gensec/spnego.c b/source4/auth/gensec/spnego.c index b7fba789b1..6e4ee4b558 100644 --- a/source4/auth/gensec/spnego.c +++ b/source4/auth/gensec/spnego.c @@ -247,9 +247,9 @@ static NTSTATUS gensec_spnego_server_try_fallback(struct gensec_security *gensec const DATA_BLOB in, DATA_BLOB *out) { int i,j; - int num_ops; - const struct gensec_security_ops **all_ops = gensec_security_all(&num_ops); - for (i=0; i < num_ops; i++) { + const struct gensec_security_ops **all_ops + = cli_credentials_gensec_list(gensec_get_credentials(gensec_security)); + for (i=0; all_ops[i]; i++) { BOOL is_spnego; NTSTATUS nt_status; if (!all_ops[i]->oid) { @@ -315,7 +315,8 @@ static NTSTATUS gensec_spnego_parse_negTokenInit(struct gensec_security *gensec_ DATA_BLOB null_data_blob = data_blob(NULL,0); const struct gensec_security_ops_wrapper *all_sec - = gensec_security_by_oid_list(out_mem_ctx, + = gensec_security_by_oid_list(gensec_security, + out_mem_ctx, mechType, GENSEC_OID_SPNEGO); for (i=0; all_sec && all_sec[i].op; i++) { @@ -413,9 +414,11 @@ static NTSTATUS gensec_spnego_create_negTokenInit(struct gensec_security *gensec const struct gensec_security_ops_wrapper *all_sec; const char *principal = NULL; - mechTypes = gensec_security_oids(out_mem_ctx, GENSEC_OID_SPNEGO); + mechTypes = gensec_security_oids(gensec_security, + out_mem_ctx, GENSEC_OID_SPNEGO); - all_sec = gensec_security_by_oid_list(out_mem_ctx, + all_sec = gensec_security_by_oid_list(gensec_security, + out_mem_ctx, mechTypes, GENSEC_OID_SPNEGO); for (i=0; all_sec && all_sec[i].op; i++) { |