diff options
author | Samba Release Account <samba-bugs@samba.org> | 1997-07-06 13:48:10 +0000 |
---|---|---|
committer | Samba Release Account <samba-bugs@samba.org> | 1997-07-06 13:48:10 +0000 |
commit | 1fe89d0b716ccd9fca4abe4daf89df063b38f4b3 (patch) | |
tree | a4ed41e49fcbed2c2901b98a1ad6cfa765631b7a /source3/smbd/server.c | |
parent | ee0acbe94c203e0ec5aa7fb09fb0a5a17ef8a31c (diff) | |
download | samba-1fe89d0b716ccd9fca4abe4daf89df063b38f4b3.tar.gz samba-1fe89d0b716ccd9fca4abe4daf89df063b38f4b3.tar.bz2 samba-1fe89d0b716ccd9fca4abe4daf89df063b38f4b3.zip |
added, tested and debugged new "hide files" option.
lkcl
(This used to be commit 60af320a436c3a26230fd7ac71856e67ef64e819)
Diffstat (limited to 'source3/smbd/server.c')
-rw-r--r-- | source3/smbd/server.c | 21 |
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); |