[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Wed Jan 22 19:57:04 MST 2014
The branch, master has been updated
via 7638f52 s3: Don't open the dir for stat/attr/acl related mask
from b04e8b7 s3: ldap client can return NT_STATUS_OK when an error occurs in a paged search.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 7638f521456f1c7e615591dff4c403902cd4ddac
Author: Abhidnya Joshi <achirmul at in.ibm.com>
Date: Wed Jan 22 17:02:15 2014 -0800
s3: Don't open the dir for stat/attr/acl related mask
Signed-off-by: Abhidnya Joshi <achirmul at in.ibm.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Christof Schmitt <cs at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Thu Jan 23 03:56:35 CET 2014 on sn-devel-104
-----------------------------------------------------------------------
Summary of changes:
source3/smbd/open.c | 31 +++++++++++++++++++++----------
1 files changed, 21 insertions(+), 10 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 200c1ce..cce8be2 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -3211,19 +3211,30 @@ static NTSTATUS open_directory(connection_struct *conn,
*/
ZERO_STRUCT(mtimespec);
+ if (access_mask & (FILE_LIST_DIRECTORY|
+ FILE_ADD_FILE|
+ FILE_ADD_SUBDIRECTORY|
+ FILE_TRAVERSE|
+ DELETE_ACCESS|
+ FILE_DELETE_CHILD)) {
#ifdef O_DIRECTORY
- status = fd_open(conn, fsp, O_RDONLY|O_DIRECTORY, 0);
+ status = fd_open(conn, fsp, O_RDONLY|O_DIRECTORY, 0);
#else
- /* POSIX allows us to open a directory with O_RDONLY. */
- status = fd_open(conn, fsp, O_RDONLY, 0);
+ /* POSIX allows us to open a directory with O_RDONLY. */
+ status = fd_open(conn, fsp, O_RDONLY, 0);
#endif
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(5, ("open_directory: Could not open fd for "
- "%s (%s)\n",
- smb_fname_str_dbg(smb_dname),
- nt_errstr(status)));
- file_free(req, fsp);
- return status;
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(5, ("open_directory: Could not open fd for "
+ "%s (%s)\n",
+ smb_fname_str_dbg(smb_dname),
+ nt_errstr(status)));
+ file_free(req, fsp);
+ return status;
+ }
+ } else {
+ fsp->fh->fd = -1;
+ DEBUG(10, ("Not opening Directory %s\n",
+ smb_fname_str_dbg(smb_dname)));
}
status = vfs_stat_fsp(fsp);
--
Samba Shared Repository
More information about the samba-cvs
mailing list