From 985909073ee718a10c6328e278bb59698dc92104 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 3 Dec 2013 13:20:17 +0100 Subject: [PATCH] smbd: Fix regression for the dropbox case. We need to allow to save a file to a directory with perm -wx. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10297 Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison Reviewed-by: Andreas Schneider (cherry picked from commit 5b49fe24c906cbae12beff7a1b45de6809258cab) --- source3/smbd/filename.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index 68321eebbb0..3096a3e5146 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -722,7 +722,10 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx, */ if (errno == EACCES) { - if (ucf_flags & UCF_CREATING_FILE) { + if ((ucf_flags & UCF_CREATING_FILE) == 0) { + status = NT_STATUS_ACCESS_DENIED; + goto fail; + } else { /* * This is the dropbox * behaviour. A dropbox is a @@ -734,11 +737,8 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx, * nevertheless want to allow * users creating a file. */ - status = NT_STATUS_OBJECT_PATH_NOT_FOUND; - } else { - status = NT_STATUS_ACCESS_DENIED; + errno = 0; } - goto fail; } if ((errno != 0) && (errno != ENOENT)) { -- 2.11.4.GIT