From 5e412188e9b9f29f52c45ac276934f1a6be3b3a8 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sun, 7 Mar 2004 00:50:37 +0000 Subject: Merge from HEAD. (This used to be commit 89f3173f4f4e9a16f24b25f550065b50577f3f4c) --- source3/smbd/vfs-wrap.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/smbd/vfs-wrap.c') 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; /* -- cgit