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:
parent
2a3c286cdc
commit
a843787637
@ -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;
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user