From 931f962a261924b926bf24754cc2251b5d660433 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 16 Oct 2009 17:20:40 -0700 Subject: [PATCH] Last 2 VFS_STAT -> LSTAT fixes I can see in the modules code. Jeremy. (cherry picked from commit 90a291f9581150d8a00fbb5e784f0b034f563d04) --- source3/modules/vfs_afsacl.c | 9 ++++++++- source3/modules/vfs_hpuxacl.c | 7 ++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/source3/modules/vfs_afsacl.c b/source3/modules/vfs_afsacl.c index 1c310c71859..4666be2aa31 100644 --- a/source3/modules/vfs_afsacl.c +++ b/source3/modules/vfs_afsacl.c @@ -659,8 +659,15 @@ static size_t afs_to_nt_acl(struct afs_acl *afs_acl, uint32 security_info, struct security_descriptor **ppdesc) { + int ret; + /* Get the stat struct for the owner info. */ - if(SMB_VFS_STAT(conn, smb_fname) != 0) { + if (lp_posix_pathnames()) { + ret = SMB_VFS_LSTAT(conn, smb_fname); + } else { + ret = SMB_VFS_STAT(conn, smb_fname); + } + if (ret == -1) { return 0; } diff --git a/source3/modules/vfs_hpuxacl.c b/source3/modules/vfs_hpuxacl.c index df70f1ea08c..5a54f79da36 100644 --- a/source3/modules/vfs_hpuxacl.c +++ b/source3/modules/vfs_hpuxacl.c @@ -255,7 +255,12 @@ int hpuxacl_sys_acl_set_file(vfs_handle_struct *handle, * that has _not_ been specified in "type" from the file first * and concatenate it with the acl provided. */ - if (SMB_VFS_STAT(handle->conn, smb_fname) != 0) { + if (lp_posix_pathnames()) { + ret = SMB_VFS_LSTAT(handle->conn, smb_fname); + } else { + ret = SMB_VFS_STAT(handle->conn, smb_fname); + } + if (ret != 0) { DEBUG(10, ("Error in stat call: %s\n", strerror(errno))); goto done; } -- 2.11.4.GIT