diff options
32 files changed, 97 insertions, 85 deletions
diff --git a/source3/groupdb/aliasdb.c b/source3/groupdb/aliasdb.c index e5e6ebfa53..a6876d0afc 100644 --- a/source3/groupdb/aliasdb.c +++ b/source3/groupdb/aliasdb.c @@ -21,7 +21,6 @@ */ #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source3/groupdb/groupdb.c b/source3/groupdb/groupdb.c index b8952358fb..1f773d9f15 100644 --- a/source3/groupdb/groupdb.c +++ b/source3/groupdb/groupdb.c @@ -21,7 +21,6 @@ */ #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source3/include/includes.h b/source3/include/includes.h index e19295834a..b71a5ee3d3 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -605,6 +605,8 @@ extern int errno; #include "talloc.h" #include "interfaces.h" #include "hash.h" +#include "trans2.h" +#include "nterr.h" #ifdef HAVE_FNMATCH #include <fnmatch.h> @@ -867,4 +869,6 @@ int setresgid(gid_t rgid, gid_t egid, gid_t sgid); #include <dlfcn.h> #endif +extern int DEBUGLEVEL; + #endif /* _INCLUDES_H */ diff --git a/source3/include/proto.h b/source3/include/proto.h index 4564ac832c..db50e12ab6 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -568,25 +568,8 @@ void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t s smb_ucs2_t *octal_string_w(int i); smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); -/*The following definitions come from libsmb/clientgen.c */ +/*The following definitions come from libsmb/cliconnect.c */ -int cli_set_port(struct cli_state *cli, int port); -char *cli_errstr(struct cli_state *cli); -BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, int pipe_name_len, - uint16 *setup, uint32 setup_count, uint32 max_setup_count, - char *params, uint32 param_count, uint32 max_param_count, - char *data, uint32 data_count, uint32 max_data_count, - char **rparam, uint32 *rparam_count, - char **rdata, uint32 *rdata_count); -BOOL cli_api(struct cli_state *cli, - char *param, int prcnt, int mprcnt, - char *data, int drcnt, int mdrcnt, - char **rparam, int *rprcnt, - char **rdata, int *rdrcnt); -BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); -int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *)); -BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, - void (*fn)(const char *, uint32, const char *)); BOOL cli_session_setup(struct cli_state *cli, char *user, char *pass, int passlen, @@ -596,6 +579,37 @@ BOOL cli_ulogoff(struct cli_state *cli); BOOL cli_send_tconX(struct cli_state *cli, char *share, char *dev, char *pass, int passlen); BOOL cli_tdis(struct cli_state *cli); +BOOL cli_negprot(struct cli_state *cli); +BOOL cli_session_request(struct cli_state *cli, + struct nmb_name *calling, struct nmb_name *called); +BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); +BOOL cli_reestablish_connection(struct cli_state *cli); +BOOL cli_establish_connection(struct cli_state *cli, + 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 attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, + struct in_addr *pdest_ip); + +/*The following definitions come from libsmb/clientgen.c */ + +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); +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); +uint16 cli_setpid(struct cli_state *cli, uint16 pid); + +/*The following definitions come from libsmb/clierror.c */ + +char *cli_errstr(struct cli_state *cli); +int cli_error(struct cli_state *cli, uint8 *eclass, uint32 *num, uint32 *nt_rpc_error); + +/*The following definitions come from libsmb/clifile.c */ + BOOL cli_rename(struct cli_state *cli, char *fname_src, char *fname_dst); BOOL cli_unlink(struct cli_state *cli, char *fname); BOOL cli_mkdir(struct cli_state *cli, char *dname); @@ -606,18 +620,52 @@ BOOL cli_close(struct cli_state *cli, int fnum); BOOL cli_lock(struct cli_state *cli, int fnum, uint32 offset, uint32 len, int timeout, enum brl_type lock_type); BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); -size_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_write(struct cli_state *cli, - int fnum, uint16 write_mode, - char *buf, off_t offset, size_t size); -ssize_t cli_smbwrite(struct cli_state *cli, - int fnum, char *buf, off_t offset, size_t size1); BOOL cli_getattrE(struct cli_state *cli, int fd, uint16 *attr, size_t *size, time_t *c_time, time_t *a_time, time_t *m_time); BOOL cli_getatr(struct cli_state *cli, char *fname, uint16 *attr, size_t *size, time_t *t); BOOL cli_setatr(struct cli_state *cli, char *fname, uint16 attr, time_t t); +BOOL cli_chkpath(struct cli_state *cli, char *path); +BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); + +/*The following definitions come from libsmb/clilist.c */ + +int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *)); + +/*The following definitions come from libsmb/climessage.c */ + +BOOL cli_message_start(struct cli_state *cli, char *host, char *username, + int *grp); +BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); +BOOL cli_message_end(struct cli_state *cli, int grp); + +/*The following definitions come from libsmb/cliprint.c */ + +int cli_print_queue(struct cli_state *cli, + void (*fn)(struct print_job_info *)); +int cli_printjob_del(struct cli_state *cli, int job); + +/*The following definitions come from libsmb/clirap.c */ + +BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, int pipe_name_len, + uint16 *setup, uint32 setup_count, uint32 max_setup_count, + char *params, uint32 param_count, uint32 max_param_count, + char *data, uint32 data_count, uint32 max_data_count, + char **rparam, uint32 *rparam_count, + char **rdata, uint32 *rdata_count); +BOOL cli_api(struct cli_state *cli, + char *param, int prcnt, int mprcnt, + char *data, int drcnt, int mdrcnt, + char **rparam, int *rprcnt, + char **rdata, int *rdrcnt); +BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); +int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *)); +BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, + void (*fn)(const char *, uint32, const char *)); +BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, + const char *old_password); BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, time_t *c_time, time_t *a_time, time_t *m_time, size_t *size, uint16 *mode); @@ -629,36 +677,27 @@ BOOL cli_qfileinfo(struct cli_state *cli, int fnum, uint16 *mode, size_t *size, time_t *c_time, time_t *a_time, time_t *m_time, time_t *w_time, SMB_INO_T *ino); -int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *)); -BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, - const char *old_password); -BOOL cli_negprot(struct cli_state *cli); -BOOL cli_session_request(struct cli_state *cli, - struct nmb_name *calling, struct nmb_name *called); -BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); -struct cli_state *cli_initialise(struct cli_state *cli); -void cli_shutdown(struct cli_state *cli); -int cli_error(struct cli_state *cli, uint8 *eclass, uint32 *num, uint32 *nt_rpc_error); -void cli_sockopt(struct cli_state *cli, char *options); -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, - struct nmb_name *calling, struct nmb_name *called, - char *service, char *service_type, - BOOL do_shutdown, BOOL do_tcon); -int cli_printjob_del(struct cli_state *cli, int job); -int cli_print_queue(struct cli_state *cli, - void (*fn)(struct print_job_info *)); -BOOL cli_chkpath(struct cli_state *cli, char *path); -BOOL cli_message_start(struct cli_state *cli, char *host, char *username, - int *grp); -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 attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, - struct in_addr *pdest_ip); + +/*The following definitions come from libsmb/clireadwrite.c */ + +size_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_write(struct cli_state *cli, + int fnum, uint16 write_mode, + char *buf, off_t offset, size_t size); +ssize_t cli_smbwrite(struct cli_state *cli, + int fnum, char *buf, off_t offset, size_t size1); + +/*The following definitions come from libsmb/clitrans.c */ + +BOOL cli_send_trans(struct cli_state *cli, int trans, + char *name, int pipe_name_len, + int fid, int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_trans(struct cli_state *cli,int trans, + char **param, int *param_len, + char **data, int *data_len); /*The following definitions come from libsmb/credentials.c */ diff --git a/source3/lib/msrpc_use.c b/source3/lib/msrpc_use.c index 1d0df1872f..e18b24ac17 100644 --- a/source3/lib/msrpc_use.c +++ b/source3/lib/msrpc_use.c @@ -23,7 +23,6 @@ #define NO_SYSLOG #include "includes.h" -#include "trans2.h" extern int DEBUGLEVEL; extern pstring global_myname; diff --git a/source3/libsmb/nterr.c b/source3/libsmb/nterr.c index d2f9335000..ef3fb4b8ba 100644 --- a/source3/libsmb/nterr.c +++ b/source3/libsmb/nterr.c @@ -1,7 +1,6 @@ /* NT error codes. please read nterr.h */ #include "includes.h" -#include "nterr.h" typedef struct { diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index f520a11157..bb7bbcaa01 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -21,7 +21,6 @@ */ #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source3/passdb/passgrp.c b/source3/passdb/passgrp.c index f578d9a20e..399a45d8a9 100644 --- a/source3/passdb/passgrp.c +++ b/source3/passdb/passgrp.c @@ -21,7 +21,6 @@ */ #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index faf660e92f..0c9526b1ec 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -21,7 +21,6 @@ */ #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source3/rpc_client/cli_login.c b/source3/rpc_client/cli_login.c index 5fe392f214..7c7398243d 100644 --- a/source3/rpc_client/cli_login.c +++ b/source3/rpc_client/cli_login.c @@ -22,7 +22,6 @@ */ #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; extern fstring global_myworkgroup; diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c index 8fccf6c796..82608ebcc3 100644 --- a/source3/rpc_client/cli_samr.c +++ b/source3/rpc_client/cli_samr.c @@ -28,7 +28,6 @@ #endif #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source3/rpc_client/ntclienttrust.c b/source3/rpc_client/ntclienttrust.c index 8ef193fa89..9e1bcf2261 100644 --- a/source3/rpc_client/ntclienttrust.c +++ b/source3/rpc_client/ntclienttrust.c @@ -25,7 +25,6 @@ #endif #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c index 771e7c31d4..a8023bc640 100644 --- a/source3/rpc_parse/parse_lsa.c +++ b/source3/rpc_parse/parse_lsa.c @@ -22,7 +22,6 @@ */ #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source3/rpc_parse/parse_net.c b/source3/rpc_parse/parse_net.c index 9588d1c53b..002d7e56aa 100644 --- a/source3/rpc_parse/parse_net.c +++ b/source3/rpc_parse/parse_net.c @@ -22,7 +22,6 @@ */ #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c index 6c62b66277..5f1f10521f 100644 --- a/source3/rpc_parse/parse_spoolss.c +++ b/source3/rpc_parse/parse_spoolss.c @@ -23,7 +23,6 @@ #include "includes.h" -#include "nterr.h" #ifdef TNG #define prs_uint16 _prs_uint16 diff --git a/source3/rpc_server/srv_lookup.c b/source3/rpc_server/srv_lookup.c index 4041cd2660..274c68f18d 100644 --- a/source3/rpc_server/srv_lookup.c +++ b/source3/rpc_server/srv_lookup.c @@ -43,7 +43,6 @@ */ #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c index fe78d48fa6..3637f68adf 100644 --- a/source3/rpc_server/srv_pipe.c +++ b/source3/rpc_server/srv_pipe.c @@ -39,7 +39,6 @@ */ #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index d1ad0f6229..1121d5c2b1 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -23,7 +23,6 @@ #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; extern pstring global_myname; diff --git a/source3/rpc_server/srv_srvsvc.c b/source3/rpc_server/srv_srvsvc.c index c5307b264e..51ba7e8a8f 100644 --- a/source3/rpc_server/srv_srvsvc.c +++ b/source3/rpc_server/srv_srvsvc.c @@ -22,7 +22,6 @@ */ #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; extern pstring global_myname; diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c index 731eda4437..ee4d5803d5 100644 --- a/source3/rpcclient/cmd_lsarpc.c +++ b/source3/rpcclient/cmd_lsarpc.c @@ -27,7 +27,6 @@ #endif #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source3/rpcclient/cmd_netlogon.c b/source3/rpcclient/cmd_netlogon.c index 2c8514b43e..944eda86b7 100644 --- a/source3/rpcclient/cmd_netlogon.c +++ b/source3/rpcclient/cmd_netlogon.c @@ -27,7 +27,6 @@ #endif #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source3/rpcclient/cmd_reg.c b/source3/rpcclient/cmd_reg.c index fcc12c530c..dfbfcf0cd1 100644 --- a/source3/rpcclient/cmd_reg.c +++ b/source3/rpcclient/cmd_reg.c @@ -27,7 +27,6 @@ #endif #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c index 023bf512e8..b3c7be56e0 100644 --- a/source3/rpcclient/cmd_samr.c +++ b/source3/rpcclient/cmd_samr.c @@ -27,7 +27,6 @@ #endif #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source3/rpcclient/cmd_srvsvc.c b/source3/rpcclient/cmd_srvsvc.c index 9deb9e801c..e1d95af381 100644 --- a/source3/rpcclient/cmd_srvsvc.c +++ b/source3/rpcclient/cmd_srvsvc.c @@ -27,7 +27,6 @@ #endif #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source3/rpcclient/cmd_wkssvc.c b/source3/rpcclient/cmd_wkssvc.c index 0b8f469af3..1e64f384ae 100644 --- a/source3/rpcclient/cmd_wkssvc.c +++ b/source3/rpcclient/cmd_wkssvc.c @@ -27,7 +27,6 @@ #endif #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c index f87423c9ca..73addda086 100644 --- a/source3/smbd/ipc.c +++ b/source3/smbd/ipc.c @@ -27,7 +27,6 @@ */ #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; extern int max_send; diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c index aaf2bc017f..9774305fc9 100644 --- a/source3/smbd/lanman.c +++ b/source3/smbd/lanman.c @@ -27,7 +27,6 @@ */ #include "includes.h" -#include "nterr.h" #ifdef CHECK_TYPES #undef CHECK_TYPES diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index b4ae0f61a9..98f5959c2d 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -20,7 +20,6 @@ */ #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; extern int Protocol; diff --git a/source3/smbd/pipes.c b/source3/smbd/pipes.c index 5d5c6a653a..0cfe653d30 100644 --- a/source3/smbd/pipes.c +++ b/source3/smbd/pipes.c @@ -27,7 +27,6 @@ #include "includes.h" -#include "trans2.h" #define PIPE "\\PIPE\\" #define PIPELEN strlen(PIPE) diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index a020f5eb3b..590dc4f427 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -25,8 +25,6 @@ #include "includes.h" -#include "trans2.h" -#include "nterr.h" /* look in server.c for some explanation of these variables */ extern int Protocol; diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 83c70a9e89..8e4de78cbf 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -20,7 +20,6 @@ */ #include "includes.h" -#include "trans2.h" pstring servicesf = CONFIGFILE; extern pstring debugf; diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index a30038a431..4e502f767b 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -22,7 +22,6 @@ */ #include "includes.h" -#include "trans2.h" extern int DEBUGLEVEL; extern int Protocol; |