summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-05-24 08:21:53 +0000
committerTim Potter <tpot@samba.org>2001-05-24 08:21:53 +0000
commit3dfb0d3bd9d34d29e1e4a0afa02f04bff631ab25 (patch)
tree8be56a33a3b869a0aa247c2a3fe01f8bef0c7636
parent43bc613e74f06d4e6169c359149db72c9f925039 (diff)
downloadsamba-3dfb0d3bd9d34d29e1e4a0afa02f04bff631ab25.tar.gz
samba-3dfb0d3bd9d34d29e1e4a0afa02f04bff631ab25.tar.bz2
samba-3dfb0d3bd9d34d29e1e4a0afa02f04bff631ab25.zip
Added structures for LOGON_CTRL rpc.
Make proto. (This used to be commit 0650f87000dcf5572f3a8d61ab93760d94eee770)
-rw-r--r--source3/include/proto.h43
-rw-r--r--source3/include/rpc_netlogon.h76
2 files changed, 95 insertions, 24 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 8035931330..d6bc3c768c 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -789,6 +789,15 @@ uint32 cli_lsa_enum_trust_dom(struct cli_state *cli, TALLOC_CTX *mem_ctx,
uint32 *num_domains, char ***domain_names,
DOM_SID **domain_sids);
+/* The following definitions come from libsmb/cli_netlogon.c */
+
+struct cli_state *cli_netlogon_initialise(struct cli_state *cli,
+ char *system_name,
+ struct ntuser_creds *creds);
+void cli_netlogon_shutdown(struct cli_state *cli);
+uint32 cli_netlogon_logon_ctrl2(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ uint32 query_level);
+
/* The following definitions come from libsmb/cli_samr.c */
struct cli_state *cli_samr_initialise(struct cli_state *cli, char *system_name,
@@ -936,6 +945,15 @@ uint32 cli_spoolss_deleteprinterdriver (
char *driver
);
+/* The following definitions come from libsmb/cli_srvsvc.c */
+
+struct cli_state *cli_svrsvc_initialise(struct cli_state *cli,
+ char *system_name,
+ struct ntuser_creds *creds);
+void cli_srvsvc_shutdown(struct cli_state *cli);
+uint32 cli_srvsvc_net_srv_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx,
+ uint32 switch_value, SRV_INFO_CTR *ctr);
+
/* The following definitions come from libsmb/cliconnect.c */
BOOL cli_session_setup(struct cli_state *cli,
@@ -2575,10 +2593,21 @@ BOOL prs_uint64(char *name, prs_struct *ps, int depth, UINT64_S *data64);
/* The following definitions come from rpc_parse/parse_net.c */
BOOL net_io_q_logon_ctrl2(char *desc, NET_Q_LOGON_CTRL2 *q_l, prs_struct *ps, int depth);
-void init_r_logon_ctrl2(NET_R_LOGON_CTRL2 *r_l, uint32 query_level,
- uint32 flags, uint32 pdc_status, uint32 logon_attempts,
- uint32 tc_status, char *trusted_domain_name);
+void init_net_q_logon_ctrl2(NET_Q_LOGON_CTRL2 *q_l, char *srv_name,
+ uint32 query_level);
+void init_net_r_logon_ctrl2(NET_R_LOGON_CTRL2 *r_l, uint32 query_level,
+ uint32 flags, uint32 pdc_status,
+ uint32 logon_attempts, uint32 tc_status,
+ char *trusted_domain_name);
BOOL net_io_r_logon_ctrl2(char *desc, NET_R_LOGON_CTRL2 *r_l, prs_struct *ps, int depth);
+BOOL net_io_q_logon_ctrl(char *desc, NET_Q_LOGON_CTRL *q_l, prs_struct *ps,
+ int depth);
+void init_net_q_logon_ctrl(NET_Q_LOGON_CTRL *q_l, char *srv_name,
+ uint32 query_level);
+void init_net_r_logon_ctrl(NET_R_LOGON_CTRL *r_l, uint32 query_level,
+ uint32 flags, uint32 pdc_status);
+BOOL net_io_r_logon_ctrl(char *desc, NET_R_LOGON_CTRL *r_l, prs_struct *ps,
+ int depth);
void init_r_trust_dom(NET_R_TRUST_DOM_LIST *r_t,
uint32 num_doms, char *dom_name);
BOOL net_io_r_trust_dom(char *desc, NET_R_TRUST_DOM_LIST *r_t, prs_struct *ps, int depth);
@@ -3684,6 +3713,8 @@ BOOL api_netlog_rpc(pipes_struct *p);
/* The following definitions come from rpc_server/srv_netlog_nt.c */
+uint32 _net_logon_ctrl(pipes_struct *p, NET_Q_LOGON_CTRL *q_u,
+ NET_R_LOGON_CTRL *r_u);
uint32 _net_logon_ctrl2(pipes_struct *p, NET_Q_LOGON_CTRL2 *q_u, NET_R_LOGON_CTRL2 *r_u);
uint32 _net_trust_dom_list(pipes_struct *p, NET_Q_TRUST_DOM_LIST *q_u, NET_R_TRUST_DOM_LIST *r_u);
uint32 _net_req_chal(pipes_struct *p, NET_Q_REQ_CHAL *q_u, NET_R_REQ_CHAL *r_u);
@@ -3880,6 +3911,9 @@ uint32 _wks_query_info(pipes_struct *p, WKS_Q_QUERY_INFO *q_u, WKS_R_QUERY_INFO
/* The following definitions come from rpcclient/cmd_lsarpc.c */
+/* The following definitions come from rpcclient/cmd_netlogon.c */
+
+
/* The following definitions come from rpcclient/cmd_samr.c */
void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1);
@@ -3889,6 +3923,9 @@ void display_sam_info_1(SAM_ENTRY1 *e1, SAM_STR1 *s1);
BOOL get_short_archi(char *short_archi, char *long_archi);
void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch);
+/* The following definitions come from rpcclient/cmd_srvsvc.c */
+
+
/* The following definitions come from rpcclient/rpcclient.c */
void fetch_domain_sid(struct cli_state *cli);
diff --git a/source3/include/rpc_netlogon.h b/source3/include/rpc_netlogon.h
index a0e286d535..f15cec3ca9 100644
--- a/source3/include/rpc_netlogon.h
+++ b/source3/include/rpc_netlogon.h
@@ -31,6 +31,8 @@
#define NET_REQCHAL 0x04
#define NET_AUTH 0x05
#define NET_SRVPWSET 0x06
+#define NET_SAM_DELTAS 0x07
+#define NET_LOGON_CTRL 0x0c
#define NET_AUTH2 0x0f
#define NET_LOGON_CTRL2 0x0e
#define NET_SAM_SYNC 0x10
@@ -162,25 +164,6 @@ typedef struct net_user_info_3
} NET_USER_INFO_3;
-/********************************************************
- Logon Control Query
-
- query_level 0x1 - pdc status
- query_level 0x3 - number of logon attempts.
-
- ********************************************************/
-/* NET_Q_LOGON_CTRL2 - LSA Netr Logon Control 2*/
-typedef struct net_q_logon_ctrl2_info
-{
- uint32 ptr; /* undocumented buffer pointer */
- UNISTR2 uni_server_name; /* server name, starting with two '\'s */
-
- uint32 function_code; /* 0x1 */
- uint32 query_level; /* 0x1, 0x3 */
- uint32 switch_value; /* 0x1 */
-
-} NET_Q_LOGON_CTRL2;
-
/* NETLOGON_INFO_1 - pdc status info, i presume */
typedef struct netlogon_1_info
{
@@ -213,6 +196,59 @@ typedef struct netlogon_3_info
} NETLOGON_INFO_3;
+/********************************************************
+ Logon Control Query
+
+ This is generated by a nltest /bdc_query:DOMAIN
+
+ query_level 0x1, function_code 0x1
+
+ ********************************************************/
+
+/* NET_Q_LOGON_CTRL - LSA Netr Logon Control */
+
+typedef struct net_q_logon_ctrl_info
+{
+ uint32 ptr;
+ UNISTR2 uni_server_name;
+ uint32 function_code;
+ uint32 query_level;
+} NET_Q_LOGON_CTRL;
+
+/* NET_R_LOGON_CTRL - LSA Netr Logon Control */
+
+typedef struct net_r_logon_ctrl_info
+{
+ uint32 switch_value;
+ uint32 ptr;
+
+ union {
+ NETLOGON_INFO_1 info1;
+ } logon;
+
+ uint32 status;
+} NET_R_LOGON_CTRL;
+
+/********************************************************
+ Logon Control2 Query
+
+ query_level 0x1 - pdc status
+ query_level 0x3 - number of logon attempts.
+
+ ********************************************************/
+
+/* NET_Q_LOGON_CTRL2 - LSA Netr Logon Control 2 */
+typedef struct net_q_logon_ctrl2_info
+{
+ uint32 ptr; /* undocumented buffer pointer */
+ UNISTR2 uni_server_name; /* server name, starting with two '\'s */
+
+ uint32 function_code; /* 0x1 */
+ uint32 query_level; /* 0x1, 0x3 */
+ uint32 switch_value; /* 0x1 */
+
+} NET_Q_LOGON_CTRL2;
+
/*******************************************************
Logon Control Response
@@ -445,6 +481,4 @@ typedef struct net_r_sam_logoff_info
} NET_R_SAM_LOGOFF;
-
#endif /* _RPC_NETLOGON_H */
-