summaryrefslogtreecommitdiffstats
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-12-03 13:20:17 +0100
committerJeremy Allison <jra@samba.org>2013-12-09 09:48:48 -0800
commit5b49fe24c906cbae12beff7a1b45de6809258cab (patch)
treec2bc0a39dd2987df2772ea052e0c2dc53c7bb667 /source3/smbd
parent967f9bd1f8a147c4b89ada3b6c7e1ce064c511bc (diff)
downloadsamba-5b49fe24c906cbae12beff7a1b45de6809258cab.tar.gz
samba-5b49fe24c906cbae12beff7a1b45de6809258cab.tar.xz
samba-5b49fe24c906cbae12beff7a1b45de6809258cab.zip
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@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/filename.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index 68321eebbb..3096a3e514 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)) {