From 2b5b5bed41320f1890c69c714c7596e1a7a1b964 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 25 Feb 2009 14:50:43 -0800 Subject: [PATCH] Use fsp->posix_open in preference if we have it. Jeremy. --- source/modules/vfs_acl_tdb.c | 10 +++++----- source/modules/vfs_acl_xattr.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/source/modules/vfs_acl_tdb.c b/source/modules/vfs_acl_tdb.c index 08c782d6b7b..49a316a1824 100644 --- a/source/modules/vfs_acl_tdb.c +++ b/source/modules/vfs_acl_tdb.c @@ -191,7 +191,7 @@ static NTSTATUS get_acl_blob(TALLOC_CTX *ctx, if (fsp && fsp->fh->fd != -1) { ret = SMB_VFS_FSTAT(fsp, &sbuf); } else { - if (lp_posix_pathnames()) { + if (fsp->posix_open) { ret = SMB_VFS_LSTAT(handle->conn, name, &sbuf); } else { ret = SMB_VFS_STAT(handle->conn, name, &sbuf); @@ -282,7 +282,7 @@ static NTSTATUS store_acl_blob_fsp(vfs_handle_struct *handle, if (fsp->fh->fd != -1) { ret = SMB_VFS_FSTAT(fsp, &sbuf); } else { - if (lp_posix_pathnames()) { + if (fsp->posix_open) { ret = SMB_VFS_LSTAT(handle->conn, fsp->fsp_name, &sbuf); } else { ret = SMB_VFS_STAT(handle->conn, fsp->fsp_name, &sbuf); @@ -508,7 +508,7 @@ static NTSTATUS inherit_new_acl(vfs_handle_struct *handle, if (fsp && !fsp->is_directory && fsp->fh->fd != -1) { ret = SMB_VFS_FSTAT(fsp, &sbuf); } else { - if (lp_posix_pathnames()) { + if (fsp->posix_open) { ret = SMB_VFS_LSTAT(handle->conn,fname, &sbuf); } else { ret = SMB_VFS_STAT(handle->conn,fname, &sbuf); @@ -758,7 +758,7 @@ static NTSTATUS fset_nt_acl_tdb(vfs_handle_struct *handle, files_struct *fsp, return NT_STATUS_OK; } if (fsp->is_directory || fsp->fh->fd == -1) { - if (lp_posix_pathnames()) { + if (fsp->posix_open) { ret = SMB_VFS_LSTAT(fsp->conn,fsp->fsp_name, &sbuf); } else { ret = SMB_VFS_STAT(fsp->conn,fsp->fsp_name, &sbuf); @@ -888,7 +888,7 @@ static int sys_acl_set_fd_tdb(vfs_handle_struct *handle, SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, return -1); if (fsp->is_directory || fsp->fh->fd == -1) { - if (lp_posix_pathnames()) { + if (fsp->posix_open) { ret = SMB_VFS_LSTAT(fsp->conn,fsp->fsp_name, &sbuf); } else { ret = SMB_VFS_STAT(fsp->conn,fsp->fsp_name, &sbuf); diff --git a/source/modules/vfs_acl_xattr.c b/source/modules/vfs_acl_xattr.c index d2faf8e3ed5..b12422fe836 100644 --- a/source/modules/vfs_acl_xattr.c +++ b/source/modules/vfs_acl_xattr.c @@ -384,7 +384,7 @@ static NTSTATUS inherit_new_acl(vfs_handle_struct *handle, if (fsp && !fsp->is_directory && fsp->fh->fd != -1) { ret = SMB_VFS_FSTAT(fsp, &sbuf); } else { - if (lp_posix_pathnames()) { + if (fsp->posix_open) { ret = SMB_VFS_LSTAT(handle->conn,fname, &sbuf); } else { ret = SMB_VFS_STAT(handle->conn,fname, &sbuf); @@ -566,7 +566,7 @@ static NTSTATUS fset_nt_acl_xattr(vfs_handle_struct *handle, files_struct *fsp, return NT_STATUS_OK; } if (fsp->is_directory || fsp->fh->fd == -1) { - if (lp_posix_pathnames()) { + if (fsp->posix_open) { ret = SMB_VFS_LSTAT(fsp->conn,fsp->fsp_name, &sbuf); } else { ret = SMB_VFS_STAT(fsp->conn,fsp->fsp_name, &sbuf); -- 2.11.4.GIT