From 0d32230c17dbfa5e790d2023ba655f109938ef28 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 --- source3/smbd/filename.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index dcee5a76cfd..e3acfc8483f 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -490,8 +490,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 @@ -501,12 +507,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; } /* -- 2.11.4.GIT