summaryrefslogtreecommitdiff
path: root/source3/smbd/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/server.c')
-rw-r--r--source3/smbd/server.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 30d8ce3d2a..0361c5aa46 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -179,6 +179,8 @@ int dos_mode(int cnum,char *path,struct stat *sbuf)
int result = 0;
extern struct current_user current_user;
+ DEBUG(5,("dos_mode: %d %s\n", cnum, path));
+
if (CAN_WRITE(cnum) && !lp_alternate_permissions(SNUM(cnum))) {
if (!((sbuf->st_mode & S_IWOTH) ||
Connections[cnum].admin_user ||
@@ -222,6 +224,21 @@ int dos_mode(int cnum,char *path,struct stat *sbuf)
result |= aHIDDEN;
}
+ if (is_hidden_path(SNUM(cnum), path))
+ {
+ result |= aHIDDEN;
+ }
+
+ DEBUG(5,("dos_mode returning "));
+
+ if (result & aHIDDEN) DEBUG(5, ("h"));
+ if (result & aRONLY ) DEBUG(5, ("r"));
+ if (result & aSYSTEM) DEBUG(5, ("s"));
+ if (result & aDIR ) DEBUG(5, ("d"));
+ if (result & aARCH ) DEBUG(5, ("a"));
+
+ DEBUG(5,("\n"));
+
return(result);
}
@@ -361,7 +378,7 @@ static BOOL scan_directory(char *path, char *name,int snum,BOOL docache)
check_mangled_stack(name);
/* open the directory */
- if (!(cur_dir = OpenDir(path, True)))
+ if (!(cur_dir = OpenDir(snum, path, True)))
{
DEBUG(3,("scan dir didn't open dir [%s]\n",path));
return(False);
@@ -791,7 +808,7 @@ BOOL check_name(char *name,int cnum)
errno = 0;
- if( is_vetoed_path(name))
+ if( is_vetoed_name(SNUM(cnum), name))
{
DEBUG(5,("file path name %s vetoed\n",name));
return(0);