[PATCH 2/2] smbd: Fix regression for the dropbox case.
Andreas Schneider
asn at samba.org
Tue Dec 3 05:20:17 MST 2013
From: Volker Lendecke <vl at samba.org>
We need to allow to save a file to a directory with perm -wx.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10297
---
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)) {
--
1.8.5
More information about the samba-technical
mailing list