summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-12-13 00:55:04 +0100
committerGünther Deschner <gd@samba.org>2008-12-17 23:23:56 +0100
commit076f15f54ef95e6b4d400a4bd241c767827bb1dd (patch)
tree2b39dc3ad9a87232c787213d61164521f4f6aed4 /source3/rpc_server
parent188695f07f4af190dbfab51054327bed80e3ec92 (diff)
downloadsamba-076f15f54ef95e6b4d400a4bd241c767827bb1dd.tar.gz
samba-076f15f54ef95e6b4d400a4bd241c767827bb1dd.tar.bz2
samba-076f15f54ef95e6b4d400a4bd241c767827bb1dd.zip
s3: refactor _netr_LogonControl{2,2Ex} server side.
Guenther
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_netlog_nt.c60
1 files changed, 32 insertions, 28 deletions
diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c
index 038690d0f1..16d370ce6d 100644
--- a/source3/rpc_server/srv_netlog_nt.c
+++ b/source3/rpc_server/srv_netlog_nt.c
@@ -90,28 +90,24 @@ static void init_netlogon_info3(struct netr_NETLOGON_INFO_3 *r,
WERROR _netr_LogonControl(pipes_struct *p,
struct netr_LogonControl *r)
{
- struct netr_NETLOGON_INFO_1 *info1;
- uint32_t flags = 0x0;
- uint32_t pdc_connection_status = W_ERROR_V(WERR_OK);
-
- /* Setup the Logon Control response */
+ struct netr_LogonControl2Ex l;
switch (r->in.level) {
- case 1:
- info1 = TALLOC_ZERO_P(p->mem_ctx, struct netr_NETLOGON_INFO_1);
- if (!info1) {
- return WERR_NOMEM;
- }
- init_netlogon_info1(info1,
- flags,
- pdc_connection_status);
- r->out.info->info1 = info1;
- break;
- default:
- return WERR_UNKNOWN_LEVEL;
+ case 1:
+ break;
+ case 2:
+ return WERR_NOT_SUPPORTED;
+ default:
+ return WERR_UNKNOWN_LEVEL;
}
- return WERR_OK;
+ l.in.logon_server = r->in.logon_server;
+ l.in.function_code = r->in.function_code;
+ l.in.level = r->in.level;
+ l.in.data = NULL;
+ l.out.query = r->out.info;
+
+ return _netr_LogonControl2Ex(p, &l);
}
/****************************************************************************
@@ -132,6 +128,24 @@ static void send_sync_message(void)
WERROR _netr_LogonControl2(pipes_struct *p,
struct netr_LogonControl2 *r)
{
+ struct netr_LogonControl2Ex l;
+
+ l.in.logon_server = r->in.logon_server;
+ l.in.function_code = r->in.function_code;
+ l.in.level = r->in.level;
+ l.in.data = r->in.data;
+ l.out.query = r->out.query;
+
+ return _netr_LogonControl2Ex(p, &l);
+}
+
+/****************************************************************
+ _netr_LogonControl2Ex
+****************************************************************/
+
+WERROR _netr_LogonControl2Ex(pipes_struct *p,
+ struct netr_LogonControl2Ex *r)
+{
uint32 flags = 0x0;
uint32 pdc_connection_status = 0x0;
uint32 logon_attempts = 0x0;
@@ -1142,16 +1156,6 @@ NTSTATUS _netr_DatabaseRedo(pipes_struct *p,
/****************************************************************
****************************************************************/
-WERROR _netr_LogonControl2Ex(pipes_struct *p,
- struct netr_LogonControl2Ex *r)
-{
- p->rng_fault_state = true;
- return WERR_NOT_SUPPORTED;
-}
-
-/****************************************************************
-****************************************************************/
-
WERROR _netr_DsRGetDCName(pipes_struct *p,
struct netr_DsRGetDCName *r)
{