From a384d2f1a1d54ba25e2a78006e260c99bd7362f4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 14 Jun 2004 09:31:47 +0000 Subject: r1139: added IDL and server code for netr_LogonSamLogonWithFlags() (This used to be commit 4eac7340d8d7a109bed8fe7bb7cf663d6e7f0a56) --- source4/librpc/idl/netlogon.idl | 15 +++++++- source4/rpc_server/netlogon/dcerpc_netlogon.c | 49 ++++++++++++++++++--------- 2 files changed, 47 insertions(+), 17 deletions(-) (limited to 'source4') diff --git a/source4/librpc/idl/netlogon.idl b/source4/librpc/idl/netlogon.idl index f9516f112e..9e695aafc6 100644 --- a/source4/librpc/idl/netlogon.idl +++ b/source4/librpc/idl/netlogon.idl @@ -1068,7 +1068,20 @@ interface netlogon /****************/ /* Function 0x2d */ - WERROR netr_NETRLOGONSAMLOGONWITHFLAGS(); + + /* this is the ADS varient. I don't yet know what the "flags" are for */ + NTSTATUS netr_LogonSamLogonWithFlags( + [in] unistr *server_name, + [in] unistr *workstation, + [in] netr_Authenticator *credential, + [in][out] netr_Authenticator *return_authenticator, + [in] uint16 logon_level, + [in] [switch_is(logon_level)] netr_LogonLevel logon, + [in] uint16 validation_level, + [out] [switch_is(validation_level)] netr_Validation validation, + [out] uint32 authoritative, + [in,out] uint32 flags + ); /****************/ /* Function 0x2e */ diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c index 8d7b97802f..dc0b8582fe 100644 --- a/source4/rpc_server/netlogon/dcerpc_netlogon.c +++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c @@ -481,14 +481,11 @@ static WERROR netr_LogonUasLogoff(struct dcesrv_call_state *dce_call, TALLOC_CTX /* - netr_LogonSamLogon - - + netr_LogonSamLogonWithFlags */ - -static NTSTATUS netr_LogonSamLogon(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, - struct netr_LogonSamLogon *r) +static NTSTATUS netr_LogonSamLogonWithFlags(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, + struct netr_LogonSamLogonWithFlags *r) { struct server_pipe_state *pipe_state = dce_call->conn->private; @@ -712,6 +709,36 @@ static NTSTATUS netr_LogonSamLogon(struct dcesrv_call_state *dce_call, TALLOC_CT return NT_STATUS_OK; } +/* + netr_LogonSamLogon +*/ +static NTSTATUS netr_LogonSamLogon(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, + struct netr_LogonSamLogon *r) +{ + struct netr_LogonSamLogonWithFlags r2; + NTSTATUS status; + + ZERO_STRUCT(r2); + + r2.in.server_name = r->in.server_name; + r2.in.workstation = r->in.workstation; + r2.in.credential = r->in.credential; + r2.in.return_authenticator = r->in.return_authenticator; + 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 = 0; + + status = netr_LogonSamLogonWithFlags(dce_call, mem_ctx, &r2); + + r->out.return_authenticator = r2.out.return_authenticator; + r->out.validation = r2.out.validation; + r->out.authoritative = r2.out.authoritative; + + return status; +} + + /* netr_LogonSamLogoff */ @@ -1233,16 +1260,6 @@ static WERROR netr_NETRGETFORESTTRUSTINFORMATION(struct dcesrv_call_state *dce_c } -/* - netr_NETRLOGONSAMLOGONWITHFLAGS -*/ -static WERROR netr_NETRLOGONSAMLOGONWITHFLAGS(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, - struct netr_NETRLOGONSAMLOGONWITHFLAGS *r) -{ - DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR); -} - - /* netr_NETRSERVERGETTRUSTINFO */ -- cgit