diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-01-09 08:27:35 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:08:33 -0500 |
commit | 3feb4423f3ec35dd3dfa2c358797a4f6a86b2fb5 (patch) | |
tree | c419b77fc5484fbfc945e8bfe7634fb16b201c67 /source4/ntvfs/posix/pvfs_search.c | |
parent | c32f3129bc0894079e71beee7c3101283adbc9bf (diff) | |
download | samba-3feb4423f3ec35dd3dfa2c358797a4f6a86b2fb5.tar.gz samba-3feb4423f3ec35dd3dfa2c358797a4f6a86b2fb5.tar.bz2 samba-3feb4423f3ec35dd3dfa2c358797a4f6a86b2fb5.zip |
r4615: added acl checking on directory search in pvfs
(This used to be commit 0e61a422bd9a1596a284c176f033e958bbeaa8ce)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_search.c')
-rw-r--r-- | source4/ntvfs/posix/pvfs_search.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/ntvfs/posix/pvfs_search.c b/source4/ntvfs/posix/pvfs_search.c index 34f5f2208e..2106758784 100644 --- a/source4/ntvfs/posix/pvfs_search.c +++ b/source4/ntvfs/posix/pvfs_search.c @@ -24,6 +24,7 @@ #include "vfs_posix.h" #include "system/time.h" #include "system/filesys.h" +#include "librpc/gen_ndr/ndr_security.h" /* the state of a search started with pvfs_search_first() */ @@ -325,6 +326,11 @@ static NTSTATUS pvfs_search_first_old(struct ntvfs_module_context *ntvfs, return STATUS_NO_MORE_FILES; } + status = pvfs_access_check_parent(pvfs, req, name, SEC_DIR_TRAVERSE | SEC_DIR_LIST); + if (!NT_STATUS_IS_OK(status)) { + return status; + } + /* we initially make search a child of the request, then if we need to keep it long term we steal it for the private structure */ @@ -461,6 +467,11 @@ NTSTATUS pvfs_search_first(struct ntvfs_module_context *ntvfs, return NT_STATUS_NO_SUCH_FILE; } + status = pvfs_access_check_parent(pvfs, req, name, SEC_DIR_TRAVERSE | SEC_DIR_LIST); + if (!NT_STATUS_IS_OK(status)) { + return status; + } + /* we initially make search a child of the request, then if we need to keep it long term we steal it for the private structure */ |