]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: another case where a utimes() failure could make scp send
authordjm@openbsd.org <djm@openbsd.org>
Wed, 6 May 2020 20:57:38 +0000 (20:57 +0000)
committerDarren Tucker <dtucker@dtucker.net>
Thu, 7 May 2020 05:39:00 +0000 (15:39 +1000)
a desynchronising error; reminded by Aymeric Vincent ok deraadt markus

OpenBSD-Commit-ID: 2ea611d34d8ff6d703a7a8bf858aa5dbfbfa7381

scp.c

diff --git a/scp.c b/scp.c
index 439025980493c1a99d46c726c2632b2bbee662b8..b4492a06206ac8c9ac90fe7031923b3254bc87a0 100644 (file)
--- a/scp.c
+++ b/scp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scp.c,v 1.209 2020/05/01 06:31:42 djm Exp $ */
+/* $OpenBSD: scp.c,v 1.210 2020/05/06 20:57:38 djm Exp $ */
 /*
  * scp - secure remote copy.  This is basically patched BSD rcp which
  * uses ssh to do the data transfer (instead of using rcmd).
@@ -1427,9 +1427,7 @@ sink(int argc, char **argv, const char *src)
                        sink(1, vect, src);
                        if (setimes) {
                                setimes = 0;
-                               if (utimes(vect[0], tv) == -1)
-                                       run_err("%s: set times: %s",
-                                           vect[0], strerror(errno));
+                               (void) utimes(vect[0], tv);
                        }
                        if (mod_flag)
                                (void) chmod(vect[0], mode);