diff options
author | djm <djm> | 2008-12-09 03:11:49 +0000 |
---|---|---|
committer | djm <djm> | 2008-12-09 03:11:49 +0000 |
commit | 0990a1139a643ccb79ebbbddc32f160751f9403d (patch) | |
tree | 9990c45675075a828d8ca937f31ff54277c78237 | |
parent | b61a9578c3af19aa79f508445b5da32395056dbb (diff) | |
download | openssh-0990a1139a643ccb79ebbbddc32f160751f9403d.tar.gz |
- djm@cvs.openbsd.org 2008/12/09 02:39:59
[sftp.c]
Deal correctly with failures in remote stat() operation in sftp,
correcting fail-on-error behaviour in batchmode. bz#1541 report and
fix from anedvedicky AT gmail.com; ok markus@
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | sftp.c | 12 |
2 files changed, 13 insertions, 6 deletions
@@ -7,6 +7,11 @@ that requested it. Disable it on slave sessions until such time as it is fixed; bz#1543 report from Adrian Bridgett via Colin Watson ok markus@ + - djm@cvs.openbsd.org 2008/12/09 02:39:59 + [sftp.c] + Deal correctly with failures in remote stat() operation in sftp, + correcting fail-on-error behaviour in batchmode. bz#1541 report and + fix from anedvedicky AT gmail.com; ok markus@ 20081208 - (djm) [configure.ac] bz#1538: better test for ProPolice/SSP: actually @@ -4974,5 +4979,5 @@ OpenServer 6 and add osr5bigcrypt support so when someone migrates passwords between UnixWare and OpenServer they will still work. OK dtucker@ -$Id: ChangeLog,v 1.5152 2008/12/09 03:11:32 djm Exp $ +$Id: ChangeLog,v 1.5153 2008/12/09 03:11:49 djm Exp $ @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp.c,v 1.103 2008/07/13 22:16:03 djm Exp $ */ +/* $OpenBSD: sftp.c,v 1.104 2008/12/09 02:39:59 djm Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> * @@ -1386,17 +1386,19 @@ parse_dispatch_command(struct sftp_conn *conn, const char *cmd, char **pwd, remote_glob(conn, path1, GLOB_NOCHECK, NULL, &g); for (i = 0; g.gl_pathv[i] && !interrupted; i++) { if (!(aa = do_stat(conn, g.gl_pathv[i], 0))) { - if (err != 0 && err_abort) + if (err_abort) { + err = -1; break; - else + } else continue; } if (!(aa->flags & SSH2_FILEXFER_ATTR_UIDGID)) { error("Can't get current ownership of " "remote file \"%s\"", g.gl_pathv[i]); - if (err != 0 && err_abort) + if (err_abort) { + err = -1; break; - else + } else continue; } aa->flags &= SSH2_FILEXFER_ATTR_UIDGID; |