From: Günther Deschner Date: Mon, 31 Aug 2009 15:13:05 +0000 (+0200) Subject: s3-netlogon: implement _netr_LogonSamLogonWithFlags(). X-Git-Tag: tevent-0.9.8~43 X-Git-Url: http://git.samba.org/samba.git/?p=ira%2Fwip.git;a=commitdiff_plain;h=931771138a52a3385afb2d3966509a57def3ece5;hp=9f031352c6e9439922284fc853611964b33ea4af s3-netlogon: implement _netr_LogonSamLogonWithFlags(). Guenther --- diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c index 9a3c8c23bcc..3daf45bbdda 100644 --- a/source3/rpc_server/srv_netlog_nt.c +++ b/source3/rpc_server/srv_netlog_nt.c @@ -807,6 +807,10 @@ static NTSTATUS _netr_LogonSamLogon_base(pipes_struct *p, process_creds = true; fn = "_netr_LogonSamLogon"; break; + case NDR_NETR_LOGONSAMLOGONWITHFLAGS: + process_creds = true; + fn = "_netr_LogonSamLogonWithFlags"; + break; case NDR_NETR_LOGONSAMLOGONEX: process_creds = false; fn = "_netr_LogonSamLogonEx"; @@ -993,18 +997,17 @@ static NTSTATUS _netr_LogonSamLogon_base(pipes_struct *p, return status; } -/************************************************************************* - _netr_LogonSamLogon - *************************************************************************/ +/**************************************************************** + _netr_LogonSamLogonWithFlags +****************************************************************/ -NTSTATUS _netr_LogonSamLogon(pipes_struct *p, - struct netr_LogonSamLogon *r) +NTSTATUS _netr_LogonSamLogonWithFlags(pipes_struct *p, + struct netr_LogonSamLogonWithFlags *r) { NTSTATUS status; struct netlogon_creds_CredentialState *creds; struct netr_LogonSamLogonEx r2; struct netr_Authenticator return_authenticator; - uint32_t flags = 0; become_root(); status = netr_creds_server_step_check(p, p->mem_ctx, @@ -1022,10 +1025,10 @@ NTSTATUS _netr_LogonSamLogon(pipes_struct *p, r2.in.logon_level = r->in.logon_level; r2.in.logon = r->in.logon; r2.in.validation_level = r->in.validation_level; - r2.in.flags = &flags; + r2.in.flags = r->in.flags; r2.out.validation = r->out.validation; r2.out.authoritative = r->out.authoritative; - r2.out.flags = &flags; + r2.out.flags = r->out.flags; status = _netr_LogonSamLogon_base(p, &r2, creds); @@ -1034,6 +1037,35 @@ NTSTATUS _netr_LogonSamLogon(pipes_struct *p, return status; } +/************************************************************************* + _netr_LogonSamLogon + *************************************************************************/ + +NTSTATUS _netr_LogonSamLogon(pipes_struct *p, + struct netr_LogonSamLogon *r) +{ + NTSTATUS status; + struct netr_LogonSamLogonWithFlags r2; + uint32_t flags = 0; + + r2.in.server_name = r->in.server_name; + r2.in.computer_name = r->in.computer_name; + r2.in.credential = r->in.credential; + r2.in.logon_level = r->in.logon_level; + r2.in.logon = r->in.logon; + r2.in.validation_level = r->in.validation_level; + r2.in.return_authenticator = r->in.return_authenticator; + r2.in.flags = &flags; + r2.out.validation = r->out.validation; + r2.out.authoritative = r->out.authoritative; + r2.out.flags = &flags; + r2.out.return_authenticator = r->out.return_authenticator; + + status = _netr_LogonSamLogonWithFlags(p, &r2); + + return status; +} + /************************************************************************* _netr_LogonSamLogonEx - no credential chaining. Map into net sam logon. @@ -1417,16 +1449,6 @@ WERROR _netr_GetForestTrustInformation(pipes_struct *p, /**************************************************************** ****************************************************************/ -NTSTATUS _netr_LogonSamLogonWithFlags(pipes_struct *p, - struct netr_LogonSamLogonWithFlags *r) -{ - p->rng_fault_state = true; - return NT_STATUS_NOT_IMPLEMENTED; -} - -/**************************************************************** -****************************************************************/ - NTSTATUS _netr_ServerGetTrustInfo(pipes_struct *p, struct netr_ServerGetTrustInfo *r) {