diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-02-13 14:02:49 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-02-13 14:02:49 +1100 |
commit | cd6026135d3dc7eaa773c60aa168bae8f3f15502 (patch) | |
tree | 9843b78f5fbb32605b6a6f7527783b13995187f8 /source4/auth/sam.c | |
parent | 71632a16977a93968b0d520a491a52f635e611a1 (diff) | |
download | samba-cd6026135d3dc7eaa773c60aa168bae8f3f15502.tar.gz samba-cd6026135d3dc7eaa773c60aa168bae8f3f15502.tar.bz2 samba-cd6026135d3dc7eaa773c60aa168bae8f3f15502.zip |
Push sam_get_server_info_principal into the auth subsystem
This means it must be accessed via the supplied auth_context in the
GENSEC server, and should remove the hard depenceny of GENSEC on the
auth subsystem and ldb (allowing LDB not to rely on LDB is considered
a good thing, apparently)
Andrew Bartlett
Diffstat (limited to 'source4/auth/sam.c')
-rw-r--r-- | source4/auth/sam.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/source4/auth/sam.c b/source4/auth/sam.c index 0017db260c..819bca0db0 100644 --- a/source4/auth/sam.c +++ b/source4/auth/sam.c @@ -428,48 +428,3 @@ NTSTATUS sam_get_results_principal(struct ldb_context *sam_ctx, return NT_STATUS_OK; } - -/* Used in the gensec_gssapi and gensec_krb5 server-side code, where the PAC isn't available */ -NTSTATUS sam_get_server_info_principal(TALLOC_CTX *mem_ctx, - struct tevent_context *event_ctx, - struct loadparm_context *lp_ctx, - const char *principal, - struct auth_serversupplied_info **server_info) -{ - NTSTATUS nt_status; - DATA_BLOB user_sess_key = data_blob(NULL, 0); - DATA_BLOB lm_sess_key = data_blob(NULL, 0); - - struct ldb_message **msgs; - struct ldb_message **msgs_domain_ref; - struct ldb_context *sam_ctx; - - TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx); - if (!tmp_ctx) { - return NT_STATUS_NO_MEMORY; - } - - sam_ctx = samdb_connect(tmp_ctx, event_ctx, lp_ctx, - system_session(tmp_ctx, lp_ctx)); - if (sam_ctx == NULL) { - talloc_free(tmp_ctx); - return NT_STATUS_INVALID_SYSTEM_SERVICE; - } - - nt_status = sam_get_results_principal(sam_ctx, tmp_ctx, principal, - &msgs, &msgs_domain_ref); - if (!NT_STATUS_IS_OK(nt_status)) { - return nt_status; - } - - nt_status = authsam_make_server_info(tmp_ctx, sam_ctx, - lp_netbios_name(lp_ctx), - msgs[0], msgs_domain_ref[0], - user_sess_key, lm_sess_key, - server_info); - if (NT_STATUS_IS_OK(nt_status)) { - talloc_steal(mem_ctx, *server_info); - } - talloc_free(tmp_ctx); - return nt_status; -} |