summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2014-06-27 17:03:28 -0700
committerAndreas Schneider <asn@cryptomilk.org>2014-07-08 07:49:37 +0200
commitc6baacd7f0b798692dba2af9a02fe9de67bb73f8 (patch)
tree115477cf2787c4d46c9ca39f70385a6c8358b271
parentfdc9a322b1e346fe95dc59749f3c77d6ff27d7de (diff)
downloadsamba-c6baacd7f0b798692dba2af9a02fe9de67bb73f8.tar.gz
samba-c6baacd7f0b798692dba2af9a02fe9de67bb73f8.tar.xz
samba-c6baacd7f0b798692dba2af9a02fe9de67bb73f8.zip
s3: VFS modules: Ignore EPERM errors on [f]chmod in crossrename module.
This is already done for [f]chown errors. Fix from CurlyMo <curlymoo1@gmail.com> Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
-rw-r--r--source3/modules/vfs_crossrename.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/modules/vfs_crossrename.c b/source3/modules/vfs_crossrename.c
index 9bb42b9958..c7534b4319 100644
--- a/source3/modules/vfs_crossrename.c
+++ b/source3/modules/vfs_crossrename.c
@@ -106,9 +106,11 @@ static int copy_reg(const char *source, const char *dest)
*/
#if defined(HAVE_FCHMOD)
- if (fchmod (ofd, source_stats.st_ex_mode & 07777))
+ if ((fchmod (ofd, source_stats.st_ex_mode & 07777) == -1) &&
+ (errno != EPERM))
#else
- if (chmod (dest, source_stats.st_ex_mode & 07777))
+ if ((chmod (dest, source_stats.st_ex_mode & 07777) == -1) &&
+ (errno != EPERM))
#endif
goto err;