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
This commit is contained in:
parent
59d531553f
commit
955854cafc
6
scp.c
6
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
|
* scp - secure remote copy. This is basically patched BSD rcp which
|
||||||
* uses ssh to do the data transfer (instead of using rcmd).
|
* 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);
|
sink(1, vect, src);
|
||||||
if (setimes) {
|
if (setimes) {
|
||||||
setimes = 0;
|
setimes = 0;
|
||||||
if (utimes(vect[0], tv) == -1)
|
(void) utimes(vect[0], tv);
|
||||||
run_err("%s: set times: %s",
|
|
||||||
vect[0], strerror(errno));
|
|
||||||
}
|
}
|
||||||
if (mod_flag)
|
if (mod_flag)
|
||||||
(void) chmod(vect[0], mode);
|
(void) chmod(vect[0], mode);
|
||||||
|
|
Loading…
Reference in New Issue