summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Ambach <ambi@samba.org>2012-10-30 13:43:59 +0100
committerAndrew Bartlett <abartlet@samba.org>2013-02-04 12:19:30 +0100
commitb4be8d5073c0476f1220569f7151f267a5c39635 (patch)
treeb1e5c9147174536c26f173e32376899a7b07d7ad
parent7cd91ca0c4acdb8ae1e5d5319d9d934d74ff4c74 (diff)
downloadsamba-b4be8d5073c0476f1220569f7151f267a5c39635.tar.gz
samba-b4be8d5073c0476f1220569f7151f267a5c39635.tar.bz2
samba-b4be8d5073c0476f1220569f7151f267a5c39635.zip
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 <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r--source3/modules/non_posix_acls.c12
1 files changed, 8 insertions, 4 deletions
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;