diff options
author | Samba Release Account <samba-bugs@samba.org> | 1997-07-01 20:50:57 +0000 |
---|---|---|
committer | Samba Release Account <samba-bugs@samba.org> | 1997-07-01 20:50:57 +0000 |
commit | 1599e41ec42998fdf05a3b22c3f3a93f8b4832ed (patch) | |
tree | 885e0c21a8938455fc8014438bcf6b5a16c5b668 /source3/smbd | |
parent | ce9baa3bac6eba5f7a468557572f342d3ba918ec (diff) | |
download | samba-1599e41ec42998fdf05a3b22c3f3a93f8b4832ed.tar.gz samba-1599e41ec42998fdf05a3b22c3f3a93f8b4832ed.tar.bz2 samba-1599e41ec42998fdf05a3b22c3f3a93f8b4832ed.zip |
Rolled back Lukes changes. Not quite ready for prime time.
Jeremy (jallison@whistle.com)
(This used to be commit ed04ec7ab8b8e73b5442bdef03d5a3c994247b4e)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/dir.c | 22 | ||||
-rw-r--r-- | source3/smbd/server.c | 9 |
2 files changed, 13 insertions, 18 deletions
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index f674c92804..bc099dd1e8 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -108,7 +108,7 @@ static void dptr_idleoldest(void) /**************************************************************************** get the dir ptr for a dir index ****************************************************************************/ -static void *dptr_get(int cnum, int key,uint32 lastused) +static void *dptr_get(int key,uint32 lastused) { if (dirptrs[key].valid) { if (lastused) dirptrs[key].lastused = lastused; @@ -116,7 +116,7 @@ static void *dptr_get(int cnum, int key,uint32 lastused) if (dptrs_open >= MAXDIR) dptr_idleoldest(); DEBUG(4,("Reopening dptr key %d\n",key)); - if ((dirptrs[key].ptr = OpenDir(cnum, dirptrs[key].path))) + if ((dirptrs[key].ptr = OpenDir(dirptrs[key].path))) dptrs_open++; } return(dirptrs[key].ptr); @@ -259,7 +259,7 @@ static BOOL start_dir(int cnum,char *directory) if (! *directory) directory = "."; - Connections[cnum].dirptr = OpenDir(cnum, directory); + Connections[cnum].dirptr = OpenDir(directory); if (Connections[cnum].dirptr) { dptrs_open++; string_set(&Connections[cnum].dirpath,directory); @@ -345,10 +345,10 @@ int dptr_create(int cnum,char *path, BOOL expect_close,int pid) /**************************************************************************** fill the 5 byte server reserved dptr field ****************************************************************************/ -BOOL dptr_fill(int cnum, char *buf1,unsigned int key) +BOOL dptr_fill(char *buf1,unsigned int key) { unsigned char *buf = (unsigned char *)buf1; - void *p = dptr_get(cnum, key,0); + void *p = dptr_get(key,0); uint32 offset; if (!p) { DEBUG(1,("filling null dirptr %d\n",key)); @@ -373,10 +373,10 @@ BOOL dptr_zero(char *buf) /**************************************************************************** fetch the dir ptr and seek it given the 5 byte server field ****************************************************************************/ -void *dptr_fetch(int cnum, char *buf,int *num) +void *dptr_fetch(char *buf,int *num) { unsigned int key = *(unsigned char *)buf; - void *p = dptr_get(cnum, key,dircounter++); + void *p = dptr_get(key,dircounter++); uint32 offset; if (!p) { DEBUG(3,("fetched null dirptr %d\n",key)); @@ -393,9 +393,9 @@ void *dptr_fetch(int cnum, char *buf,int *num) /**************************************************************************** fetch the dir ptr and seek it given the lanman2 parameter block ****************************************************************************/ -void *dptr_fetch_lanman2(int cnum, char *params,int dptr_num) +void *dptr_fetch_lanman2(char *params,int dptr_num) { - void *p = dptr_get(cnum, dptr_num,dircounter++); + void *p = dptr_get(dptr_num,dircounter++); uint32 resume_key = SVAL(params,6); BOOL uses_resume_key = BITSETW(params+10,2); BOOL continue_bit = BITSETW(params+10,3); @@ -520,7 +520,7 @@ typedef struct /******************************************************************* open a directory ********************************************************************/ -void *OpenDir(int cnum, char *name) +void *OpenDir(char *name) { Dir *dirp; char *n; @@ -539,7 +539,7 @@ void *OpenDir(int cnum, char *name) while ((n = readdirname(p))) { int l = strlen(n)+1; /* If it's a vetoed file, pretend it doesn't even exist */ - if(is_vetoed_name(cnum, n)) + if(is_vetoed_name(n)) continue; if (used + l > dirp->mallocsize) { int s = MAX(used+l,used+2000); diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 5af77d0ac4..8c40734ce4 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -222,11 +222,6 @@ int dos_mode(int cnum,char *path,struct stat *sbuf) result |= aHIDDEN; } - if (is_hidden_path(SNUM(cnum), path)) - { - result |= aHIDDEN; - } - return(result); } @@ -366,7 +361,7 @@ static BOOL scan_directory(char *path, char *name,int snum,BOOL docache) check_mangled_stack(name); /* open the directory */ - if (!(cur_dir = OpenDir(snum, path))) + if (!(cur_dir = OpenDir(path))) { DEBUG(3,("scan dir didn't open dir [%s]\n",path)); return(False); @@ -796,7 +791,7 @@ BOOL check_name(char *name,int cnum) errno = 0; - if( is_vetoed_path(SNUM(cnum), name)) + if( is_vetoed_path(name)) { DEBUG(5,("file path name %s vetoed\n",name)); return(0); |