From: Jeremy Allison Date: Tue, 15 Mar 2016 18:46:58 +0000 (-0700) Subject: s3: vfs: vfs_afsacl. refuse_symlink() means we can always use STAT here. X-Git-Tag: tdb-1.3.9~131 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=feb297ca73c03907cf1f379a97a4707ad034e7c3;p=thirdparty%2Fsamba.git s3: vfs: vfs_afsacl. refuse_symlink() means we can always use STAT here. 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 Reviewed-by: Uri Simchoni --- diff --git a/source3/modules/vfs_afsacl.c b/source3/modules/vfs_afsacl.c index feca54fc80f..5838fd01c2f 100644 --- a/source3/modules/vfs_afsacl.c +++ b/source3/modules/vfs_afsacl.c @@ -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; }