diff --git a/ChangeLog b/ChangeLog index c4d0fb5f4..f84d67725 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +20010218 + - (bal) Patch for fix FCHMOD reference in ftp-client.c by Tim Rice + + 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 760a224e2..7c234ce2d 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)) {