]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: vfs: vfs_afsacl. refuse_symlink() means we can always use STAT here.
authorJeremy Allison <jra@samba.org>
Tue, 15 Mar 2016 18:46:58 +0000 (11:46 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 24 Mar 2016 21:57:16 +0000 (22:57 +0100)
For a posix acl call on a symlink, we've already refused it.
For a Windows acl mapped call on a symlink, we want to follow
it.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
source3/modules/vfs_afsacl.c

index feca54fc80f33525dbd27704f291eb24039d36f3..5838fd01c2f1a846d47e0c838630fd97cc7e7c6a 100644 (file)
@@ -666,12 +666,14 @@ static size_t afs_to_nt_acl(struct afs_acl *afs_acl,
 {
        int ret;
 
+       /*
+        * We can directly use SMB_VFS_STAT here, as if this was a
+        * POSIX call on a symlink, we've already refused it.
+        * For a Windows acl mapped call on a symlink, we want to follow
+        * it.
+        */
        /* Get the stat struct for the owner info. */
-       if (lp_posix_pathnames()) {
-               ret = SMB_VFS_LSTAT(conn, smb_fname);
-       } else {
-               ret = SMB_VFS_STAT(conn, smb_fname);
-       }
+       ret = SMB_VFS_STAT(conn, smb_fname);
        if (ret == -1) {
                return 0;
        }