summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-02-17 16:47:47 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-02-17 16:47:47 +0000
commit6dc75f594d4e10cb2102562a944d5873dea28f7e (patch)
tree4a4e6b65360ace79f83b93deab60acf08418a450
parent63015fdb0b6267774cbed10517048c63df587d09 (diff)
downloadopenssh-git-6dc75f594d4e10cb2102562a944d5873dea28f7e.tar.gz
- (bal) Patch for fix FCHMOD reference in ftp-client.c by Tim Rice
<tim@multitalents.net>
-rw-r--r--ChangeLog6
-rw-r--r--sftp-client.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c4d0fb5f..f84d6772 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+20010218
+ - (bal) Patch for fix FCHMOD reference in ftp-client.c by Tim Rice
+ <tim@multitalents.net>
+
20010217
- (bal) OpenBSD Sync:
- markus@cvs.openbsd.org 2001/02/16 13:38:18
@@ -4004,4 +4008,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1
-$Id: ChangeLog,v 1.782 2001/02/16 16:02:14 mouring Exp $
+$Id: ChangeLog,v 1.783 2001/02/17 16:47:47 mouring Exp $
diff --git a/sftp-client.c b/sftp-client.c
index 760a224e..7c234ce2 100644
--- a/sftp-client.c
+++ b/sftp-client.c
@@ -662,7 +662,11 @@ do_download(int fd_in, int fd_out, char *remote_path, char *local_path,
status = do_close(fd_in, fd_out, handle, handle_len);
/* Override umask and utimes if asked */
+#ifdef HAVE_FCHMOD
if (pflag && fchmod(local_fd, mode) == -1)
+#else
+ if (pflag && chmod(local_path, mode) == -1)
+#endif /* HAVE_FCHMOD */
error("Couldn't set mode on \"%s\": %s", local_path,
strerror(errno));
if (pflag && (a->flags & SSH2_FILEXFER_ATTR_ACMODTIME)) {