summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--source3/groupdb/aliasdb.c1
-rw-r--r--source3/groupdb/groupdb.c1
-rw-r--r--source3/include/includes.h4
-rw-r--r--source3/include/proto.h147
-rw-r--r--source3/lib/msrpc_use.c1
-rw-r--r--source3/libsmb/nterr.c1
-rw-r--r--source3/passdb/passdb.c1
-rw-r--r--source3/passdb/passgrp.c1
-rw-r--r--source3/printing/nt_printing.c1
-rw-r--r--source3/rpc_client/cli_login.c1
-rw-r--r--source3/rpc_client/cli_samr.c1
-rw-r--r--source3/rpc_client/ntclienttrust.c1
-rw-r--r--source3/rpc_parse/parse_lsa.c1
-rw-r--r--source3/rpc_parse/parse_net.c1
-rw-r--r--source3/rpc_parse/parse_spoolss.c1
-rw-r--r--source3/rpc_server/srv_lookup.c1
-rw-r--r--source3/rpc_server/srv_pipe.c1
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c1
-rw-r--r--source3/rpc_server/srv_srvsvc.c1
-rw-r--r--source3/rpcclient/cmd_lsarpc.c1
-rw-r--r--source3/rpcclient/cmd_netlogon.c1
-rw-r--r--source3/rpcclient/cmd_reg.c1
-rw-r--r--source3/rpcclient/cmd_samr.c1
-rw-r--r--source3/rpcclient/cmd_srvsvc.c1
-rw-r--r--source3/rpcclient/cmd_wkssvc.c1
-rw-r--r--source3/smbd/ipc.c1
-rw-r--r--source3/smbd/lanman.c1
-rw-r--r--source3/smbd/nttrans.c1
-rw-r--r--source3/smbd/pipes.c1
-rw-r--r--source3/smbd/reply.c2
-rw-r--r--source3/smbd/server.c1
-rw-r--r--source3/smbd/trans2.c1
32 files changed, 97 insertions, 85 deletions
diff --git a/source3/groupdb/aliasdb.c b/source3/groupdb/aliasdb.c
index e5e6ebfa53f..a6876d0afca 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 b8952358fbc..1f773d9f153 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 e19295834a6..b71a5ee3d3d 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 4564ac832c8..db50e12ab65 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 1d0df1872fb..e18b24ac17a 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 d2f9335000d..ef3fb4b8baf 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 f520a11157a..bb7bbcaa01b 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 f578d9a20ea..399a45d8a9a 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 faf660e92f7..0c9526b1ec6 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 5fe392f2148..7c7398243df 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 8fccf6c7962..82608ebcc37 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 8ef193fa893..9e1bcf2261e 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 771e7c31d45..a8023bc640d 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 9588d1c53b3..002d7e56aaf 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 6c62b662779..5f1f10521fc 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 4041cd26604..274c68f18da 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 fe78d48fa60..3637f68adfe 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 d1ad0f62291..1121d5c2b10 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 c5307b264ee..51ba7e8a8f7 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 731eda4437d..ee4d5803d53 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 2c8514b43e8..944eda86b7c 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 fcc12c530cc..dfbfcf0cd1b 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 023bf512e8a..b3c7be56e0d 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 9deb9e801c6..e1d95af381f 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 0b8f469af37..1e64f384aeb 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 f87423c9cac..73addda086c 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 aaf2bc017f6..9774305fc92 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 b4ae0f61a9a..98f5959c2dc 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 5d5c6a653a4..0cfe653d306 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 a020f5eb3b1..590dc4f4270 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 83c70a9e89a..8e4de78cbfa 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 a30038a431e..4e502f767bd 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;