summaryrefslogtreecommitdiff
path: root/source3/smbd/dir.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2000-02-03 05:17:25 +0000
committerTim Potter <tpot@samba.org>2000-02-03 05:17:25 +0000
commit16bb009dbbe6302febf3848cee61e9927eeb0fb5 (patch)
tree2e6871c679d6de83e99133cb968c6fbbc89375b6 /source3/smbd/dir.c
parent6df7bfbd9f5badd1d8489b7c329961441f71b471 (diff)
downloadsamba-16bb009dbbe6302febf3848cee61e9927eeb0fb5.tar.gz
samba-16bb009dbbe6302febf3848cee61e9927eeb0fb5.tar.bz2
samba-16bb009dbbe6302febf3848cee61e9927eeb0fb5.zip
Mega-VFS merge. Yeah baby!
Synopsis: change every disk access function to work through a vfs_ops structure contained in the connection_struct. (This used to be commit 3aad500c0fb61232ed3431ff4b743b5d18ec852f)
Diffstat (limited to 'source3/smbd/dir.c')
-rw-r--r--source3/smbd/dir.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index f3f261f0b2..32fc523541 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -617,14 +617,11 @@ BOOL get_dir_entry(connection_struct *conn,char *mask,int dirtype,char *fname,
pstrcpy(pathreal,path);
pstrcat(path,fname);
pstrcat(pathreal,dname);
- if (dos_stat(pathreal,&sbuf) != 0)
+ if (conn->vfs_ops.stat(dos_to_unix(pathreal, False), &sbuf) != 0)
{
DEBUG(5,("Couldn't stat 1 [%s]. Error = %s\n",path, strerror(errno) ));
continue;
}
-
- if (check_descend && !strequal(fname,".") && !strequal(fname,".."))
- continue;
*mode = dos_mode(conn,pathreal,&sbuf);
@@ -673,19 +670,19 @@ void *OpenDir(connection_struct *conn, char *name, BOOL use_veto)
{
Dir *dirp;
char *n;
- DIR *p = dos_opendir(name);
+ DIR *p = conn->vfs_ops.opendir(name);
int used=0;
if (!p) return(NULL);
dirp = (Dir *)malloc(sizeof(Dir));
if (!dirp) {
- closedir(p);
+ conn->vfs_ops.closedir(p);
return(NULL);
}
dirp->pos = dirp->numentries = dirp->mallocsize = 0;
dirp->data = dirp->current = NULL;
- while ((n = dos_readdirname(p)))
+ while ((n = vfs_readdirname(conn, p)))
{
int l = strlen(n)+1;
@@ -709,7 +706,7 @@ void *OpenDir(connection_struct *conn, char *name, BOOL use_veto)
dirp->numentries++;
}
- closedir(p);
+ conn->vfs_ops.closedir(p);
return((void *)dirp);
}