diff options
author | Darren Tucker <dtucker@zip.com.au> | 2013-06-02 07:52:21 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2013-06-02 07:52:21 +1000 |
commit | 3750fce6ac6b287f62584ac55a4406df95c71b92 (patch) | |
tree | e40b1697b606d0ecb0aa4cdcc994825c7fc94627 | |
parent | b759c9c2efebe7b416ab81093ca8eb17836b6933 (diff) |
- dtucker@cvs.openbsd.org 2013/06/01 20:59:25
[scp.c sftp-client.c]
Replace S_IWRITE, which isn't standardized, with S_IWUSR, which is. Patch
from Nathan Osman via bz#2113. ok deraadt.
(note: corrected bug number from 2085)
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | scp.c | 4 | ||||
-rw-r--r-- | sftp-client.c | 4 |
3 files changed, 8 insertions, 4 deletions
@@ -44,6 +44,10 @@ | |||
44 | Use clock_gettime(CLOCK_MONOTONIC ...) for ssh timers so that things like | 44 | Use clock_gettime(CLOCK_MONOTONIC ...) for ssh timers so that things like |
45 | keepalives and rekeying will work properly over clock steps. Suggested by | 45 | keepalives and rekeying will work properly over clock steps. Suggested by |
46 | markus@, "looks good" djm@. | 46 | markus@, "looks good" djm@. |
47 | - dtucker@cvs.openbsd.org 2013/06/01 20:59:25 | ||
48 | [scp.c sftp-client.c] | ||
49 | Replace S_IWRITE, which isn't standardized, with S_IWUSR, which is. Patch | ||
50 | from Nathan Osman via bz#2085. ok deraadt. | ||
47 | 51 | ||
48 | 20130529 | 52 | 20130529 |
49 | - (dtucker) [configure.ac openbsd-compat/bsd-misc.h] bz#2087: Add a null | 53 | - (dtucker) [configure.ac openbsd-compat/bsd-misc.h] bz#2087: Add a null |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: scp.c,v 1.173 2013/05/17 00:13:14 djm Exp $ */ | 1 | /* $OpenBSD: scp.c,v 1.174 2013/06/01 20:59:25 dtucker 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). |
@@ -1066,7 +1066,7 @@ sink(int argc, char **argv) | |||
1066 | continue; | 1066 | continue; |
1067 | } | 1067 | } |
1068 | omode = mode; | 1068 | omode = mode; |
1069 | mode |= S_IWRITE; | 1069 | mode |= S_IWUSR; |
1070 | if ((ofd = open(np, O_WRONLY|O_CREAT, mode)) < 0) { | 1070 | if ((ofd = open(np, O_WRONLY|O_CREAT, mode)) < 0) { |
1071 | bad: run_err("%s: %s", np, strerror(errno)); | 1071 | bad: run_err("%s: %s", np, strerror(errno)); |
1072 | continue; | 1072 | continue; |
diff --git a/sftp-client.c b/sftp-client.c index 038e1c347..fc60dd80d 100644 --- a/sftp-client.c +++ b/sftp-client.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sftp-client.c,v 1.98 2013/05/17 00:13:14 djm Exp $ */ | 1 | /* $OpenBSD: sftp-client.c,v 1.99 2013/06/01 20:59:25 dtucker Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> | 3 | * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> |
4 | * | 4 | * |
@@ -1051,7 +1051,7 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path, | |||
1051 | } | 1051 | } |
1052 | 1052 | ||
1053 | local_fd = open(local_path, O_WRONLY | O_CREAT | O_TRUNC, | 1053 | local_fd = open(local_path, O_WRONLY | O_CREAT | O_TRUNC, |
1054 | mode | S_IWRITE); | 1054 | mode | S_IWUSR); |
1055 | if (local_fd == -1) { | 1055 | if (local_fd == -1) { |
1056 | error("Couldn't open local file \"%s\" for writing: %s", | 1056 | error("Couldn't open local file \"%s\" for writing: %s", |
1057 | local_path, strerror(errno)); | 1057 | local_path, strerror(errno)); |