summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-03-24 10:31:14 -0700
committerJeremy Allison <jra@samba.org>2010-03-24 10:33:09 -0700
commitc5f67891528698e3848c7fc464bf1755c56b4477 (patch)
tree5b90b001a23439e71234a0a2faf9f65241aada99 /source3
parentbb47e5b6172ae28f996b132e8b612c752c873adb (diff)
downloadsamba-c5f67891528698e3848c7fc464bf1755c56b4477.tar.gz
samba-c5f67891528698e3848c7fc464bf1755c56b4477.tar.bz2
samba-c5f67891528698e3848c7fc464bf1755c56b4477.zip
Fix valgrind warning when source and dest stat are identical.
Jeremy.
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/posix_acls.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index c9fdc714c7..e47a260050 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -2702,7 +2702,9 @@ static bool set_canon_ace_list(files_struct *fsp,
mode_t mask_perms = 0;
/* Use the psbuf that was passed in. */
- fsp->fsp_name->st = *psbuf;
+ if (psbuf != &fsp->fsp_name->st) {
+ fsp->fsp_name->st = *psbuf;
+ }
#if defined(POSIX_ACL_NEEDS_MASK)
/* HP-UX always wants to have a mask (called "class" there). */