From b4be8d5073c0476f1220569f7151f267a5c39635 Mon Sep 17 00:00:00 2001 From: Christian Ambach Date: Tue, 30 Oct 2012 13:43:59 +0100 Subject: s3:modules/non_posix_acls: only stat if we do not have it cached most probably we already have the stat() information Signed-off-by: Christian Ambach Reviewed-by: Andrew Bartlett --- source3/modules/non_posix_acls.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'source3') diff --git a/source3/modules/non_posix_acls.c b/source3/modules/non_posix_acls.c index 245b5c8d21..6c1dfbf359 100644 --- a/source3/modules/non_posix_acls.c +++ b/source3/modules/non_posix_acls.c @@ -79,10 +79,14 @@ int non_posix_sys_acl_blob_get_fd_helper(vfs_handle_struct *handle, acl_wrapper.acl_as_blob = acl_as_blob; - ret = smb_vfs_call_fstat(handle, fsp, &sbuf); - if (ret == -1) { - TALLOC_FREE(frame); - return -1; + if (!VALID_STAT(fsp->fsp_name->st)) { + ret = smb_vfs_call_fstat(handle, fsp, &sbuf); + if (ret == -1) { + TALLOC_FREE(frame); + return -1; + } + } else { + sbuf = fsp->fsp_name->st; } acl_wrapper.owner = sbuf.st_ex_uid; -- cgit