From bf8dd1b17078cd51a795c5a22a230710354f30cc Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 13 May 2009 15:46:35 +0200 Subject: [PATCH] Re-Add the "dropbox" functionality with -wx rights on a directory --- source/smbd/filename.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/smbd/filename.c b/source/smbd/filename.c index d404b90..7ff497f 100644 --- a/source/smbd/filename.c +++ b/source/smbd/filename.c @@ -508,12 +508,12 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx, errno == ELOOP) { result = NT_STATUS_OBJECT_PATH_NOT_FOUND; - } - else { + goto fail; + } else if (errno != EACCES) { result = map_nt_error_from_unix(errno); + goto fail; } - goto fail; } /* -- 1.5.5 From ba9c35684a47b5cda201c23b964bb17d2b90fe62 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 30 May 2009 11:30:16 +0200 Subject: [PATCH] Simplify the dropbox patch --- source/smbd/filename.c | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/source/smbd/filename.c b/source/smbd/filename.c index 7ff497f..5ea5cb2 100644 --- a/source/smbd/filename.c +++ b/source/smbd/filename.c @@ -497,8 +497,14 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx, goto fail; } - /* ENOENT is the only valid error here. */ - if ((errno != 0) && (errno != ENOENT)) { + /* + * ENOENT/EACCESS are the only valid errors + * here. EACCESS needs handling here for + * "dropboxes", i.e. directories where users + * can only put stuff with permission -wx. + */ + if ((errno != 0) && (errno != ENOENT) + && (errno != EACCES)) { /* * ENOTDIR and ELOOP both map to * NT_STATUS_OBJECT_PATH_NOT_FOUND @@ -508,12 +514,11 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx, errno == ELOOP) { result = NT_STATUS_OBJECT_PATH_NOT_FOUND; - goto fail; - } else if (errno != EACCES) { + } else { result = map_nt_error_from_unix(errno); - goto fail; } + goto fail; } /* -- 1.5.5