diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/proto.h | 15 | ||||
-rw-r--r-- | source3/rpc_client/cli_srvsvc.c | 14 | ||||
-rw-r--r-- | source3/rpcclient/cmd_atsvc.c | 10 | ||||
-rw-r--r-- | source3/rpcclient/cmd_srvsvc.c | 14 |
4 files changed, 23 insertions, 30 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index 38b4be92ad..a481e2cccd 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -801,6 +801,7 @@ struct in_addr *name_query(int fd,const char *name,int name_type, BOOL bcast,BOO 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); @@ -2081,30 +2082,30 @@ BOOL spoolss_closeprinter(struct cli_state *cli, uint16 fnum, PRINTER_HND *hnd); /*The following definitions come from rpc_client/cli_srvsvc.c */ -BOOL do_srv_net_srv_tprt_enum( +BOOL srv_net_srv_tprt_enum( const char *srv_name, uint32 switch_value, SRV_TPRT_INFO_CTR *ctr, uint32 preferred_len, ENUM_HND *hnd); -BOOL do_srv_net_srv_conn_enum( char *srv_name, char *qual_name, +BOOL srv_net_srv_conn_enum( char *srv_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( char *srv_name, char *qual_name, char *user_name, +BOOL srv_net_srv_sess_enum( char *srv_name, char *qual_name, char *user_name, uint32 switch_value, SRV_SESS_INFO_CTR *ctr, uint32 preferred_len, ENUM_HND *hnd); -BOOL do_srv_net_srv_share_enum( char *srv_name, +BOOL srv_net_srv_share_enum( char *srv_name, uint32 switch_value, SRV_SHARE_INFO_CTR *ctr, uint32 preferred_len, ENUM_HND *hnd); -BOOL do_srv_net_srv_file_enum( char *srv_name, char *qual_name, uint32 file_id, +BOOL srv_net_srv_file_enum( char *srv_name, char *qual_name, uint32 file_id, uint32 switch_value, SRV_FILE_INFO_CTR *ctr, uint32 preferred_len, ENUM_HND *hnd); -BOOL do_srv_net_srv_get_info( char *srv_name, uint32 switch_value, +BOOL srv_net_srv_get_info( char *srv_name, uint32 switch_value, SRV_INFO_CTR *ctr); -BOOL do_srv_net_remote_tod( char *srv_name, TIME_OF_DAY_INFO *tod); +BOOL srv_net_remote_tod( char *srv_name, TIME_OF_DAY_INFO *tod); /*The following definitions come from rpc_client/cli_svcctl.c */ diff --git a/source3/rpc_client/cli_srvsvc.c b/source3/rpc_client/cli_srvsvc.c index 6d301d014e..4180141cba 100644 --- a/source3/rpc_client/cli_srvsvc.c +++ b/source3/rpc_client/cli_srvsvc.c @@ -34,7 +34,7 @@ extern int DEBUGLEVEL; /**************************************************************************** do a server net tprt enum ****************************************************************************/ -BOOL do_srv_net_srv_tprt_enum( +BOOL srv_net_srv_tprt_enum( const char *srv_name, uint32 switch_value, SRV_TPRT_INFO_CTR *ctr, uint32 preferred_len, @@ -119,7 +119,7 @@ BOOL do_srv_net_srv_tprt_enum( /**************************************************************************** do a server net conn enum ****************************************************************************/ -BOOL do_srv_net_srv_conn_enum( char *srv_name, char *qual_name, +BOOL srv_net_srv_conn_enum( char *srv_name, char *qual_name, uint32 switch_value, SRV_CONN_INFO_CTR *ctr, uint32 preferred_len, ENUM_HND *hnd) @@ -203,7 +203,7 @@ BOOL do_srv_net_srv_conn_enum( char *srv_name, char *qual_name, /**************************************************************************** do a server net sess enum ****************************************************************************/ -BOOL do_srv_net_srv_sess_enum( char *srv_name, char *qual_name, char *user_name, +BOOL srv_net_srv_sess_enum( char *srv_name, char *qual_name, char *user_name, uint32 switch_value, SRV_SESS_INFO_CTR *ctr, uint32 preferred_len, ENUM_HND *hnd) @@ -287,7 +287,7 @@ BOOL do_srv_net_srv_sess_enum( char *srv_name, char *qual_name, char *user_name, /**************************************************************************** do a server net share enum ****************************************************************************/ -BOOL do_srv_net_srv_share_enum( char *srv_name, +BOOL srv_net_srv_share_enum( char *srv_name, uint32 switch_value, SRV_SHARE_INFO_CTR *ctr, uint32 preferred_len, ENUM_HND *hnd) @@ -373,7 +373,7 @@ BOOL do_srv_net_srv_share_enum( char *srv_name, /**************************************************************************** do a server net file enum ****************************************************************************/ -BOOL do_srv_net_srv_file_enum( char *srv_name, char *qual_name, uint32 file_id, +BOOL srv_net_srv_file_enum( char *srv_name, char *qual_name, uint32 file_id, uint32 switch_value, SRV_FILE_INFO_CTR *ctr, uint32 preferred_len, ENUM_HND *hnd) @@ -459,7 +459,7 @@ BOOL do_srv_net_srv_file_enum( char *srv_name, char *qual_name, uint32 file_id, /**************************************************************************** do a server get info ****************************************************************************/ -BOOL do_srv_net_srv_get_info( char *srv_name, uint32 switch_value, +BOOL srv_net_srv_get_info( char *srv_name, uint32 switch_value, SRV_INFO_CTR *ctr) { prs_struct data; @@ -533,7 +533,7 @@ BOOL do_srv_net_srv_get_info( char *srv_name, uint32 switch_value, /**************************************************************************** get server time ****************************************************************************/ -BOOL do_srv_net_remote_tod( char *srv_name, TIME_OF_DAY_INFO *tod) +BOOL srv_net_remote_tod( char *srv_name, TIME_OF_DAY_INFO *tod) { prs_struct data; prs_struct rdata; diff --git a/source3/rpcclient/cmd_atsvc.c b/source3/rpcclient/cmd_atsvc.c index e07a89f4d9..39dc5213cf 100644 --- a/source3/rpcclient/cmd_atsvc.c +++ b/source3/rpcclient/cmd_atsvc.c @@ -137,19 +137,11 @@ schedule the job 'soon' ****************************************************************************/ static BOOL at_soon(char *dest_srv, uint32 *hours, uint32 *minutes, uint32 *seconds) { - uint16 nt_pipe_fnum; TIME_OF_DAY_INFO tod; BOOL res = True; - /* open srvsvc session. */ - res = res ? cli_nt_session_open(smb_cli, PIPE_SRVSVC, &nt_pipe_fnum) : False; - /* enumerate files on server */ - res = res ? do_srv_net_remote_tod(smb_cli, nt_pipe_fnum, - dest_srv, &tod) : False; - - /* Close the session */ - cli_nt_session_close(smb_cli, nt_pipe_fnum); + res = res ? srv_net_remote_tod(dest_srv, &tod) : False; if (res) { diff --git a/source3/rpcclient/cmd_srvsvc.c b/source3/rpcclient/cmd_srvsvc.c index 74368dea89..f0b10fe0d6 100644 --- a/source3/rpcclient/cmd_srvsvc.c +++ b/source3/rpcclient/cmd_srvsvc.c @@ -55,7 +55,7 @@ BOOL net_srv_get_info(struct client_info *info, dest_srv, (int)info_level)); /* send info level: receive requested info. hopefully. */ - res = res ? do_srv_net_srv_get_info(dest_srv, info_level, ctr) : False; + res = res ? srv_net_srv_get_info(dest_srv, info_level, ctr) : False; return res; } @@ -106,7 +106,7 @@ BOOL msrpc_srv_enum_tprt( const char* dest_srv, hnd.handle = 0; /* enumerate transports on server */ - res1 = res ? do_srv_net_srv_tprt_enum(dest_srv, + res1 = res ? srv_net_srv_tprt_enum(dest_srv, info_level, ctr, 0xffffffff, &hnd) : False; tprt_fn(ctr); @@ -187,7 +187,7 @@ void cmd_srv_enum_conn(struct client_info *info, int argc, char *argv[]) hnd.handle = 0; /* enumerate connections on server */ - res = res ? do_srv_net_srv_conn_enum(dest_srv, qual_srv, + res = res ? srv_net_srv_conn_enum(dest_srv, qual_srv, info_level, &ctr, 0xffffffff, &hnd) : False; if (res) @@ -237,7 +237,7 @@ void cmd_srv_enum_shares(struct client_info *info, int argc, char *argv[]) hnd.handle = 0; /* enumerate shares_files on server */ - res = res ? do_srv_net_srv_share_enum(dest_srv, + res = res ? srv_net_srv_share_enum(dest_srv, info_level, &ctr, 0xffffffff, &hnd) : False; if (res) @@ -287,7 +287,7 @@ void cmd_srv_enum_sess(struct client_info *info, int argc, char *argv[]) hnd.handle = 0; /* enumerate sessions on server */ - res = res ? do_srv_net_srv_sess_enum(dest_srv, NULL, NULL, + res = res ? srv_net_srv_sess_enum(dest_srv, NULL, NULL, info_level, &ctr, 0x1000, &hnd) : False; if (res) @@ -337,7 +337,7 @@ void cmd_srv_enum_files(struct client_info *info, int argc, char *argv[]) hnd.handle = 0; /* enumerate files on server */ - res = res ? do_srv_net_srv_file_enum(dest_srv, NULL, 0, + res = res ? srv_net_srv_file_enum(dest_srv, NULL, 0, info_level, &ctr, 0x1000, &hnd) : False; if (res) @@ -373,7 +373,7 @@ void cmd_time(struct client_info *info, int argc, char *argv[]) DEBUG(4,("cmd_time: server:%s\n", dest_srv)); /* enumerate files on server */ - res = res ? do_srv_net_remote_tod(dest_srv, &tod) : False; + res = res ? srv_net_remote_tod(dest_srv, &tod) : False; if (res) { |