diff options
author | Tim Potter <tpot@samba.org> | 2004-03-07 00:34:49 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2004-03-07 00:34:49 +0000 |
commit | a843787637292e115cc1bd66475e6d4d686f9bc0 (patch) | |
tree | 697f050941afb05896ebb75f08543f5bbbbc42f4 | |
parent | 2a3c286cdc620ecdc34ecee4e8a3d185a5ed3f61 (diff) | |
download | samba-a843787637292e115cc1bd66475e6d4d686f9bc0.tar.gz samba-a843787637292e115cc1bd66475e6d4d686f9bc0.tar.bz2 samba-a843787637292e115cc1bd66475e6d4d686f9bc0.zip |
Enclose use of fchown() with guards. Bugzilla #1155.
(This used to be commit 92f6895dd11189ce966b8b5a3f9ace54f478a375)
-rw-r--r-- | source3/smbd/vfs-wrap.c | 4 |
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; /* |