summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-05-30 11:30:16 +0200
committerVolker Lendecke <vl@samba.org>2009-05-30 11:30:16 +0200
commit34c2172ae83d30f2d4e20baab8e3d3676179110f (patch)
treee6522f37b3779fc3e9ee13cf69eaf8a93b9c00ec /source3
parent29d25d5ebfc5b0c76d066685de5cd12e8ebb6cda (diff)
downloadsamba-34c2172ae83d30f2d4e20baab8e3d3676179110f.tar.gz
samba-34c2172ae83d30f2d4e20baab8e3d3676179110f.tar.bz2
samba-34c2172ae83d30f2d4e20baab8e3d3676179110f.zip
Simplify the dropbox patch
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/filename.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index bcd8560ad9..059dca29c8 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -513,8 +513,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
@@ -524,12 +530,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;
}
/*