The branch, v3-4-test has been updated
       via  0d32230c17dbfa5e790d2023ba655f109938ef28 (commit)
      from  78aecba62195822f3edb6134548657cf7ba9037c (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test


- Log -----------------------------------------------------------------
commit 0d32230c17dbfa5e790d2023ba655f109938ef28
Author: Jeremy Allison <[email protected]>
Date:   Sat May 30 11:30:16 2009 +0200

    Simplify the dropbox patch

-----------------------------------------------------------------------

Summary of changes:
 source3/smbd/filename.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index dcee5a7..e3acfc8 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;
                                }
 
                                /*


-- 
Samba Shared Repository

Reply via email to