summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-09-05 05:07:05 +0000
committerAndrew Tridgell <tridge@samba.org>1998-09-05 05:07:05 +0000
commite9ea36e4d2270bd7d32da12ef6d6e2299641582d (patch)
tree34905bbfb6adde96be7234d122562e678aa6efd8 /source3/rpc_parse
parent766aa4ff5c6007669010d8c284de20111e633b25 (diff)
downloadsamba-e9ea36e4d2270bd7d32da12ef6d6e2299641582d.tar.gz
samba-e9ea36e4d2270bd7d32da12ef6d6e2299641582d.tar.bz2
samba-e9ea36e4d2270bd7d32da12ef6d6e2299641582d.zip
tridge the destroyer returns!
prompted by the interpret_security() dead code that Jean-Francois pointed out I added a make target "finddead" that finds potentially dead (ie. unused) code. It spat out 304 function names ... I went through these are deleted many of them, making others static (finddead also reports functions that are used only in the local file). in doing this I have almost certainly deleted some useful code. I may have even prevented compilation with some compile options. I apologise. I decided it was better to get rid of this code now and add back the one or two functions that are needed than to keep all this baggage. So, if I have done a bit too much "destroying" then let me know. Keep the swearing to a minimum :) One bit I didn't do is the ubibt code. Chris, can you look at that? Heaps of unused functions there. Can they be made static? (This used to be commit 2204475c87f3024ea8fd1fbd7385b2def617a46f)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_lsa.c113
-rw-r--r--source3/rpc_parse/parse_misc.c57
-rw-r--r--source3/rpc_parse/parse_net.c135
-rw-r--r--source3/rpc_parse/parse_prs.c14
-rw-r--r--source3/rpc_parse/parse_reg.c71
-rw-r--r--source3/rpc_parse/parse_rpc.c38
-rw-r--r--source3/rpc_parse/parse_samr.c628
-rw-r--r--source3/rpc_parse/parse_srv.c239
-rw-r--r--source3/rpc_parse/parse_wks.c16
9 files changed, 93 insertions, 1218 deletions
diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c
index 638222590d..0818057d48 100644
--- a/source3/rpc_parse/parse_lsa.c
+++ b/source3/rpc_parse/parse_lsa.c
@@ -26,6 +26,7 @@
extern int DEBUGLEVEL;
+static void lsa_io_trans_names(char *desc, LSA_TRANS_NAME_ENUM *trn, prs_struct *ps, int depth);
/*******************************************************************
creates a LSA_TRANS_NAME structure.
@@ -43,7 +44,7 @@ void make_lsa_trans_name(LSA_TRANS_NAME *trn, uint32 sid_name_use, char *name, u
/*******************************************************************
reads or writes a LSA_TRANS_NAME structure.
********************************************************************/
-void lsa_io_trans_name(char *desc, LSA_TRANS_NAME *trn, prs_struct *ps, int depth)
+static void lsa_io_trans_name(char *desc, LSA_TRANS_NAME *trn, prs_struct *ps, int depth)
{
if (trn == NULL) return;
@@ -63,7 +64,7 @@ void lsa_io_trans_name(char *desc, LSA_TRANS_NAME *trn, prs_struct *ps, int dept
/*******************************************************************
reads or writes a DOM_R_REF structure.
********************************************************************/
-void lsa_io_dom_r_ref(char *desc, DOM_R_REF *r_r, prs_struct *ps, int depth)
+static void lsa_io_dom_r_ref(char *desc, DOM_R_REF *r_r, prs_struct *ps, int depth)
{
int i;
@@ -99,27 +100,11 @@ void lsa_io_dom_r_ref(char *desc, DOM_R_REF *r_r, prs_struct *ps, int depth)
}
}
-/*******************************************************************
-makes an LSA_OBJ_ATTR structure.
-********************************************************************/
-void make_lsa_obj_attr(LSA_OBJ_ATTR *attr, uint32 attributes, uint32 sec_qos)
-{
- if (attr == NULL) return;
-
- DEBUG(5,("make_lsa_obj_attr\n"));
-
- attr->len = 0x18; /* length of object attribute block, in bytes */
- attr->ptr_root_dir = 0;
- attr->ptr_obj_name = 0;
- attr->attributes = attributes;
- attr->ptr_sec_desc = 0;
- attr->sec_qos = sec_qos;
-}
/*******************************************************************
reads or writes an LSA_OBJ_ATTR structure.
********************************************************************/
-void lsa_io_obj_attr(char *desc, LSA_OBJ_ATTR *attr, prs_struct *ps, int depth)
+static void lsa_io_obj_attr(char *desc, LSA_OBJ_ATTR *attr, prs_struct *ps, int depth)
{
int start;
@@ -148,24 +133,6 @@ void lsa_io_obj_attr(char *desc, LSA_OBJ_ATTR *attr, prs_struct *ps, int depth)
attr->len, ps->offset - start));
}
}
-/*******************************************************************
-makes an LSA_Q_OPEN_POL structure.
-********************************************************************/
-void make_q_open_pol(LSA_Q_OPEN_POL *r_q, char *server_name,
- uint32 attributes, uint32 sec_qos,
- uint32 desired_access)
-{
- if (r_q == NULL) return;
-
- DEBUG(5,("make_open_pol\n"));
-
- r_q->ptr = 1; /* undocumented pointer */
-
- make_unistr2 (&(r_q->uni_server_name), server_name, strlen(server_name));
- make_lsa_obj_attr(&(r_q->attr ), attributes, sec_qos);
-
- r_q->des_access = desired_access;
-}
/*******************************************************************
reads or writes an LSA_Q_OPEN_POL structure.
@@ -202,20 +169,6 @@ void lsa_io_r_open_pol(char *desc, LSA_R_OPEN_POL *r_p, prs_struct *ps, int dep
}
/*******************************************************************
-makes an LSA_Q_QUERY_INFO structure.
-********************************************************************/
-void make_q_query(LSA_Q_QUERY_INFO *q_q, POLICY_HND *hnd, uint16 info_class)
-{
- if (q_q == NULL || hnd == NULL) return;
-
- DEBUG(5,("make_q_query\n"));
-
- memcpy(&(q_q->pol), hnd, sizeof(q_q->pol));
-
- q_q->info_class = info_class;
-}
-
-/*******************************************************************
reads or writes an LSA_Q_QUERY_INFO structure.
********************************************************************/
void lsa_io_q_query(char *desc, LSA_Q_QUERY_INFO *q_q, prs_struct *ps, int depth)
@@ -307,60 +260,6 @@ void lsa_io_r_enum_trust_dom(char *desc, LSA_R_ENUM_TRUST_DOM *r_e, prs_struct
}
/*******************************************************************
-makes an LSA_Q_CLOSE structure.
-********************************************************************/
-void make_lsa_q_close(LSA_Q_CLOSE *q_c, POLICY_HND *hnd)
-{
- if (q_c == NULL || hnd == NULL) return;
-
- DEBUG(5,("make_lsa_q_close\n"));
-
- memcpy(&(q_c->pol), hnd, sizeof(q_c->pol));
-}
-
-
-/*******************************************************************
-reads or writes an LSA_Q_CLOSE structure.
-********************************************************************/
-void lsa_io_q_close(char *desc, LSA_Q_CLOSE *q_c, prs_struct *ps, int depth)
-{
- if (q_c == NULL) return;
-
- prs_debug(ps, depth, desc, "lsa_io_q_close");
- depth++;
-
- smb_io_pol_hnd("", &(q_c->pol), ps, depth);
-}
-
-/*******************************************************************
-makes an LSA_R_CLOSE structure.
-********************************************************************/
-void make_lsa_r_close(LSA_R_CLOSE *q_r, POLICY_HND *hnd)
-{
- if (q_r == NULL || hnd == NULL) return;
-
- DEBUG(5,("make_lsa_r_close\n"));
-
- memcpy(&(q_r->pol), hnd, sizeof(q_r->pol));
-}
-
-
-/*******************************************************************
-reads or writes an LSA_R_CLOSE structure.
-********************************************************************/
-void lsa_io_r_close(char *desc, LSA_R_CLOSE *r_c, prs_struct *ps, int depth)
-{
- if (r_c == NULL) return;
-
- prs_debug(ps, depth, desc, "lsa_io_r_close");
- depth++;
-
- smb_io_pol_hnd("", &(r_c->pol), ps, depth);
-
- prs_uint32("status", ps, depth, &(r_c->status));
-}
-
-/*******************************************************************
reads or writes an LSA_Q_QUERY_INFO structure.
********************************************************************/
void lsa_io_r_query(char *desc, LSA_R_QUERY_INFO *r_q, prs_struct *ps, int depth)
@@ -402,7 +301,7 @@ void lsa_io_r_query(char *desc, LSA_R_QUERY_INFO *r_q, prs_struct *ps, int dept
/*******************************************************************
reads or writes a LSA_SID_ENUM structure.
********************************************************************/
-void lsa_io_sid_enum(char *desc, LSA_SID_ENUM *sen, prs_struct *ps, int depth)
+static void lsa_io_sid_enum(char *desc, LSA_SID_ENUM *sen, prs_struct *ps, int depth)
{
int i;
@@ -459,7 +358,7 @@ void lsa_io_q_lookup_sids(char *desc, LSA_Q_LOOKUP_SIDS *q_s, prs_struct *ps, in
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void lsa_io_trans_names(char *desc, LSA_TRANS_NAME_ENUM *trn, prs_struct *ps, int depth)
+static void lsa_io_trans_names(char *desc, LSA_TRANS_NAME_ENUM *trn, prs_struct *ps, int depth)
{
int i;
int i2;
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c
index 3c83382f0c..3749827860 100644
--- a/source3/rpc_parse/parse_misc.c
+++ b/source3/rpc_parse/parse_misc.c
@@ -32,7 +32,7 @@ extern int DEBUGLEVEL;
/*******************************************************************
reads or writes a UTIME type.
********************************************************************/
-void smb_io_utime(char *desc, UTIME *t, prs_struct *ps, int depth)
+static void smb_io_utime(char *desc, UTIME *t, prs_struct *ps, int depth)
{
if (t == NULL) return;
@@ -541,27 +541,11 @@ void make_dom_rid4(DOM_RID4 *rid4, uint16 unknown, uint16 attr, uint32 rid)
rid4->rid = rid;
}
-/*******************************************************************
-reads or writes a DOM_RID4 structure.
-********************************************************************/
-void smb_io_dom_rid4(char *desc, DOM_RID4 *rid4, prs_struct *ps, int depth)
-{
- if (rid4 == NULL) return;
-
- prs_debug(ps, depth, desc, "smb_io_dom_rid4. XXXX !check size of unknown! XXXX");
- depth++;
-
- prs_align(ps);
-
- prs_uint32("unknown", ps, depth, &(rid4->unknown));
- prs_uint16("attr ", ps, depth, &(rid4->attr ));
- prs_uint32("rid ", ps, depth, &(rid4->rid ));
-}
/*******************************************************************
makes a DOM_CLNT_SRV structure.
********************************************************************/
-void make_clnt_srv(DOM_CLNT_SRV *log, char *logon_srv, char *comp_name)
+static void make_clnt_srv(DOM_CLNT_SRV *log, char *logon_srv, char *comp_name)
{
if (log == NULL) return;
@@ -591,7 +575,7 @@ void make_clnt_srv(DOM_CLNT_SRV *log, char *logon_srv, char *comp_name)
/*******************************************************************
reads or writes a DOM_CLNT_SRV structure.
********************************************************************/
-void smb_io_clnt_srv(char *desc, DOM_CLNT_SRV *log, prs_struct *ps, int depth)
+static void smb_io_clnt_srv(char *desc, DOM_CLNT_SRV *log, prs_struct *ps, int depth)
{
if (log == NULL) return;
@@ -861,23 +845,7 @@ void smb_io_pol_hnd(char *desc, POLICY_HND *pol, prs_struct *ps, int depth)
/*******************************************************************
reads or writes a dom query structure.
********************************************************************/
-void smb_io_dom_query_3(char *desc, DOM_QUERY_3 *d_q, prs_struct *ps, int depth)
-{
- smb_io_dom_query("", d_q, ps, depth);
-}
-
-/*******************************************************************
-reads or writes a dom query structure.
-********************************************************************/
-void smb_io_dom_query_5(char *desc, DOM_QUERY_3 *d_q, prs_struct *ps, int depth)
-{
- smb_io_dom_query("", d_q, ps, depth);
-}
-
-/*******************************************************************
-reads or writes a dom query structure.
-********************************************************************/
-void smb_io_dom_query(char *desc, DOM_QUERY *d_q, prs_struct *ps, int depth)
+static void smb_io_dom_query(char *desc, DOM_QUERY *d_q, prs_struct *ps, int depth)
{
if (d_q == NULL) return;
@@ -905,6 +873,23 @@ void smb_io_dom_query(char *desc, DOM_QUERY *d_q, prs_struct *ps, int depth)
}
/*******************************************************************
+reads or writes a dom query structure.
+********************************************************************/
+void smb_io_dom_query_3(char *desc, DOM_QUERY_3 *d_q, prs_struct *ps, int depth)
+{
+ smb_io_dom_query("", d_q, ps, depth);
+}
+
+/*******************************************************************
+reads or writes a dom query structure.
+********************************************************************/
+void smb_io_dom_query_5(char *desc, DOM_QUERY_3 *d_q, prs_struct *ps, int depth)
+{
+ smb_io_dom_query("", d_q, ps, depth);
+}
+
+
+/*******************************************************************
reads or writes a DOM_NAME structure.
********************************************************************/
void smb_io_dom_name(char *desc, DOM_NAME *name, prs_struct *ps, int depth)
diff --git a/source3/rpc_parse/parse_net.c b/source3/rpc_parse/parse_net.c
index 182b3495db..12d6aca264 100644
--- a/source3/rpc_parse/parse_net.c
+++ b/source3/rpc_parse/parse_net.c
@@ -29,7 +29,7 @@ extern int DEBUGLEVEL;
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void net_io_neg_flags(char *desc, NEG_FLAGS *neg, prs_struct *ps, int depth)
+static void net_io_neg_flags(char *desc, NEG_FLAGS *neg, prs_struct *ps, int depth)
{
if (neg == NULL) return;
@@ -44,7 +44,7 @@ void net_io_neg_flags(char *desc, NEG_FLAGS *neg, prs_struct *ps, int depth)
/*******************************************************************
creates a NETLOGON_INFO_3 structure.
********************************************************************/
-void make_netinfo_3(NETLOGON_INFO_3 *info, uint32 flags, uint32 logon_attempts)
+static void make_netinfo_3(NETLOGON_INFO_3 *info, uint32 flags, uint32 logon_attempts)
{
info->flags = flags;
info->logon_attempts = logon_attempts;
@@ -58,7 +58,7 @@ void make_netinfo_3(NETLOGON_INFO_3 *info, uint32 flags, uint32 logon_attempts)
/*******************************************************************
reads or writes a NETLOGON_INFO_3 structure.
********************************************************************/
-void net_io_netinfo_3(char *desc, NETLOGON_INFO_3 *info, prs_struct *ps, int depth)
+static void net_io_netinfo_3(char *desc, NETLOGON_INFO_3 *info, prs_struct *ps, int depth)
{
if (info == NULL) return;
@@ -80,7 +80,7 @@ void net_io_netinfo_3(char *desc, NETLOGON_INFO_3 *info, prs_struct *ps, int de
/*******************************************************************
creates a NETLOGON_INFO_1 structure.
********************************************************************/
-void make_netinfo_1(NETLOGON_INFO_1 *info, uint32 flags, uint32 pdc_status)
+static void make_netinfo_1(NETLOGON_INFO_1 *info, uint32 flags, uint32 pdc_status)
{
info->flags = flags;
info->pdc_status = pdc_status;
@@ -89,7 +89,7 @@ void make_netinfo_1(NETLOGON_INFO_1 *info, uint32 flags, uint32 pdc_status)
/*******************************************************************
reads or writes a NETLOGON_INFO_1 structure.
********************************************************************/
-void net_io_netinfo_1(char *desc, NETLOGON_INFO_1 *info, prs_struct *ps, int depth)
+static void net_io_netinfo_1(char *desc, NETLOGON_INFO_1 *info, prs_struct *ps, int depth)
{
if (info == NULL) return;
@@ -105,7 +105,7 @@ void net_io_netinfo_1(char *desc, NETLOGON_INFO_1 *info, prs_struct *ps, int de
/*******************************************************************
creates a NETLOGON_INFO_2 structure.
********************************************************************/
-void make_netinfo_2(NETLOGON_INFO_2 *info, uint32 flags, uint32 pdc_status,
+static void make_netinfo_2(NETLOGON_INFO_2 *info, uint32 flags, uint32 pdc_status,
uint32 tc_status, char *trusted_dc_name)
{
int len_dc_name = strlen(trusted_dc_name);
@@ -127,7 +127,7 @@ void make_netinfo_2(NETLOGON_INFO_2 *info, uint32 flags, uint32 pdc_status,
/*******************************************************************
reads or writes a NETLOGON_INFO_2 structure.
********************************************************************/
-void net_io_netinfo_2(char *desc, NETLOGON_INFO_2 *info, prs_struct *ps, int depth)
+static void net_io_netinfo_2(char *desc, NETLOGON_INFO_2 *info, prs_struct *ps, int depth)
{
if (info == NULL) return;
@@ -150,24 +150,6 @@ void net_io_netinfo_2(char *desc, NETLOGON_INFO_2 *info, prs_struct *ps, int de
}
/*******************************************************************
-makes an NET_Q_LOGON_CTRL2 structure.
-********************************************************************/
-void make_q_logon_ctrl2(NET_Q_LOGON_CTRL2 *q_l, char *server_name,
- uint32 function_code)
-{
- if (q_l == NULL) return;
-
- DEBUG(5,("make_q_logon_ctrl2\n"));
-
- q_l->ptr = 1; /* undocumented pointer */
- make_unistr2 (&(q_l->uni_server_name), server_name, strlen(server_name));
-
- q_l->function_code = function_code; /* should only be 0x1 */
- q_l->query_level = function_code; /* should only be 0x1 */
- q_l->switch_value = function_code; /* should only be 0x1 */
-}
-
-/*******************************************************************
reads or writes an NET_Q_LOGON_CTRL2 structure.
********************************************************************/
void net_io_q_logon_ctrl2(char *desc, NET_Q_LOGON_CTRL2 *q_l, prs_struct *ps, int depth)
@@ -340,20 +322,6 @@ void net_io_r_trust_dom(char *desc, NET_R_TRUST_DOM_LIST *r_t, prs_struct *ps,
prs_uint32("status", ps, depth, &(r_t->status));
}
-/*******************************************************************
-makes an NET_Q_TRUST_DOM_LIST structure.
-********************************************************************/
-void make_q_trust_dom(NET_Q_TRUST_DOM_LIST *q_l, char *server_name,
- uint32 function_code)
-{
- if (q_l == NULL) return;
-
- DEBUG(5,("make_q_trust_dom\n"));
-
- make_unistr2 (&(q_l->uni_server_name), server_name, strlen(server_name));
-
- q_l->function_code = function_code; /* should only be 0x31 */
-}
/*******************************************************************
reads or writes an NET_Q_TRUST_DOM_LIST structure.
@@ -571,88 +539,9 @@ static int make_dom_sid2s(char *sids_str, DOM_SID2 *sids, int max_sids)
}
/*******************************************************************
-makes a NET_ID_INFO_1 structure.
-
-This is an interactive logon packet. The log_id parameters
-are what an NT server would generate for LUID once the
-user is logged on. I don't think we care about them.
-
-Note that this passes the actual NT and LM hashed passwords
-over the secure channel. This is not the preferred logon
-method from a Samba domain client as it exposes the password
-hashes to anyone who has compromised the secure channel. JRA.
-********************************************************************/
-
-void make_id_info1(NET_ID_INFO_1 *id, char *domain_name,
- uint32 param_ctrl, uint32 log_id_low, uint32 log_id_high,
- char *user_name, char *wksta_name,
- char sess_key[16],
- unsigned char lm_cypher[16], unsigned char nt_cypher[16])
-{
- int len_domain_name = strlen(domain_name);
- int len_user_name = strlen(user_name );
- int len_wksta_name = strlen(wksta_name );
-
- unsigned char lm_owf[16];
- unsigned char nt_owf[16];
-
- if (id == NULL) return;
-
- DEBUG(5,("make_id_info1: %d\n", __LINE__));
-
- id->ptr_id_info1 = 1;
-
- make_uni_hdr(&(id->hdr_domain_name), len_domain_name, len_domain_name, 4);
-
- id->param_ctrl = param_ctrl;
- make_logon_id(&(id->logon_id), log_id_low, log_id_high);
-
- make_uni_hdr(&(id->hdr_user_name ), len_user_name , len_user_name , 4);
- make_uni_hdr(&(id->hdr_wksta_name ), len_wksta_name , len_wksta_name , 4);
-
- if (lm_cypher && nt_cypher)
- {
- void arcfour(uint8 key[16], uint8 out[16], uint8 in[16]);
- unsigned char owf_key[16];
-#ifdef DEBUG_PASSWORD
- DEBUG(100,("lm cypher:"));
- dump_data(100, lm_cypher, 16);
-
- DEBUG(100,("nt cypher:"));
- dump_data(100, nt_cypher, 16);
-#endif
-
- memcpy(owf_key, sess_key, 16);
-
- memcpy(lm_owf, lm_cypher, 16);
- memcpy(nt_owf, nt_cypher, 16);
- SamOEMhash(lm_owf, owf_key, False);
- SamOEMhash(nt_owf, owf_key, False);
-
-#ifdef DEBUG_PASSWORD
- DEBUG(100,("hash of lm owf password:"));
- dump_data(100, lm_owf, 16);
-
- DEBUG(100,("hash of nt owf password:"));
- dump_data(100, nt_owf, 16);
-#endif
- /* set up pointers to blocks */
- lm_cypher = lm_owf;
- nt_cypher = nt_owf;
- }
-
- make_owf_info(&(id->lm_owf), lm_cypher);
- make_owf_info(&(id->nt_owf), nt_cypher);
-
- make_unistr2(&(id->uni_domain_name), domain_name, len_domain_name);
- make_unistr2(&(id->uni_user_name ), user_name , len_user_name );
- make_unistr2(&(id->uni_wksta_name ), wksta_name , len_wksta_name );
-}
-
-/*******************************************************************
reads or writes an NET_ID_INFO_1 structure.
********************************************************************/
-void net_io_id_info1(char *desc, NET_ID_INFO_1 *id, prs_struct *ps, int depth)
+static void net_io_id_info1(char *desc, NET_ID_INFO_1 *id, prs_struct *ps, int depth)
{
if (id == NULL) return;
@@ -754,7 +643,7 @@ void make_id_info2(NET_ID_INFO_2 *id, char *domain_name,
/*******************************************************************
reads or writes an NET_ID_INFO_2 structure.
********************************************************************/
-void net_io_id_info2(char *desc, NET_ID_INFO_2 *id, prs_struct *ps, int depth)
+static void net_io_id_info2(char *desc, NET_ID_INFO_2 *id, prs_struct *ps, int depth)
{
if (id == NULL) return;
@@ -821,7 +710,7 @@ void make_sam_info(DOM_SAM_INFO *sam,
/*******************************************************************
reads or writes a DOM_SAM_INFO structure.
********************************************************************/
-void net_io_id_info_ctr(char *desc, NET_ID_INFO_CTR *ctr, prs_struct *ps, int depth)
+static void net_io_id_info_ctr(char *desc, NET_ID_INFO_CTR *ctr, prs_struct *ps, int depth)
{
if (ctr == NULL) return;
@@ -856,7 +745,7 @@ void net_io_id_info_ctr(char *desc, NET_ID_INFO_CTR *ctr, prs_struct *ps, int d
/*******************************************************************
reads or writes a DOM_SAM_INFO structure.
********************************************************************/
-void smb_io_sam_info(char *desc, DOM_SAM_INFO *sam, prs_struct *ps, int depth)
+static void smb_io_sam_info(char *desc, DOM_SAM_INFO *sam, prs_struct *ps, int depth)
{
if (sam == NULL) return;
@@ -1004,7 +893,7 @@ void make_net_user_info3(NET_USER_INFO_3 *usr,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void net_io_user_info3(char *desc, NET_USER_INFO_3 *usr, prs_struct *ps, int depth)
+static void net_io_user_info3(char *desc, NET_USER_INFO_3 *usr, prs_struct *ps, int depth)
{
int i;
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c
index ad05831229..024ac88b18 100644
--- a/source3/rpc_parse/parse_prs.c
+++ b/source3/rpc_parse/parse_prs.c
@@ -148,20 +148,6 @@ BOOL prs_uint8s(BOOL charmode, char *name, prs_struct *ps, int depth, uint8 *dat
}
/******************************************************************
- stream an array of uint16s. length is number of uint16s
- ********************************************************************/
-BOOL prs_uint16s(BOOL charmode, char *name, prs_struct *ps, int depth, uint16 *data16s, int len)
-{
- char *q = mem_data(&(ps->data), ps->offset);
- if (q == NULL) return False;
-
- DBG_RW_PSVAL(charmode, name, depth, ps->offset, ps->io, q, data16s, len)
- ps->offset += len * sizeof(uint16);
-
- return True;
-}
-
-/******************************************************************
stream an array of uint32s. length is number of uint32s
********************************************************************/
BOOL prs_uint32s(BOOL charmode, char *name, prs_struct *ps, int depth, uint32 *data32s, int len)
diff --git a/source3/rpc_parse/parse_reg.c b/source3/rpc_parse/parse_reg.c
index dec5110b41..6b464645e5 100644
--- a/source3/rpc_parse/parse_reg.c
+++ b/source3/rpc_parse/parse_reg.c
@@ -28,18 +28,6 @@ extern int DEBUGLEVEL;
/*******************************************************************
-creates a structure.
-********************************************************************/
-void make_reg_q_open_policy(REG_Q_OPEN_POLICY *r_q,
- uint16 unknown_0, uint32 level, uint16 unknown_1)
-{
- r_q->ptr = 1;
- r_q->unknown_0 = unknown_0;
- r_q->level = level;
- r_q->unknown_1 = unknown_1;
-}
-
-/*******************************************************************
reads or writes a structure.
********************************************************************/
void reg_io_q_open_policy(char *desc, REG_Q_OPEN_POLICY *r_q, prs_struct *ps, int depth)
@@ -62,18 +50,6 @@ void reg_io_q_open_policy(char *desc, REG_Q_OPEN_POLICY *r_q, prs_struct *ps, i
/*******************************************************************
-creates a structure.
-********************************************************************/
-void make_reg_r_open_policy(REG_R_OPEN_POLICY *r_r,
- POLICY_HND *pol, uint32 status)
-{
- if (r_r == NULL) return;
-
- memcpy(&(r_r->pol), pol, sizeof(r_r->pol));
- r_r->status = status;
-}
-
-/*******************************************************************
reads or writes a structure.
********************************************************************/
void reg_io_r_open_policy(char *desc, REG_R_OPEN_POLICY *r_r, prs_struct *ps, int depth)
@@ -124,34 +100,6 @@ void reg_io_r_close(char *desc, REG_R_CLOSE *r_u, prs_struct *ps, int depth)
prs_uint32("status", ps, depth, &(r_u->status));
}
-/*******************************************************************
-creates a structure.
-********************************************************************/
-void make_reg_q_info(REG_Q_INFO *r_q,
- POLICY_HND *pol, char *product_type,
- NTTIME *prod_time, uint8 major_version, uint8 minor_version,
- uint32 unknown)
-{
- int type_len = strlen(product_type);
-
- memcpy(&(r_q->pol), pol, sizeof(r_q->pol));
- make_uni_hdr(&(r_q->hdr_type), type_len, type_len, 1);
- make_unistr2(&(r_q->uni_type), product_type, type_len);
-
- r_q->ptr1 = 1;
- memcpy(&(r_q->time), prod_time, sizeof(r_q->time));
- r_q->major_version1 = major_version;
- r_q->minor_version1 = minor_version;
- bzero(r_q->pad1, sizeof(r_q->pad1));
-
- r_q->ptr2 = 1;
- r_q->major_version2 = major_version;
- r_q->minor_version2 = minor_version;
- bzero(r_q->pad2, sizeof(r_q->pad2));
-
- r_q->ptr3 = 1;
- r_q->unknown = unknown;
-}
/*******************************************************************
reads or writes a structure.
@@ -264,25 +212,6 @@ void reg_io_r_info(char *desc, REG_R_INFO *r_r, prs_struct *ps, int depth)
/*******************************************************************
-creates a structure.
-********************************************************************/
-void make_reg_q_open_entry(REG_Q_OPEN_ENTRY *r_q,
- POLICY_HND *pol, char *name,
- uint32 unknown_0, uint32 unknown_1, uint16 unknown_2)
-{
- int len_name = strlen(name);
-
- memcpy(&(r_q->pol), pol, sizeof(r_q->pol));
-
- make_uni_hdr(&(r_q->hdr_name), len_name, len_name, 1);
- make_unistr2(&(r_q->uni_name), name, len_name);
-
- r_q->unknown_0 = unknown_0;
- r_q->unknown_1 = unknown_1;
- r_q->unknown_2 = unknown_2;
-}
-
-/*******************************************************************
reads or writes a structure.
********************************************************************/
void reg_io_q_open_entry(char *desc, REG_Q_OPEN_ENTRY *r_q, prs_struct *ps, int depth)
diff --git a/source3/rpc_parse/parse_rpc.c b/source3/rpc_parse/parse_rpc.c
index 8a5b6c172e..ac01e7f0b1 100644
--- a/source3/rpc_parse/parse_rpc.c
+++ b/source3/rpc_parse/parse_rpc.c
@@ -184,20 +184,9 @@ void smb_io_rpc_hdr(char *desc, RPC_HDR *rpc, prs_struct *ps, int depth)
}
/*******************************************************************
-creates an RPC_IFACE structure.
-********************************************************************/
-void make_rpc_iface(RPC_IFACE *ifc, char data[16], uint32 version)
-{
- if (ifc == NULL || data == NULL) return;
-
- memcpy(ifc->data, data, sizeof(ifc->data)); /* 16 bytes of number */
- ifc->version = version; /* the interface number */
-}
-
-/*******************************************************************
reads or writes an RPC_IFACE structure.
********************************************************************/
-void smb_io_rpc_iface(char *desc, RPC_IFACE *ifc, prs_struct *ps, int depth)
+static void smb_io_rpc_iface(char *desc, RPC_IFACE *ifc, prs_struct *ps, int depth)
{
if (ifc == NULL) return;
@@ -213,7 +202,7 @@ void smb_io_rpc_iface(char *desc, RPC_IFACE *ifc, prs_struct *ps, int depth)
/*******************************************************************
creates an RPC_ADDR_STR structure.
********************************************************************/
-void make_rpc_addr_str(RPC_ADDR_STR *str, char *name)
+static void make_rpc_addr_str(RPC_ADDR_STR *str, char *name)
{
if (str == NULL || name == NULL) return;
@@ -224,7 +213,7 @@ void make_rpc_addr_str(RPC_ADDR_STR *str, char *name)
/*******************************************************************
reads or writes an RPC_ADDR_STR structure.
********************************************************************/
-void smb_io_rpc_addr_str(char *desc, RPC_ADDR_STR *str, prs_struct *ps, int depth)
+static void smb_io_rpc_addr_str(char *desc, RPC_ADDR_STR *str, prs_struct *ps, int depth)
{
if (str == NULL) return;
@@ -239,7 +228,7 @@ void smb_io_rpc_addr_str(char *desc, RPC_ADDR_STR *str, prs_struct *ps, int dep
/*******************************************************************
creates an RPC_HDR_BBA structure.
********************************************************************/
-void make_rpc_hdr_bba(RPC_HDR_BBA *bba, uint16 max_tsize, uint16 max_rsize, uint32 assoc_gid)
+static void make_rpc_hdr_bba(RPC_HDR_BBA *bba, uint16 max_tsize, uint16 max_rsize, uint32 assoc_gid)
{
if (bba == NULL) return;
@@ -251,7 +240,7 @@ void make_rpc_hdr_bba(RPC_HDR_BBA *bba, uint16 max_tsize, uint16 max_rsize, uint
/*******************************************************************
reads or writes an RPC_HDR_BBA structure.
********************************************************************/
-void smb_io_rpc_hdr_bba(char *desc, RPC_HDR_BBA *rpc, prs_struct *ps, int depth)
+static void smb_io_rpc_hdr_bba(char *desc, RPC_HDR_BBA *rpc, prs_struct *ps, int depth)
{
if (rpc == NULL) return;
@@ -312,7 +301,7 @@ creates an RPC_RESULTS structure.
lkclXXXX only one reason at the moment!
********************************************************************/
-void make_rpc_results(RPC_RESULTS *res,
+static void make_rpc_results(RPC_RESULTS *res,
uint8 num_results, uint16 result, uint16 reason)
{
if (res == NULL) return;
@@ -328,7 +317,7 @@ reads or writes an RPC_RESULTS structure.
lkclXXXX only one reason at the moment!
********************************************************************/
-void smb_io_rpc_results(char *desc, RPC_RESULTS *res, prs_struct *ps, int depth)
+static void smb_io_rpc_results(char *desc, RPC_RESULTS *res, prs_struct *ps, int depth)
{
if (res == NULL) return;
@@ -411,19 +400,6 @@ void smb_io_rpc_hdr_req(char *desc, RPC_HDR_REQ *rpc, prs_struct *ps, int depth
}
/*******************************************************************
-creates an RPC_HDR_RESP structure.
-********************************************************************/
-void make_rpc_hdr_resp(RPC_HDR_RESP *hdr, uint32 data_len)
-{
- if (hdr == NULL) return;
-
- hdr->alloc_hint = data_len - 0x18; /* allocation hint */
- hdr->context_id = 0; /* presentation context identifier */
- hdr->cancel_count = 0; /* cancel count */
- hdr->reserved = 0; /* 0 - reserved */
-}
-
-/*******************************************************************
reads or writes an RPC_HDR_RESP structure.
********************************************************************/
void smb_io_rpc_hdr_resp(char *desc, RPC_HDR_RESP *rpc, prs_struct *ps, int depth)
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c
index 8f20a257ce..71eb8a37dd 100644
--- a/source3/rpc_parse/parse_samr.c
+++ b/source3/rpc_parse/parse_samr.c
@@ -28,18 +28,6 @@ extern int DEBUGLEVEL;
/*******************************************************************
-makes a SAMR_Q_CLOSE_HND structure.
-********************************************************************/
-void make_samr_q_close_hnd(SAMR_Q_CLOSE_HND *q_c, POLICY_HND *hnd)
-{
- if (q_c == NULL || hnd == NULL) return;
-
- DEBUG(5,("make_samr_q_close_hnd\n"));
-
- memcpy(&(q_c->pol), hnd, sizeof(q_c->pol));
-}
-
-/*******************************************************************
reads or writes a structure.
********************************************************************/
void samr_io_q_close_hnd(char *desc, SAMR_Q_CLOSE_HND *q_u, prs_struct *ps, int depth)
@@ -77,22 +65,6 @@ void samr_io_r_close_hnd(char *desc, SAMR_R_CLOSE_HND *r_u, prs_struct *ps, int
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void make_samr_q_open_domain(SAMR_Q_OPEN_DOMAIN *q_u,
- POLICY_HND *connect_pol, uint32 rid, DOM_SID *sid)
-{
- if (q_u == NULL) return;
-
- DEBUG(5,("samr_make_q_open_domain\n"));
-
- memcpy(&q_u->connect_pol, connect_pol, sizeof(q_u->connect_pol));
- q_u->rid = rid;
- make_dom_sid2(&(q_u->dom_sid), sid);
-}
-
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
void samr_io_q_open_domain(char *desc, SAMR_Q_OPEN_DOMAIN *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL) return;
@@ -134,55 +106,6 @@ void samr_io_r_open_domain(char *desc, SAMR_R_OPEN_DOMAIN *r_u, prs_struct *ps,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void make_samr_q_unknown_8(SAMR_Q_UNKNOWN_8 *q_u,
- POLICY_HND *domain_pol, uint16 switch_value)
-{
- if (q_u == NULL) return;
-
- DEBUG(5,("samr_make_q_unknown_8\n"));
-
- memcpy(&q_u->domain_pol, domain_pol, sizeof(q_u->domain_pol));
- q_u->switch_value = switch_value;
-}
-
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-void samr_io_q_unknown_8(char *desc, SAMR_Q_UNKNOWN_8 *q_u, prs_struct *ps, int depth)
-{
- if (q_u == NULL) return;
-
- prs_debug(ps, depth, desc, "samr_io_q_unknown_8");
- depth++;
-
- prs_align(ps);
-
- smb_io_pol_hnd("domain_pol", &(q_u->domain_pol), ps, depth);
- prs_align(ps);
-
- prs_uint16("switch_value", ps, depth, &(q_u->switch_value));
- prs_align(ps);
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-void make_samr_q_unknown_3(SAMR_Q_UNKNOWN_3 *q_u,
- POLICY_HND *user_pol, uint16 switch_value)
-{
- if (q_u == NULL) return;
-
- DEBUG(5,("samr_make_q_unknown_3\n"));
-
- memcpy(&q_u->user_pol, user_pol, sizeof(q_u->user_pol));
- q_u->switch_value = switch_value;
-}
-
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
void samr_io_q_unknown_3(char *desc, SAMR_Q_UNKNOWN_3 *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL) return;
@@ -219,7 +142,7 @@ this one's odd, because the length (in bytes) is specified at the beginning.
the length _includes_ the length of the length, too :-)
********************************************************************/
-void sam_io_dom_sid3(char *desc, DOM_SID3 *sid3, prs_struct *ps, int depth)
+static void sam_io_dom_sid3(char *desc, DOM_SID3 *sid3, prs_struct *ps, int depth)
{
if (sid3 == NULL) return;
@@ -243,7 +166,7 @@ unknown_6 : 0x0002
unknown_7 : 0x5800 or 0x0070
********************************************************************/
-void make_sam_sid_stuff(SAM_SID_STUFF *stf,
+static void make_sam_sid_stuff(SAM_SID_STUFF *stf,
uint16 unknown_2, uint16 unknown_3,
uint32 unknown_4, uint16 unknown_6, uint16 unknown_7,
int num_sid3s, DOM_SID3 sid3[MAX_SAM_SIDS])
@@ -269,7 +192,7 @@ void make_sam_sid_stuff(SAM_SID_STUFF *stf,
/*******************************************************************
reads or writes a SAM_SID_STUFF structure.
********************************************************************/
-void sam_io_sid_stuff(char *desc, SAM_SID_STUFF *stf, prs_struct *ps, int depth)
+static void sam_io_sid_stuff(char *desc, SAM_SID_STUFF *stf, prs_struct *ps, int depth)
{
int i;
@@ -406,29 +329,10 @@ void samr_io_r_unknown_3(char *desc, SAMR_R_UNKNOWN_3 *r_u, prs_struct *ps, int
prs_uint32("status", ps, depth, &(r_u->status));
}
-
-/*******************************************************************
-makes a SAM_STR1 structure.
-********************************************************************/
-void make_sam_str1(SAM_STR1 *sam, char *sam_acct, char *sam_name, char *sam_desc)
-{
- int len_sam_acct = sam_acct != NULL ? strlen(sam_acct) : 0;
- int len_sam_name = sam_name != NULL ? strlen(sam_name) : 0;
- int len_sam_desc = sam_desc != NULL ? strlen(sam_desc) : 0;
-
- if (sam == NULL) return;
-
- DEBUG(5,("make_sam_str1: %d\n", __LINE__));
-
- make_unistr2(&(sam->uni_acct_name), sam_acct, len_sam_acct);
- make_unistr2(&(sam->uni_full_name), sam_name, len_sam_name);
- make_unistr2(&(sam->uni_acct_desc), sam_desc, len_sam_desc);
-}
-
/*******************************************************************
reads or writes a SAM_STR1 structure.
********************************************************************/
-void sam_io_sam_str1(char *desc, SAM_STR1 *sam, uint32 acct_buf, uint32 name_buf, uint32 desc_buf, prs_struct *ps, int depth)
+static void sam_io_sam_str1(char *desc, SAM_STR1 *sam, uint32 acct_buf, uint32 name_buf, uint32 desc_buf, prs_struct *ps, int depth)
{
if (sam == NULL) return;
@@ -445,7 +349,7 @@ void sam_io_sam_str1(char *desc, SAM_STR1 *sam, uint32 acct_buf, uint32 name_bu
/*******************************************************************
makes a SAM_ENTRY1 structure.
********************************************************************/
-void make_sam_entry1(SAM_ENTRY1 *sam, uint32 user_idx,
+static void make_sam_entry1(SAM_ENTRY1 *sam, uint32 user_idx,
uint32 len_sam_name, uint32 len_sam_full, uint32 len_sam_desc,
uint32 rid_user, uint16 acb_info)
{
@@ -466,7 +370,7 @@ void make_sam_entry1(SAM_ENTRY1 *sam, uint32 user_idx,
/*******************************************************************
reads or writes a SAM_ENTRY1 structure.
********************************************************************/
-void sam_io_sam_entry1(char *desc, SAM_ENTRY1 *sam, prs_struct *ps, int depth)
+static void sam_io_sam_entry1(char *desc, SAM_ENTRY1 *sam, prs_struct *ps, int depth)
{
if (sam == NULL) return;
@@ -487,25 +391,9 @@ void sam_io_sam_entry1(char *desc, SAM_ENTRY1 *sam, prs_struct *ps, int depth)
}
/*******************************************************************
-makes a SAM_STR2 structure.
-********************************************************************/
-void make_sam_str2(SAM_STR2 *sam, char *sam_acct, char *sam_desc)
-{
- int len_sam_acct = sam_acct != NULL ? strlen(sam_acct) : 0;
- int len_sam_desc = sam_desc != NULL ? strlen(sam_desc) : 0;
-
- if (sam == NULL) return;
-
- DEBUG(5,("make_sam_str2: %d\n", __LINE__));
-
- make_unistr2(&(sam->uni_srv_name), sam_acct, len_sam_acct);
- make_unistr2(&(sam->uni_srv_desc), sam_desc, len_sam_desc);
-}
-
-/*******************************************************************
reads or writes a SAM_STR2 structure.
********************************************************************/
-void sam_io_sam_str2(char *desc, SAM_STR2 *sam, uint32 acct_buf, uint32 desc_buf, prs_struct *ps, int depth)
+static void sam_io_sam_str2(char *desc, SAM_STR2 *sam, uint32 acct_buf, uint32 desc_buf, prs_struct *ps, int depth)
{
if (sam == NULL) return;
@@ -521,7 +409,7 @@ void sam_io_sam_str2(char *desc, SAM_STR2 *sam, uint32 acct_buf, uint32 desc_bu
/*******************************************************************
makes a SAM_ENTRY2 structure.
********************************************************************/
-void make_sam_entry2(SAM_ENTRY2 *sam, uint32 user_idx,
+static void make_sam_entry2(SAM_ENTRY2 *sam, uint32 user_idx,
uint32 len_sam_name, uint32 len_sam_desc,
uint32 rid_user, uint16 acb_info)
{
@@ -541,7 +429,7 @@ void make_sam_entry2(SAM_ENTRY2 *sam, uint32 user_idx,
/*******************************************************************
reads or writes a SAM_ENTRY2 structure.
********************************************************************/
-void sam_io_sam_entry2(char *desc, SAM_ENTRY2 *sam, prs_struct *ps, int depth)
+static void sam_io_sam_entry2(char *desc, SAM_ENTRY2 *sam, prs_struct *ps, int depth)
{
if (sam == NULL) return;
@@ -561,25 +449,9 @@ void sam_io_sam_entry2(char *desc, SAM_ENTRY2 *sam, prs_struct *ps, int depth)
}
/*******************************************************************
-makes a SAM_STR3 structure.
-********************************************************************/
-void make_sam_str3(SAM_STR3 *sam, char *grp_acct, char *grp_desc)
-{
- int len_grp_acct = strlen(grp_acct);
- int len_grp_desc = strlen(grp_desc);
-
- if (sam == NULL) return;
-
- DEBUG(5,("make_sam_str3: %d\n", __LINE__));
-
- make_unistr2(&(sam->uni_grp_name), grp_acct, len_grp_acct);
- make_unistr2(&(sam->uni_grp_desc), grp_desc, len_grp_desc);
-}
-
-/*******************************************************************
reads or writes a SAM_STR3 structure.
********************************************************************/
-void sam_io_sam_str3(char *desc, SAM_STR3 *sam, uint32 acct_buf, uint32 desc_buf, prs_struct *ps, int depth)
+static void sam_io_sam_str3(char *desc, SAM_STR3 *sam, uint32 acct_buf, uint32 desc_buf, prs_struct *ps, int depth)
{
if (sam == NULL) return;
@@ -595,7 +467,7 @@ void sam_io_sam_str3(char *desc, SAM_STR3 *sam, uint32 acct_buf, uint32 desc_bu
/*******************************************************************
makes a SAM_ENTRY3 structure.
********************************************************************/
-void make_sam_entry3(SAM_ENTRY3 *sam, uint32 grp_idx,
+static void make_sam_entry3(SAM_ENTRY3 *sam, uint32 grp_idx,
uint32 len_grp_name, uint32 len_grp_desc, uint32 rid_grp)
{
if (sam == NULL) return;
@@ -613,7 +485,7 @@ void make_sam_entry3(SAM_ENTRY3 *sam, uint32 grp_idx,
/*******************************************************************
reads or writes a SAM_ENTRY3 structure.
********************************************************************/
-void sam_io_sam_entry3(char *desc, SAM_ENTRY3 *sam, prs_struct *ps, int depth)
+static void sam_io_sam_entry3(char *desc, SAM_ENTRY3 *sam, prs_struct *ps, int depth)
{
if (sam == NULL) return;
@@ -634,7 +506,7 @@ void sam_io_sam_entry3(char *desc, SAM_ENTRY3 *sam, prs_struct *ps, int depth)
/*******************************************************************
makes a SAM_ENTRY structure.
********************************************************************/
-void make_sam_entry(SAM_ENTRY *sam, uint32 len_sam_name, uint32 rid)
+static void make_sam_entry(SAM_ENTRY *sam, uint32 len_sam_name, uint32 rid)
{
if (sam == NULL) return;
@@ -647,7 +519,7 @@ void make_sam_entry(SAM_ENTRY *sam, uint32 len_sam_name, uint32 rid)
/*******************************************************************
reads or writes a SAM_ENTRY structure.
********************************************************************/
-void sam_io_sam_entry(char *desc, SAM_ENTRY *sam, prs_struct *ps, int depth)
+static void sam_io_sam_entry(char *desc, SAM_ENTRY *sam, prs_struct *ps, int depth)
{
if (sam == NULL) return;
@@ -659,26 +531,6 @@ void sam_io_sam_entry(char *desc, SAM_ENTRY *sam, prs_struct *ps, int depth)
smb_io_unihdr("unihdr", &(sam->hdr_name), ps, depth); /* account name unicode string header */
}
-/*******************************************************************
-makes a SAMR_Q_ENUM_DOM_USERS structure.
-********************************************************************/
-void make_samr_q_enum_dom_users(SAMR_Q_ENUM_DOM_USERS *q_e, POLICY_HND *pol,
- uint16 req_num_entries, uint16 unk_0,
- uint16 acb_mask, uint16 unk_1, uint32 size)
-{
- if (q_e == NULL || pol == NULL) return;
-
- DEBUG(5,("make_q_enum_dom_users\n"));
-
- memcpy(&(q_e->pol), pol, sizeof(*pol));
-
- q_e->req_num_entries = req_num_entries; /* zero indicates lots */
- q_e->unknown_0 = unk_0; /* this gets returned in the response */
- q_e->acb_mask = acb_mask;
- q_e->unknown_1 = unk_1;
- q_e->max_size = size;
-}
-
/*******************************************************************
reads or writes a structure.
@@ -809,21 +661,6 @@ void samr_io_r_enum_dom_users(char *desc, SAMR_R_ENUM_DOM_USERS *r_u, prs_struc
prs_uint32("status", ps, depth, &(r_u->status));
}
-/*******************************************************************
-makes a SAMR_Q_ENUM_DOM_ALIASES structure.
-********************************************************************/
-void make_samr_q_enum_dom_aliases(SAMR_Q_ENUM_DOM_ALIASES *q_e, POLICY_HND *pol, uint32 size)
-{
- if (q_e == NULL || pol == NULL) return;
-
- DEBUG(5,("make_q_enum_dom_aliases\n"));
-
- memcpy(&(q_e->pol), pol, sizeof(*pol));
-
- q_e->unknown_0 = 0;
- q_e->max_size = size;
-}
-
/*******************************************************************
reads or writes a structure.
@@ -940,26 +777,6 @@ void samr_io_r_enum_dom_aliases(char *desc, SAMR_R_ENUM_DOM_ALIASES *r_u, prs_s
prs_uint32("status", ps, depth, &(r_u->status));
}
-/*******************************************************************
-makes a SAMR_Q_QUERY_DISPINFO structure.
-********************************************************************/
-void make_samr_q_query_dispinfo(SAMR_Q_QUERY_DISPINFO *q_e, POLICY_HND *pol,
- uint16 switch_level, uint32 start_idx, uint32 size)
-{
- if (q_e == NULL || pol == NULL) return;
-
- DEBUG(5,("make_q_query_dispinfo\n"));
-
- memcpy(&(q_e->pol), pol, sizeof(*pol));
-
- q_e->switch_level = switch_level;
-
- q_e->unknown_0 = 0;
- q_e->start_idx = start_idx;
- q_e->unknown_1 = 0x000007d0;
- q_e->max_size = size;
-}
-
/*******************************************************************
reads or writes a structure.
@@ -1033,7 +850,7 @@ void make_sam_info_2(SAM_INFO_2 *sam, uint32 acb_mask,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void sam_io_sam_info_2(char *desc, SAM_INFO_2 *sam, prs_struct *ps, int depth)
+static void sam_io_sam_info_2(char *desc, SAM_INFO_2 *sam, prs_struct *ps, int depth)
{
int i;
@@ -1116,7 +933,7 @@ void make_sam_info_1(SAM_INFO_1 *sam, uint32 acb_mask,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void sam_io_sam_info_1(char *desc, SAM_INFO_1 *sam, prs_struct *ps, int depth)
+static void sam_io_sam_info_1(char *desc, SAM_INFO_1 *sam, prs_struct *ps, int depth)
{
int i;
@@ -1218,26 +1035,6 @@ void samr_io_r_query_dispinfo(char *desc, SAMR_R_QUERY_DISPINFO *r_u, prs_struc
}
-/*******************************************************************
-makes a SAMR_Q_ENUM_DOM_GROUPS structure.
-********************************************************************/
-void make_samr_q_enum_dom_groups(SAMR_Q_ENUM_DOM_GROUPS *q_e, POLICY_HND *pol,
- uint16 switch_level, uint32 start_idx, uint32 size)
-{
- if (q_e == NULL || pol == NULL) return;
-
- DEBUG(5,("make_q_enum_dom_groups\n"));
-
- memcpy(&(q_e->pol), pol, sizeof(*pol));
-
- q_e->switch_level = switch_level;
-
- q_e->unknown_0 = 0;
- q_e->start_idx = start_idx;
- q_e->unknown_1 = 0x000007d0;
- q_e->max_size = size;
-}
-
/*******************************************************************
reads or writes a structure.
@@ -1370,22 +1167,6 @@ void samr_io_r_enum_dom_groups(char *desc, SAMR_R_ENUM_DOM_GROUPS *r_u, prs_str
}
-/*******************************************************************
-makes a SAMR_Q_QUERY_ALIASINFO structure.
-********************************************************************/
-void make_samr_q_query_aliasinfo(SAMR_Q_QUERY_ALIASINFO *q_e,
- POLICY_HND *pol,
- uint16 switch_level)
-{
- if (q_e == NULL || pol == NULL) return;
-
- DEBUG(5,("make_q_query_aliasinfo\n"));
-
- memcpy(&(q_e->pol), pol, sizeof(*pol));
-
- q_e->switch_level = switch_level;
-}
-
/*******************************************************************
reads or writes a structure.
@@ -1709,33 +1490,6 @@ void samr_io_r_lookup_names(char *desc, SAMR_R_LOOKUP_NAMES *r_u, prs_struct *p
}
/*******************************************************************
-makes a SAMR_Q_UNKNOWN_12 structure.
-********************************************************************/
-void make_samr_q_unknown_12(SAMR_Q_UNKNOWN_12 *q_u,
- POLICY_HND *pol, uint32 rid,
- uint32 num_gids, uint32 *gid)
-{
- int i;
- if (q_u == NULL) return;
-
- DEBUG(5,("make_samr_r_unknwon_12\n"));
-
- memcpy(&(q_u->pol), pol, sizeof(*pol));
-
- q_u->num_gids1 = num_gids;
- q_u->rid = rid;
- q_u->ptr = 0;
- q_u->num_gids2 = num_gids;
-
- SMB_ASSERT_ARRAY(q_u->gid, num_gids);
-
- for (i = 0; i < num_gids; i++)
- {
- q_u->gid[i] = gid[i];
- }
-}
-
-/*******************************************************************
reads or writes a structure.
********************************************************************/
void samr_io_q_unknown_12(char *desc, SAMR_Q_UNKNOWN_12 *q_u, prs_struct *ps, int depth)
@@ -1870,23 +1624,6 @@ void samr_io_r_unknown_12(char *desc, SAMR_R_UNKNOWN_12 *r_u, prs_struct *ps, i
prs_uint32("status", ps, depth, &(r_u->status));
}
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-void make_samr_q_open_user(SAMR_Q_OPEN_USER *q_u,
- POLICY_HND *pol,
- uint32 unk_0, uint32 rid)
-{
- if (q_u == NULL) return;
-
- DEBUG(5,("samr_make_q_open_user\n"));
-
- memcpy(&q_u->domain_pol, pol, sizeof(q_u->domain_pol));
-
- q_u->unknown_0 = unk_0;
- q_u->user_rid = rid;
-}
-
/*******************************************************************
reads or writes a structure.
@@ -1929,19 +1666,6 @@ void samr_io_r_open_user(char *desc, SAMR_R_OPEN_USER *r_u, prs_struct *ps, int
/*******************************************************************
-makes a SAMR_Q_QUERY_USERGROUPS structure.
-********************************************************************/
-void make_samr_q_query_usergroups(SAMR_Q_QUERY_USERGROUPS *q_u,
- POLICY_HND *hnd)
-{
- if (q_u == NULL || hnd == NULL) return;
-
- DEBUG(5,("make_samr_q_query_usergroups\n"));
-
- memcpy(&(q_u->pol), hnd, sizeof(q_u->pol));
-}
-
-/*******************************************************************
reads or writes a structure.
********************************************************************/
void samr_io_q_query_usergroups(char *desc, SAMR_Q_QUERY_USERGROUPS *q_u, prs_struct *ps, int depth)
@@ -2032,20 +1756,6 @@ void samr_io_r_query_usergroups(char *desc, SAMR_R_QUERY_USERGROUPS *r_u, prs_s
}
/*******************************************************************
-makes a SAMR_Q_QUERY_USERINFO structure.
-********************************************************************/
-void make_samr_q_query_userinfo(SAMR_Q_QUERY_USERINFO *q_u,
- POLICY_HND *hnd, uint16 switch_value)
-{
- if (q_u == NULL || hnd == NULL) return;
-
- DEBUG(5,("make_samr_q_query_userinfo\n"));
-
- memcpy(&(q_u->pol), hnd, sizeof(q_u->pol));
- q_u->switch_value = switch_value;
-}
-
-/*******************************************************************
reads or writes a structure.
********************************************************************/
void samr_io_q_query_userinfo(char *desc, SAMR_Q_QUERY_USERINFO *q_u, prs_struct *ps, int depth)
@@ -2068,7 +1778,7 @@ void samr_io_q_query_userinfo(char *desc, SAMR_Q_QUERY_USERINFO *q_u, prs_struc
/*******************************************************************
reads or writes a LOGON_HRS structure.
********************************************************************/
-void sam_io_logon_hrs(char *desc, LOGON_HRS *hrs, prs_struct *ps, int depth)
+static void sam_io_logon_hrs(char *desc, LOGON_HRS *hrs, prs_struct *ps, int depth)
{
if (hrs == NULL) return;
@@ -2088,104 +1798,6 @@ void sam_io_logon_hrs(char *desc, LOGON_HRS *hrs, prs_struct *ps, int depth)
prs_uint8s (False, "hours", ps, depth, hrs->hours, hrs->len);
}
-/*******************************************************************
-makes a SAM_USER_INFO_11 structure.
-********************************************************************/
-void make_sam_user_info11(SAM_USER_INFO_11 *usr,
- NTTIME *expiry,
- char *mach_acct,
- uint32 rid_user,
- uint32 rid_group,
- uint16 acct_ctrl)
-
-{
- int len_mach_acct;
- if (usr == NULL || expiry == NULL || mach_acct == NULL) return;
-
- DEBUG(5,("make_samr_r_unknown_24\n"));
-
- len_mach_acct = strlen(mach_acct);
-
- memcpy(&(usr->expiry),expiry, sizeof(usr->expiry)); /* expiry time or something? */
- bzero(usr->padding_1, sizeof(usr->padding_1)); /* 0 - padding 24 bytes */
-
- make_uni_hdr(&(usr->hdr_mach_acct), len_mach_acct, len_mach_acct, 4); /* unicode header for machine account */
- usr->padding_2 = 0; /* 0 - padding 4 bytes */
-
- usr->ptr_1 = 1; /* pointer */
- bzero(usr->padding_3, sizeof(usr->padding_3)); /* 0 - padding 32 bytes */
- usr->padding_4 = 0; /* 0 - padding 4 bytes */
-
- usr->ptr_2 = 1; /* pointer */
- usr->padding_5 = 0; /* 0 - padding 4 bytes */
-
- usr->ptr_3 = 1; /* pointer */
- bzero(usr->padding_6, sizeof(usr->padding_6)); /* 0 - padding 32 bytes */
-
- usr->rid_user = rid_user;
- usr->rid_group = rid_group;
-
- usr->acct_ctrl = acct_ctrl;
- usr->unknown_3 = 0x0000;
-
- usr->unknown_4 = 0x003f; /* 0x003f - 16 bit unknown */
- usr->unknown_5 = 0x003c; /* 0x003c - 16 bit unknown */
-
- bzero(usr->padding_7, sizeof(usr->padding_7)); /* 0 - padding 16 bytes */
- usr->padding_8 = 0; /* 0 - padding 4 bytes */
-
- make_unistr2(&(usr->uni_mach_acct), mach_acct, len_mach_acct); /* unicode string for machine account */
-
- bzero(usr->padding_9, sizeof(usr->padding_9)); /* 0 - padding 48 bytes */
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-void sam_io_user_info11(char *desc, SAM_USER_INFO_11 *usr, prs_struct *ps, int depth)
-{
- if (usr == NULL) return;
-
- prs_debug(ps, depth, desc, "samr_io_r_unknown_24");
- depth++;
-
- prs_align(ps);
-
- prs_uint8s (False, "padding_0", ps, depth, usr->padding_0, sizeof(usr->padding_0));
-
- smb_io_time("time", &(usr->expiry), ps, depth);
-
- prs_uint8s (False, "padding_1", ps, depth, usr->padding_1, sizeof(usr->padding_1));
-
- smb_io_unihdr ("unihdr", &(usr->hdr_mach_acct), ps, depth);
- prs_uint32( "padding_2", ps, depth, &(usr->padding_2));
-
- prs_uint32( "ptr_1 ", ps, depth, &(usr->ptr_1 ));
- prs_uint8s (False, "padding_3", ps, depth, usr->padding_3, sizeof(usr->padding_3));
- prs_uint32( "padding_4", ps, depth, &(usr->padding_4));
-
- prs_uint32( "ptr_2 ", ps, depth, &(usr->ptr_2 ));
- prs_uint32( "padding_5", ps, depth, &(usr->padding_5));
-
- prs_uint32( "ptr_3 ", ps, depth, &(usr->ptr_3 ));
- prs_uint8s (False, "padding_6", ps, depth, usr->padding_6, sizeof(usr->padding_6));
-
- prs_uint32( "rid_user ", ps, depth, &(usr->rid_user ));
- prs_uint32( "rid_group", ps, depth, &(usr->rid_group));
- prs_uint16( "acct_ctrl", ps, depth, &(usr->acct_ctrl));
- prs_uint16( "unknown_3", ps, depth, &(usr->unknown_3));
- prs_uint16( "unknown_4", ps, depth, &(usr->unknown_4));
- prs_uint16( "unknown_5", ps, depth, &(usr->unknown_5));
-
- prs_uint8s (False, "padding_7", ps, depth, usr->padding_7, sizeof(usr->padding_7));
- prs_uint32( "padding_8", ps, depth, &(usr->padding_8));
-
- smb_io_unistr2("unistr2", &(usr->uni_mach_acct), True, ps, depth);
- prs_align(ps);
-
- prs_uint8s (False, "padding_9", ps, depth, usr->padding_9, sizeof(usr->padding_9));
-}
-
/*************************************************************************
make_sam_user_info21
@@ -2295,7 +1907,7 @@ void make_sam_user_info21(SAM_USER_INFO_21 *usr,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void sam_io_user_info21(char *desc, SAM_USER_INFO_21 *usr, prs_struct *ps, int depth)
+static void sam_io_user_info21(char *desc, SAM_USER_INFO_21 *usr, prs_struct *ps, int depth)
{
if (usr == NULL) return;
@@ -2489,75 +2101,6 @@ void samr_io_r_query_userinfo(char *desc, SAMR_R_QUERY_USERINFO *r_u, prs_struc
prs_uint32("status", ps, depth, &(r_u->status));
}
-
-/*******************************************************************
-makes a SAMR_Q_UNKNOWN_21 structure.
-********************************************************************/
-void make_samr_q_unknown_21(SAMR_Q_UNKNOWN_21 *q_c,
- POLICY_HND *hnd, uint16 unk_1, uint16 unk_2)
-{
- if (q_c == NULL || hnd == NULL) return;
-
- DEBUG(5,("make_samr_q_unknown_21\n"));
-
- memcpy(&(q_c->group_pol), hnd, sizeof(q_c->group_pol));
- q_c->unknown_1 = unk_1;
- q_c->unknown_2 = unk_2;
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-void samr_io_q_unknown_21(char *desc, SAMR_Q_UNKNOWN_21 *q_u, prs_struct *ps, int depth)
-{
- if (q_u == NULL) return;
-
- prs_debug(ps, depth, desc, "samr_io_q_unknown_21");
- depth++;
-
- prs_align(ps);
-
- smb_io_pol_hnd("group_pol", &(q_u->group_pol), ps, depth);
- prs_align(ps);
-
- prs_uint16("unknown_1", ps, depth, &(q_u->unknown_1));
- prs_uint16("unknown_2", ps, depth, &(q_u->unknown_2));
-}
-
-/*******************************************************************
-makes a SAMR_Q_UNKNOWN_13 structure.
-********************************************************************/
-void make_samr_q_unknown_13(SAMR_Q_UNKNOWN_13 *q_c,
- POLICY_HND *hnd, uint16 unk_1, uint16 unk_2)
-{
- if (q_c == NULL || hnd == NULL) return;
-
- DEBUG(5,("make_samr_q_unknown_13\n"));
-
- memcpy(&(q_c->alias_pol), hnd, sizeof(q_c->alias_pol));
- q_c->unknown_1 = unk_1;
- q_c->unknown_2 = unk_2;
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-void samr_io_q_unknown_13(char *desc, SAMR_Q_UNKNOWN_13 *q_u, prs_struct *ps, int depth)
-{
- if (q_u == NULL) return;
-
- prs_debug(ps, depth, desc, "samr_io_q_unknown_13");
- depth++;
-
- prs_align(ps);
-
- smb_io_pol_hnd("alias_pol", &(q_u->alias_pol), ps, depth);
- prs_align(ps);
-
- prs_uint16("unknown_1", ps, depth, &(q_u->unknown_1));
- prs_uint16("unknown_2", ps, depth, &(q_u->unknown_2));
-}
-
/*******************************************************************
reads or writes a structure.
********************************************************************/
@@ -2603,25 +2146,6 @@ void samr_io_r_unknown_32(char *desc, SAMR_R_UNKNOWN_32 *r_u, prs_struct *ps, i
/*******************************************************************
-makes a SAMR_Q_CONNECT structure.
-********************************************************************/
-void make_samr_q_connect(SAMR_Q_CONNECT *q_u,
- char *srv_name, uint32 unknown_0)
-{
- int len_srv_name = strlen(srv_name);
-
- if (q_u == NULL) return;
-
- DEBUG(5,("make_q_connect\n"));
-
- /* make PDC server name \\server */
- make_unistr2(&(q_u->uni_srv_name), srv_name, len_srv_name);
-
- /* example values: 0x0000 0002 */
- q_u->unknown_0 = unknown_0;
-}
-
-/*******************************************************************
reads or writes a structure.
********************************************************************/
void samr_io_q_connect(char *desc, SAMR_Q_CONNECT *q_u, prs_struct *ps, int depth)
@@ -2660,22 +2184,6 @@ void samr_io_r_connect(char *desc, SAMR_R_CONNECT *r_u, prs_struct *ps, int dep
}
/*******************************************************************
-makes a SAMR_Q_OPEN_ALIAS structure.
-********************************************************************/
-void make_samr_q_open_alias(SAMR_Q_OPEN_ALIAS *q_u,
- uint32 unknown_0, uint32 rid)
-{
- if (q_u == NULL) return;
-
- DEBUG(5,("make_q_open_alias\n"));
-
- /* example values: 0x0000 0008 */
- q_u->unknown_0 = unknown_0;
-
- q_u->rid_alias = rid;
-}
-
-/*******************************************************************
reads or writes a structure.
********************************************************************/
void samr_io_q_open_alias(char *desc, SAMR_Q_OPEN_ALIAS *q_u, prs_struct *ps, int depth)
@@ -2709,106 +2217,6 @@ void samr_io_r_open_alias(char *desc, SAMR_R_OPEN_ALIAS *r_u, prs_struct *ps, i
prs_uint32("status", ps, depth, &(r_u->status));
}
-/*******************************************************************
-makes a SAMR_Q_UNKNOWN_38 structure.
-********************************************************************/
-void make_samr_q_unknown_38(SAMR_Q_UNKNOWN_38 *q_u, char *srv_name)
-{
- int len_srv_name = strlen(srv_name);
-
- if (q_u == NULL) return;
-
- DEBUG(5,("make_q_unknown_38\n"));
-
- q_u->ptr = 1;
- make_uni_hdr(&(q_u->hdr_srv_name), len_srv_name, len_srv_name, len_srv_name != 0);
- make_unistr2(&(q_u->uni_srv_name), srv_name, len_srv_name);
-
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-void samr_io_q_unknown_38(char *desc, SAMR_Q_UNKNOWN_38 *q_u, prs_struct *ps, int depth)
-{
- if (q_u == NULL) return;
-
- prs_debug(ps, depth, desc, "samr_io_q_unknown_38");
- depth++;
-
- prs_align(ps);
-
- prs_uint32("ptr", ps, depth, &(q_u->ptr));
- if (q_u->ptr != 0)
- {
- smb_io_unihdr ("", &(q_u->hdr_srv_name), ps, depth);
- smb_io_unistr2("", &(q_u->uni_srv_name), q_u->hdr_srv_name.buffer, ps, depth);
- }
-}
-
-/*******************************************************************
-makes a SAMR_R_UNKNOWN_38 structure.
-********************************************************************/
-void make_samr_r_unknown_38(SAMR_R_UNKNOWN_38 *r_u,
- uint16 level, uint32 status)
-{
- if (r_u == NULL) return;
-
- DEBUG(5,("make_r_unknown_38\n"));
-
- r_u->level.value = level;
- r_u->ptr_0 = 0;
- r_u->status = status;
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-void samr_io_r_unknown_38(char *desc, SAMR_R_UNKNOWN_38 *r_u, prs_struct *ps, int depth)
-{
- if (r_u == NULL) return;
-
- prs_debug(ps, depth, desc, "samr_io_r_unknown_38");
- depth++;
-
- prs_align(ps);
-
- smb_io_lookup_level("level ", &(r_u->level), ps, depth);
- prs_uint32("ptr_0 ", ps, depth, &(r_u->ptr_0 ));
- prs_uint32("status", ps, depth, &(r_u->status));
-}
-
-/*******************************************************************
-reads or writes a SAMR_ENC_PASSWD structure.
-********************************************************************/
-void samr_io_enc_passwd(char *desc, SAMR_ENC_PASSWD *pwd, prs_struct *ps, int depth)
-{
- if (pwd == NULL) return;
-
- prs_debug(ps, depth, desc, "samr_io_enc_passwd");
- depth++;
-
- prs_align(ps);
-
- prs_uint32("ptr", ps, depth, &(pwd->ptr));
- prs_uint8s(False, "pwd", ps, depth, pwd->pass, sizeof(pwd->pass));
-}
-
-/*******************************************************************
-reads or writes a SAMR_ENC_HASH structure.
-********************************************************************/
-void samr_io_enc_hash(char *desc, SAMR_ENC_HASH *hsh, prs_struct *ps, int depth)
-{
- if (hsh == NULL) return;
-
- prs_debug(ps, depth, desc, "samr_io_enc_hash");
- depth++;
-
- prs_align(ps);
-
- prs_uint32("ptr ", ps, depth, &(hsh->ptr));
- prs_uint8s(False, "hash", ps, depth, hsh->hash, sizeof(hsh->hash));
-}
#if 0
/* SAMR_Q_CHGPASSWD_USER */
diff --git a/source3/rpc_parse/parse_srv.c b/source3/rpc_parse/parse_srv.c
index 356b515f19..db557028a5 100644
--- a/source3/rpc_parse/parse_srv.c
+++ b/source3/rpc_parse/parse_srv.c
@@ -44,7 +44,7 @@ void make_srv_share_info1_str(SH_INFO_1_STR *sh1, char *net_name, char *remark)
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void srv_io_share_info1_str(char *desc, SH_INFO_1_STR *sh1, prs_struct *ps, int depth)
+static void srv_io_share_info1_str(char *desc, SH_INFO_1_STR *sh1, prs_struct *ps, int depth)
{
if (sh1 == NULL) return;
@@ -74,7 +74,7 @@ void make_srv_share_info1(SH_INFO_1 *sh1, char *net_name, uint32 type, char *rem
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void srv_io_share_info1(char *desc, SH_INFO_1 *sh1, prs_struct *ps, int depth)
+static void srv_io_share_info1(char *desc, SH_INFO_1 *sh1, prs_struct *ps, int depth)
{
if (sh1 == NULL) return;
@@ -91,7 +91,7 @@ void srv_io_share_info1(char *desc, SH_INFO_1 *sh1, prs_struct *ps, int depth)
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void srv_io_srv_share_info_1(char *desc, SRV_SHARE_INFO_1 *ctr, prs_struct *ps, int depth)
+static void srv_io_srv_share_info_1(char *desc, SRV_SHARE_INFO_1 *ctr, prs_struct *ps, int depth)
{
if (ctr == NULL) return;
@@ -152,7 +152,7 @@ void make_srv_share_info2_str(SH_INFO_2_STR *sh2,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void srv_io_share_info2_str(char *desc, SH_INFO_2_STR *sh2, prs_struct *ps, int depth)
+static void srv_io_share_info2_str(char *desc, SH_INFO_2_STR *sh2, prs_struct *ps, int depth)
{
if (sh2 == NULL) return;
@@ -193,7 +193,7 @@ void make_srv_share_info2(SH_INFO_2 *sh2,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void srv_io_share_info2(char *desc, SH_INFO_2 *sh2, prs_struct *ps, int depth)
+static void srv_io_share_info2(char *desc, SH_INFO_2 *sh2, prs_struct *ps, int depth)
{
if (sh2 == NULL) return;
@@ -215,7 +215,7 @@ void srv_io_share_info2(char *desc, SH_INFO_2 *sh2, prs_struct *ps, int depth)
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void srv_io_srv_share_info_2(char *desc, SRV_SHARE_INFO_2 *ctr, prs_struct *ps, int depth)
+static void srv_io_srv_share_info_2(char *desc, SRV_SHARE_INFO_2 *ctr, prs_struct *ps, int depth)
{
if (ctr == NULL) return;
@@ -259,7 +259,7 @@ void srv_io_srv_share_info_2(char *desc, SRV_SHARE_INFO_2 *ctr, prs_struct *ps,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void srv_io_srv_share_ctr(char *desc, SRV_SHARE_INFO_CTR *ctr, prs_struct *ps, int depth)
+static void srv_io_srv_share_ctr(char *desc, SRV_SHARE_INFO_CTR *ctr, prs_struct *ps, int depth)
{
if (ctr == NULL) return;
@@ -298,29 +298,6 @@ void srv_io_srv_share_ctr(char *desc, SRV_SHARE_INFO_CTR *ctr, prs_struct *ps,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void make_srv_q_net_share_enum(SRV_Q_NET_SHARE_ENUM *q_n,
- char *srv_name,
- uint32 share_level, SRV_SHARE_INFO_CTR *ctr,
- uint32 preferred_len,
- ENUM_HND *hnd)
-{
- if (q_n == NULL || ctr == NULL || hnd == NULL) return;
-
- q_n->ctr = ctr;
-
- DEBUG(5,("make_q_net_share_enum\n"));
-
- make_buf_unistr2(&(q_n->uni_srv_name), &(q_n->ptr_srv_name), srv_name);
-
- q_n->share_level = share_level;
- q_n->preferred_len = preferred_len;
-
- memcpy(&(q_n->enum_hnd), hnd, sizeof(*hnd));
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
void srv_io_q_net_share_enum(char *desc, SRV_Q_NET_SHARE_ENUM *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL) return;
@@ -386,7 +363,7 @@ void make_srv_sess_info0_str(SESS_INFO_0_STR *ss0, char *name)
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void srv_io_sess_info0_str(char *desc, SESS_INFO_0_STR *ss0, prs_struct *ps, int depth)
+static void srv_io_sess_info0_str(char *desc, SESS_INFO_0_STR *ss0, prs_struct *ps, int depth)
{
if (ss0 == NULL) return;
@@ -413,7 +390,7 @@ void make_srv_sess_info0(SESS_INFO_0 *ss0, char *name)
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void srv_io_sess_info0(char *desc, SESS_INFO_0 *ss0, prs_struct *ps, int depth)
+static void srv_io_sess_info0(char *desc, SESS_INFO_0 *ss0, prs_struct *ps, int depth)
{
if (ss0 == NULL) return;
@@ -428,7 +405,7 @@ void srv_io_sess_info0(char *desc, SESS_INFO_0 *ss0, prs_struct *ps, int depth)
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void srv_io_srv_sess_info_0(char *desc, SRV_SESS_INFO_0 *ss0, prs_struct *ps, int depth)
+static void srv_io_srv_sess_info_0(char *desc, SRV_SESS_INFO_0 *ss0, prs_struct *ps, int depth)
{
if (ss0 == NULL) return;
@@ -485,7 +462,7 @@ void make_srv_sess_info1_str(SESS_INFO_1_STR *ss1, char *name, char *user)
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void srv_io_sess_info1_str(char *desc, SESS_INFO_1_STR *ss1, prs_struct *ps, int depth)
+static void srv_io_sess_info1_str(char *desc, SESS_INFO_1_STR *ss1, prs_struct *ps, int depth)
{
if (ss1 == NULL) return;
@@ -522,7 +499,7 @@ void make_srv_sess_info1(SESS_INFO_1 *ss1,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void srv_io_sess_info1(char *desc, SESS_INFO_1 *ss1, prs_struct *ps, int depth)
+static void srv_io_sess_info1(char *desc, SESS_INFO_1 *ss1, prs_struct *ps, int depth)
{
if (ss1 == NULL) return;
@@ -543,7 +520,7 @@ void srv_io_sess_info1(char *desc, SESS_INFO_1 *ss1, prs_struct *ps, int depth)
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void srv_io_srv_sess_info_1(char *desc, SRV_SESS_INFO_1 *ss1, prs_struct *ps, int depth)
+static void srv_io_srv_sess_info_1(char *desc, SRV_SESS_INFO_1 *ss1, prs_struct *ps, int depth)
{
if (ss1 == NULL) return;
@@ -587,7 +564,7 @@ void srv_io_srv_sess_info_1(char *desc, SRV_SESS_INFO_1 *ss1, prs_struct *ps, i
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void srv_io_srv_sess_ctr(char *desc, SRV_SESS_INFO_CTR *ctr, prs_struct *ps, int depth)
+static void srv_io_srv_sess_ctr(char *desc, SRV_SESS_INFO_CTR *ctr, prs_struct *ps, int depth)
{
if (ctr == NULL) return;
@@ -626,30 +603,6 @@ void srv_io_srv_sess_ctr(char *desc, SRV_SESS_INFO_CTR *ctr, prs_struct *ps, in
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void make_srv_q_net_sess_enum(SRV_Q_NET_SESS_ENUM *q_n,
- char *srv_name, char *qual_name,
- uint32 sess_level, SRV_SESS_INFO_CTR *ctr,
- uint32 preferred_len,
- ENUM_HND *hnd)
-{
- if (q_n == NULL || ctr == NULL || hnd == NULL) return;
-
- q_n->ctr = ctr;
-
- DEBUG(5,("make_q_net_sess_enum\n"));
-
- make_buf_unistr2(&(q_n->uni_srv_name), &(q_n->ptr_srv_name), srv_name);
- make_buf_unistr2(&(q_n->uni_qual_name), &(q_n->ptr_qual_name), qual_name);
-
- q_n->sess_level = sess_level;
- q_n->preferred_len = preferred_len;
-
- memcpy(&(q_n->enum_hnd), hnd, sizeof(*hnd));
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
void srv_io_q_net_sess_enum(char *desc, SRV_Q_NET_SESS_ENUM *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL) return;
@@ -720,7 +673,7 @@ void make_srv_conn_info0(CONN_INFO_0 *ss0, uint32 id)
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void srv_io_conn_info0(char *desc, CONN_INFO_0 *ss0, prs_struct *ps, int depth)
+static void srv_io_conn_info0(char *desc, CONN_INFO_0 *ss0, prs_struct *ps, int depth)
{
if (ss0 == NULL) return;
@@ -735,7 +688,7 @@ void srv_io_conn_info0(char *desc, CONN_INFO_0 *ss0, prs_struct *ps, int depth)
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void srv_io_srv_conn_info_0(char *desc, SRV_CONN_INFO_0 *ss0, prs_struct *ps, int depth)
+static void srv_io_srv_conn_info_0(char *desc, SRV_CONN_INFO_0 *ss0, prs_struct *ps, int depth)
{
if (ss0 == NULL) return;
@@ -784,7 +737,7 @@ void make_srv_conn_info1_str(CONN_INFO_1_STR *ss1, char *usr_name, char *net_nam
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void srv_io_conn_info1_str(char *desc, CONN_INFO_1_STR *ss1, prs_struct *ps, int depth)
+static void srv_io_conn_info1_str(char *desc, CONN_INFO_1_STR *ss1, prs_struct *ps, int depth)
{
if (ss1 == NULL) return;
@@ -822,7 +775,7 @@ void make_srv_conn_info1(CONN_INFO_1 *ss1,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void srv_io_conn_info1(char *desc, CONN_INFO_1 *ss1, prs_struct *ps, int depth)
+static void srv_io_conn_info1(char *desc, CONN_INFO_1 *ss1, prs_struct *ps, int depth)
{
if (ss1 == NULL) return;
@@ -844,7 +797,7 @@ void srv_io_conn_info1(char *desc, CONN_INFO_1 *ss1, prs_struct *ps, int depth)
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void srv_io_srv_conn_info_1(char *desc, SRV_CONN_INFO_1 *ss1, prs_struct *ps, int depth)
+static void srv_io_srv_conn_info_1(char *desc, SRV_CONN_INFO_1 *ss1, prs_struct *ps, int depth)
{
if (ss1 == NULL) return;
@@ -886,7 +839,7 @@ void srv_io_srv_conn_info_1(char *desc, SRV_CONN_INFO_1 *ss1, prs_struct *ps, i
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void srv_io_srv_conn_ctr(char *desc, SRV_CONN_INFO_CTR *ctr, prs_struct *ps, int depth)
+static void srv_io_srv_conn_ctr(char *desc, SRV_CONN_INFO_CTR *ctr, prs_struct *ps, int depth)
{
if (ctr == NULL) return;
@@ -925,30 +878,6 @@ void srv_io_srv_conn_ctr(char *desc, SRV_CONN_INFO_CTR *ctr, prs_struct *ps, in
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void make_srv_q_net_conn_enum(SRV_Q_NET_CONN_ENUM *q_n,
- char *srv_name, char *qual_name,
- uint32 conn_level, SRV_CONN_INFO_CTR *ctr,
- uint32 preferred_len,
- ENUM_HND *hnd)
-{
- if (q_n == NULL || ctr == NULL || hnd == NULL) return;
-
- q_n->ctr = ctr;
-
- DEBUG(5,("make_q_net_conn_enum\n"));
-
- make_buf_unistr2(&(q_n->uni_srv_name ), &(q_n->ptr_srv_name ), srv_name );
- make_buf_unistr2(&(q_n->uni_qual_name), &(q_n->ptr_qual_name), qual_name);
-
- q_n->conn_level = conn_level;
- q_n->preferred_len = preferred_len;
-
- memcpy(&(q_n->enum_hnd), hnd, sizeof(*hnd));
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
void srv_io_q_net_conn_enum(char *desc, SRV_Q_NET_CONN_ENUM *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL) return;
@@ -1020,7 +949,7 @@ void make_srv_file_info3_str(FILE_INFO_3_STR *fi3, char *user_name, char *path_n
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void srv_io_file_info3_str(char *desc, FILE_INFO_3_STR *sh1, prs_struct *ps, int depth)
+static void srv_io_file_info3_str(char *desc, FILE_INFO_3_STR *sh1, prs_struct *ps, int depth)
{
if (sh1 == NULL) return;
@@ -1055,7 +984,7 @@ void make_srv_file_info3(FILE_INFO_3 *fl3,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void srv_io_file_info3(char *desc, FILE_INFO_3 *fl3, prs_struct *ps, int depth)
+static void srv_io_file_info3(char *desc, FILE_INFO_3 *fl3, prs_struct *ps, int depth)
{
if (fl3 == NULL) return;
@@ -1074,7 +1003,7 @@ void srv_io_file_info3(char *desc, FILE_INFO_3 *fl3, prs_struct *ps, int depth)
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void srv_io_srv_file_info_3(char *desc, SRV_FILE_INFO_3 *fl3, prs_struct *ps, int depth)
+static void srv_io_srv_file_info_3(char *desc, SRV_FILE_INFO_3 *fl3, prs_struct *ps, int depth)
{
if (fl3 == NULL) return;
@@ -1115,7 +1044,7 @@ void srv_io_srv_file_info_3(char *desc, SRV_FILE_INFO_3 *fl3, prs_struct *ps, i
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void srv_io_srv_file_ctr(char *desc, SRV_FILE_INFO_CTR *ctr, prs_struct *ps, int depth)
+static void srv_io_srv_file_ctr(char *desc, SRV_FILE_INFO_CTR *ctr, prs_struct *ps, int depth)
{
if (ctr == NULL) return;
@@ -1149,30 +1078,6 @@ void srv_io_srv_file_ctr(char *desc, SRV_FILE_INFO_CTR *ctr, prs_struct *ps, in
/*******************************************************************
reads or writes a structure.
********************************************************************/
-void make_srv_q_net_file_enum(SRV_Q_NET_FILE_ENUM *q_n,
- char *srv_name, char *qual_name,
- uint32 file_level, SRV_FILE_INFO_CTR *ctr,
- uint32 preferred_len,
- ENUM_HND *hnd)
-{
- if (q_n == NULL || ctr == NULL || hnd == NULL) return;
-
- q_n->ctr = ctr;
-
- DEBUG(5,("make_q_net_file_enum\n"));
-
- make_buf_unistr2(&(q_n->uni_srv_name), &(q_n->ptr_srv_name), srv_name);
- make_buf_unistr2(&(q_n->uni_qual_name), &(q_n->ptr_qual_name), qual_name);
-
- q_n->file_level = file_level;
- q_n->preferred_len = preferred_len;
-
- memcpy(&(q_n->enum_hnd), hnd, sizeof(*hnd));
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
void srv_io_q_net_file_enum(char *desc, SRV_Q_NET_FILE_ENUM *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL) return;
@@ -1251,7 +1156,7 @@ void make_srv_info_101(SRV_INFO_101 *sv101, uint32 platform_id, char *name,
/*******************************************************************
reads or writes a SRV_INFO_101 structure.
********************************************************************/
-void srv_io_info_101(char *desc, SRV_INFO_101 *sv101, prs_struct *ps, int depth)
+static void srv_io_info_101(char *desc, SRV_INFO_101 *sv101, prs_struct *ps, int depth)
{
if (sv101 == NULL) return;
@@ -1308,7 +1213,7 @@ void make_srv_info_102(SRV_INFO_102 *sv102, uint32 platform_id, char *name,
/*******************************************************************
reads or writes a SRV_INFO_102 structure.
********************************************************************/
-void srv_io_info_102(char *desc, SRV_INFO_102 *sv102, prs_struct *ps, int depth)
+static void srv_io_info_102(char *desc, SRV_INFO_102 *sv102, prs_struct *ps, int depth)
{
if (sv102 == NULL) return;
@@ -1344,7 +1249,7 @@ void srv_io_info_102(char *desc, SRV_INFO_102 *sv102, prs_struct *ps, int depth
/*******************************************************************
reads or writes a SRV_INFO_102 structure.
********************************************************************/
-void srv_io_info_ctr(char *desc, SRV_INFO_CTR *ctr, prs_struct *ps, int depth)
+static void srv_io_info_ctr(char *desc, SRV_INFO_CTR *ctr, prs_struct *ps, int depth)
{
if (ctr == NULL) return;
@@ -1380,20 +1285,6 @@ void srv_io_info_ctr(char *desc, SRV_INFO_CTR *ctr, prs_struct *ps, int depth)
}
}
-/*******************************************************************
- makes a SRV_Q_NET_SRV_GET_INFO structure.
- ********************************************************************/
-void make_srv_q_net_srv_get_info(SRV_Q_NET_SRV_GET_INFO *srv,
- char *server_name, uint32 switch_value)
-{
- if (srv == NULL) return;
-
- DEBUG(5,("make_srv_q_net_srv_get_info\n"));
-
- make_buf_unistr2(&(srv->uni_srv_name), &(srv->ptr_srv_name), server_name);
-
- srv->switch_value = switch_value;
-}
/*******************************************************************
reads or writes a structure.
@@ -1460,80 +1351,6 @@ void srv_io_r_net_srv_get_info(char *desc, SRV_R_NET_SRV_GET_INFO *r_n, prs_str
/*******************************************************************
- makes a SRV_Q_NET_SRV_SET_INFO structure.
- ********************************************************************/
-void make_srv_q_net_srv_set_info(SRV_Q_NET_SRV_SET_INFO *srv,
- uint32 switch_value, SRV_INFO_CTR *ctr)
-{
- if (srv == NULL) return;
-
- DEBUG(5,("make_srv_r_net_srv_set_info\n"));
-
- srv->ctr = ctr;
-
- srv->ctr->switch_value = switch_value;
- srv->ctr->ptr_srv_ctr = 1;
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-void srv_io_q_net_srv_set_info(char *desc, SRV_Q_NET_SRV_SET_INFO *q_n, prs_struct *ps, int depth)
-{
- if (q_n == NULL) return;
-
- prs_debug(ps, depth, desc, "srv_io_q_net_srv_set_info");
- depth++;
-
- prs_align(ps);
-
- prs_uint32("ptr_srv_name ", ps, depth, &(q_n->ptr_srv_name));
- smb_io_unistr2("", &(q_n->uni_srv_name), True, ps, depth);
-
- prs_align(ps);
-
- srv_io_info_ctr("ctr", q_n->ctr, ps, depth);
-}
-
-/*******************************************************************
- makes a SRV_R_NET_SRV_SET_INFO structure.
- ********************************************************************/
-void make_srv_r_net_srv_set_info(SRV_R_NET_SRV_SET_INFO *srv,
- uint32 switch_value, SRV_INFO_CTR *ctr, uint32 status)
-{
- if (srv == NULL) return;
-
- DEBUG(5,("make_srv_r_net_srv_set_info\n"));
-
- if (status == 0x0)
- {
- srv->switch_value = switch_value;
- }
- else
- {
- srv->switch_value = 0;
- }
-
- srv->status = status;
-}
-
-/*******************************************************************
- reads or writes a structure.
- ********************************************************************/
-void srv_io_r_net_srv_set_info(char *desc, SRV_R_NET_SRV_SET_INFO *r_n, prs_struct *ps, int depth)
-{
- if (r_n == NULL) return;
-
- prs_debug(ps, depth, desc, "srv_io_q_net_srv_set_info");
- depth++;
-
- prs_align(ps);
-
- prs_uint32("switch_value", ps, depth, &(r_n->switch_value));
- prs_uint32("status ", ps, depth, &(r_n->status ));
-}
-
-/*******************************************************************
reads or writes a structure.
********************************************************************/
void srv_io_q_net_remote_tod(char *desc, SRV_Q_NET_REMOTE_TOD *q_n, prs_struct *ps, int depth)
@@ -1552,7 +1369,7 @@ void srv_io_q_net_remote_tod(char *desc, SRV_Q_NET_REMOTE_TOD *q_n, prs_struct
/*******************************************************************
reads or writes a TIME_OF_DAY_INFO structure.
********************************************************************/
-void srv_io_time_of_day_info(char *desc, TIME_OF_DAY_INFO *tod, prs_struct *ps, int depth)
+static void srv_io_time_of_day_info(char *desc, TIME_OF_DAY_INFO *tod, prs_struct *ps, int depth)
{
if (tod == NULL) return;
diff --git a/source3/rpc_parse/parse_wks.c b/source3/rpc_parse/parse_wks.c
index 694acb5eec..a5e4d2318f 100644
--- a/source3/rpc_parse/parse_wks.c
+++ b/source3/rpc_parse/parse_wks.c
@@ -27,20 +27,6 @@
extern int DEBUGLEVEL;
-
-/*******************************************************************
- make_wks_q_query_info
- ********************************************************************/
-void make_wks_q_query_info(WKS_Q_QUERY_INFO *q_u,
- char *server, uint16 switch_value)
-{
- DEBUG(5,("make_wks_q_query_info: %d\n", __LINE__));
-
- make_buf_unistr2(&(q_u->uni_srv_name), &(q_u->ptr_srv_name), server);
- q_u->switch_value = switch_value;
-
-}
-
/*******************************************************************
reads or writes a WKS_Q_QUERY_INFO structure.
********************************************************************/
@@ -81,7 +67,7 @@ void make_wks_info_100(WKS_INFO_100 *inf,
/*******************************************************************
reads or writes a WKS_INFO_100 structure.
********************************************************************/
-void wks_io_wks_info_100(char *desc, WKS_INFO_100 *inf, prs_struct *ps, int depth)
+static void wks_io_wks_info_100(char *desc, WKS_INFO_100 *inf, prs_struct *ps, int depth)
{
if (inf == NULL) return;