summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-03-28 13:22:03 +1100
committerAndrew Bartlett <abartlet@samba.org>2012-04-05 02:39:09 +0200
commitf6e053202481631b12d75f6a552ee1aa8b355064 (patch)
treef029e300d5005e87774a3d1c6390423d0c09f9fd
parent2320b2144fcb1236c082278444e3c6df998e17ec (diff)
downloadsamba-f6e053202481631b12d75f6a552ee1aa8b355064.tar.gz
samba-f6e053202481631b12d75f6a552ee1aa8b355064.tar.bz2
samba-f6e053202481631b12d75f6a552ee1aa8b355064.zip
build: Remove SMB_STRUCT_DIR define
-rw-r--r--examples/VFS/skel_opaque.c16
-rw-r--r--examples/VFS/skel_transparent.c16
-rw-r--r--libgpo/gpext/gpext.c2
-rw-r--r--source3/client/client.c2
-rw-r--r--source3/include/includes.h8
-rw-r--r--source3/include/proto.h4
-rw-r--r--source3/include/vfs.h32
-rw-r--r--source3/lib/system.c2
-rw-r--r--source3/lib/util.c2
-rw-r--r--source3/modules/onefs.h16
-rw-r--r--source3/modules/onefs_dir.c36
-rw-r--r--source3/modules/onefs_streams.c2
-rw-r--r--source3/modules/vfs_audit.c4
-rw-r--r--source3/modules/vfs_cap.c4
-rw-r--r--source3/modules/vfs_catia.c4
-rw-r--r--source3/modules/vfs_default.c20
-rw-r--r--source3/modules/vfs_dirsort.c14
-rw-r--r--source3/modules/vfs_extd_audit.c4
-rw-r--r--source3/modules/vfs_full_audit.c20
-rw-r--r--source3/modules/vfs_netatalk.c10
-rw-r--r--source3/modules/vfs_onefs_shadow_copy.c4
-rw-r--r--source3/modules/vfs_scannedonly.c24
-rw-r--r--source3/modules/vfs_shadow_copy.c24
-rw-r--r--source3/modules/vfs_shadow_copy2.c6
-rw-r--r--source3/modules/vfs_streams_depot.c2
-rw-r--r--source3/modules/vfs_time_audit.c20
-rw-r--r--source3/param/loadparm.c4
-rw-r--r--source3/rpc_server/samr/srv_samr_chgpasswd.c2
-rw-r--r--source3/smbd/dir.c2
-rw-r--r--source3/smbd/msdfs.c4
-rw-r--r--source3/smbd/vfs.c18
-rw-r--r--source3/utils/net_usershare.c6
32 files changed, 163 insertions, 171 deletions
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 8a2c8e86c5..426e7b70e2 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -89,34 +89,34 @@ static NTSTATUS skel_get_dfs_referrals(struct vfs_handle_struct *handle,
return NT_STATUS_NOT_IMPLEMENTED;
}
-static SMB_STRUCT_DIR *skel_opendir(vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
+static DIR *skel_opendir(vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
{
return NULL;
}
-static SMB_STRUCT_DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *fsp, const char *mask, uint32 attr)
+static DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *fsp, const char *mask, uint32 attr)
{
return NULL;
}
static struct dirent *skel_readdir(vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp,
+ DIR *dirp,
SMB_STRUCT_STAT *sbuf)
{
return NULL;
}
-static void skel_seekdir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp, long offset)
+static void skel_seekdir(vfs_handle_struct *handle, DIR *dirp, long offset)
{
;
}
-static long skel_telldir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
+static long skel_telldir(vfs_handle_struct *handle, DIR *dirp)
{
return (long)-1;
}
-static void skel_rewind_dir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
+static void skel_rewind_dir(vfs_handle_struct *handle, DIR *dirp)
{
;
}
@@ -133,13 +133,13 @@ static int skel_rmdir(vfs_handle_struct *handle, const char *path)
return -1;
}
-static int skel_closedir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dir)
+static int skel_closedir(vfs_handle_struct *handle, DIR *dir)
{
errno = ENOSYS;
return -1;
}
-static void skel_init_search_op(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
+static void skel_init_search_op(struct vfs_handle_struct *handle, DIR *dirp)
{
;
}
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index 2c28223214..f94719403d 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -86,34 +86,34 @@ static NTSTATUS skel_get_dfs_referrals(struct vfs_handle_struct *handle,
return SMB_VFS_NEXT_GET_DFS_REFERRALS(handle, r);
}
-static SMB_STRUCT_DIR *skel_opendir(vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
+static DIR *skel_opendir(vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
{
return SMB_VFS_NEXT_OPENDIR(handle, fname, mask, attr);
}
-static SMB_STRUCT_DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *fsp, const char *mask, uint32 attr)
+static DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *fsp, const char *mask, uint32 attr)
{
return SMB_VFS_NEXT_FDOPENDIR(handle, fsp, mask, attr);
}
static struct dirent *skel_readdir(vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp,
+ DIR *dirp,
SMB_STRUCT_STAT *sbuf)
{
return SMB_VFS_NEXT_READDIR(handle, dirp, sbuf);
}
-static void skel_seekdir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp, long offset)
+static void skel_seekdir(vfs_handle_struct *handle, DIR *dirp, long offset)
{
SMB_VFS_NEXT_SEEKDIR(handle, dirp, offset);
}
-static long skel_telldir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
+static long skel_telldir(vfs_handle_struct *handle, DIR *dirp)
{
return SMB_VFS_NEXT_TELLDIR(handle, dirp);
}
-static void skel_rewind_dir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
+static void skel_rewind_dir(vfs_handle_struct *handle, DIR *dirp)
{
SMB_VFS_NEXT_REWINDDIR(handle, dirp);
}
@@ -128,12 +128,12 @@ static int skel_rmdir(vfs_handle_struct *handle, const char *path)
return SMB_VFS_NEXT_RMDIR(handle, path);
}
-static int skel_closedir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dir)
+static int skel_closedir(vfs_handle_struct *handle, DIR *dir)
{
return SMB_VFS_NEXT_CLOSEDIR(handle, dir);
}
-static void skel_init_search_op(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
+static void skel_init_search_op(struct vfs_handle_struct *handle, DIR *dirp)
{
SMB_VFS_NEXT_INIT_SEARCH_OP(handle, dirp);
}
diff --git a/libgpo/gpext/gpext.c b/libgpo/gpext/gpext.c
index ae16d06a94..8bda729d69 100644
--- a/libgpo/gpext/gpext.c
+++ b/libgpo/gpext/gpext.c
@@ -487,7 +487,7 @@ static NTSTATUS gp_glob_ext_list(TALLOC_CTX *mem_ctx,
const char ***ext_list,
size_t *ext_list_len)
{
- SMB_STRUCT_DIR *dir = NULL;
+ DIR *dir = NULL;
struct dirent *dirent = NULL;
dir = opendir(modules_path(talloc_tos(),
diff --git a/source3/client/client.c b/source3/client/client.c
index 40ba23ef40..3bfe8e94a7 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -2074,7 +2074,7 @@ static int cmd_select(void)
static int file_find(struct file_list **list, const char *directory,
const char *expression, bool match)
{
- SMB_STRUCT_DIR *dir;
+ DIR *dir;
struct file_list *entry;
struct stat statbuf;
int ret;
diff --git a/source3/include/includes.h b/source3/include/includes.h
index ffdc1d28f3..e8f3c0bb34 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -368,14 +368,6 @@ struct stat_ex {
typedef struct stat_ex SMB_STRUCT_STAT;
/*
- * Type for DIR structure.
- */
-
-#ifndef SMB_STRUCT_DIR
-# define SMB_STRUCT_DIR DIR
-#endif
-
-/*
* Defines for 64 bit fcntl locks.
*/
diff --git a/source3/include/proto.h b/source3/include/proto.h
index f6db59e14e..303ea9ccb4 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -337,7 +337,7 @@ int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf,
int sys_posix_fallocate(int fd, SMB_OFF_T offset, SMB_OFF_T len);
int sys_fallocate(int fd, enum vfs_fallocate_mode mode, SMB_OFF_T offset, SMB_OFF_T len);
void kernel_flock(int fd, uint32 share_mode, uint32 access_mask);
-SMB_STRUCT_DIR *sys_fdopendir(int fd);
+DIR *sys_fdopendir(int fd);
int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev);
int sys_waitpid(pid_t pid,int *status,int options);
char *sys_getwd(void);
@@ -487,7 +487,7 @@ uid_t nametouid(const char *name);
gid_t nametogid(const char *name);
void smb_panic_s3(const char *why);
void log_stack_trace(void);
-const char *readdirname(SMB_STRUCT_DIR *p);
+const char *readdirname(DIR *p);
bool is_in_path(const char *name, name_compare_entry *namelist, bool case_sensitive);
void set_namearray(name_compare_entry **ppname_array, const char *namelist);
void free_namearray(name_compare_entry *name_array);
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 023f5b177e..585214f77b 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -204,18 +204,18 @@ struct vfs_fn_pointers {
/* Directory operations */
- SMB_STRUCT_DIR *(*opendir_fn)(struct vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attributes);
- SMB_STRUCT_DIR *(*fdopendir_fn)(struct vfs_handle_struct *handle, files_struct *fsp, const char *mask, uint32 attributes);
+ DIR *(*opendir_fn)(struct vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attributes);
+ DIR *(*fdopendir_fn)(struct vfs_handle_struct *handle, files_struct *fsp, const char *mask, uint32 attributes);
struct dirent *(*readdir_fn)(struct vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp,
+ DIR *dirp,
SMB_STRUCT_STAT *sbuf);
- void (*seekdir_fn)(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp, long offset);
- long (*telldir_fn)(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp);
- void (*rewind_dir_fn)(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp);
+ void (*seekdir_fn)(struct vfs_handle_struct *handle, DIR *dirp, long offset);
+ long (*telldir_fn)(struct vfs_handle_struct *handle, DIR *dirp);
+ void (*rewind_dir_fn)(struct vfs_handle_struct *handle, DIR *dirp);
int (*mkdir_fn)(struct vfs_handle_struct *handle, const char *path, mode_t mode);
int (*rmdir_fn)(struct vfs_handle_struct *handle, const char *path);
- int (*closedir_fn)(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dir);
- void (*init_search_op_fn)(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp);
+ int (*closedir_fn)(struct vfs_handle_struct *handle, DIR *dir);
+ void (*init_search_op_fn)(struct vfs_handle_struct *handle, DIR *dirp);
/* File operations */
@@ -553,29 +553,29 @@ uint32_t smb_vfs_call_fs_capabilities(struct vfs_handle_struct *handle,
*/
NTSTATUS smb_vfs_call_get_dfs_referrals(struct vfs_handle_struct *handle,
struct dfs_GetDFSReferral *r);
-SMB_STRUCT_DIR *smb_vfs_call_opendir(struct vfs_handle_struct *handle,
+DIR *smb_vfs_call_opendir(struct vfs_handle_struct *handle,
const char *fname, const char *mask,
uint32 attributes);
-SMB_STRUCT_DIR *smb_vfs_call_fdopendir(struct vfs_handle_struct *handle,
+DIR *smb_vfs_call_fdopendir(struct vfs_handle_struct *handle,
struct files_struct *fsp,
const char *mask,
uint32 attributes);
struct dirent *smb_vfs_call_readdir(struct vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp,
+ DIR *dirp,
SMB_STRUCT_STAT *sbuf);
void smb_vfs_call_seekdir(struct vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp, long offset);
+ DIR *dirp, long offset);
long smb_vfs_call_telldir(struct vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp);
+ DIR *dirp);
void smb_vfs_call_rewind_dir(struct vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp);
+ DIR *dirp);
int smb_vfs_call_mkdir(struct vfs_handle_struct *handle, const char *path,
mode_t mode);
int smb_vfs_call_rmdir(struct vfs_handle_struct *handle, const char *path);
int smb_vfs_call_closedir(struct vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dir);
+ DIR *dir);
void smb_vfs_call_init_search_op(struct vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp);
+ DIR *dirp);
int smb_vfs_call_open(struct vfs_handle_struct *handle,
struct smb_filename *smb_fname, struct files_struct *fsp,
int flags, mode_t mode);
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 1988088ba5..5ba3aebd69 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -623,7 +623,7 @@ void kernel_flock(int fd, uint32 share_mode, uint32 access_mask)
calling code.. JRA.
********************************************************************/
-SMB_STRUCT_DIR *sys_fdopendir(int fd)
+DIR *sys_fdopendir(int fd)
{
#if defined(HAVE_FDOPENDIR) && defined(HAVE_DIRFD)
return fdopendir(fd);
diff --git a/source3/lib/util.c b/source3/lib/util.c
index b727f7b3d8..edad75d646 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1029,7 +1029,7 @@ libunwind_failed:
A readdir wrapper which just returns the file name.
********************************************************************/
-const char *readdirname(SMB_STRUCT_DIR *p)
+const char *readdirname(DIR *p)
{
struct dirent *ptr;
char *dname;
diff --git a/source3/modules/onefs.h b/source3/modules/onefs.h
index 926138bdab..1f72a9f207 100644
--- a/source3/modules/onefs.h
+++ b/source3/modules/onefs.h
@@ -24,24 +24,24 @@
/*
* vfs interface handlers
*/
-SMB_STRUCT_DIR *onefs_opendir(struct vfs_handle_struct *handle,
+DIR *onefs_opendir(struct vfs_handle_struct *handle,
const char *fname, const char *mask,
uint32 attributes);
struct dirent *onefs_readdir(struct vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp, SMB_STRUCT_STAT *sbuf);
+ DIR *dirp, SMB_STRUCT_STAT *sbuf);
-void onefs_seekdir(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp,
+void onefs_seekdir(struct vfs_handle_struct *handle, DIR *dirp,
long offset);
-long onefs_telldir(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp);
+long onefs_telldir(struct vfs_handle_struct *handle, DIR *dirp);
-void onefs_rewinddir(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp);
+void onefs_rewinddir(struct vfs_handle_struct *handle, DIR *dirp);
-int onefs_closedir(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *dir);
+int onefs_closedir(struct vfs_handle_struct *handle, DIR *dir);
void onefs_init_search_op(struct vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp);
+ DIR *dirp);
NTSTATUS onefs_create_file(vfs_handle_struct *handle,
struct smb_request *req,
@@ -142,7 +142,7 @@ NTSTATUS onefs_stream_prep_smb_fname(TALLOC_CTX *ctx,
const struct smb_filename *smb_fname_in,
struct smb_filename **smb_fname_out);
-int onefs_rdp_add_dir_state(connection_struct *conn, SMB_STRUCT_DIR *dirp);
+int onefs_rdp_add_dir_state(connection_struct *conn, DIR *dirp);
/*
* System Interfaces
diff --git a/source3/modules/onefs_dir.c b/source3/modules/onefs_dir.c
index 00ea145b2c..1a0f4819fe 100644
--- a/source3/modules/onefs_dir.c
+++ b/source3/modules/onefs_dir.c
@@ -49,7 +49,7 @@ static uint64_t *rdp_cookies = NULL;
struct rdp_dir_state {
struct rdp_dir_state *next, *prev;
- SMB_STRUCT_DIR *dirp;
+ DIR *dirp;
char *direntries_cursor; /* cursor to last returned direntry in cache */
size_t stat_count; /* number of entries stored in the cache */
size_t stat_cursor; /* cursor to last returned stat in the cache */
@@ -59,7 +59,7 @@ struct rdp_dir_state {
static struct rdp_dir_state *dirstatelist = NULL;
-SMB_STRUCT_DIR *rdp_last_dirp = NULL;
+DIR *rdp_last_dirp = NULL;
/**
* Given a DIR pointer, return our internal state.
@@ -73,7 +73,7 @@ SMB_STRUCT_DIR *rdp_last_dirp = NULL;
* @return 0 on success, 1 on failure
*/
static int
-rdp_retrieve_dir_state(SMB_STRUCT_DIR *dirp, struct rdp_dir_state **dir_state,
+rdp_retrieve_dir_state(DIR *dirp, struct rdp_dir_state **dir_state,
bool *same_as_last)
{
struct rdp_dir_state *dsp;
@@ -198,7 +198,7 @@ rdp_fill_cache(struct rdp_dir_state *dsp)
* call to VFS_CLOSEDIR().
*/
int
-onefs_rdp_add_dir_state(connection_struct *conn, SMB_STRUCT_DIR *dirp)
+onefs_rdp_add_dir_state(connection_struct *conn, DIR *dirp)
{
int ret = 0;
struct rdp_dir_state *dsp = NULL;
@@ -225,7 +225,7 @@ onefs_rdp_add_dir_state(connection_struct *conn, SMB_STRUCT_DIR *dirp)
return ret;
}
- /* Set the SMB_STRUCT_DIR in the dsp */
+ /* Set the DIR in the dsp */
dsp->dirp = dirp;
DLIST_ADD(dirstatelist, dsp);
@@ -246,12 +246,12 @@ onefs_rdp_add_dir_state(connection_struct *conn, SMB_STRUCT_DIR *dirp)
*
* @return DIR pointer, NULL if directory does not exist, NULL on error
*/
-SMB_STRUCT_DIR *
+DIR *
onefs_opendir(vfs_handle_struct *handle, const char *fname, const char *mask,
uint32 attr)
{
int ret = 0;
- SMB_STRUCT_DIR *ret_dirp;
+ DIR *ret_dirp;
/* Fallback to default system routines if readdirplus is disabled */
if (!lp_parm_bool(SNUM(handle->conn), PARM_ONEFS_TYPE,
@@ -297,7 +297,7 @@ onefs_opendir(vfs_handle_struct *handle, const char *fname, const char *mask,
* @return dirent structure, NULL if at the end of the directory, NULL on error
*/
struct dirent *
-onefs_readdir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp,
+onefs_readdir(vfs_handle_struct *handle, DIR *dirp,
SMB_STRUCT_STAT *sbuf)
{
struct rdp_dir_state *dsp = NULL;
@@ -320,7 +320,7 @@ onefs_readdir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp,
ret = rdp_retrieve_dir_state(dirp, &dsp, &same_as_last);
if (ret) {
DEBUG(1, ("Could not retrieve dir_state struct for "
- "SMB_STRUCT_DIR pointer.\n"));
+ "DIR pointer.\n"));
ret_direntp = NULL;
goto end;
}
@@ -405,7 +405,7 @@ end:
* @return no return value
*/
void
-onefs_seekdir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp, long offset)
+onefs_seekdir(vfs_handle_struct *handle, DIR *dirp, long offset)
{
struct rdp_dir_state *dsp = NULL;
bool same_as_last;
@@ -429,7 +429,7 @@ onefs_seekdir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp, long offset)
ret = rdp_retrieve_dir_state(dirp, &dsp, &same_as_last);
if (ret) {
DEBUG(1, ("Could not retrieve dir_state struct for "
- "SMB_STRUCT_DIR pointer.\n"));
+ "DIR pointer.\n"));
/* XXX: we can't return an error, should we ABORT rather than
* return without actually seeking? */
return;
@@ -469,7 +469,7 @@ onefs_seekdir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp, long offset)
* @return offset into the directory to resume reading from
*/
long
-onefs_telldir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
+onefs_telldir(vfs_handle_struct *handle, DIR *dirp)
{
struct rdp_dir_state *dsp = NULL;
bool same_as_last;
@@ -487,7 +487,7 @@ onefs_telldir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
ret = rdp_retrieve_dir_state(dirp, &dsp, &same_as_last);
if (ret) {
DEBUG(1, ("Could not retrieve dir_state struct for "
- "SMB_STRUCT_DIR pointer.\n"));
+ "DIR pointer.\n"));
return -1;
}
@@ -516,7 +516,7 @@ onefs_telldir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
* @return no return value
*/
void
-onefs_rewinddir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
+onefs_rewinddir(vfs_handle_struct *handle, DIR *dirp)
{
struct rdp_dir_state *dsp = NULL;
bool same_as_last;
@@ -533,7 +533,7 @@ onefs_rewinddir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
ret = rdp_retrieve_dir_state(dirp, &dsp, &same_as_last);
if (ret) {
DEBUG(1, ("Could not retrieve dir_state struct for "
- "SMB_STRUCT_DIR pointer.\n"));
+ "DIR pointer.\n"));
return;
}
@@ -560,7 +560,7 @@ onefs_rewinddir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
* @return -1 on failure, setting errno
*/
int
-onefs_closedir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
+onefs_closedir(vfs_handle_struct *handle, DIR *dirp)
{
struct rdp_dir_state *dsp = NULL;
bool same_as_last;
@@ -578,7 +578,7 @@ onefs_closedir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
ret = rdp_retrieve_dir_state(dirp, &dsp, &same_as_last);
if (ret) {
DEBUG(1, ("Could not retrieve dir_state struct for "
- "SMB_STRUCT_DIR pointer.\n"));
+ "DIR pointer.\n"));
errno = ENOENT;
return -1;
}
@@ -612,7 +612,7 @@ onefs_closedir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
* @return nothing
*/
void
-onefs_init_search_op(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
+onefs_init_search_op(vfs_handle_struct *handle, DIR *dirp)
{
/* Setting the rdp_last_dirp to NULL will cause the next readdir
* operation to refill the cache. */
diff --git a/source3/modules/onefs_streams.c b/source3/modules/onefs_streams.c
index 221825cdab..c79619922c 100644
--- a/source3/modules/onefs_streams.c
+++ b/source3/modules/onefs_streams.c
@@ -583,7 +583,7 @@ static NTSTATUS walk_onefs_streams(connection_struct *conn, files_struct *fsp,
int dir_fd = -1;
int stream_fd = -1;
int ret;
- SMB_STRUCT_DIR *dirp = NULL;
+ DIR *dirp = NULL;
struct dirent *dp = NULL;
files_struct fake_fs;
struct fd_handle fake_fh;
diff --git a/source3/modules/vfs_audit.c b/source3/modules/vfs_audit.c
index 1da8755410..3377b5f849 100644
--- a/source3/modules/vfs_audit.c
+++ b/source3/modules/vfs_audit.c
@@ -106,9 +106,9 @@ static void audit_disconnect(vfs_handle_struct *handle)
return;
}
-static SMB_STRUCT_DIR *audit_opendir(vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
+static DIR *audit_opendir(vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
{
- SMB_STRUCT_DIR *result;
+ DIR *result;
result = SMB_VFS_NEXT_OPENDIR(handle, fname, mask, attr);
diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c
index e7539902bc..d5682720cd 100644
--- a/source3/modules/vfs_cap.c
+++ b/source3/modules/vfs_cap.c
@@ -43,7 +43,7 @@ static uint64_t cap_disk_free(vfs_handle_struct *handle, const char *path,
dfree, dsize);
}
-static SMB_STRUCT_DIR *cap_opendir(vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
+static DIR *cap_opendir(vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
{
char *capname = capencode(talloc_tos(), fname);
@@ -55,7 +55,7 @@ static SMB_STRUCT_DIR *cap_opendir(vfs_handle_struct *handle, const char *fname,
}
static struct dirent *cap_readdir(vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp,
+ DIR *dirp,
SMB_STRUCT_STAT *sbuf)
{
struct dirent *result;
diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c
index d18977d6fe..5834ead2a8 100644
--- a/source3/modules/vfs_catia.c
+++ b/source3/modules/vfs_catia.c
@@ -261,14 +261,14 @@ static NTSTATUS catia_string_replace_allocate(connection_struct *conn,
return NT_STATUS_OK;
}
-static SMB_STRUCT_DIR *catia_opendir(vfs_handle_struct *handle,
+static DIR *catia_opendir(vfs_handle_struct *handle,
const char *fname,
const char *mask,
uint32 attr)
{
char *name_mapped = NULL;
NTSTATUS status;
- SMB_STRUCT_DIR *ret;
+ DIR *ret;
status = catia_string_replace_allocate(handle->conn, fname,
&name_mapped, vfs_translate_to_unix);
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 1f3dd6a89b..49c948f8af 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -343,9 +343,9 @@ static NTSTATUS vfswrap_get_dfs_referrals(struct vfs_handle_struct *handle,
/* Directory operations */
-static SMB_STRUCT_DIR *vfswrap_opendir(vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
+static DIR *vfswrap_opendir(vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
{
- SMB_STRUCT_DIR *result;
+ DIR *result;
START_PROFILE(syscall_opendir);
result = opendir(fname);
@@ -353,12 +353,12 @@ static SMB_STRUCT_DIR *vfswrap_opendir(vfs_handle_struct *handle, const char *f
return result;
}
-static SMB_STRUCT_DIR *vfswrap_fdopendir(vfs_handle_struct *handle,
+static DIR *vfswrap_fdopendir(vfs_handle_struct *handle,
files_struct *fsp,
const char *mask,
uint32 attr)
{
- SMB_STRUCT_DIR *result;
+ DIR *result;
START_PROFILE(syscall_fdopendir);
result = sys_fdopendir(fsp->fh->fd);
@@ -368,7 +368,7 @@ static SMB_STRUCT_DIR *vfswrap_fdopendir(vfs_handle_struct *handle,
static struct dirent *vfswrap_readdir(vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp,
+ DIR *dirp,
SMB_STRUCT_STAT *sbuf)
{
struct dirent *result;
@@ -383,14 +383,14 @@ static struct dirent *vfswrap_readdir(vfs_handle_struct *handle,
return result;
}
-static void vfswrap_seekdir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp, long offset)
+static void vfswrap_seekdir(vfs_handle_struct *handle, DIR *dirp, long offset)
{
START_PROFILE(syscall_seekdir);
seekdir(dirp, offset);
END_PROFILE(syscall_seekdir);
}
-static long vfswrap_telldir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
+static long vfswrap_telldir(vfs_handle_struct *handle, DIR *dirp)
{
long result;
START_PROFILE(syscall_telldir);
@@ -399,7 +399,7 @@ static long vfswrap_telldir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
return result;
}
-static void vfswrap_rewinddir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
+static void vfswrap_rewinddir(vfs_handle_struct *handle, DIR *dirp)
{
START_PROFILE(syscall_rewinddir);
rewinddir(dirp);
@@ -450,7 +450,7 @@ static int vfswrap_rmdir(vfs_handle_struct *handle, const char *path)
return result;
}
-static int vfswrap_closedir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
+static int vfswrap_closedir(vfs_handle_struct *handle, DIR *dirp)
{
int result;
@@ -461,7 +461,7 @@ static int vfswrap_closedir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
}
static void vfswrap_init_search_op(vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp)
+ DIR *dirp)
{
/* Default behavior is a NOOP */
}
diff --git a/source3/modules/vfs_dirsort.c b/source3/modules/vfs_dirsort.c
index 7067a5892b..f04f52d718 100644
--- a/source3/modules/vfs_dirsort.c
+++ b/source3/modules/vfs_dirsort.c
@@ -32,7 +32,7 @@ struct dirsort_privates {
struct dirent *directory_list;
long number_of_entries;
time_t mtime;
- SMB_STRUCT_DIR *source_directory;
+ DIR *source_directory;
int fd;
};
@@ -90,7 +90,7 @@ static bool open_and_sort_dir (vfs_handle_struct *handle)
return true;
}
-static SMB_STRUCT_DIR *dirsort_opendir(vfs_handle_struct *handle,
+static DIR *dirsort_opendir(vfs_handle_struct *handle,
const char *fname, const char *mask,
uint32 attr)
{
@@ -124,7 +124,7 @@ static SMB_STRUCT_DIR *dirsort_opendir(vfs_handle_struct *handle,
return data->source_directory;
}
-static SMB_STRUCT_DIR *dirsort_fdopendir(vfs_handle_struct *handle,
+static DIR *dirsort_fdopendir(vfs_handle_struct *handle,
files_struct *fsp,
const char *mask,
uint32 attr)
@@ -167,7 +167,7 @@ static SMB_STRUCT_DIR *dirsort_fdopendir(vfs_handle_struct *handle,
}
static struct dirent *dirsort_readdir(vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp,
+ DIR *dirp,
SMB_STRUCT_STAT *sbuf)
{
struct dirsort_privates *data = NULL;
@@ -195,7 +195,7 @@ static struct dirent *dirsort_readdir(vfs_handle_struct *handle,
return &data->directory_list[data->pos++];
}
-static void dirsort_seekdir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp,
+static void dirsort_seekdir(vfs_handle_struct *handle, DIR *dirp,
long offset)
{
struct dirsort_privates *data = NULL;
@@ -204,7 +204,7 @@ static void dirsort_seekdir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp,
data->pos = offset;
}
-static long dirsort_telldir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
+static long dirsort_telldir(vfs_handle_struct *handle, DIR *dirp)
{
struct dirsort_privates *data = NULL;
SMB_VFS_HANDLE_GET_DATA(handle, data, struct dirsort_privates,
@@ -213,7 +213,7 @@ static long dirsort_telldir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
return data->pos;
}
-static void dirsort_rewinddir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp)
+static void dirsort_rewinddir(vfs_handle_struct *handle, DIR *dirp)
{
struct dirsort_privates *data = NULL;
SMB_VFS_HANDLE_GET_DATA(handle, data, struct dirsort_privates, return);
diff --git a/source3/modules/vfs_extd_audit.c b/source3/modules/vfs_extd_audit.c
index 6aab9cecbe..fc23ea9148 100644
--- a/source3/modules/vfs_extd_audit.c
+++ b/source3/modules/vfs_extd_audit.c
@@ -116,9 +116,9 @@ static void audit_disconnect(vfs_handle_struct *handle)
return;
}
-static SMB_STRUCT_DIR *audit_opendir(vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
+static DIR *audit_opendir(vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
{
- SMB_STRUCT_DIR *result;
+ DIR *result;
result = SMB_VFS_NEXT_OPENDIR(handle, fname, mask, attr);
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index 7997c2fab7..34c7a848e6 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -735,10 +735,10 @@ static uint32_t smb_full_audit_fs_capabilities(struct vfs_handle_struct *handle,
return result;
}
-static SMB_STRUCT_DIR *smb_full_audit_opendir(vfs_handle_struct *handle,
+static DIR *smb_full_audit_opendir(vfs_handle_struct *handle,
const char *fname, const char *mask, uint32 attr)
{
- SMB_STRUCT_DIR *result;
+ DIR *result;
result = SMB_VFS_NEXT_OPENDIR(handle, fname, mask, attr);
@@ -747,10 +747,10 @@ static SMB_STRUCT_DIR *smb_full_audit_opendir(vfs_handle_struct *handle,
return result;
}
-static SMB_STRUCT_DIR *smb_full_audit_fdopendir(vfs_handle_struct *handle,
+static DIR *smb_full_audit_fdopendir(vfs_handle_struct *handle,
files_struct *fsp, const char *mask, uint32 attr)
{
- SMB_STRUCT_DIR *result;
+ DIR *result;
result = SMB_VFS_NEXT_FDOPENDIR(handle, fsp, mask, attr);
@@ -761,7 +761,7 @@ static SMB_STRUCT_DIR *smb_full_audit_fdopendir(vfs_handle_struct *handle,
}
static struct dirent *smb_full_audit_readdir(vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp, SMB_STRUCT_STAT *sbuf)
+ DIR *dirp, SMB_STRUCT_STAT *sbuf)
{
struct dirent *result;
@@ -776,7 +776,7 @@ static struct dirent *smb_full_audit_readdir(vfs_handle_struct *handle,
}
static void smb_full_audit_seekdir(vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp, long offset)
+ DIR *dirp, long offset)
{
SMB_VFS_NEXT_SEEKDIR(handle, dirp, offset);
@@ -785,7 +785,7 @@ static void smb_full_audit_seekdir(vfs_handle_struct *handle,
}
static long smb_full_audit_telldir(vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp)
+ DIR *dirp)
{
long result;
@@ -797,7 +797,7 @@ static long smb_full_audit_telldir(vfs_handle_struct *handle,
}
static void smb_full_audit_rewinddir(vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp)
+ DIR *dirp)
{
SMB_VFS_NEXT_REWINDDIR(handle, dirp);
@@ -830,7 +830,7 @@ static int smb_full_audit_rmdir(vfs_handle_struct *handle,
}
static int smb_full_audit_closedir(vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp)
+ DIR *dirp)
{
int result;
@@ -842,7 +842,7 @@ static int smb_full_audit_closedir(vfs_handle_struct *handle,
}
static void smb_full_audit_init_search_op(vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp)
+ DIR *dirp)
{
SMB_VFS_NEXT_INIT_SEARCH_OP(handle, dirp);
diff --git a/source3/modules/vfs_netatalk.c b/source3/modules/vfs_netatalk.c
index c4a65e07ff..a4573550fa 100644
--- a/source3/modules/vfs_netatalk.c
+++ b/source3/modules/vfs_netatalk.c
@@ -153,7 +153,7 @@ static void atalk_rrmdir(TALLOC_CTX *ctx, char *path)
{
char *dpath;
struct dirent *dent = 0;
- SMB_STRUCT_DIR *dir;
+ DIR *dir;
if (!path) return;
@@ -177,9 +177,9 @@ static void atalk_rrmdir(TALLOC_CTX *ctx, char *path)
/* Directory operations */
-static SMB_STRUCT_DIR *atalk_opendir(struct vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
+static DIR *atalk_opendir(struct vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
{
- SMB_STRUCT_DIR *ret = 0;
+ DIR *ret = 0;
ret = SMB_VFS_NEXT_OPENDIR(handle, fname, mask, attr);
@@ -198,9 +198,9 @@ static SMB_STRUCT_DIR *atalk_opendir(struct vfs_handle_struct *handle, const cha
return ret;
}
-static SMB_STRUCT_DIR *atalk_fdopendir(struct vfs_handle_struct *handle, files_struct *fsp, const char *mask, uint32 attr)
+static DIR *atalk_fdopendir(struct vfs_handle_struct *handle, files_struct *fsp, const char *mask, uint32 attr)
{
- SMB_STRUCT_DIR *ret = 0;
+ DIR *ret = 0;
ret = SMB_VFS_NEXT_FDOPENDIR(handle, fsp, mask, attr);
diff --git a/source3/modules/vfs_onefs_shadow_copy.c b/source3/modules/vfs_onefs_shadow_copy.c
index 3b25942e68..c9b6f08096 100644
--- a/source3/modules/vfs_onefs_shadow_copy.c
+++ b/source3/modules/vfs_onefs_shadow_copy.c
@@ -186,13 +186,13 @@ onefs_shadow_copy_statvfs(struct vfs_handle_struct *handle, const char *path,
int);
}
-static SMB_STRUCT_DIR *
+static DIR *
onefs_shadow_copy_opendir(vfs_handle_struct *handle, const char *path,
const char *mask, uint32_t attr)
{
SHADOW_NEXT(OPENDIR,
(handle, cpath ?: path, mask, attr),
- SMB_STRUCT_DIR *);
+ DIR *);
}
static int
diff --git a/source3/modules/vfs_scannedonly.c b/source3/modules/vfs_scannedonly.c
index 080e88c47e..baf7fbefa9 100644
--- a/source3/modules/vfs_scannedonly.c
+++ b/source3/modules/vfs_scannedonly.c
@@ -90,7 +90,7 @@ struct scannedonly_DIR {
char *base;
int recheck_tries_done; /* if 0 the directory listing has not yet
been checked for files that need to be scanned. */
- SMB_STRUCT_DIR *DIR;
+ DIR *DIR;
};
#define SCANNEDONLY_DEBUG 9
/*********************/
@@ -506,11 +506,11 @@ static bool scannedonly_allow_access(vfs_handle_struct * handle,
/* VFS functions */
/*********************/
-static SMB_STRUCT_DIR *scannedonly_opendir(vfs_handle_struct * handle,
+static DIR *scannedonly_opendir(vfs_handle_struct * handle,
const char *fname,
const char *mask, uint32 attr)
{
- SMB_STRUCT_DIR *DIRp;
+ DIR *DIRp;
struct scannedonly_DIR *sDIR;
DIRp = SMB_VFS_NEXT_OPENDIR(handle, fname, mask, attr);
@@ -528,14 +528,14 @@ static SMB_STRUCT_DIR *scannedonly_opendir(vfs_handle_struct * handle,
("scannedonly_opendir, fname=%s, base=%s\n",fname,sDIR->base));
sDIR->DIR = DIRp;
sDIR->recheck_tries_done = 0;
- return (SMB_STRUCT_DIR *) sDIR;
+ return (DIR *) sDIR;
}
-static SMB_STRUCT_DIR *scannedonly_fdopendir(vfs_handle_struct * handle,
+static DIR *scannedonly_fdopendir(vfs_handle_struct * handle,
files_struct *fsp,
const char *mask, uint32 attr)
{
- SMB_STRUCT_DIR *DIRp;
+ DIR *DIRp;
struct scannedonly_DIR *sDIR;
const char *fname;
@@ -556,12 +556,12 @@ static SMB_STRUCT_DIR *scannedonly_fdopendir(vfs_handle_struct * handle,
("scannedonly_fdopendir, fname=%s, base=%s\n",fname,sDIR->base));
sDIR->DIR = DIRp;
sDIR->recheck_tries_done = 0;
- return (SMB_STRUCT_DIR *) sDIR;
+ return (DIR *) sDIR;
}
static struct dirent *scannedonly_readdir(vfs_handle_struct *handle,
- SMB_STRUCT_DIR * dirp,
+ DIR * dirp,
SMB_STRUCT_STAT *sbuf)
{
struct dirent *result;
@@ -648,28 +648,28 @@ static struct dirent *scannedonly_readdir(vfs_handle_struct *handle,
}
static void scannedonly_seekdir(struct vfs_handle_struct *handle,
- SMB_STRUCT_DIR * dirp, long offset)
+ DIR * dirp, long offset)
{
struct scannedonly_DIR *sDIR = (struct scannedonly_DIR *)dirp;
SMB_VFS_NEXT_SEEKDIR(handle, sDIR->DIR, offset);
}
static long scannedonly_telldir(struct vfs_handle_struct *handle,
- SMB_STRUCT_DIR * dirp)
+ DIR * dirp)
{
struct scannedonly_DIR *sDIR = (struct scannedonly_DIR *)dirp;
return SMB_VFS_NEXT_TELLDIR(handle, sDIR->DIR);
}
static void scannedonly_rewinddir(struct vfs_handle_struct *handle,
- SMB_STRUCT_DIR * dirp)
+ DIR * dirp)
{
struct scannedonly_DIR *sDIR = (struct scannedonly_DIR *)dirp;
SMB_VFS_NEXT_REWINDDIR(handle, sDIR->DIR);
}
static int scannedonly_closedir(vfs_handle_struct * handle,
- SMB_STRUCT_DIR * dirp)
+ DIR * dirp)
{
int retval;
struct scannedonly_DIR *sDIR = (struct scannedonly_DIR *)dirp;
diff --git a/source3/modules/vfs_shadow_copy.c b/source3/modules/vfs_shadow_copy.c
index 3f9bc96f0c..7b45c2e7aa 100644
--- a/source3/modules/vfs_shadow_copy.c
+++ b/source3/modules/vfs_shadow_copy.c
@@ -73,10 +73,10 @@ static bool shadow_copy_match_name(const char *name)
return False;
}
-static SMB_STRUCT_DIR *shadow_copy_opendir(vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
+static DIR *shadow_copy_opendir(vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
{
shadow_copy_Dir *dirp;
- SMB_STRUCT_DIR *p = SMB_VFS_NEXT_OPENDIR(handle,fname,mask,attr);
+ DIR *p = SMB_VFS_NEXT_OPENDIR(handle,fname,mask,attr);
if (!p) {
DEBUG(0,("shadow_copy_opendir: SMB_VFS_NEXT_OPENDIR() failed for [%s]\n",fname));
@@ -117,13 +117,13 @@ static SMB_STRUCT_DIR *shadow_copy_opendir(vfs_handle_struct *handle, const char
}
SMB_VFS_NEXT_CLOSEDIR(handle,p);
- return((SMB_STRUCT_DIR *)dirp);
+ return((DIR *)dirp);
}
-static SMB_STRUCT_DIR *shadow_copy_fdopendir(vfs_handle_struct *handle, files_struct *fsp, const char *mask, uint32 attr)
+static DIR *shadow_copy_fdopendir(vfs_handle_struct *handle, files_struct *fsp, const char *mask, uint32 attr)
{
shadow_copy_Dir *dirp;
- SMB_STRUCT_DIR *p = SMB_VFS_NEXT_FDOPENDIR(handle,fsp,mask,attr);
+ DIR *p = SMB_VFS_NEXT_FDOPENDIR(handle,fsp,mask,attr);
if (!p) {
DEBUG(10,("shadow_copy_opendir: SMB_VFS_NEXT_FDOPENDIR() failed for [%s]\n",
@@ -169,11 +169,11 @@ static SMB_STRUCT_DIR *shadow_copy_fdopendir(vfs_handle_struct *handle, files_st
SMB_VFS_NEXT_CLOSEDIR(handle,p);
/* We have now closed the fd in fsp. */
fsp->fh->fd = -1;
- return((SMB_STRUCT_DIR *)dirp);
+ return((DIR *)dirp);
}
static struct dirent *shadow_copy_readdir(vfs_handle_struct *handle,
- SMB_STRUCT_DIR *_dirp,
+ DIR *_dirp,
SMB_STRUCT_STAT *sbuf)
{
shadow_copy_Dir *dirp = (shadow_copy_Dir *)_dirp;
@@ -185,7 +185,7 @@ static struct dirent *shadow_copy_readdir(vfs_handle_struct *handle,
return NULL;
}
-static void shadow_copy_seekdir(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *_dirp, long offset)
+static void shadow_copy_seekdir(struct vfs_handle_struct *handle, DIR *_dirp, long offset)
{
shadow_copy_Dir *dirp = (shadow_copy_Dir *)_dirp;
@@ -194,19 +194,19 @@ static void shadow_copy_seekdir(struct vfs_handle_struct *handle, SMB_STRUCT_DIR
}
}
-static long shadow_copy_telldir(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *_dirp)
+static long shadow_copy_telldir(struct vfs_handle_struct *handle, DIR *_dirp)
{
shadow_copy_Dir *dirp = (shadow_copy_Dir *)_dirp;
return( dirp->pos ) ;
}
-static void shadow_copy_rewinddir(struct vfs_handle_struct *handle, SMB_STRUCT_DIR *_dirp)
+static void shadow_copy_rewinddir(struct vfs_handle_struct *handle, DIR *_dirp)
{
shadow_copy_Dir *dirp = (shadow_copy_Dir *)_dirp;
dirp->pos = 0 ;
}
-static int shadow_copy_closedir(vfs_handle_struct *handle, SMB_STRUCT_DIR *_dirp)
+static int shadow_copy_closedir(vfs_handle_struct *handle, DIR *_dirp)
{
shadow_copy_Dir *dirp = (shadow_copy_Dir *)_dirp;
@@ -221,7 +221,7 @@ static int shadow_copy_get_shadow_copy_data(vfs_handle_struct *handle,
struct shadow_copy_data *shadow_copy_data,
bool labels)
{
- SMB_STRUCT_DIR *p = SMB_VFS_NEXT_OPENDIR(handle,fsp->conn->connectpath,NULL,0);
+ DIR *p = SMB_VFS_NEXT_OPENDIR(handle,fsp->conn->connectpath,NULL,0);
shadow_copy_data->num_volumes = 0;
shadow_copy_data->labels = NULL;
diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c
index 14d33085c2..755a9b616c 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -447,14 +447,14 @@ static void convert_sbuf(vfs_handle_struct *handle, const char *fname,
}
}
-static SMB_STRUCT_DIR *shadow_copy2_opendir(vfs_handle_struct *handle,
+static DIR *shadow_copy2_opendir(vfs_handle_struct *handle,
const char *fname,
const char *mask,
uint32 attr)
{
time_t timestamp;
char *stripped;
- SMB_STRUCT_DIR *ret;
+ DIR *ret;
int saved_errno;
char *conv;
@@ -1076,7 +1076,7 @@ static int shadow_copy2_get_shadow_copy_data(
struct shadow_copy_data *shadow_copy2_data,
bool labels)
{
- SMB_STRUCT_DIR *p;
+ DIR *p;
const char *snapdir;
struct dirent *d;
TALLOC_CTX *tmp_ctx = talloc_stackframe();
diff --git a/source3/modules/vfs_streams_depot.c b/source3/modules/vfs_streams_depot.c
index f268492ade..172a0c634d 100644
--- a/source3/modules/vfs_streams_depot.c
+++ b/source3/modules/vfs_streams_depot.c
@@ -374,7 +374,7 @@ static NTSTATUS walk_streams(vfs_handle_struct *handle,
void *private_data)
{
char *dirname;
- SMB_STRUCT_DIR *dirhandle = NULL;
+ DIR *dirhandle = NULL;
const char *dirent = NULL;
char *talloced = NULL;
diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c
index 76e917c15d..035f2df406 100644
--- a/source3/modules/vfs_time_audit.c
+++ b/source3/modules/vfs_time_audit.c
@@ -203,11 +203,11 @@ static uint32_t smb_time_audit_fs_capabilities(struct vfs_handle_struct *handle,
return result;
}
-static SMB_STRUCT_DIR *smb_time_audit_opendir(vfs_handle_struct *handle,
+static DIR *smb_time_audit_opendir(vfs_handle_struct *handle,
const char *fname,
const char *mask, uint32 attr)
{
- SMB_STRUCT_DIR *result;
+ DIR *result;
struct timespec ts1,ts2;
double timediff;
@@ -223,11 +223,11 @@ static SMB_STRUCT_DIR *smb_time_audit_opendir(vfs_handle_struct *handle,
return result;
}
-static SMB_STRUCT_DIR *smb_time_audit_fdopendir(vfs_handle_struct *handle,
+static DIR *smb_time_audit_fdopendir(vfs_handle_struct *handle,
files_struct *fsp,
const char *mask, uint32 attr)
{
- SMB_STRUCT_DIR *result;
+ DIR *result;
struct timespec ts1,ts2;
double timediff;
@@ -244,7 +244,7 @@ static SMB_STRUCT_DIR *smb_time_audit_fdopendir(vfs_handle_struct *handle,
}
static struct dirent *smb_time_audit_readdir(vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp,
+ DIR *dirp,
SMB_STRUCT_STAT *sbuf)
{
struct dirent *result;
@@ -264,7 +264,7 @@ static struct dirent *smb_time_audit_readdir(vfs_handle_struct *handle,
}
static void smb_time_audit_seekdir(vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp, long offset)
+ DIR *dirp, long offset)
{
struct timespec ts1,ts2;
double timediff;
@@ -282,7 +282,7 @@ static void smb_time_audit_seekdir(vfs_handle_struct *handle,
}
static long smb_time_audit_telldir(vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp)
+ DIR *dirp)
{
long result;
struct timespec ts1,ts2;
@@ -301,7 +301,7 @@ static long smb_time_audit_telldir(vfs_handle_struct *handle,
}
static void smb_time_audit_rewinddir(vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp)
+ DIR *dirp)
{
struct timespec ts1,ts2;
double timediff;
@@ -357,7 +357,7 @@ static int smb_time_audit_rmdir(vfs_handle_struct *handle,
}
static int smb_time_audit_closedir(vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp)
+ DIR *dirp)
{
int result;
struct timespec ts1,ts2;
@@ -376,7 +376,7 @@ static int smb_time_audit_closedir(vfs_handle_struct *handle,
}
static void smb_time_audit_init_search_op(vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp)
+ DIR *dirp)
{
struct timespec ts1,ts2;
double timediff;
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index d42b04f18b..5d8c3a7680 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -8253,7 +8253,7 @@ enum usershare_err parse_usershare_file(TALLOC_CTX *ctx,
const char **prefixallowlist = lp_usershare_prefix_allow_list();
const char **prefixdenylist = lp_usershare_prefix_deny_list();
int us_vers;
- SMB_STRUCT_DIR *dp;
+ DIR *dp;
SMB_STRUCT_STAT sbuf;
char *sharepath = NULL;
char *comment = NULL;
@@ -8732,7 +8732,7 @@ int load_usershare_service(const char *servicename)
int load_usershare_shares(struct smbd_server_connection *sconn,
bool (*snumused) (struct smbd_server_connection *, int))
{
- SMB_STRUCT_DIR *dp;
+ DIR *dp;
SMB_STRUCT_STAT sbuf;
struct dirent *de;
int num_usershares = 0;
diff --git a/source3/rpc_server/samr/srv_samr_chgpasswd.c b/source3/rpc_server/samr/srv_samr_chgpasswd.c
index a88f61437f..94d7021349 100644
--- a/source3/rpc_server/samr/srv_samr_chgpasswd.c
+++ b/source3/rpc_server/samr/srv_samr_chgpasswd.c
@@ -67,7 +67,7 @@ static int findpty(char **slave)
{
int master = -1;
char *line = NULL;
- SMB_STRUCT_DIR *dirp = NULL;
+ DIR *dirp = NULL;
const char *dpname;
*slave = NULL;
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index 103dbc8a33..79a0f8bf18 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -43,7 +43,7 @@ struct name_cache_entry {
struct smb_Dir {
connection_struct *conn;
- SMB_STRUCT_DIR *dir;
+ DIR *dir;
long offset;
char *dir_path;
size_t name_cache_size;
diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c
index 7dc604c15b..b7a505284e 100644
--- a/source3/smbd/msdfs.c
+++ b/source3/smbd/msdfs.c
@@ -1288,7 +1288,7 @@ bool remove_msdfs_link(const struct junction_map *jucn)
static int count_dfs_links(TALLOC_CTX *ctx, int snum)
{
size_t cnt = 0;
- SMB_STRUCT_DIR *dirp = NULL;
+ DIR *dirp = NULL;
const char *dname = NULL;
char *talloced = NULL;
const char *connect_path = lp_pathname(snum);
@@ -1355,7 +1355,7 @@ static int form_junctions(TALLOC_CTX *ctx,
size_t jn_remain)
{
size_t cnt = 0;
- SMB_STRUCT_DIR *dirp = NULL;
+ DIR *dirp = NULL;
const char *dname = NULL;
char *talloced = NULL;
const char *connect_path = lp_pathname(snum);
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index cb7d2e4496..33f2701704 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -729,7 +729,7 @@ const char *vfs_readdirname(connection_struct *conn, void *p,
if (!p)
return(NULL);
- ptr = SMB_VFS_READDIR(conn, (SMB_STRUCT_DIR *)p, sbuf);
+ ptr = SMB_VFS_READDIR(conn, (DIR *)p, sbuf);
if (!ptr)
return(NULL);
@@ -1388,7 +1388,7 @@ NTSTATUS smb_vfs_call_get_dfs_referrals(struct vfs_handle_struct *handle,
return handle->fns->get_dfs_referrals_fn(handle, r);
}
-SMB_STRUCT_DIR *smb_vfs_call_opendir(struct vfs_handle_struct *handle,
+DIR *smb_vfs_call_opendir(struct vfs_handle_struct *handle,
const char *fname, const char *mask,
uint32 attributes)
{
@@ -1396,7 +1396,7 @@ SMB_STRUCT_DIR *smb_vfs_call_opendir(struct vfs_handle_struct *handle,
return handle->fns->opendir_fn(handle, fname, mask, attributes);
}
-SMB_STRUCT_DIR *smb_vfs_call_fdopendir(struct vfs_handle_struct *handle,
+DIR *smb_vfs_call_fdopendir(struct vfs_handle_struct *handle,
struct files_struct *fsp,
const char *mask,
uint32 attributes)
@@ -1406,7 +1406,7 @@ SMB_STRUCT_DIR *smb_vfs_call_fdopendir(struct vfs_handle_struct *handle,
}
struct dirent *smb_vfs_call_readdir(struct vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp,
+ DIR *dirp,
SMB_STRUCT_STAT *sbuf)
{
VFS_FIND(readdir);
@@ -1414,21 +1414,21 @@ struct dirent *smb_vfs_call_readdir(struct vfs_handle_struct *handle,
}
void smb_vfs_call_seekdir(struct vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp, long offset)
+ DIR *dirp, long offset)
{
VFS_FIND(seekdir);
handle->fns->seekdir_fn(handle, dirp, offset);
}
long smb_vfs_call_telldir(struct vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp)
+ DIR *dirp)
{
VFS_FIND(telldir);
return handle->fns->telldir_fn(handle, dirp);
}
void smb_vfs_call_rewind_dir(struct vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp)
+ DIR *dirp)
{
VFS_FIND(rewind_dir);
handle->fns->rewind_dir_fn(handle, dirp);
@@ -1448,14 +1448,14 @@ int smb_vfs_call_rmdir(struct vfs_handle_struct *handle, const char *path)
}
int smb_vfs_call_closedir(struct vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dir)
+ DIR *dir)
{
VFS_FIND(closedir);
return handle->fns->closedir_fn(handle, dir);
}
void smb_vfs_call_init_search_op(struct vfs_handle_struct *handle,
- SMB_STRUCT_DIR *dirp)
+ DIR *dirp)
{
VFS_FIND(init_search_op);
handle->fns->init_search_op_fn(handle, dirp);
diff --git a/source3/utils/net_usershare.c b/source3/utils/net_usershare.c
index b7ec7a94c3..b11757a611 100644
--- a/source3/utils/net_usershare.c
+++ b/source3/utils/net_usershare.c
@@ -208,7 +208,7 @@ static struct file_list *flist;
static int get_share_list(TALLOC_CTX *ctx, const char *wcard, bool only_ours)
{
- SMB_STRUCT_DIR *dp;
+ DIR *dp;
struct dirent *de;
uid_t myuid = geteuid();
struct file_list *fl = NULL;
@@ -546,7 +546,7 @@ static int net_usershare_info(struct net_context *c, int argc, const char **argv
static int count_num_usershares(void)
{
- SMB_STRUCT_DIR *dp;
+ DIR *dp;
struct dirent *de;
int num_usershares = 0;
TALLOC_CTX *ctx = talloc_tos();
@@ -1059,7 +1059,7 @@ static int net_usershare_list(struct net_context *c, int argc,
int net_usershare(struct net_context *c, int argc, const char **argv)
{
- SMB_STRUCT_DIR *dp;
+ DIR *dp;
struct functable func[] = {
{