diff options
author | des <des@FreeBSD.org> | 2002-06-27 22:31:32 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2002-06-27 22:31:32 +0000 |
commit | bb02848f18878bddada7a9f55b110116f63c2f3c (patch) | |
tree | d93e4bc5fc0a9a5e99878bd93a4d51c873c1a43e /crypto/openssh/sftp-client.c | |
parent | 610201f50fdb0594e9885594b69e4ee69c71dd08 (diff) | |
download | FreeBSD-src-bb02848f18878bddada7a9f55b110116f63c2f3c.zip FreeBSD-src-bb02848f18878bddada7a9f55b110116f63c2f3c.tar.gz |
Vendor import of OpenSSH 3.3p1.
Diffstat (limited to 'crypto/openssh/sftp-client.c')
-rw-r--r-- | crypto/openssh/sftp-client.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/openssh/sftp-client.c b/crypto/openssh/sftp-client.c index fb3d166..779ef2f 100644 --- a/crypto/openssh/sftp-client.c +++ b/crypto/openssh/sftp-client.c @@ -30,7 +30,7 @@ #include "includes.h" RCSID("$OpenBSD: sftp-client.c,v 1.32 2002/06/09 13:32:01 markus Exp $"); -#include <sys/queue.h> +#include "openbsd-compat/fake-queue.h" #include "buffer.h" #include "bufaux.h" @@ -929,7 +929,11 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path, status = do_close(conn, 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)) { |