diff options
author | Simo Sorce <idra@samba.org> | 2010-02-18 14:44:09 -0500 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2010-02-23 12:46:50 -0500 |
commit | 3b12c38ac09ad253cf56099c243659a3a362ea67 (patch) | |
tree | 9a4058a85edaa3da2790630fcdf5009bbe2f6de9 /source3/rpc_server | |
parent | e5ab64a79902e710636352b01ccd0012d5df1c31 (diff) | |
download | samba-3b12c38ac09ad253cf56099c243659a3a362ea67.tar.gz samba-3b12c38ac09ad253cf56099c243659a3a362ea67.tar.bz2 samba-3b12c38ac09ad253cf56099c243659a3a362ea67.zip |
s3:schannel streamline interface
Make calling schannel much easier by removing the need to explicitly open the
database. Let the abstraction do it instead.
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_netlog_nt.c | 22 | ||||
-rw-r--r-- | source3/rpc_server/srv_pipe.c | 2 |
2 files changed, 9 insertions, 15 deletions
diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c index 769936ca20..15f19b5207 100644 --- a/source3/rpc_server/srv_netlog_nt.c +++ b/source3/rpc_server/srv_netlog_nt.c @@ -724,7 +724,7 @@ NTSTATUS _netr_ServerAuthenticate3(pipes_struct *p, /* Store off the state so we can continue after client disconnect. */ become_root(); - status = schannel_store_session_key(p->mem_ctx, creds); + status = schannel_save_creds_state(p->mem_ctx, creds); unbecome_root(); if (!NT_STATUS_IS_OK(status)) { @@ -806,7 +806,6 @@ static NTSTATUS netr_creds_server_step_check(pipes_struct *p, struct netlogon_creds_CredentialState **creds_out) { NTSTATUS status; - struct tdb_context *tdb; bool schannel_global_required = (lp_server_schannel() == true) ? true:false; if (schannel_global_required) { @@ -818,17 +817,11 @@ static NTSTATUS netr_creds_server_step_check(pipes_struct *p, } } - tdb = open_schannel_session_store(mem_ctx); - if (!tdb) { - return NT_STATUS_ACCESS_DENIED; - } - - status = schannel_creds_server_step_check_tdb(tdb, mem_ctx, - computer_name, - received_authenticator, - return_authenticator, - creds_out); - tdb_close(tdb); + status = schannel_check_creds_state(mem_ctx, + computer_name, + received_authenticator, + return_authenticator, + creds_out); return status; } @@ -1393,7 +1386,8 @@ NTSTATUS _netr_LogonSamLogonEx(pipes_struct *p, struct netlogon_creds_CredentialState *creds = NULL; become_root(); - status = schannel_fetch_session_key(p->mem_ctx, r->in.computer_name, &creds); + status = schannel_get_creds_state(p->mem_ctx, + r->in.computer_name, &creds); unbecome_root(); if (!NT_STATUS_IS_OK(status)) { return status; diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c index 23f947f95b..5cde423daf 100644 --- a/source3/rpc_server/srv_pipe.c +++ b/source3/rpc_server/srv_pipe.c @@ -1477,7 +1477,7 @@ static bool pipe_schannel_auth_bind(pipes_struct *p, prs_struct *rpc_in_p, */ become_root(); - status = schannel_fetch_session_key(p, + status = schannel_get_creds_state(p, neg.oem_netbios_computer.a, &creds); unbecome_root(); |