summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-02-13 22:55:44 +0100
committerGünther Deschner <gd@samba.org>2008-02-13 23:01:34 +0100
commit3722208ddff6386ff93d8445337442569710ff23 (patch)
tree740e6ccb6ee7d88eb121cea5d618ea0e69ca575e /source3
parent6f05330e4a831058d02506d04f89b8cc10fa238b (diff)
downloadsamba-3722208ddff6386ff93d8445337442569710ff23.tar.gz
samba-3722208ddff6386ff93d8445337442569710ff23.tar.bz2
samba-3722208ddff6386ff93d8445337442569710ff23.zip
Add some netr_NETLOGON_INFO init functions.
Guenther (This used to be commit f0c66688588a4e62c4a250b0d21a0fe14bbc5099)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_netlog_nt.c46
1 files changed, 43 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c
index acf694b128..2c52ba87af 100644
--- a/source3/rpc_server/srv_netlog_nt.c
+++ b/source3/rpc_server/srv_netlog_nt.c
@@ -42,6 +42,46 @@ static void init_net_r_req_chal(struct netr_Credential *r,
memcpy(r->data, srv_chal->data, sizeof(r->data));
}
+/*******************************************************************
+ Inits a netr_NETLOGON_INFO_1 structure.
+********************************************************************/
+
+static void init_netlogon_info1(struct netr_NETLOGON_INFO_1 *r,
+ uint32_t flags,
+ uint32_t pdc_connection_status)
+{
+ r->flags = flags;
+ r->pdc_connection_status = pdc_connection_status;
+}
+
+/*******************************************************************
+ Inits a netr_NETLOGON_INFO_2 structure.
+********************************************************************/
+
+static void init_netlogon_info2(struct netr_NETLOGON_INFO_2 *r,
+ uint32_t flags,
+ uint32_t pdc_connection_status,
+ const char *trusted_dc_name,
+ uint32_t tc_connection_status)
+{
+ r->flags = flags;
+ r->pdc_connection_status = pdc_connection_status;
+ r->trusted_dc_name = trusted_dc_name;
+ r->tc_connection_status = tc_connection_status;
+}
+
+/*******************************************************************
+ Inits a netr_NETLOGON_INFO_3 structure.
+********************************************************************/
+
+static void init_netlogon_info3(struct netr_NETLOGON_INFO_3 *r,
+ uint32_t flags,
+ uint32_t logon_attempts)
+{
+ r->flags = flags;
+ r->logon_attempts = logon_attempts;
+}
+
/*************************************************************************
_netr_LogonControl
*************************************************************************/
@@ -61,9 +101,9 @@ WERROR _netr_LogonControl(pipes_struct *p,
if (!info1) {
return WERR_NOMEM;
}
- info1->flags = flags;
- info1->pdc_connection_status = pdc_connection_status;
-
+ init_netlogon_info1(info1,
+ flags,
+ pdc_connection_status);
r->out.info->info1 = info1;
break;
default: