summaryrefslogtreecommitdiff
path: root/sftp-server.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-02-13 02:40:56 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-02-13 02:40:56 +0000
commit34bb0c7431d4e41e506eb51cc4a39251110d3f49 (patch)
tree9985fdb7dadc045ce376a687fe577eeea317cb16 /sftp-server.c
parent6c92dab9a1ab05426b42d7cc5dca2a9c5af52f1d (diff)
- (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 346411e79..0291da206 100644
--- a/sftp-server.c
+++ b/sftp-server.c
@@ -609,7 +609,11 @@ process_fsetstat(void)
609 status = errno_to_portable(errno); 609 status = errno_to_portable(errno);
610 } 610 }
611 if (a->flags & SSH2_FILEXFER_ATTR_UIDGID) { 611 if (a->flags & SSH2_FILEXFER_ATTR_UIDGID) {
612#ifdef HAVE_FCHOWN
612 ret = fchown(fd, a->uid, a->gid); 613 ret = fchown(fd, a->uid, a->gid);
614#else
615 ret = chown(name, a->uid, a->gid);
616#endif
613 if (ret == -1) 617 if (ret == -1)
614 status = errno_to_portable(errno); 618 status = errno_to_portable(errno);
615 } 619 }