summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-01-11 23:11:16 +0000
committerTim Potter <tpot@samba.org>2001-01-11 23:11:16 +0000
commitbd72966aaa3f95fe1bc2ae3ee23f1a3bdd89dbc2 (patch)
treec719b61f749d5bfca5e29dac32f4d36115e7e389
parent7bf2d9864e12d1415230c66faff0af6cb8c98e8a (diff)
downloadsamba-bd72966aaa3f95fe1bc2ae3ee23f1a3bdd89dbc2.tar.gz
samba-bd72966aaa3f95fe1bc2ae3ee23f1a3bdd89dbc2.tar.bz2
samba-bd72966aaa3f95fe1bc2ae3ee23f1a3bdd89dbc2.zip
New makefile and proto for rpcclient.
(This used to be commit fdf044c351e3ed22212a89c9f2559a44a53d0cdd)
-rw-r--r--source3/Makefile.in14
-rw-r--r--source3/include/proto.h162
2 files changed, 44 insertions, 132 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index d16683a679..e7f1d4819d 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -125,7 +125,8 @@ LIBSMB_OBJ = libsmb/clientgen.o libsmb/cliconnect.o libsmb/clifile.o \
libsmb/smberr.o libsmb/credentials.o libsmb/pwd_cache.o \
libsmb/passchange.o libsmb/unexpected.o $(RPC_PARSE_OBJ1)
-LIBMSRPC_OBJ = libsmb/cli_lsarpc.o rpc_client/cli_pipe.o
+LIBMSRPC_OBJ = rpc_client/cli_pipe.o libsmb/cli_lsarpc.o libsmb/cli_samr.o \
+ libsmb/cli_spoolss.o
RPC_SERVER_OBJ = rpc_server/srv_lsa.o \
rpc_server/srv_lsa_hnd.o rpc_server/srv_netlog.o \
@@ -255,17 +256,12 @@ SMBPASSWD_OBJ = utils/smbpasswd.o lib/msrpc-client.o $(PARAM_OBJ) \
PDBEDIT_OBJ = utils/pdbedit.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(PASSDB_OBJ) \
$(UBIQX_OBJ) $(LIB_OBJ)
-RPCCLIENT_OBJ1 = rpcclient/rpcclient.o \
- lib/cmd_interp.o \
- lib/msrpc-client.o \
- rpcclient/spoolss_cmds.o rpcclient/cmd_spoolss.o \
- rpcclient/cmd_lsarpc.o \
- rpcclient/display_spool.o rpcclient/display_sec.o \
- rpc_client/msrpc_spoolss.o rpc_client/cli_spoolss.o
+RPCCLIENT_OBJ1 = rpcclient/rpcclient.o rpcclient/cmd_lsarpc.o \
+ rpcclient/cmd_samr.o rpcclient/cmd_spoolss.o
RPCCLIENT_OBJ = $(RPCCLIENT_OBJ1) \
$(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) $(LIB_OBJ) \
- $(RPC_CLIENT_OBJ) $(RPC_PARSE_OBJ) $(PASSDB_OBJ)
+ $(RPC_CLIENT_OBJ) $(RPC_PARSE_OBJ) $(PASSDB_OBJ) $(LIBMSRPC_OBJ)
PAM_WINBIND_OBJ = nsswitch/pam_winbind.po nsswitch/wb_common.po
diff --git a/source3/include/proto.h b/source3/include/proto.h
index e1127325ea..561496a8db 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -43,15 +43,6 @@ void charset_initialise(void);
void codepage_initialise(int client_codepage);
void add_char_string(char *s);
-/*The following definitions come from lib/cmd_interp.c */
-
-void free_cmd_set_array(uint32 num_entries, struct command_set **entries);
-struct command_set *add_cmd_set_to_array(uint32 *len, struct command_set ***array,
- const struct command_set *cmd);
-void add_command_set(const struct command_set *cmds);
-void cmd_set_no_autoconnect(void);
-int command_main(int argc, char *argv[]);
-
/*The following definitions come from lib/crc32.c */
uint32 crc32_calc_buffer( char *buffer, uint32 count);
@@ -691,6 +682,42 @@ uint32 cli_lsa_enum_trust_dom(struct cli_state *cli, POLICY_HND *pol,
uint32 *enum_ctx, uint32 *num_domains,
char ***domain_names, DOM_SID **domain_sids);
+/*The following definitions come from libsmb/cli_samr.c */
+
+struct cli_state *cli_samr_initialise(struct cli_state *cli, char *system_name,
+ struct ntuser_creds *creds);
+void cli_samr_shutdown(struct cli_state *cli);
+uint32 cli_samr_connect(struct cli_state *cli, char *srv_name,
+ uint32 access_mask, POLICY_HND *connect_pol);
+uint32 cli_samr_close(struct cli_state *cli, POLICY_HND *connect_pol);
+uint32 cli_samr_open_domain(struct cli_state *cli, POLICY_HND *connect_pol,
+ uint32 access_mask, DOM_SID *domain_sid,
+ POLICY_HND *domain_pol);
+uint32 cli_samr_open_user(struct cli_state *cli, POLICY_HND *domain_pol,
+ uint32 access_mask, uint32 user_rid,
+ POLICY_HND *user_pol);
+uint32 cli_samr_query_userinfo(struct cli_state *cli, POLICY_HND *user_pol,
+ uint16 switch_value, SAM_USERINFO_CTR *ctr);
+
+/*The following definitions come from libsmb/cli_spoolss.c */
+
+struct cli_state *cli_spoolss_initialise(struct cli_state *cli,
+ char *system_name,
+ struct ntuser_creds *creds);
+void cli_spoolss_shutdown(struct cli_state *cli);
+uint32 cli_spoolss_open_printer_ex(struct cli_state *cli, char *printername,
+ char *datatype, uint32 access_required,
+ char *station, char *username,
+ POLICY_HND *pol);
+uint32 cli_spoolss_closeprinter(struct cli_state *cli, POLICY_HND *pol);
+uint32 cli_spoolss_enum_printers(struct cli_state *cli, uint32 flags,
+ uint32 level, int *returned,
+ PRINTER_INFO_CTR *ctr);
+uint32 cli_spoolss_enum_ports(struct cli_state *cli, uint32 level,
+ int *returned, PORT_INFO_CTR *ctr);
+uint32 cli_spoolss_getprinter(struct cli_state *cli, POLICY_HND *pol,
+ uint32 level, PRINTER_INFO_CTR *ctr);
+
/*The following definitions come from libsmb/cliconnect.c */
BOOL cli_session_setup(struct cli_state *cli,
@@ -2099,48 +2126,6 @@ BOOL do_samr_query_userinfo(struct cli_state *cli,
BOOL do_samr_close(struct cli_state *cli, POLICY_HND *hnd);
#endif
-/*The following definitions come from rpc_client/cli_spoolss.c */
-
-uint32 spoolss_enum_printerdrivers(const char *srv_name, const char *environment,
- uint32 level, NEW_BUFFER *buffer, uint32 offered,
- uint32 *needed, uint32 *returned);
-uint32 spoolss_enum_printers(uint32 flags, fstring srv_name, uint32 level,
- NEW_BUFFER *buffer, uint32 offered,
- uint32 *needed, uint32 *returned);
-uint32 spoolss_enum_ports(fstring srv_name, uint32 level,
- NEW_BUFFER *buffer, uint32 offered,
- uint32 *needed, uint32 *returned);
-uint32 spoolss_enum_jobs(const POLICY_HND *hnd, uint32 firstjob, uint32 numofjobs,
- uint32 level, NEW_BUFFER *buffer, uint32 offered,
- uint32 *needed, uint32 *returned);
-uint32 spoolss_enum_printerdata(const POLICY_HND *hnd, uint32 idx,
- uint32 *valuelen, uint16 *value, uint32 *rvaluelen,
- uint32 *type, uint32 *datalen, uint8 *data,
- uint32 *rdatalen);
-uint32 spoolss_getprinter(const POLICY_HND *hnd, uint32 level,
- NEW_BUFFER *buffer, uint32 offered,
- uint32 *needed);
-uint32 spoolss_getprinterdriver(const POLICY_HND *hnd,
- const char *environment, uint32 level,
- NEW_BUFFER *buffer, uint32 offered,
- uint32 *needed);
-BOOL spoolss_open_printer_ex( const char *printername,
- const char *datatype, uint32 access_required,
- const char *station, const char *username,
- POLICY_HND *hnd);
-BOOL spoolss_addprinterex(POLICY_HND *hnd, const char* srv_name, PRINTER_INFO_2 *info2);
-BOOL spoolss_closeprinter(POLICY_HND *hnd);
-uint32 spoolss_getprinterdata(const POLICY_HND *hnd, const UNISTR2 *valuename,
- uint32 in_size,
- uint32 *type,
- uint32 *out_size,
- uint8 *data,
- uint32 *needed);
-uint32 spoolss_getprinterdriverdir(fstring srv_name, fstring env_name, uint32 level,
- NEW_BUFFER *buffer, uint32 offered,
- uint32 *needed);
-uint32 spoolss_addprinterdriver(const char *srv_name, uint32 level, PRINTER_DRIVER_CTR *info);
-
/*The following definitions come from rpc_client/cli_spoolss_notify.c */
BOOL spoolss_disconnect_from_client( struct cli_state *cli);
@@ -2193,42 +2178,6 @@ 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/msrpc_spoolss.c */
-
-void init_buffer(NEW_BUFFER *buffer, uint32 size, TALLOC_CTX *ctx);
-void decode_port_info_1(NEW_BUFFER *buffer, uint32 returned,
- PORT_INFO_1 **info);
-void decode_port_info_2(NEW_BUFFER *buffer, uint32 returned,
- PORT_INFO_2 **info);
-BOOL msrpc_spoolss_enum_printers(char* srv_name, uint32 flags,
- uint32 level, PRINTER_INFO_CTR ctr);
-BOOL msrpc_spoolss_enum_ports(char* srv_name,
- uint32 level, PORT_INFO_CTR *ctr);
-uint32 msrpc_spoolss_getprinterdata( const char* printer_name,
- const char* station,
- const char* user_name,
- const char* value_name,
- uint32 *type,
- NEW_BUFFER *buffer,
- void *fn);
-BOOL msrpc_spoolss_enum_jobs( const char* printer_name,
- const char* station, const char* user_name,
- uint32 level,
- void ***ctr, JOB_INFO_FN(fn));
-BOOL msrpc_spoolss_enum_printerdata( const char* printer_name,
- const char* station, const char* user_name );
-BOOL msrpc_spoolss_getprinter( const char* printer_name, const uint32 level,
- const char* station, const char* user_name,
- PRINTER_INFO_CTR ctr);
-BOOL msrpc_spoolss_getprinterdriver( const char* printer_name,
- const char *environment, const uint32 level,
- const char* station, const char* user_name,
- PRINTER_DRIVER_CTR ctr);
-BOOL msrpc_spoolss_enumprinterdrivers( const char* srv_name,
- const char *environment, const uint32 level,
- PRINTER_DRIVER_CTR ctr);
-BOOL msrpc_spoolss_getprinterdriverdir(char* srv_name, char* env_name, uint32 level, DRIVER_DIRECTORY_CTR ctr);
-
/*The following definitions come from rpc_client/ncacn_np_use.c */
BOOL ncacn_np_use_del(const char *srv_name, const char *pipe_name,
@@ -3413,50 +3362,17 @@ BOOL api_wkssvc_rpc(pipes_struct *p);
/*The following definitions come from rpcclient/cmd_lsarpc.c */
-/*The following definitions come from rpcclient/cmd_spoolss.c */
+/*The following definitions come from rpcclient/cmd_samr.c */
+
+/*The following definitions come from rpcclient/cmd_spoolss.c */
-/*The following definitions come from rpcclient/display_sec.c */
-
-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_printer_info_ctr(FILE *out_hnd, enum action_type action, uint32 level,
- uint32 count, PRINTER_INFO_CTR ctr);
-void display_port_info_ctr(FILE *out_hnd, enum action_type action, uint32 level,
- uint32 count, PORT_INFO_CTR *ctr);
-void display_port_info_1(FILE *out_hnd, enum action_type action, PORT_INFO_1 *i1);
-void display_port_info_2(FILE *out_hnd, enum action_type action, PORT_INFO_2 *i2);
-void display_printer_enumdata(FILE *out_hnd, enum action_type action, uint32 idx,
- uint32 valuelen, uint16 *value, uint32 rvaluelen,
- uint32 type,
- uint32 datalen, uint8 *data, uint32 rdatalen);
-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);
-void display_printer_driver_ctr(FILE *out_hnd, enum action_type action, uint32 level,
- uint32 count, PRINTER_DRIVER_CTR ctr);
-void display_printerdriverdir_info_ctr(FILE *out_hnd, enum action_type action, uint32 level,
- DRIVER_DIRECTORY_CTR ctr);
/*The following definitions come from rpcclient/rpcclient.c */
void init_rpcclient_creds(struct ntuser_creds *creds);
void add_command_set(struct cmd_set *cmd_set);
-/*The following definitions come from rpcclient/spoolss_cmds.c */
-
-void add_spl_commands(void);
-
/*The following definitions come from smbd/blocking.c */
#if OLD_NTDOMAIN