diff options
author | djm@openbsd.org <djm@openbsd.org> | 2020-05-06 20:57:38 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2020-05-07 15:39:00 +1000 |
commit | 955854cafca88e0cdcd3d09ca1ad4ada465364a1 (patch) | |
tree | 53872ea069780b8a09315186c079d66349f6099d /scp.c | |
parent | 59d531553fd90196946743da391f3a27cf472f4e (diff) |
upstream: another case where a utimes() failure could make scp send
a desynchronising error; reminded by Aymeric Vincent ok deraadt markus
OpenBSD-Commit-ID: 2ea611d34d8ff6d703a7a8bf858aa5dbfbfa7381
Diffstat (limited to 'scp.c')
-rw-r--r-- | scp.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: scp.c,v 1.209 2020/05/01 06:31:42 djm Exp $ */ | 1 | /* $OpenBSD: scp.c,v 1.210 2020/05/06 20:57:38 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * scp - secure remote copy. This is basically patched BSD rcp which | 3 | * scp - secure remote copy. This is basically patched BSD rcp which |
4 | * uses ssh to do the data transfer (instead of using rcmd). | 4 | * uses ssh to do the data transfer (instead of using rcmd). |
@@ -1427,9 +1427,7 @@ sink(int argc, char **argv, const char *src) | |||
1427 | sink(1, vect, src); | 1427 | sink(1, vect, src); |
1428 | if (setimes) { | 1428 | if (setimes) { |
1429 | setimes = 0; | 1429 | setimes = 0; |
1430 | if (utimes(vect[0], tv) == -1) | 1430 | (void) utimes(vect[0], tv); |
1431 | run_err("%s: set times: %s", | ||
1432 | vect[0], strerror(errno)); | ||
1433 | } | 1431 | } |
1434 | if (mod_flag) | 1432 | if (mod_flag) |
1435 | (void) chmod(vect[0], mode); | 1433 | (void) chmod(vect[0], mode); |