summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_hpuxacl.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2016-03-11 14:29:20 -0800
committerUri Simchoni <uri@samba.org>2016-03-15 08:29:30 +0100
commitf690c1cfc8a53bd8c9b3e7e8fc6122d09ed7aa36 (patch)
treed613f3a6e6276a930024c2ce197ef44110c29a73 /source3/modules/vfs_hpuxacl.c
parent7b431eba22444d2e0d872de781a8193dcfa6d252 (diff)
downloadsamba-f690c1cfc8a53bd8c9b3e7e8fc6122d09ed7aa36.tar.gz
s3: vfs: vfs_hpuxacl. 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 <jra@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
Diffstat (limited to 'source3/modules/vfs_hpuxacl.c')
-rw-r--r--source3/modules/vfs_hpuxacl.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/source3/modules/vfs_hpuxacl.c b/source3/modules/vfs_hpuxacl.c
index 1894146cc51..55a68946517 100644
--- a/source3/modules/vfs_hpuxacl.c
+++ b/source3/modules/vfs_hpuxacl.c
@@ -249,22 +249,24 @@ int hpuxacl_sys_acl_set_file(vfs_handle_struct *handle,
}
/*
- * if the file is a directory, there is extra work to do:
- * since the hpux acl call stores both the access acl and
- * the default acl as provided, we have to get the acl part
- * that has _not_ been specified in "type" from the file first
- * and concatenate it with the acl provided.
+ * 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.
*/
- if (lp_posix_pathnames()) {
- ret = SMB_VFS_LSTAT(handle->conn, smb_fname);
- } else {
- ret = SMB_VFS_STAT(handle->conn, smb_fname);
- }
+ ret = SMB_VFS_STAT(handle->conn, smb_fname);
if (ret != 0) {
DEBUG(10, ("Error in stat call: %s\n", strerror(errno)));
goto done;
}
if (S_ISDIR(smb_fname->st.st_ex_mode)) {
+ /*
+ * if the file is a directory, there is extra work to do:
+ * since the hpux acl call stores both the access acl and
+ * the default acl as provided, we have to get the acl part
+ * that has _not_ been specified in "type" from the file first
+ * and concatenate it with the acl provided.
+ */
HPUX_ACL_T other_acl;
int other_count;
SMB_ACL_TYPE_T other_type;