summaryrefslogtreecommitdiff
path: root/sftp-server.c
diff options
context:
space:
mode:
authormouring <mouring>2001-02-13 02:40:56 +0000
committermouring <mouring>2001-02-13 02:40:56 +0000
commitc0f52f3866f1528ad27199b9a0e3b25687663aff (patch)
tree500f4ed24a2ef8f61fa72f7e604f5d38d803e9c7 /sftp-server.c
parent75182a6a05c879142d492004a04e79a278ba1e05 (diff)
downloadopenssh-c0f52f3866f1528ad27199b9a0e3b25687663aff.tar.gz
- (bal) Use chown() if fchown() does not exist in ftp-server.c patch by
Tim Rice <tim@multitalents.net>
Diffstat (limited to 'sftp-server.c')
-rw-r--r--sftp-server.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sftp-server.c b/sftp-server.c
index 346411e7..0291da20 100644
--- a/sftp-server.c
+++ b/sftp-server.c
@@ -609,7 +609,11 @@ process_fsetstat(void)
status = errno_to_portable(errno);
}
if (a->flags & SSH2_FILEXFER_ATTR_UIDGID) {
+#ifdef HAVE_FCHOWN
ret = fchown(fd, a->uid, a->gid);
+#else
+ ret = chown(name, a->uid, a->gid);
+#endif
if (ret == -1)
status = errno_to_portable(errno);
}