1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-08 04:58:40 +03:00

Enclose use of fchown() with guards. Bugzilla #1155.

(This used to be commit 92f6895dd11189ce966b8b5a3f9ace54f478a375)
This commit is contained in:
Tim Potter 2004-03-07 00:34:49 +00:00
parent 2a3c286cdc
commit a843787637

View File

@ -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;
/*