The branch, v4-4-test has been updated
       via  1b6b200 s3: VFS: vfs_streams_xattr.c: Make streams_xattr_open() 
store the same path as streams_xattr_recheck().
       via  f65f081 smbd: Fix "map acl inherit" = yes
       via  bb453f5 s3: vfs: dirsort doesn't handle opendir of "." correctly.
      from  946a4de vfs_fruit: checks wrong AAPL config state and so always 
uses readdirattr

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-4-test


- Log -----------------------------------------------------------------
commit 1b6b200ee72744783c08326c597ee73017b3f531
Author: Jeremy Allison <[email protected]>
Date:   Wed Feb 1 11:36:25 2017 -0800

    s3: VFS: vfs_streams_xattr.c: Make streams_xattr_open() store the same path 
as streams_xattr_recheck().
    
    If the open is changing directories, fsp->fsp_name->base_name
    will be the full path from the share root, whilst
    smb_fname will be relative to the $cwd.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12546
    
    Signed-off-by: Jeremy Allison <[email protected]>
    Reviewed-by: Ralph Böhme <[email protected]>
    
    Autobuild-User(master): Jeremy Allison <[email protected]>
    Autobuild-Date(master): Thu Feb  2 01:55:42 CET 2017 on sn-devel-144
    
    (cherry picked from commit a24ba3e4083200ec9885363efc5769f43183fb6b)
    
    Autobuild-User(v4-4-test): Karolin Seeger <[email protected]>
    Autobuild-Date(v4-4-test): Tue Feb  7 13:05:34 CET 2017 on sn-devel-144

commit f65f08118c98f2475a5b54ceb01ab4cb2f468715
Author: Volker Lendecke <[email protected]>
Date:   Wed Feb 1 14:41:43 2017 +0000

    smbd: Fix "map acl inherit" = yes
    
    Brown-Paper-Bag bug in f85c2a6852a. The assignment contains a self-reference
    in get_pai_flags which I missed.
    
    Fix an uninitialized read.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=12551
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Stefan Metzmacher <[email protected]>
    
    Autobuild-User(master): Volker Lendecke <[email protected]>
    Autobuild-Date(master): Wed Feb  1 22:06:50 CET 2017 on sn-devel-144
    
    (cherry picked from commit 129bc58eee4b1868b1aaec6194808752520517b4)

commit bb453f5b558de3a9d601005ba002c766672859c6
Author: Jeremy Allison <[email protected]>
Date:   Fri Jan 27 09:09:56 2017 -0800

    s3: vfs: dirsort doesn't handle opendir of "." correctly.
    
    Needs to store $cwd path for correct sorting.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12499
    
    Back-port from commit e2f34116ab6328e2b872999dc7c4bcda69c03ab2.
    
    Signed-off-by: Jeremy Allison <[email protected]>
    Reviewed-by: Uri Simchoni <[email protected]>

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

Summary of changes:
 source3/modules/vfs_dirsort.c       | 4 ++++
 source3/modules/vfs_streams_xattr.c | 9 ++++++++-
 source3/smbd/posix_acls.c           | 4 ++--
 3 files changed, 14 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_dirsort.c b/source3/modules/vfs_dirsort.c
index d164088..0e923e6 100644
--- a/source3/modules/vfs_dirsort.c
+++ b/source3/modules/vfs_dirsort.c
@@ -137,6 +137,10 @@ static DIR *dirsort_opendir(vfs_handle_struct *handle,
                return NULL;
        }
 
+       if (ISDOT(data->smb_fname->base_name)) {
+               data->smb_fname->base_name = vfs_GetWd(data, handle->conn);
+       }
+
        /* Open the underlying directory and count the number of entries */
        data->source_directory = SMB_VFS_NEXT_OPENDIR(handle, fname, mask,
                                                      attr);
diff --git a/source3/modules/vfs_streams_xattr.c 
b/source3/modules/vfs_streams_xattr.c
index b54809f..2f77525 100644
--- a/source3/modules/vfs_streams_xattr.c
+++ b/source3/modules/vfs_streams_xattr.c
@@ -521,8 +521,15 @@ static int streams_xattr_open(vfs_handle_struct *handle,
 
         sio->xattr_name = talloc_strdup(VFS_MEMCTX_FSP_EXTENSION(handle, fsp),
                                        xattr_name);
+       /*
+        * so->base needs to be a copy of fsp->fsp_name->base_name,
+        * making it identical to streams_xattr_recheck(). If the
+        * open is changing directories, fsp->fsp_name->base_name
+        * will be the full path from the share root, whilst
+        * smb_fname will be relative to the $cwd.
+        */
         sio->base = talloc_strdup(VFS_MEMCTX_FSP_EXTENSION(handle, fsp),
-                                 smb_fname->base_name);
+                                 fsp->fsp_name->base_name);
        sio->fsp_name_ptr = fsp->fsp_name;
        sio->handle = handle;
        sio->fsp = fsp;
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index d87253d..e2a10cf 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -2700,9 +2700,9 @@ static canon_ace *canonicalise_acl(struct 
connection_struct *conn,
                        .attr = ALLOW_ACE,
                        .trustee = sid,
                        .unix_ug = unix_ug,
-                       .owner_type = owner_type,
-                       .ace_flags = get_pai_flags(pal, ace, is_default_acl)
+                       .owner_type = owner_type
                };
+               ace->ace_flags = get_pai_flags(pal, ace, is_default_acl);
 
                DLIST_ADD(l_head, ace);
        }


-- 
Samba Shared Repository

Reply via email to