commit | 34bb0c7431d4e41e506eb51cc4a39251110d3f49 | [log] [tgz] |
---|---|---|
author | Ben Lindstrom <mouring@eviladmin.org> | Tue Feb 13 02:40:56 2001 +0000 |
committer | Ben Lindstrom <mouring@eviladmin.org> | Tue Feb 13 02:40:56 2001 +0000 |
tree | 9985fdb7dadc045ce376a687fe577eeea317cb16 | |
parent | 6c92dab9a1ab05426b42d7cc5dca2a9c5af52f1d [diff] [blame] |
- (bal) Use chown() if fchown() does not exist in ftp-server.c patch by Tim Rice <tim@multitalents.net>
diff --git a/sftp-server.c b/sftp-server.c index 346411e..0291da2 100644 --- a/sftp-server.c +++ b/sftp-server.c
@@ -609,7 +609,11 @@ 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); }