The branch, v3-2-test has been updated
       via  d891d0563974ba7d91752b8b15712eb79cf4e387 (commit)
       via  736bdf15d934028b579a02dc411aed6c14a437f3 (commit)
       via  06304f3c5f538c75bfc63c7abc1457d2b4dc0f0b (commit)
      from  39d7dab19ad7aa97ef8691cd3704ab976510aa78 (commit)

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


- Log -----------------------------------------------------------------
commit d891d0563974ba7d91752b8b15712eb79cf4e387
Merge: 736bdf15d934028b579a02dc411aed6c14a437f3 
39d7dab19ad7aa97ef8691cd3704ab976510aa78
Author: Jeremy Allison <[EMAIL PROTECTED]>
Date:   Tue Aug 12 14:10:52 2008 -0700

    Merge branch 'v3-2-test' of ssh://[EMAIL PROTECTED]/data/git/samba into 
v3-2-test

commit 736bdf15d934028b579a02dc411aed6c14a437f3
Author: Michael Adam <[EMAIL PROTECTED]>
Date:   Tue Aug 12 14:59:59 2008 +0200

    Fix unix_convert() for "*" after changing map_nt_error_from_unix().
    
    map_nt_error_from_unix() now assumes that it is called in
    an error path and returns an error even for a given errno == 0.
    The original behaviour of unix_convert() used the mapping
    of errno == 0 ==> NT_STATUS_OK to return success through
    an error path.
    
    I think this must have been an oversight, and unix_convert() worked
    only by coincidence (or because explicitly using the knowledge
    of the conceptually wrong working of map_nt_error_from_unix().
    
    This patch puts this straight by not interpreting errno == 0
    as an error condition and proceeding in that case.
    
    Jeremy - please check!
    
    Michael

commit 06304f3c5f538c75bfc63c7abc1457d2b4dc0f0b
Author: Michael Adam <[EMAIL PROTECTED]>
Date:   Tue Aug 12 15:19:17 2008 +0200

    Make sure to always set errno on error path in OpenDir (and hence 
scan_directory).
    
    Michael

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

Summary of changes:
 source/smbd/dir.c      |    1 +
 source/smbd/filename.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/smbd/dir.c b/source/smbd/dir.c
index 6e02401..604db98 100644
--- a/source/smbd/dir.c
+++ b/source/smbd/dir.c
@@ -1152,6 +1152,7 @@ struct smb_Dir *OpenDir(TALLOC_CTX *mem_ctx, 
connection_struct *conn,
 
        dirp->dir_path = talloc_strdup(dirp, name);
        if (!dirp->dir_path) {
+               errno = ENOMEM;
                goto fail;
        }
 
diff --git a/source/smbd/filename.c b/source/smbd/filename.c
index 4323e84..41a0b92 100644
--- a/source/smbd/filename.c
+++ b/source/smbd/filename.c
@@ -477,7 +477,7 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
                                }
 
                                /* ENOENT is the only valid error here. */
-                               if (errno != ENOENT) {
+                               if ((errno != 0) && (errno != ENOENT)) {
                                        /*
                                         * ENOTDIR and ELOOP both map to
                                         * NT_STATUS_OBJECT_PATH_NOT_FOUND


-- 
Samba Shared Repository

Reply via email to