summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/client.h2
-rw-r--r--source3/include/ntdomain.h22
-rw-r--r--source3/include/proto.h142
-rw-r--r--source3/include/rpc_client.h27
-rw-r--r--source3/include/rpc_client_proto.h200
-rw-r--r--source3/include/rpcclient.h30
-rw-r--r--source3/include/smb.h35
7 files changed, 353 insertions, 105 deletions
diff --git a/source3/include/client.h b/source3/include/client.h
index 406f2e972c..625277d856 100644
--- a/source3/include/client.h
+++ b/source3/include/client.h
@@ -124,6 +124,8 @@ struct cli_state {
fstring clnt_name_slash; /* \\local client. */
uint16 max_xmit_frag;
uint16 max_recv_frag;
+ vuser_key key;
+ uint32 ntlmssp_flags;
BOOL use_oplocks; /* should we use oplocks? */
};
diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h
index 71c55c062c..424a99c700 100644
--- a/source3/include/ntdomain.h
+++ b/source3/include/ntdomain.h
@@ -221,6 +221,28 @@ struct acct_info
uint32 smb_userid; /* domain-relative RID */
};
+struct cli_connection;
+
+typedef struct cli_auth_fns
+{
+ /* these three will do for now. they *should* match with server-side */
+ BOOL (*create_bind_req) (struct cli_connection *, prs_struct *,
+ uint32, RPC_IFACE *, RPC_IFACE *);
+ BOOL (*decode_bind_resp) (struct cli_connection *, prs_struct *);
+ BOOL (*create_bind_cont) (struct cli_connection *, prs_struct *,
+ uint32);
+ /* creates an authenticated PDU */
+ BOOL (*cli_create_pdu) (struct cli_connection *, uint8,
+ prs_struct *, int, int *,
+ prs_struct *, uint8 *);
+ /* decodes an authenticated PDU */
+ BOOL (*cli_decode_pdu) (struct cli_connection *, prs_struct *,
+ int, int);
+
+}
+cli_auth_fns;
+
+
/* security descriptor structures */
#include "rpc_secdes.h"
diff --git a/source3/include/proto.h b/source3/include/proto.h
index d196cde45b..30f2da366e 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -613,6 +613,7 @@ int cli_set_port(struct cli_state *cli, int port);
BOOL cli_receive_smb(struct cli_state *cli);
BOOL cli_send_smb(struct cli_state *cli);
void cli_setup_packet(struct cli_state *cli);
+void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr);
struct cli_state *cli_initialise(struct cli_state *cli);
void cli_shutdown(struct cli_state *cli);
void cli_sockopt(struct cli_state *cli, char *options);
@@ -741,7 +742,10 @@ struct in_addr *name_query(int fd,const char *name,int name_type,
FILE *startlmhosts(char *fname);
BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr);
void endlmhosts(FILE *fp);
+BOOL is_ip_address(const char *name);
BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type);
+BOOL resolve_srv_name(const char* srv_name, fstring dest_host,
+ struct in_addr *ip);
BOOL find_master_ip(char *group, struct in_addr *master_ip);
BOOL lookup_pdc_name(const char *srcname, const char *domain, struct in_addr *pdc_ip, char *ret_name);
BOOL get_dc_list(char *group, struct in_addr **ip_list, int *count);
@@ -771,7 +775,8 @@ int name_len(char *s1);
/*The following definitions come from libsmb/nterr.c */
-char *get_nt_error_msg(uint32 nt_code);
+BOOL get_safe_nt_error_msg(uint32 nt_code,char *msg, size_t len);
+const char *get_nt_error_msg(uint32 nt_code);
/*The following definitions come from libsmb/passchange.c */
@@ -782,6 +787,7 @@ BOOL remote_password_change(const char *remote_machine, const char *user_name,
/*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);
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);
@@ -1696,6 +1702,12 @@ BOOL print_queue_purge(int snum, uint16 vuid);
BOOL profile_setup(BOOL rdonly);
+/*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);
+
/*The following definitions come from rpc_client/cli_login.c */
BOOL cli_nt_setup_creds(struct cli_state *cli, unsigned char mach_pwd[16]);
@@ -1854,12 +1866,37 @@ BOOL do_srv_net_srv_file_enum(struct cli_state *cli,
BOOL do_srv_net_srv_get_info(struct cli_state *cli,
char *server_name, uint32 switch_value, SRV_INFO_CTR *ctr);
+/*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 ntuser_creds *usr_creds,
+ BOOL reuse, BOOL *is_new);
+BOOL cli_net_use_del(const char *srv_name,
+ const struct ntuser_creds *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 do_wks_query_info(struct cli_state *cli,
char *server_name, uint32 switch_value,
WKS_INFO_100 *wks100);
+/*The following definitions come from rpc_client/ncacn_np_use.c */
+
+BOOL ncacn_np_use_del(const char *srv_name, const char *pipe_name,
+ const vuser_key * key,
+ BOOL force_close, BOOL *connection_closed);
+
+/*The following definitions come from rpc_client/ncalrpc_l_use.c */
+
+BOOL ncalrpc_l_use_del(const char *pipe_name,
+ const vuser_key * key,
+ BOOL force_close, BOOL *connection_closed);
+
/*The following definitions come from rpc_parse/parse_creds.c */
BOOL make_creds_unix(CREDS_UNIX *r_u, const char* user_name,
@@ -2994,109 +3031,6 @@ uint32 lookup_user_rid(char *user_name, uint32 *rid);
BOOL api_wkssvc_rpc(pipes_struct *p);
#endif
-/*The following definitions come from rpcclient/cmd_lsarpc.c */
-
-void cmd_lsa_query_info(struct client_info *info);
-void cmd_lsa_lookup_sids(struct client_info *info);
-
-/*The following definitions come from rpcclient/cmd_netlogon.c */
-
-void cmd_netlogon_login_test(struct client_info *info);
-
-/*The following definitions come from rpcclient/cmd_reg.c */
-
-void cmd_reg_enum(struct client_info *info);
-void cmd_reg_query_key(struct client_info *info);
-void cmd_reg_create_val(struct client_info *info);
-void cmd_reg_delete_val(struct client_info *info);
-void cmd_reg_delete_key(struct client_info *info);
-void cmd_reg_create_key(struct client_info *info);
-void cmd_reg_test_key_sec(struct client_info *info);
-void cmd_reg_get_key_sec(struct client_info *info);
-
-/*The following definitions come from rpcclient/cmd_samr.c */
-
-void cmd_sam_ntchange_pwd(struct client_info *info);
-void cmd_sam_test(struct client_info *info);
-void cmd_sam_enum_users(struct client_info *info);
-void cmd_sam_query_user(struct client_info *info);
-void cmd_sam_query_groups(struct client_info *info);
-void cmd_sam_enum_aliases(struct client_info *info);
-
-/*The following definitions come from rpcclient/cmd_srvsvc.c */
-
-void cmd_srv_query_info(struct client_info *info);
-void cmd_srv_enum_conn(struct client_info *info);
-void cmd_srv_enum_shares(struct client_info *info);
-void cmd_srv_enum_sess(struct client_info *info);
-void cmd_srv_enum_files(struct client_info *info);
-
-/*The following definitions come from rpcclient/cmd_wkssvc.c */
-
-void cmd_wks_query_info(struct client_info *info);
-
-/*The following definitions come from rpcclient/display.c */
-
-char *get_file_mode_str(uint32 share_mode);
-char *get_file_oplock_str(uint32 op_type);
-char *get_share_type_str(uint32 type);
-char *get_server_type_str(uint32 type);
-void display_srv_info_101(FILE *out_hnd, enum action_type action,
- SRV_INFO_101 *sv101);
-void display_srv_info_102(FILE *out_hnd, enum action_type action,SRV_INFO_102 *sv102);
-void display_srv_info_ctr(FILE *out_hnd, enum action_type action,SRV_INFO_CTR *ctr);
-void display_conn_info_0(FILE *out_hnd, enum action_type action,
- CONN_INFO_0 *info0);
-void display_conn_info_1(FILE *out_hnd, enum action_type action,
- CONN_INFO_1 *info1, CONN_INFO_1_STR *str1);
-void display_srv_conn_info_0_ctr(FILE *out_hnd, enum action_type action,
- SRV_CONN_INFO_0 *ctr);
-void display_srv_conn_info_1_ctr(FILE *out_hnd, enum action_type action,
- SRV_CONN_INFO_1 *ctr);
-void display_srv_conn_info_ctr(FILE *out_hnd, enum action_type action,
- SRV_CONN_INFO_CTR *ctr);
-void display_share_info_1(FILE *out_hnd, enum action_type action,
- SRV_SHARE_INFO_1 *info1);
-void display_share_info_2(FILE *out_hnd, enum action_type action,
- SRV_SHARE_INFO_2 *info2);
-void display_srv_share_info_ctr(FILE *out_hnd, enum action_type action,
- SRV_SHARE_INFO_CTR *ctr);
-void display_file_info_3(FILE *out_hnd, enum action_type action,
- FILE_INFO_3 *info3, FILE_INFO_3_STR *str3);
-void display_srv_file_info_3_ctr(FILE *out_hnd, enum action_type action,
- SRV_FILE_INFO_3 *ctr);
-void display_srv_file_info_ctr(FILE *out_hnd, enum action_type action,
- SRV_FILE_INFO_CTR *ctr);
-void display_server(FILE *out_hnd, enum action_type action,
- char *sname, uint32 type, char *comment);
-void display_share(FILE *out_hnd, enum action_type action,
- char *sname, uint32 type, char *comment);
-void display_share2(FILE *out_hnd, enum action_type action,
- char *sname, uint32 type, char *comment,
- uint32 perms, uint32 max_uses, uint32 num_uses,
- char *path, char *passwd);
-void display_name(FILE *out_hnd, enum action_type action,
- char *sname);
-void display_group_rid_info(FILE *out_hnd, enum action_type action,
- uint32 num_gids, DOM_GID *gid);
-void display_alias_name_info(FILE *out_hnd, enum action_type action,
- uint32 num_aliases, fstring *alias_name, uint32 *num_als_usrs);
-void display_sam_user_info_21(FILE *out_hnd, enum action_type action, SAM_USER_INFO_21 *usr);
-char *get_sec_mask_str(uint32 type);
-void display_sec_access(FILE *out_hnd, enum action_type action, SEC_ACCESS *info);
-void display_sec_ace(FILE *out_hnd, enum action_type action, SEC_ACE *ace);
-void display_sec_acl(FILE *out_hnd, enum action_type action, SEC_ACL *sec_acl);
-void display_sec_desc(FILE *out_hnd, enum action_type action, SEC_DESC *sec);
-char *get_reg_val_type_str(uint32 type);
-void display_reg_value_info(FILE *out_hnd, enum action_type action,
- char *val_name, uint32 val_type, BUFFER2 *value);
-void display_reg_key_info(FILE *out_hnd, enum action_type action,
- char *key_name, time_t key_mod_time);
-
-/*The following definitions come from rpcclient/rpcclient.c */
-
-void rpcclient_init(void);
-
/*The following definitions come from smbd/blocking.c */
#if OLD_NTDOMAIN
diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h
new file mode 100644
index 0000000000..1d7bee4105
--- /dev/null
+++ b/source3/include/rpc_client.h
@@ -0,0 +1,27 @@
+/*
+ Unix SMB/Netbios implementation.
+ Version 1.9.
+ SMB parameters and setup
+ Copyright (C) Elrond 2000
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#ifndef _RPC_CLIENT_H
+#define _RPC_CLIENT_H
+
+#include "rpc_client_proto.h"
+
+#endif /* _RPC_CLIENT_H */
diff --git a/source3/include/rpc_client_proto.h b/source3/include/rpc_client_proto.h
new file mode 100644
index 0000000000..7682057439
--- /dev/null
+++ b/source3/include/rpc_client_proto.h
@@ -0,0 +1,200 @@
+#ifndef _RPC_CLIENT_PROTO_H_
+#define _RPC_CLIENT_PROTO_H_
+/* This file is automatically generated with "make proto". DO NOT EDIT */
+
+
+/*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);
+
+/*The following definitions come from rpc_client/cli_login.c */
+
+BOOL cli_nt_setup_creds(struct cli_state *cli, unsigned char mach_pwd[16]);
+BOOL cli_nt_srv_pwset(struct cli_state *cli, unsigned char *new_hashof_mach_pwd);
+BOOL cli_nt_login_interactive(struct cli_state *cli, char *domain, char *username,
+ uint32 smb_userid_low, char *password,
+ NET_ID_INFO_CTR *ctr, NET_USER_INFO_3 *user_info3);
+BOOL cli_nt_login_network(struct cli_state *cli, char *domain, char *username,
+ uint32 smb_userid_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, NET_ID_INFO_CTR *ctr);
+
+/*The following definitions come from rpc_client/cli_lsarpc.c */
+
+BOOL do_lsa_open_policy(struct cli_state *cli,
+ char *system_name, POLICY_HND *hnd,
+ BOOL sec_qos);
+BOOL do_lsa_lookup_sids(struct cli_state *cli,
+ POLICY_HND *hnd,
+ int num_sids,
+ DOM_SID **sids,
+ char ***names,
+ int *num_names);
+BOOL do_lsa_query_info_pol(struct cli_state *cli,
+ POLICY_HND *hnd, uint16 info_class,
+ fstring domain_name, DOM_SID *domain_sid);
+BOOL do_lsa_close(struct cli_state *cli, POLICY_HND *hnd);
+BOOL cli_lsa_get_domain_sid(struct cli_state *cli, char *server);
+
+/*The following definitions come from rpc_client/cli_netlogon.c */
+
+BOOL cli_net_logon_ctrl2(struct cli_state *cli, uint32 status_level);
+BOOL cli_net_auth2(struct cli_state *cli, uint16 sec_chan,
+ uint32 neg_flags, DOM_CHAL *srv_chal);
+BOOL cli_net_req_chal(struct cli_state *cli, DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal);
+BOOL cli_net_srv_pwset(struct cli_state *cli, uint8 hashed_mach_pwd[16]);
+BOOL cli_net_sam_logon(struct cli_state *cli, NET_ID_INFO_CTR *ctr,
+ NET_USER_INFO_3 *user_info3);
+BOOL cli_net_sam_logoff(struct cli_state *cli, NET_ID_INFO_CTR *ctr);
+BOOL change_trust_account_password( char *domain, char *remote_machine_list);
+
+/*The following definitions come from rpc_client/cli_pipe.c */
+
+BOOL rpc_api_pipe_req(struct cli_state *cli, uint8 op_num,
+ prs_struct *data, prs_struct *rdata);
+void cli_nt_set_ntlmssp_flgs(struct cli_state *cli, uint32 ntlmssp_flgs);
+BOOL cli_nt_session_open(struct cli_state *cli, char *pipe_name);
+void cli_nt_session_close(struct cli_state *cli);
+
+/*The following definitions come from rpc_client/cli_reg.c */
+
+BOOL do_reg_connect(struct cli_state *cli, char *full_keyname, char *key_name,
+ POLICY_HND *reg_hnd);
+BOOL do_reg_open_hklm(struct cli_state *cli, uint16 unknown_0, uint32 level,
+ POLICY_HND *hnd);
+BOOL do_reg_open_hku(struct cli_state *cli, uint16 unknown_0, uint32 level,
+ POLICY_HND *hnd);
+BOOL do_reg_flush_key(struct cli_state *cli, POLICY_HND *hnd);
+BOOL do_reg_query_key(struct cli_state *cli, POLICY_HND *hnd,
+ char *class, uint32 *class_len,
+ uint32 *num_subkeys, uint32 *max_subkeylen,
+ uint32 *max_subkeysize, uint32 *num_values,
+ uint32 *max_valnamelen, uint32 *max_valbufsize,
+ uint32 *sec_desc, NTTIME *mod_time);
+BOOL do_reg_unknown_1a(struct cli_state *cli, POLICY_HND *hnd, uint32 *unk);
+BOOL do_reg_query_info(struct cli_state *cli, POLICY_HND *hnd,
+ char *key_value, uint32* key_type);
+BOOL do_reg_set_key_sec(struct cli_state *cli, POLICY_HND *hnd, SEC_DESC_BUF *sec_desc_buf);
+BOOL do_reg_get_key_sec(struct cli_state *cli, POLICY_HND *hnd, uint32 *sec_buf_size, SEC_DESC_BUF **ppsec_desc_buf);
+BOOL do_reg_delete_val(struct cli_state *cli, POLICY_HND *hnd, char *val_name);
+BOOL do_reg_delete_key(struct cli_state *cli, POLICY_HND *hnd, char *key_name);
+BOOL do_reg_create_key(struct cli_state *cli, POLICY_HND *hnd,
+ char *key_name, char *key_class,
+ SEC_ACCESS *sam_access,
+ POLICY_HND *key);
+BOOL do_reg_enum_key(struct cli_state *cli, POLICY_HND *hnd,
+ int key_index, char *key_name,
+ uint32 *unk_1, uint32 *unk_2,
+ time_t *mod_time);
+BOOL do_reg_create_val(struct cli_state *cli, POLICY_HND *hnd,
+ char *val_name, uint32 type, BUFFER3 *data);
+BOOL do_reg_enum_val(struct cli_state *cli, POLICY_HND *hnd,
+ int val_index, int max_valnamelen, int max_valbufsize,
+ fstring val_name,
+ uint32 *val_type, BUFFER2 *value);
+BOOL do_reg_open_entry(struct cli_state *cli, POLICY_HND *hnd,
+ char *key_name, uint32 unk_0,
+ POLICY_HND *key_hnd);
+BOOL do_reg_close(struct cli_state *cli, POLICY_HND *hnd);
+
+/*The following definitions come from rpc_client/cli_samr.c */
+
+#if OLD_NTDOMAIN
+BOOL get_samr_query_usergroups(struct cli_state *cli,
+ POLICY_HND *pol_open_domain, uint32 user_rid,
+ uint32 *num_groups, DOM_GID *gid);
+BOOL get_samr_query_userinfo(struct cli_state *cli,
+ POLICY_HND *pol_open_domain,
+ uint32 info_level,
+ uint32 user_rid, SAM_USER_INFO_21 *usr);
+BOOL do_samr_chgpasswd_user(struct cli_state *cli,
+ char *srv_name, char *user_name,
+ char nt_newpass[516], uchar nt_oldhash[16],
+ char lm_newpass[516], uchar lm_oldhash[16]);
+BOOL do_samr_unknown_38(struct cli_state *cli, char *srv_name);
+BOOL do_samr_query_dom_info(struct cli_state *cli,
+ POLICY_HND *domain_pol, uint16 switch_value);
+BOOL do_samr_enum_dom_users(struct cli_state *cli,
+ POLICY_HND *pol, uint16 num_entries, uint16 unk_0,
+ uint16 acb_mask, uint16 unk_1, uint32 size,
+ struct acct_info **sam,
+ int *num_sam_users);
+BOOL do_samr_connect(struct cli_state *cli,
+ char *srv_name, uint32 unknown_0,
+ POLICY_HND *connect_pol);
+BOOL do_samr_open_user(struct cli_state *cli,
+ POLICY_HND *pol, uint32 unk_0, uint32 rid,
+ POLICY_HND *user_pol);
+BOOL do_samr_open_domain(struct cli_state *cli,
+ POLICY_HND *connect_pol, uint32 rid, DOM_SID *sid,
+ POLICY_HND *domain_pol);
+BOOL do_samr_query_unknown_12(struct cli_state *cli,
+ POLICY_HND *pol, uint32 rid, uint32 num_gids, uint32 *gids,
+ uint32 *num_aliases,
+ fstring als_names [MAX_LOOKUP_SIDS],
+ uint32 num_als_users[MAX_LOOKUP_SIDS]);
+BOOL do_samr_query_usergroups(struct cli_state *cli,
+ POLICY_HND *pol, uint32 *num_groups, DOM_GID *gid);
+BOOL do_samr_query_userinfo(struct cli_state *cli,
+ POLICY_HND *pol, uint16 switch_value, void* usr);
+BOOL do_samr_close(struct cli_state *cli, POLICY_HND *hnd);
+#endif
+
+/*The following definitions come from rpc_client/cli_srvsvc.c */
+
+BOOL do_srv_net_srv_conn_enum(struct cli_state *cli,
+ char *server_name, char *qual_name,
+ uint32 switch_value, SRV_CONN_INFO_CTR *ctr,
+ uint32 preferred_len,
+ ENUM_HND *hnd);
+BOOL do_srv_net_srv_sess_enum(struct cli_state *cli,
+ char *server_name, char *qual_name,
+ uint32 switch_value, SRV_SESS_INFO_CTR *ctr,
+ uint32 preferred_len,
+ ENUM_HND *hnd);
+BOOL do_srv_net_srv_share_enum(struct cli_state *cli,
+ char *server_name,
+ uint32 switch_value, SRV_R_NET_SHARE_ENUM *r_o,
+ uint32 preferred_len, ENUM_HND *hnd);
+BOOL do_srv_net_srv_file_enum(struct cli_state *cli,
+ char *server_name, char *qual_name,
+ uint32 switch_value, SRV_FILE_INFO_CTR *ctr,
+ uint32 preferred_len,
+ ENUM_HND *hnd);
+BOOL do_srv_net_srv_get_info(struct cli_state *cli,
+ char *server_name, uint32 switch_value, SRV_INFO_CTR *ctr);
+
+/*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 ntuser_creds *usr_creds,
+ BOOL reuse, BOOL *is_new);
+BOOL cli_net_use_del(const char *srv_name,
+ const struct ntuser_creds *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 do_wks_query_info(struct cli_state *cli,
+ char *server_name, uint32 switch_value,
+ WKS_INFO_100 *wks100);
+
+/*The following definitions come from rpc_client/ncacn_np_use.c */
+
+BOOL ncacn_np_use_del(const char *srv_name, const char *pipe_name,
+ const vuser_key * key,
+ BOOL force_close, BOOL *connection_closed);
+
+/*The following definitions come from rpc_client/ncalrpc_l_use.c */
+
+BOOL ncalrpc_l_use_del(const char *pipe_name,
+ const vuser_key * key,
+ BOOL force_close, BOOL *connection_closed);
+#endif /* _PROTO_H_ */
diff --git a/source3/include/rpcclient.h b/source3/include/rpcclient.h
index dc2be5d2b8..f322724217 100644
--- a/source3/include/rpcclient.h
+++ b/source3/include/rpcclient.h
@@ -24,6 +24,8 @@
#ifndef _RPCCLIENT_H
#define _RPCCLIENT_H
+#define report fprintf
+
struct tar_client_info
{
int blocksize;
@@ -83,7 +85,7 @@ struct nt_client_info
int num_sam_entries;
};
-struct client_info
+/* struct client_info
{
struct in_addr dest_ip;
fstring dest_host;
@@ -117,8 +119,34 @@ struct client_info
struct tar_client_info tar;
struct nt_client_info dom;
+}; */
+
+struct client_info
+{
+ struct in_addr dest_ip;
+ fstring dest_host;
+
+ fstring myhostname;
+
+ struct tar_client_info tar;
+ struct nt_client_info dom;
+
+ BOOL reuse;
};
+
enum action_type {ACTION_HEADER, ACTION_ENUMERATE, ACTION_FOOTER};
+/****************************************************************************
+ This defines the commands supported by this client
+ ****************************************************************************/
+struct command_set
+{
+ char *name;
+ uint32 (*fn)(struct client_info*, int, char*[]);
+ char *description;
+ char* (*compl_args[2])(char*, int);
+};
+
+
#endif /* _RPCCLIENT_H */
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 5af04f6e93..cb53e7b59e 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -363,10 +363,20 @@ struct sam_disp_info
char *full_name; /* user's full name string */
};
+typedef struct
+{
+ uint32 pid;
+ uint16 vuid;
+
+}
+vuser_key;
+
+
struct use_info
{
BOOL connected;
char *srv_name;
+ vuser_key key;
char *user_name;
char *domain;
};
@@ -1647,6 +1657,31 @@ struct ntdom_info
int max_recv_frag;
int max_xmit_frag;
+
+ vuser_key key;
+};
+
+struct msrpc_local
+{
+ fstring pipe_name;
+ struct ntdom_info nt;
+#if 0
+ cli_auth_fns *auth;
+ void *auth_info;
+#endif
+
+ int fd;
+ BOOL initialised;
+ char *inbuf;
+ char *outbuf;
+};
+
+struct ncacn_np
+{
+ fstring pipe_name;
+ struct cli_state *smb;
+ uint16 fnum;
+ BOOL initialised;
};
#include "rpc_creds.h"