[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Tue Dec 17 21:54:02 UTC 2019


The branch, master has been updated
       via  fca2d3e0d1f s3: VFS: glusterfs: Reset nlinks for symlink entries during readdir
      from  2241ce8e86f mit-kdb: Fix license on header file

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit fca2d3e0d1fa5af59e7b729f7c1d126f7b81e149
Author: Anoop C S <anoopcs at redhat.com>
Date:   Tue Nov 12 19:58:43 2019 +0530

    s3: VFS: glusterfs: Reset nlinks for symlink entries during readdir
    
    On receiving an already initialized stat_ex buffer for readdir() call we
    invoke readdirplus() GlusterFS API, an optimized variant of readdir(),
    which then returns stat information along with dir entry result. But for
    symlink entries we don't know if link or target info is needed. In that
    case it is better to leave this decision back to caller by resetting
    nlinks value inside stat information to make it invalid.
    
    This was also preventing us from displaying msdfs link as directories
    inside the share.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14182
    
    Signed-off-by: Anoop C S <anoopcs at redhat.com>
    Reviewed-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Tue Dec 17 21:53:07 UTC 2019 on sn-devel-184

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

Summary of changes:
 source3/modules/vfs_glusterfs.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index 6c3995b7168..d7a1ec4d334 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -573,7 +573,10 @@ static struct dirent *vfs_gluster_readdir(struct vfs_handle_struct *handle,
 	}
 
 	if (sbuf != NULL) {
-		smb_stat_ex_from_stat(sbuf, &stat);
+		SET_STAT_INVALID(*sbuf);
+		if (!S_ISLNK(stat.st_mode)) {
+			smb_stat_ex_from_stat(sbuf, &stat);
+		}
 	}
 
 	END_PROFILE(syscall_readdir);


-- 
Samba Shared Repository



More information about the samba-cvs mailing list