summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-05-30 11:30:16 +0200
committerKarolin Seeger <kseeger@samba.org>2009-06-10 16:17:57 +0200
commit0d35aa29f97ac089c359e376901923a968b02658 (patch)
tree3ecdb067ebcf7b59cfc33a93f216fac9f7322d9d /source
parent624595e80368f9aa9d530ab06d07f9b82dc8d42c (diff)
downloadsamba-0d35aa29f97ac089c359e376901923a968b02658.tar.gz
samba-0d35aa29f97ac089c359e376901923a968b02658.tar.xz
samba-0d35aa29f97ac089c359e376901923a968b02658.zip
Simplify the dropbox patch
(cherry picked from commit f9ea09b61a46136fc55314e2e1cd2e9cfb362802)
Diffstat (limited to 'source')
-rw-r--r--source/smbd/filename.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/source/smbd/filename.c b/source/smbd/filename.c
index 7ff497f5cca..5ea5cb2af52 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;
}
/*