char *cname,char *caddr);
BOOL check_access(int sock, char *allow_list, char *deny_list);
+/*The following definitions come from lib/agent.c */
+
+void init_sock_redir(struct vagent_ops*va);
+void free_sock_redir(struct vagent_ops*va);
+void start_agent(struct vagent_ops *va);
+
/*The following definitions come from lib/bitmap.c */
struct bitmap *bitmap_allocate(int n);
/*The following definitions come from lib/sids.c */
+struct sid_map* add_sidmap_to_array(uint32 *len, struct sid_map ***array,
+ const struct sid_map *name);
void get_sam_domain_name(void);
BOOL get_member_domain_sid(void);
void generate_wellknown_sids(void);
+BOOL create_sidmap_table(void);
BOOL generate_sam_sid(char *domain_name, DOM_SID *sid);
BOOL map_domain_name_to_sid(DOM_SID *sid, char **nt_domain);
BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain);
+BOOL map_domain_sid_to_any_dc(DOM_SID *sid, char *dc_name);
BOOL split_domain_name(const char *fullname, char *domain, char *name);
BOOL enumtrustdoms(char ***doms, uint32 *num_entries);
BOOL enumdomains(char ***doms, uint32 *num_entries);
/*The following definitions come from lib/system.c */
-int sys_select(int maxfd, fd_set *fds,struct timeval *tval);
-int sys_select(int maxfd, fd_set *fds,struct timeval *tval);
+int sys_select(int maxfd, fd_set *fds, fd_set *w_fds, struct timeval *tval);
+int sys_select(int maxfd, fd_set *r_fds, fd_set *w_fds, struct timeval *tval);
int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf);
int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf);
int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf);
void reg_get_subkey(char *full_keyname, char *key_name, char *subkey_name);
BOOL reg_split_key(const char *full_keyname, uint32 *reg_type, char *key_name);
BOOL become_user_permanently(uid_t uid, gid_t gid);
+char *get_trusted_serverlist(const char* domain);
/*The following definitions come from lib/util_array.c */
void free_void_array(uint32 num_entries, void **entries,
void(free_item)(void*));
-void* add_item_to_array(uint32 *len, void ***array, const void *item,
+void* add_copy_to_array(uint32 *len, void ***array, const void *item,
void*(item_dup)(const void*), BOOL alloc_anyway);
+void* add_item_to_array(uint32 *len, void ***array, void *item);
+void free_use_array(uint32 num_entries, struct use_info **entries);
+struct use_info* add_use_to_array(uint32 *len, struct use_info ***array,
+ const struct use_info *name);
void free_char_array(uint32 num_entries, char **entries);
char* add_chars_to_array(uint32 *len, char ***array, const char *name);
void free_uint32_array(uint32 num_entries, uint32 **entries);
void reset_globals_after_fork(void);
char *client_name(int fd);
char *client_addr(int fd);
+int open_pipe_sock(char *path);
/*The following definitions come from lib/util_status.c */
/*The following definitions come from libsmb/clientgen.c */
-void copy_user_creds(struct user_credentials *to, const struct user_credentials *from);
+void copy_user_creds(struct user_credentials *to,
+ const struct user_credentials *from);
int cli_set_port(struct cli_state *cli, int port);
char *cli_errstr(struct cli_state *cli);
void cli_safe_smb_errstr(struct cli_state *cli, char *msg, size_t len);
char *ntpass, int ntpasslen,
char *user_domain);
BOOL cli_session_setup(struct cli_state *cli,
- char *user,
+ char *myhostname, char *user,
char *pass, int passlen,
char *ntpass, int ntpasslen,
char *user_domain);
uint16 cli_setpid(struct cli_state *cli, uint16 pid);
BOOL cli_reestablish_connection(struct cli_state *cli);
BOOL cli_establish_connection(struct cli_state *cli,
- char *dest_host, struct in_addr *dest_ip,
+ const char *dest_host, struct in_addr *dest_ip,
struct nmb_name *calling, struct nmb_name *called,
char *service, char *service_type,
BOOL do_shutdown, BOOL do_tcon);
+BOOL cli_connect_auth(struct cli_state *cli,
+ const char* desthost,
+ struct in_addr *dest_ip,
+ const struct user_credentials *usr);
+BOOL cli_connect_servers_auth(struct cli_state *cli,
+ char *p,
+ const struct user_credentials *usr);
BOOL cli_connect_serverlist(struct cli_state *cli, char *p);
int cli_printjob_del(struct cli_state *cli, int job);
int cli_print_queue(struct cli_state *cli,
BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp);
BOOL cli_message_end(struct cli_state *cli, int grp);
BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail);
+BOOL get_any_dc_name(const char *domain, char *srv_name);
/*The following definitions come from libsmb/clienttrust.c */
BOOL send_packet(struct packet_struct *p);
struct packet_struct *receive_packet(int fd,enum packet_type type,int t);
void sort_query_replies(char *data, int n, struct in_addr ip);
+BOOL read_nmb_sock(int c, struct nmb_state *con);
+int get_nmb_sock(void);
/*The following definitions come from libsmb/nterr.c */
/*The following definitions come from libsmb/pwd_cache.c */
void pwd_init(struct pwd_info *pwd);
+BOOL pwd_is_nullpwd(const struct pwd_info *pwd);
void pwd_obfuscate_key(struct pwd_info *pwd, uint32 int_key, char *str_key);
+BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2);
void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt);
void pwd_set_nullpwd(struct pwd_info *pwd);
void pwd_set_cleartext(struct pwd_info *pwd, char *clr);
void pwd_get_cleartext(struct pwd_info *pwd, char *clr);
void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]);
-void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]);
+void pwd_get_lm_nt_16(const struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]);
void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr);
void pwd_make_lm_nt_owf2(struct pwd_info *pwd, const uchar srv_key[8],
const char *user, const char *server, const char *domain);
/*The following definitions come from libsmb/smbencrypt.c */
-void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24);
-void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24);
-void E_md4hash(uchar *passwd, uchar *p16);
+void SMBencrypt(uchar *pwrd, uchar *c8, uchar *p24);
+void SMBNTencrypt(uchar *pwrd, uchar *c8, uchar *p24);
+void E_md4hash(uchar *pwrd, uchar *p16);
void lm_owf_genW(const UNISTR2 *pwd, uchar p16[16]);
void lm_owf_gen(const char *pwd, uchar p16[16]);
void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]);
void nt_owf_gen(const char *pwd, uchar nt_p16[16]);
void nt_lm_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16], uchar lm_p16[16]);
void nt_lm_owf_gen(const char *pwd, uchar nt_p16[16], uchar lm_p16[16]);
-void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]);
+void SMBOWFencrypt(uchar pwrd[16], uchar *c8, uchar p24[24]);
void SMBOWFencrypt_ntv2(const uchar kr[16],
const uchar *srv_chal, int srv_chal_len,
const uchar *cli_chal, int cli_chal_len,
const char *user_n,
const char *domain_n,
uchar kr_buf[16]);
-void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]);
-BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode);
+void NTLMSSPOWFencrypt(uchar pwrd[8], uchar *ntlmchalresp, uchar p24[24]);
+BOOL make_oem_passwd_hash(char data[516], const char *pwrd, uchar old_pw_hash[16], BOOL unicode);
BOOL nt_decrypt_string2(STRING2 *out, const STRING2 *in, const uchar *key);
void create_ntlmssp_resp(struct pwd_info *pwd,
char *domain, char *user_name, char *my_name,
uint32 ntlmssp_cli_flgs,
prs_struct *auth_resp);
-BOOL decode_pw_buffer(const char buffer[516], char *new_passwd,
- int new_passwd_size, uint32 *new_pw_len);
+BOOL decode_pw_buffer(const char buffer[516], char *new_pwrd,
+ int new_pwrd_size, uint32 *new_pw_len);
BOOL encode_pw_buffer(char buffer[516], const char *new_pass,
int new_pw_len, BOOL nt_pass_set);
BOOL get_trust_account_password( unsigned char *ret_pwd, time_t *pass_last_set_time);
BOOL set_trust_account_password( unsigned char *md4_new_pwd);
BOOL trust_get_passwd( unsigned char trust_passwd[16], char *domain, char *myname);
+BOOL create_trust_account_file(char *domain, char *name, uchar pass[16]);
/*The following definitions come from passdb/smbpassgroup.c */
/*The following definitions come from rpc_client/cli_connect.c */
+void init_connections(void);
+void free_connections(void);
void cli_connection_free(struct cli_connection *con);
void cli_connection_unlink(struct cli_connection *con);
-BOOL cli_connection_init_list(char* servers, const char* pipe_name,
+BOOL cli_connection_init(const char* srv_name, const char* pipe_name,
struct cli_connection **con);
-BOOL cli_connection_init(const char* server_name, const char* pipe_name,
+BOOL cli_connection_getsrv(const char* srv_name, const char* pipe_name,
struct cli_connection **con);
BOOL cli_connection_get(const POLICY_HND *pol, struct cli_connection **con);
BOOL cli_pol_link(POLICY_HND *to, const POLICY_HND *from);
-BOOL cli_get_usr_sesskey(const POLICY_HND *pol, uchar sess_key[16]);
+BOOL cli_get_con_usr_sesskey(struct cli_connection *con, uchar usr_sess_key[16]);
+BOOL cli_get_con_sesskey(struct cli_connection *con, uchar sess_key[16]);
+BOOL cli_con_get_srvname(struct cli_connection *con, char *srv_name);
+BOOL cli_get_usr_sesskey(const POLICY_HND *pol, uchar usr_sess_key[16]);
+BOOL cli_get_sesskey(const POLICY_HND *pol, uchar sess_key[16]);
+BOOL cli_get_sesskey_srv(const char* srv_name, uchar sess_key[16]);
+void cli_con_gen_next_creds(struct cli_connection *con,
+ DOM_CRED *new_clnt_cred);
+void cli_con_get_cli_cred(struct cli_connection *con,
+ DOM_CRED *clnt_cred);
+BOOL cli_con_deal_with_creds(struct cli_connection *con,
+ DOM_CRED *rcv_srv_cred);
+BOOL cli_con_set_creds(const char* srv_name, const uchar sess_key[16],
+ DOM_CRED *cred);
BOOL rpc_hnd_pipe_req(const POLICY_HND *hnd, uint8 op_num,
prs_struct *data, prs_struct *rdata);
BOOL rpc_con_pipe_req(struct cli_connection *con, uint8 op_num,
/*The following definitions come from rpc_client/cli_login.c */
-uint32 cli_nt_setup_creds(struct cli_state *cli, uint16 fnum,
+uint32 cli_nt_setup_creds( const char* srv_name, const char* myhostname,
const char* trust_acct,
- const char* srv_name,
unsigned char trust_pwd[16],
uint16 sec_chan);
-BOOL cli_nt_srv_pwset(struct cli_state *cli, uint16 fnum,
- unsigned char *new_hashof_trust_pwd, uint16 sec_chan);
-BOOL cli_nt_login_interactive(struct cli_state *cli, uint16 fnum, char *domain, char *username,
- uint32 luid_low, char *password,
- NET_ID_INFO_CTR *ctr, NET_USER_INFO_3 *user_info3);
-BOOL cli_nt_login_network(struct cli_state *cli, uint16 fnum, char *domain, char *username,
- uint32 luid_low, char lm_chal[8], char lm_chal_resp[24],
- char nt_chal_resp[24],
- NET_ID_INFO_CTR *ctr, NET_USER_INFO_3 *user_info3);
-BOOL cli_nt_logoff(struct cli_state *cli, uint16 fnum, NET_ID_INFO_CTR *ctr);
+BOOL cli_nt_srv_pwset(const char* srv_name, const char* myhostname,
+ const char* trust_acct,
+ unsigned char *new_hashof_trust_pwd,
+ uint16 sec_chan);
+BOOL cli_nt_login_interactive(const char* srv_name, const char* myhostname,
+ const char *domain, const char *username,
+ uint32 luid_low, char *password,
+ NET_ID_INFO_CTR *ctr,
+ NET_USER_INFO_3 *user_info3);
+BOOL cli_nt_login_network(const char* srv_name, const char* myhostname,
+ const char *domain, const char *username,
+ uint32 luid_low, char lm_chal[8],
+ char lm_chal_resp[24],
+ char nt_chal_resp[24],
+ NET_ID_INFO_CTR *ctr,
+ NET_USER_INFO_3 *user_info3);
+BOOL cli_nt_logoff(const char* srv_name, const char* myhostname,
+ NET_ID_INFO_CTR *ctr);
+BOOL net_sam_sync(const char* srv_name, const char* myhostname,
+ const char* trust_acct,
+ uchar trust_passwd[16],
+ SAM_DELTA_HDR hdr_deltas[MAX_SAM_DELTAS],
+ SAM_DELTA_CTR deltas [MAX_SAM_DELTAS],
+ uint32 *num_deltas);
/*The following definitions come from rpc_client/cli_lsarpc.c */
BOOL get_domain_sids(const char *myname,
- DOM_SID *sid3, DOM_SID *sid5, char *servers);
+ DOM_SID *sid3, DOM_SID *sid5, char *domain);
BOOL get_trust_sid_and_domain(const char* myname, char *server,
DOM_SID *sid,
char *domain, size_t len);
/*The following definitions come from rpc_client/cli_netlogon.c */
-BOOL cli_net_logon_ctrl2(struct cli_state *cli, uint16 nt_pipe_fnum, uint32 status_level);
-uint32 cli_net_auth2(struct cli_state *cli, uint16 nt_pipe_fnum,
+void gen_next_creds( struct cli_state *cli, DOM_CRED *new_clnt_cred);
+BOOL cli_net_logon_ctrl2(const char* srv_name, uint32 status_level);
+uint32 cli_net_auth2(const char *srv_name,
const char *trust_acct,
- const char *srv_name, uint16 sec_chan,
+ const char *acct_name,
+ uint16 sec_chan,
uint32 neg_flags, DOM_CHAL *srv_chal);
-uint32 cli_net_req_chal(struct cli_state *cli, uint16 nt_pipe_fnum,
- const char *srv_name,
+uint32 cli_net_req_chal( const char *srv_name, const char* myhostname,
DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal);
-BOOL cli_net_srv_pwset(struct cli_state *cli, uint16 nt_pipe_fnum,
- uint8 hashed_mach_pwd[16], uint16 sec_chan_type);
-BOOL cli_net_sam_logon(struct cli_state *cli, uint16 nt_pipe_fnum, NET_ID_INFO_CTR *ctr,
- NET_USER_INFO_3 *user_info3);
-BOOL cli_net_sam_logoff(struct cli_state *cli, uint16 nt_pipe_fnum, NET_ID_INFO_CTR *ctr);
-BOOL cli_net_sam_sync(struct cli_state *cli, uint16 nt_pipe_fnum,
- const char* srv_name,
+BOOL cli_net_srv_pwset(const char* srv_name,
+ const char* myhostname,
+ const char* trust_acct,
+ uint8 hashed_trust_pwd[16],
+ uint16 sec_chan_type);
+BOOL cli_net_sam_logon(const char* srv_name, const char* myhostname,
+ NET_ID_INFO_CTR *ctr,
+ NET_USER_INFO_3 *user_info3);
+BOOL cli_net_sam_logoff(const char* srv_name, const char* myhostname,
+ NET_ID_INFO_CTR *ctr);
+BOOL cli_net_sam_sync( const char* srv_name, const char* myhostname,
uint32 database_id,
uint32 *num_deltas,
SAM_DELTA_HDR *hdr_deltas,
SAM_DELTA_CTR *deltas);
-BOOL do_sam_sync(struct cli_state *cli, uchar trust_passwd[16],
- const char* acct_name,
- const char* srv_name,
- SAM_DELTA_HDR hdr_deltas[MAX_SAM_DELTAS],
- SAM_DELTA_CTR deltas [MAX_SAM_DELTAS],
- uint32 *num_deltas);
/*The following definitions come from rpc_client/cli_netlogon_sync.c */
BOOL samr_del_aliasmem( POLICY_HND *alias_pol, DOM_SID *sid);
BOOL samr_add_aliasmem( POLICY_HND *alias_pol, DOM_SID *sid);
BOOL samr_delete_dom_alias( POLICY_HND *alias_pol);
-BOOL samr_create_dom_user( POLICY_HND *domain_pol, const char *acct_name,
+uint32 samr_create_dom_user( POLICY_HND *domain_pol, const char *acct_name,
uint32 unk_0, uint32 unk_1,
POLICY_HND *user_pol, uint32 *rid);
BOOL samr_create_dom_alias( POLICY_HND *domain_pol, const char *acct_name,
char* password,
char* disp_name);
+/*The following definitions come from rpc_client/cli_use.c */
+
+void init_cli_use(void);
+void free_cli_use(void);
+struct cli_state *cli_net_use_add(const char* srv_name,
+ const struct user_credentials *usr_creds,
+ BOOL redir);
+BOOL cli_net_use_del(const char* srv_name,
+ const struct user_credentials *usr_creds,
+ BOOL force_close,
+ BOOL *connection_closed);
+void cli_net_use_enum(uint32 *num_cons, struct use_info ***use);
+void cli_use_wait_keyboard(void);
+
/*The following definitions come from rpc_client/cli_wkssvc.c */
BOOL wks_query_info( char *srv_name, uint32 switch_value,
uint32 msrpc_sam_enum_domains( const char* srv_name,
struct acct_info **sam,
uint32 *num_sam_entries,
- DOMAIN_FN(dom_fn));
+ DOMAIN_FN(dom_fn),
+ DOMAIN_INFO_FN(dom_inf_fn));
uint32 msrpc_sam_enum_groups( const char* srv_name,
const char* domain,
const DOM_SID *sid1,
ALIAS_FN(als_fn),
ALIAS_INFO_FN(als_inf_fn),
ALIAS_MEM_FN(als_mem_fn));
-BOOL create_samr_domain_user( POLICY_HND *pol_open_domain,
- const char *acct_name, uint16 acb_info,
+BOOL create_samr_domain_user( POLICY_HND *pol_dom,
+ char *acct_name, uint16 acb_info,
+ const char* password, int plen,
uint32 *rid);
BOOL create_samr_domain_alias( POLICY_HND *pol_open_domain,
const char *acct_name, const char *acct_desc,
uint32 alias_rid, ALIAS_INFO_CTR *ctr);
BOOL msrpc_sam_create_dom_user(const char* srv_name, DOM_SID *sid1,
char *acct_name, uint16 acb_info,
+ const char *password, int plen,
uint32 *rid);
BOOL msrpc_sam_query_dispinfo(const char* srv_name, const char* domain,
DOM_SID *sid1,
BOOL smb_io_chal(char *desc, DOM_CHAL *chal, prs_struct *ps, int depth);
BOOL smb_io_cred(char *desc, DOM_CRED *cred, prs_struct *ps, int depth);
BOOL make_clnt_info2(DOM_CLNT_INFO2 *clnt,
- char *logon_srv, char *comp_name,
+ const char *logon_srv, const char *comp_name,
DOM_CRED *clnt_cred);
BOOL smb_io_clnt_info2(char *desc, DOM_CLNT_INFO2 *clnt, prs_struct *ps, int depth);
BOOL make_clnt_info(DOM_CLNT_INFO *clnt,
- char *logon_srv, char *acct_name,
- uint16 sec_chan, char *comp_name,
+ const char *logon_srv, const char *acct_name,
+ uint16 sec_chan, const char *comp_name,
DOM_CRED *cred);
BOOL smb_io_clnt_info(char *desc, DOM_CLNT_INFO *clnt, prs_struct *ps, int depth);
BOOL make_owf_info(OWF_INFO *hash, uint8 data[16]);
/*The following definitions come from rpc_parse/parse_net.c */
+BOOL make_q_logon_ctrl2(NET_Q_LOGON_CTRL2 *q_l,
+ const char* srv_name,
+ uint32 function_code,
+ uint32 query_level,
+ uint32 switch_value);
BOOL net_io_q_logon_ctrl2(char *desc, NET_Q_LOGON_CTRL2 *q_l, prs_struct *ps, int depth);
BOOL make_r_logon_ctrl2(NET_R_LOGON_CTRL2 *r_l, uint32 query_level,
uint32 flags, uint32 pdc_status, uint32 logon_attempts,
DOM_CHAL *clnt_chal, uint32 clnt_flgs);
BOOL net_io_q_auth_2(char *desc, NET_Q_AUTH_2 *q_a, prs_struct *ps, int depth);
BOOL net_io_r_auth_2(char *desc, NET_R_AUTH_2 *r_a, prs_struct *ps, int depth);
-BOOL make_q_srv_pwset(NET_Q_SRV_PWSET *q_s, char *logon_srv, char *acct_name,
- uint16 sec_chan, char *comp_name, DOM_CRED *cred, char nt_cypher[16]);
+BOOL make_q_srv_pwset(NET_Q_SRV_PWSET *q_s,
+ const char *logon_srv, const char *acct_name,
+ uint16 sec_chan, const char *comp_name,
+ DOM_CRED *cred, char nt_cypher[16]);
BOOL net_io_q_srv_pwset(char *desc, NET_Q_SRV_PWSET *q_s, prs_struct *ps, int depth);
BOOL net_io_r_srv_pwset(char *desc, NET_R_SRV_PWSET *r_s, prs_struct *ps, int depth);
-BOOL make_id_info1(NET_ID_INFO_1 *id, char *domain_name,
+BOOL make_id_info1(NET_ID_INFO_1 *id, const char *domain_name,
uint32 param_ctrl, uint32 log_id_low, uint32 log_id_high,
- char *user_name, char *wksta_name,
+ const char *user_name, const char *wksta_name,
char sess_key[16],
unsigned char lm_cypher[16], unsigned char nt_cypher[16]);
-BOOL make_id_info2(NET_ID_INFO_2 *id, char *domain_name,
- uint32 param_ctrl, uint32 log_id_low, uint32 log_id_high,
- char *user_name, char *wksta_name,
+BOOL make_id_info2(NET_ID_INFO_2 *id, const char *domain_name,
+ uint32 param_ctrl,
+ uint32 log_id_low, uint32 log_id_high,
+ const char *user_name, const char *wksta_name,
unsigned char lm_challenge[8],
unsigned char lm_chal_resp[24],
unsigned char nt_chal_resp[24]);
BOOL make_sam_info(DOM_SAM_INFO *sam,
- char *logon_srv, char *comp_name, DOM_CRED *clnt_cred,
+ const char *logon_srv, const char *comp_name,
+ DOM_CRED *clnt_cred,
DOM_CRED *rtn_cred, uint16 logon_level,
- NET_ID_INFO_CTR *ctr, uint16 validation_level);
+ NET_ID_INFO_CTR *ctr);
BOOL make_net_user_info3(NET_USER_INFO_3 *usr,
NTTIME *logon_time,
uint16 acct_ctrl);
BOOL sam_io_user_info11(char *desc, SAM_USER_INFO_11 *usr, prs_struct *ps, int depth);
BOOL make_sam_user_info24(SAM_USER_INFO_24 *usr,
- char newpass[516]);
+ char newpass[516], uint16 passlen);
BOOL make_sam_user_info23W(SAM_USER_INFO_23 *usr,
NTTIME *logon_time, /* all zeros */
void cmd_wks_query_info(struct client_info *info, int argc, char *argv[]);
-/*The following definitions come from rpcclient/display.c */
+/*The following definitions come from rpcclient/display_at.c */
+
+void display_at_enum_info(FILE *out_hnd, enum action_type action,
+ uint32 num_jobs, const AT_ENUM_INFO *const jobs,
+ char *const *const commands);
+void display_at_job_info(FILE *out_hnd, enum action_type action,
+ AT_JOB_INFO *const job, fstring command);
+
+/*The following definitions come from rpcclient/display_event.c */
+
+void display_eventlog_eventrecord(FILE *out_hnd, enum action_type action, EVENTLOGRECORD *const ev);
+
+/*The following definitions come from rpcclient/display_reg.c */
+
+char *get_reg_val_type_str(uint32 type);
+void display_reg_value_info(FILE *out_hnd, enum action_type action,
+ const char *val_name,
+ uint32 val_type, const BUFFER2 *value);
+void display_reg_key_info(FILE *out_hnd, enum action_type action,
+ const char *key_name, time_t key_mod_time);
+
+/*The following definitions come from rpcclient/display_sam.c */
+
+void display_alias_members(FILE *out_hnd, enum action_type action,
+ uint32 num_mem, char *const *const sid_mem,
+ uint8 *const type);
+void display_alias_rid_info(FILE *out_hnd, enum action_type action,
+ DOM_SID *const sid,
+ uint32 num_rids, uint32 *const rid);
+void display_group_members(FILE *out_hnd, enum action_type action,
+ uint32 num_mem, char *const *const name, uint32 *const type);
+void display_group_info1(FILE *out_hnd, enum action_type action, GROUP_INFO1 *const info1);
+void display_group_info4(FILE *out_hnd, enum action_type action, GROUP_INFO4 *const info4);
+void display_group_info_ctr(FILE *out_hnd, enum action_type action,
+ GROUP_INFO_CTR *const ctr);
+void display_group_rid_info(FILE *out_hnd, enum action_type action,
+ uint32 num_gids, DOM_GID *const gid);
+void display_alias_name_info(FILE *out_hnd, enum action_type action,
+ uint32 num_aliases, fstring *const alias_name, const uint32 *const num_als_usrs);
+void display_alias_info3(FILE *out_hnd, enum action_type action, ALIAS_INFO3 *const info3);
+void display_alias_info_ctr(FILE *out_hnd, enum action_type action,
+ ALIAS_INFO_CTR *const ctr);
+void display_sam_user_info_21(FILE *out_hnd, enum action_type action, SAM_USER_INFO_21 *const usr);
+void display_sam_unk_info_2(FILE *out_hnd, enum action_type action,
+ SAM_UNK_INFO_2 *const info2);
+void display_sam_unk_ctr(FILE *out_hnd, enum action_type action,
+ uint32 switch_value, SAM_UNK_CTR *const ctr);
+void display_sam_info_1(FILE *out_hnd, enum action_type action,
+ SAM_ENTRY1 *const e1, SAM_STR1 *const s1);
+void display_sam_info_1_ctr(FILE *out_hnd, enum action_type action,
+ uint32 count, SAM_DISPINFO_1 *const ctr);
+void display_sam_disp_info_ctr(FILE *out_hnd, enum action_type action,
+ uint16 level, uint32 count,
+ SAM_DISPINFO_CTR *const ctr);
+
+/*The following definitions come from rpcclient/display_sec.c */
+
+char *get_sec_mask_str(uint32 type);
+void display_sec_access(FILE *out_hnd, enum action_type action, SEC_ACCESS *const info);
+void display_sec_ace(FILE *out_hnd, enum action_type action, SEC_ACE *const ace);
+void display_sec_acl(FILE *out_hnd, enum action_type action, SEC_ACL *const sec_acl);
+void display_sec_desc(FILE *out_hnd, enum action_type action, SEC_DESC *const sec);
+
+/*The following definitions come from rpcclient/display_spool.c */
+
+void display_print_info_0(FILE *out_hnd, enum action_type action,
+ PRINTER_INFO_0 *const i0);
+void display_print_info_1(FILE *out_hnd, enum action_type action,
+ PRINTER_INFO_1 *const i1);
+void display_printer_info_0_ctr(FILE *out_hnd, enum action_type action,
+ uint32 count, PRINTER_INFO_0 *const *const ctr);
+void display_printer_info_1_ctr(FILE *out_hnd, enum action_type action,
+ uint32 count, PRINTER_INFO_1 *const *const ctr);
+void display_printer_info_ctr(FILE *out_hnd, enum action_type action,
+ uint32 level, uint32 count,
+ void *const *const ctr);
+void display_job_info_2(FILE *out_hnd, enum action_type action,
+ JOB_INFO_2 *const i2);
+void display_job_info_1(FILE *out_hnd, enum action_type action,
+ JOB_INFO_1 *const i1);
+void display_job_info_2_ctr(FILE *out_hnd, enum action_type action,
+ uint32 count, JOB_INFO_2 *const *const ctr);
+void display_job_info_1_ctr(FILE *out_hnd, enum action_type action,
+ uint32 count, JOB_INFO_1 *const *const ctr);
+void display_job_info_ctr(FILE *out_hnd, enum action_type action,
+ uint32 level, uint32 count,
+ void *const *const ctr);
+
+/*The following definitions come from rpcclient/display_srv.c */
char *get_sid_name_use_str(uint8 sid_name_use);
char *get_file_mode_str(uint32 share_mode);
void display_share2(FILE *out_hnd, enum action_type action,
char *const sname, uint32 type, char *const comment,
uint32 perms, uint32 max_uses, uint32 num_uses,
- char *const path, char *const passwd);
+ char *const path, char *const password);
void display_name(FILE *out_hnd, enum action_type action,
char *const sname);
-void display_alias_members(FILE *out_hnd, enum action_type action,
- uint32 num_mem, char *const *const sid_mem,
- uint8 *const type);
-void display_alias_rid_info(FILE *out_hnd, enum action_type action,
- DOM_SID *const sid,
- uint32 num_rids, uint32 *const rid);
-void display_group_members(FILE *out_hnd, enum action_type action,
- uint32 num_mem, char *const *const name, uint32 *const type);
-void display_group_info1(FILE *out_hnd, enum action_type action, GROUP_INFO1 *const info1);
-void display_group_info4(FILE *out_hnd, enum action_type action, GROUP_INFO4 *const info4);
-void display_group_info_ctr(FILE *out_hnd, enum action_type action,
- GROUP_INFO_CTR *const ctr);
-void display_group_rid_info(FILE *out_hnd, enum action_type action,
- uint32 num_gids, DOM_GID *const gid);
-void display_alias_name_info(FILE *out_hnd, enum action_type action,
- uint32 num_aliases, fstring *const alias_name, const uint32 *const num_als_usrs);
-void display_alias_info3(FILE *out_hnd, enum action_type action, ALIAS_INFO3 *const info3);
-void display_alias_info_ctr(FILE *out_hnd, enum action_type action,
- ALIAS_INFO_CTR *const ctr);
-void display_sam_user_info_21(FILE *out_hnd, enum action_type action, SAM_USER_INFO_21 *const usr);
-char *get_sec_mask_str(uint32 type);
-void display_sec_access(FILE *out_hnd, enum action_type action, SEC_ACCESS *const info);
-void display_sec_ace(FILE *out_hnd, enum action_type action, SEC_ACE *const ace);
-void display_sec_acl(FILE *out_hnd, enum action_type action, SEC_ACL *const sec_acl);
-void display_sec_desc(FILE *out_hnd, enum action_type action, SEC_DESC *const sec);
-char *get_reg_val_type_str(uint32 type);
-void display_reg_value_info(FILE *out_hnd, enum action_type action,
- const char *val_name,
- uint32 val_type, const BUFFER2 *value);
-void display_reg_key_info(FILE *out_hnd, enum action_type action,
- const char *key_name, time_t key_mod_time);
+
+/*The following definitions come from rpcclient/display_svc.c */
+
char *get_svc_start_type_str(uint32 type);
void display_query_svc_cfg(FILE *out_hnd, enum action_type action,
const QUERY_SERVICE_CONFIG *const cfg);
void display_svc_info(FILE *out_hnd, enum action_type action,
const ENUM_SRVC_STATUS *const svc);
-void display_at_enum_info(FILE *out_hnd, enum action_type action,
- uint32 num_jobs, const AT_ENUM_INFO *const jobs,
- char *const *const commands);
-void display_at_job_info(FILE *out_hnd, enum action_type action,
- AT_JOB_INFO *const job, fstring command);
-void display_eventlog_eventrecord(FILE *out_hnd, enum action_type action, EVENTLOGRECORD *const ev);
+
+/*The following definitions come from rpcclient/display_sync.c */
+
void display_sam_sync_ctr(FILE *out_hnd, enum action_type action,
SAM_DELTA_HDR *const delta,
SAM_DELTA_CTR *const ctr);
SAM_DELTA_HDR *const deltas,
SAM_DELTA_CTR *const ctr,
uint32 num);
-void display_sam_unk_info_2(FILE *out_hnd, enum action_type action,
- SAM_UNK_INFO_2 *const info2);
-void display_sam_unk_ctr(FILE *out_hnd, enum action_type action,
- uint32 switch_value, SAM_UNK_CTR *const ctr);
-void display_sam_info_1(FILE *out_hnd, enum action_type action,
- SAM_ENTRY1 *const e1, SAM_STR1 *const s1);
-void display_sam_info_1_ctr(FILE *out_hnd, enum action_type action,
- uint32 count, SAM_DISPINFO_1 *const ctr);
-void display_sam_disp_info_ctr(FILE *out_hnd, enum action_type action,
- uint16 level, uint32 count,
- SAM_DISPINFO_CTR *const ctr);
-void display_print_info_0(FILE *out_hnd, enum action_type action,
- PRINTER_INFO_0 *const i0);
-void display_print_info_1(FILE *out_hnd, enum action_type action,
- PRINTER_INFO_1 *const i1);
-void display_printer_info_0_ctr(FILE *out_hnd, enum action_type action,
- uint32 count, PRINTER_INFO_0 *const *const ctr);
-void display_printer_info_1_ctr(FILE *out_hnd, enum action_type action,
- uint32 count, PRINTER_INFO_1 *const *const ctr);
-void display_printer_info_ctr(FILE *out_hnd, enum action_type action,
- uint32 level, uint32 count,
- void *const *const ctr);
-void display_job_info_2(FILE *out_hnd, enum action_type action,
- JOB_INFO_2 *const i2);
-void display_job_info_1(FILE *out_hnd, enum action_type action,
- JOB_INFO_1 *const i1);
-void display_job_info_2_ctr(FILE *out_hnd, enum action_type action,
- uint32 count, JOB_INFO_2 *const *const ctr);
-void display_job_info_1_ctr(FILE *out_hnd, enum action_type action,
- uint32 count, JOB_INFO_1 *const *const ctr);
-void display_job_info_ctr(FILE *out_hnd, enum action_type action,
- uint32 level, uint32 count,
- void *const *const ctr);
/*The following definitions come from rpcclient/rpcclient.c */
BOOL server_validate(char *user, char *domain,
char *pass, int passlen,
char *ntpass, int ntpasslen);
-BOOL domain_client_validate( char *user, char *domain, char *server_list,
+BOOL domain_client_validate( char *user, char *domain,
char *acct_name, uint16 acct_type,
char *smb_apasswd, int smb_apasslen,
char *smb_ntpasswd, int smb_ntpasslen,