[Pkg-samba-maint] [samba] 109/135: smbd: Fix regression for the dropbox case.

Ivo De Decker ivodd at moszumanska.debian.org
Sat Jan 11 21:30:30 UTC 2014


This is an automated email from the git hooks/post-receive script.

ivodd pushed a commit to branch master
in repository samba.

commit 985909073ee718a10c6328e278bb59698dc92104
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Dec 3 13:20:17 2013 +0100

    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 <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    (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 68321ee..3096a3e 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)) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git




More information about the Pkg-samba-maint mailing list