summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/client/client.c17
-rw-r--r--source4/client/clitar.c9
-rw-r--r--source4/include/client.h4
-rw-r--r--source4/include/rewrite.h3
-rw-r--r--source4/include/structs.h2
-rw-r--r--source4/ldap_server/ldap_server.c1
-rw-r--r--source4/lib/events.c1
-rw-r--r--source4/lib/messaging/messaging.c1
-rw-r--r--source4/libcli/clideltree.c3
-rw-r--r--source4/libcli/clilist.c21
-rw-r--r--source4/libcli/raw/clitransport.c1
-rw-r--r--source4/librpc/rpc/dcerpc_sock.c1
-rw-r--r--source4/ntvfs/cifs/vfs_cifs.c1
-rw-r--r--source4/ntvfs/posix/pvfs_wait.c1
-rw-r--r--source4/rpc_server/dcerpc_sock.c1
-rw-r--r--source4/smb_server/request.c1
-rw-r--r--source4/smb_server/smb_server.c1
-rw-r--r--source4/smbd/process_model.c1
-rw-r--r--source4/smbd/process_single.c1
-rw-r--r--source4/smbd/process_standard.c1
-rw-r--r--source4/smbd/service.c1
-rw-r--r--source4/torture/basic/dir.c2
-rw-r--r--source4/torture/masktest.c3
-rw-r--r--source4/torture/torture.c1
24 files changed, 49 insertions, 30 deletions
diff --git a/source4/client/client.c b/source4/client/client.c
index e80d4ebef4..0b33101600 100644
--- a/source4/client/client.c
+++ b/source4/client/client.c
@@ -22,6 +22,7 @@
*/
#include "includes.h"
+#include "client.h"
#include "lib/cmdline/popt_common.h"
#include "librpc/gen_ndr/ndr_srvsvc.h"
#include "libcli/raw/libcliraw.h"
@@ -355,7 +356,7 @@ BOOL mask_match(struct smbcli_state *c, const char *string, char *pattern,
/*******************************************************************
decide if a file should be operated on
********************************************************************/
-static BOOL do_this_one(file_info *finfo)
+static BOOL do_this_one(struct file_info *finfo)
{
if (finfo->mode & FILE_ATTRIBUTE_DIRECTORY) return(True);
@@ -381,7 +382,7 @@ static BOOL do_this_one(file_info *finfo)
/****************************************************************************
display info about a file
****************************************************************************/
-static void display_finfo(file_info *finfo)
+static void display_finfo(struct file_info *finfo)
{
if (do_this_one(finfo)) {
time_t t = finfo->mtime; /* the time is assumed to be passed as GMT */
@@ -400,7 +401,7 @@ static void display_finfo(file_info *finfo)
/****************************************************************************
accumulate size of a file
****************************************************************************/
-static void do_du(file_info *finfo)
+static void do_du(struct file_info *finfo)
{
if (do_this_one(finfo)) {
dir_total += finfo->size;
@@ -413,7 +414,7 @@ static char *do_list_queue = 0;
static long do_list_queue_size = 0;
static long do_list_queue_start = 0;
static long do_list_queue_end = 0;
-static void (*do_list_fn)(file_info *);
+static void (*do_list_fn)(struct file_info *);
/****************************************************************************
functions for do_list_queue
@@ -532,7 +533,7 @@ static int do_list_queue_empty(void)
/****************************************************************************
a helper for do_list
****************************************************************************/
-static void do_list_helper(file_info *f, const char *mask, void *state)
+static void do_list_helper(struct file_info *f, const char *mask, void *state)
{
if (f->mode & FILE_ATTRIBUTE_DIRECTORY) {
if (do_list_dirs && do_this_one(f)) {
@@ -564,7 +565,7 @@ static void do_list_helper(file_info *f, const char *mask, void *state)
/****************************************************************************
a wrapper around smbcli_list that adds recursion
****************************************************************************/
-void do_list(const char *mask,uint16_t attribute,void (*fn)(file_info *),BOOL rec, BOOL dirs)
+void do_list(const char *mask,uint16_t attribute,void (*fn)(struct file_info *),BOOL rec, BOOL dirs)
{
static int in_do_list = 0;
@@ -879,7 +880,7 @@ static BOOL yesno(char *p)
/****************************************************************************
do a mget operation on one file
****************************************************************************/
-static void do_mget(file_info *finfo)
+static void do_mget(struct file_info *finfo)
{
pstring rname;
pstring quest;
@@ -2546,7 +2547,7 @@ typedef struct {
int len;
} completion_remote_t;
-static void completion_remote_filter(file_info *f, const char *mask, void *state)
+static void completion_remote_filter(struct file_info *f, const char *mask, void *state)
{
completion_remote_t *info = (completion_remote_t *)state;
diff --git a/source4/client/clitar.c b/source4/client/clitar.c
index ca2c55bcbf..40ff5a79ab 100644
--- a/source4/client/clitar.c
+++ b/source4/client/clitar.c
@@ -36,6 +36,7 @@
#include "includes.h"
+#include "client.h"
#include "clitar.h"
#include "system/time.h"
#include "system/iconv.h"
@@ -169,8 +170,8 @@ static int tarhandle;
static void writetarheader(int f, const char *aname, uint64_t size, time_t mtime,
const char *amode, uint8_t ftype);
-static void do_atar(char *rname,const char *lname,file_info *finfo1);
-static void do_tar(file_info *finfo);
+static void do_atar(char *rname,const char *lname,struct file_info *finfo1);
+static void do_tar(struct file_info *finfo);
static void oct_it(uint64_t value, int ndgs, char *p);
static void fixtarname(char *tptr, const char *fp, int l);
static int dotarbuf(int f, char *b, int n);
@@ -642,7 +643,7 @@ static void do_setrattr(char *name, uint16_t attr, int set)
/****************************************************************************
append one remote file to the tar file
***************************************************************************/
-static void do_atar(char *rname,const char *lname,file_info *finfo1)
+static void do_atar(char *rname,const char *lname,struct file_info *finfo1)
{
int fnum;
uint64_t nread=0;
@@ -825,7 +826,7 @@ static void do_atar(char *rname,const char *lname,file_info *finfo1)
/****************************************************************************
Append single file to tar file (or not)
***************************************************************************/
-static void do_tar(file_info *finfo)
+static void do_tar(struct file_info *finfo)
{
pstring rname;
diff --git a/source4/include/client.h b/source4/include/client.h
index b7f1da28b3..d3c1756045 100644
--- a/source4/include/client.h
+++ b/source4/include/client.h
@@ -38,7 +38,7 @@
* These definitions depend on smb.h
*/
-typedef struct file_info
+struct file_info
{
uint64_t size;
uint16_t mode;
@@ -50,7 +50,7 @@ typedef struct file_info
time_t ctime;
const char *name;
char short_name[13*3]; /* the *3 is to cope with multi-byte */
-} file_info;
+};
struct print_job_info
{
diff --git a/source4/include/rewrite.h b/source4/include/rewrite.h
index 619942cac9..fa2168bed7 100644
--- a/source4/include/rewrite.h
+++ b/source4/include/rewrite.h
@@ -52,7 +52,6 @@ typedef int BOOL;
#include "doserr.h"
#include "enums.h"
-#include "events.h"
/*
* Loopback command offsets.
@@ -76,8 +75,6 @@ typedef int BOOL;
#include "rpc_secdes.h"
-#include "client.h"
-
#define SAFE_NETBIOS_CHARS ". -_"
/* generic iconv conversion structure */
diff --git a/source4/include/structs.h b/source4/include/structs.h
index 24ae2a5ba0..5c7c470a38 100644
--- a/source4/include/structs.h
+++ b/source4/include/structs.h
@@ -106,3 +106,5 @@ union libnet_rpc_connect;
union libnet_RemoteTOD;
struct net_functable;
struct net_context;
+
+struct file_info;
diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c
index c9812d1d2f..3b4ccb6b73 100644
--- a/source4/ldap_server/ldap_server.c
+++ b/source4/ldap_server/ldap_server.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "events.h"
#include "auth/auth.h"
#include "dlinklist.h"
#include "asn_1.h"
diff --git a/source4/lib/events.c b/source4/lib/events.c
index 4fb1e42ba3..f53a244c6d 100644
--- a/source4/lib/events.c
+++ b/source4/lib/events.c
@@ -68,6 +68,7 @@
#include "system/time.h"
#include "system/select.h"
#include "dlinklist.h"
+#include "events.h"
/*
create a event_context structure. This must be the first events
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c
index 48d608ee94..f862b2d505 100644
--- a/source4/lib/messaging/messaging.c
+++ b/source4/lib/messaging/messaging.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "events.h"
#include "system/time.h"
#include "messages.h"
#include "dlinklist.h"
diff --git a/source4/libcli/clideltree.c b/source4/libcli/clideltree.c
index aa73f5b90b..7dd3803735 100644
--- a/source4/libcli/clideltree.c
+++ b/source4/libcli/clideltree.c
@@ -19,6 +19,7 @@
*/
#include "includes.h"
+#include "client.h"
struct delete_state {
struct smbcli_tree *tree;
@@ -29,7 +30,7 @@ struct delete_state {
/*
callback function for torture_deltree()
*/
-static void delete_fn(file_info *finfo, const char *name, void *state)
+static void delete_fn(struct file_info *finfo, const char *name, void *state)
{
struct delete_state *dstate = state;
char *s, *n;
diff --git a/source4/libcli/clilist.c b/source4/libcli/clilist.c
index dde2a7befa..e8b97f324d 100644
--- a/source4/libcli/clilist.c
+++ b/source4/libcli/clilist.c
@@ -20,10 +20,11 @@
*/
#include "includes.h"
+#include "client.h"
#include "libcli/raw/libcliraw.h"
struct search_private {
- file_info *dirlist;
+ struct file_info *dirlist;
TALLOC_CTX *mem_ctx;
int dirlist_len;
int ff_searchcount; /* total received in 1 server trip */
@@ -39,9 +40,9 @@ struct search_private {
****************************************************************************/
static BOOL interpret_long_filename(enum smb_search_level level,
union smb_search_data *info,
- file_info *finfo)
+ struct file_info *finfo)
{
- file_info finfo2;
+ struct file_info finfo2;
if (!finfo) finfo = &finfo2;
ZERO_STRUCTP(finfo);
@@ -81,7 +82,7 @@ static BOOL interpret_long_filename(enum smb_search_level level,
static BOOL smbcli_list_new_callback(void *private, union smb_search_data *file)
{
struct search_private *state = (struct search_private*) private;
- file_info *tdl;
+ struct file_info *tdl;
/* add file info to the dirlist pool */
tdl = talloc_realloc(state,
@@ -105,7 +106,7 @@ static BOOL smbcli_list_new_callback(void *private, union smb_search_data *file)
int smbcli_list_new(struct smbcli_tree *tree, const char *Mask, uint16_t attribute,
enum smb_search_level level,
- void (*fn)(file_info *, const char *, void *),
+ void (*fn)(struct file_info *, const char *, void *),
void *caller_state)
{
union smb_search_first first_parms;
@@ -208,9 +209,9 @@ int smbcli_list_new(struct smbcli_tree *tree, const char *Mask, uint16_t attribu
****************************************************************************/
static BOOL interpret_short_filename(int level,
union smb_search_data *info,
- file_info *finfo)
+ struct file_info *finfo)
{
- file_info finfo2;
+ struct file_info finfo2;
if (!finfo) finfo = &finfo2;
ZERO_STRUCTP(finfo);
@@ -228,7 +229,7 @@ static BOOL interpret_short_filename(int level,
static BOOL smbcli_list_old_callback(void *private, union smb_search_data *file)
{
struct search_private *state = (struct search_private*) private;
- file_info *tdl;
+ struct file_info *tdl;
/* add file info to the dirlist pool */
tdl = talloc_realloc(state,
@@ -251,7 +252,7 @@ static BOOL smbcli_list_old_callback(void *private, union smb_search_data *file)
}
int smbcli_list_old(struct smbcli_tree *tree, const char *Mask, uint16_t attribute,
- void (*fn)(file_info *, const char *, void *),
+ void (*fn)(struct file_info *, const char *, void *),
void *caller_state)
{
union smb_search_first first_parms;
@@ -337,7 +338,7 @@ int smbcli_list_old(struct smbcli_tree *tree, const char *Mask, uint16_t attribu
****************************************************************************/
int smbcli_list(struct smbcli_tree *tree, const char *Mask,uint16_t attribute,
- void (*fn)(file_info *, const char *, void *), void *state)
+ void (*fn)(struct file_info *, const char *, void *), void *state)
{
if (tree->session->transport->negotiate.protocol <= PROTOCOL_LANMAN1)
return smbcli_list_old(tree, Mask, attribute, fn, state);
diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c
index c5e3d39545..00e52f3a14 100644
--- a/source4/libcli/raw/clitransport.c
+++ b/source4/libcli/raw/clitransport.c
@@ -23,6 +23,7 @@
#include "libcli/raw/libcliraw.h"
#include "system/time.h"
#include "dlinklist.h"
+#include "events.h"
static void smbcli_transport_process_recv(struct smbcli_transport *transport);
diff --git a/source4/librpc/rpc/dcerpc_sock.c b/source4/librpc/rpc/dcerpc_sock.c
index c0050da383..41fde60ea0 100644
--- a/source4/librpc/rpc/dcerpc_sock.c
+++ b/source4/librpc/rpc/dcerpc_sock.c
@@ -23,6 +23,7 @@
#include "includes.h"
#include "dlinklist.h"
+#include "events.h"
#include "librpc/gen_ndr/ndr_epmapper.h"
#define MIN_HDR_SIZE 16
diff --git a/source4/ntvfs/cifs/vfs_cifs.c b/source4/ntvfs/cifs/vfs_cifs.c
index 9e3c841dd3..4fd5650f9b 100644
--- a/source4/ntvfs/cifs/vfs_cifs.c
+++ b/source4/ntvfs/cifs/vfs_cifs.c
@@ -26,6 +26,7 @@
*/
#include "includes.h"
+#include "events.h"
#include "libcli/raw/libcliraw.h"
#include "smb_server/smb_server.h"
diff --git a/source4/ntvfs/posix/pvfs_wait.c b/source4/ntvfs/posix/pvfs_wait.c
index 2a8cbbbe0d..f01bd0ea18 100644
--- a/source4/ntvfs/posix/pvfs_wait.c
+++ b/source4/ntvfs/posix/pvfs_wait.c
@@ -21,6 +21,7 @@
*/
#include "include/includes.h"
+#include "events.h"
#include "vfs_posix.h"
/* the context for a single wait instance */
diff --git a/source4/rpc_server/dcerpc_sock.c b/source4/rpc_server/dcerpc_sock.c
index 5c4bbea045..544082471e 100644
--- a/source4/rpc_server/dcerpc_sock.c
+++ b/source4/rpc_server/dcerpc_sock.c
@@ -23,6 +23,7 @@
*/
#include "includes.h"
+#include "events.h"
#include "rpc_server/dcerpc_server.h"
struct dcesrv_socket_context {
diff --git a/source4/smb_server/request.c b/source4/smb_server/request.c
index b1cb8fe2df..141d2652a6 100644
--- a/source4/smb_server/request.c
+++ b/source4/smb_server/request.c
@@ -23,6 +23,7 @@
*/
#include "includes.h"
+#include "events.h"
#include "dlinklist.h"
#include "smb_server/smb_server.h"
diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c
index aa3a2a794c..39dc73096c 100644
--- a/source4/smb_server/smb_server.c
+++ b/source4/smb_server/smb_server.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "events.h"
#include "system/time.h"
#include "dlinklist.h"
#include "smb_server/smb_server.h"
diff --git a/source4/smbd/process_model.c b/source4/smbd/process_model.c
index 101a24b694..3493425774 100644
--- a/source4/smbd/process_model.c
+++ b/source4/smbd/process_model.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "events.h"
#include "smb_server/smb_server.h"
#include "smbd/process_model.h"
diff --git a/source4/smbd/process_single.c b/source4/smbd/process_single.c
index 42978db739..6ce0479b0c 100644
--- a/source4/smbd/process_single.c
+++ b/source4/smbd/process_single.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "events.h"
#include "dlinklist.h"
#include "smb_server/smb_server.h"
#include "process_model.h"
diff --git a/source4/smbd/process_standard.c b/source4/smbd/process_standard.c
index 781a9eb55a..3741ce1b46 100644
--- a/source4/smbd/process_standard.c
+++ b/source4/smbd/process_standard.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "events.h"
#include "dlinklist.h"
#include "smb_server/smb_server.h"
#include "process_model.h"
diff --git a/source4/smbd/service.c b/source4/smbd/service.c
index f2d129d240..6d2f9a8149 100644
--- a/source4/smbd/service.c
+++ b/source4/smbd/service.c
@@ -22,6 +22,7 @@
*/
#include "includes.h"
+#include "events.h"
#include "system/dir.h"
#include "dlinklist.h"
#include "process_model.h"
diff --git a/source4/torture/basic/dir.c b/source4/torture/basic/dir.c
index d34e064580..5d3ac8d1de 100644
--- a/source4/torture/basic/dir.c
+++ b/source4/torture/basic/dir.c
@@ -22,7 +22,7 @@
#include "includes.h"
-static void list_fn(file_info *finfo, const char *name, void *state)
+static void list_fn(struct file_info *finfo, const char *name, void *state)
{
}
diff --git a/source4/torture/masktest.c b/source4/torture/masktest.c
index 1f4bce0288..964d000d49 100644
--- a/source4/torture/masktest.c
+++ b/source4/torture/masktest.c
@@ -19,6 +19,7 @@
*/
#include "includes.h"
+#include "client.h"
#include "libcli/raw/libcliraw.h"
#include "system/time.h"
@@ -96,7 +97,7 @@ static struct {
} last_hit;
static BOOL f_info_hit;
-static void listfn(file_info *f, const char *s, void *state)
+static void listfn(struct file_info *f, const char *s, void *state)
{
if (strcmp(f->name,".") == 0) {
resultp[0] = '+';
diff --git a/source4/torture/torture.c b/source4/torture/torture.c
index fa6d513a53..6d68f03967 100644
--- a/source4/torture/torture.c
+++ b/source4/torture/torture.c
@@ -19,6 +19,7 @@
*/
#include "includes.h"
+#include "client.h"
#include "lib/cmdline/popt_common.h"
#include "libcli/raw/libcliraw.h"
#include "system/time.h"