summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2004-03-07 00:50:37 +0000
committerTim Potter <tpot@samba.org>2004-03-07 00:50:37 +0000
commit5e412188e9b9f29f52c45ac276934f1a6be3b3a8 (patch)
tree77f2a3062b22c0ba8974e72fe9fcc69328bf62b9
parentbc8b6cd9ebac4ff34ecb20e10c5dc572ae38525b (diff)
downloadsamba-5e412188e9b9f29f52c45ac276934f1a6be3b3a8.tar.gz
samba-5e412188e9b9f29f52c45ac276934f1a6be3b3a8.tar.bz2
samba-5e412188e9b9f29f52c45ac276934f1a6be3b3a8.zip
Merge from HEAD.
(This used to be commit 89f3173f4f4e9a16f24b25f550065b50577f3f4c)
-rw-r--r--source3/smbd/vfs-wrap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/smbd/vfs-wrap.c b/source3/smbd/vfs-wrap.c
index 4f2d82734f..5393dfc755 100644
--- a/source3/smbd/vfs-wrap.c
+++ b/source3/smbd/vfs-wrap.c
@@ -359,7 +359,11 @@ static int copy_reg(const char *source, const char *dest)
* But root probably wants to know, e.g. if NFS disallows it.
*/
+#ifdef HAVE_FCHOWN
if ((fchown(ofd, source_stats.st_uid, source_stats.st_gid) == -1) && (errno != EPERM))
+#else
+ if ((chown(dest, source_stats.st_uid, source_stats.st_gid) == -1) && (errno != EPERM))
+#endif
goto err;
/*