diff options
author | Damien Miller <djm@mindrot.org> | 2014-07-18 15:04:47 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2014-07-18 15:04:47 +1000 |
commit | ab2ec586baad122ed169285c31927ccf58bc7b28 (patch) | |
tree | 0d03482f06594db9e4669928641332b30a8cf9fe | |
parent | 357610d15946381ae90c271837dcdd0cdce7145f (diff) |
- djm@cvs.openbsd.org 2014/07/18 02:46:01
[ssh-agent.c]
restore umask around listener socket creation (dropped in streamlocal patch
merge)
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ssh-agent.c | 5 |
2 files changed, 8 insertions, 1 deletions
@@ -33,6 +33,10 @@ | |||
33 | reflect stdio-forward ("ssh -W host:port ...") failures in exit status. | 33 | reflect stdio-forward ("ssh -W host:port ...") failures in exit status. |
34 | previously we were always returning 0. bz#2255 reported by Brendan | 34 | previously we were always returning 0. bz#2255 reported by Brendan |
35 | Germain; ok dtucker | 35 | Germain; ok dtucker |
36 | - djm@cvs.openbsd.org 2014/07/18 02:46:01 | ||
37 | [ssh-agent.c] | ||
38 | restore umask around listener socket creation (dropped in streamlocal patch | ||
39 | merge) | ||
36 | 40 | ||
37 | 20140717 | 41 | 20140717 |
38 | - (djm) [digest-openssl.c] Preserve array order when disabling digests. | 42 | - (djm) [digest-openssl.c] Preserve array order when disabling digests. |
diff --git a/ssh-agent.c b/ssh-agent.c index 26c1bd37e..e20a64ecf 100644 --- a/ssh-agent.c +++ b/ssh-agent.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-agent.c,v 1.188 2014/07/15 15:54:14 millert Exp $ */ | 1 | /* $OpenBSD: ssh-agent.c,v 1.189 2014/07/18 02:46:01 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -1047,6 +1047,7 @@ main(int ac, char **av) | |||
1047 | char pidstrbuf[1 + 3 * sizeof pid]; | 1047 | char pidstrbuf[1 + 3 * sizeof pid]; |
1048 | struct timeval *tvp = NULL; | 1048 | struct timeval *tvp = NULL; |
1049 | size_t len; | 1049 | size_t len; |
1050 | mode_t prev_mask; | ||
1050 | 1051 | ||
1051 | /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */ | 1052 | /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */ |
1052 | sanitise_stdfd(); | 1053 | sanitise_stdfd(); |
@@ -1159,12 +1160,14 @@ main(int ac, char **av) | |||
1159 | * Create socket early so it will exist before command gets run from | 1160 | * Create socket early so it will exist before command gets run from |
1160 | * the parent. | 1161 | * the parent. |
1161 | */ | 1162 | */ |
1163 | prev_mask = umask(0177); | ||
1162 | sock = unix_listener(socket_name, SSH_LISTEN_BACKLOG, 0); | 1164 | sock = unix_listener(socket_name, SSH_LISTEN_BACKLOG, 0); |
1163 | if (sock < 0) { | 1165 | if (sock < 0) { |
1164 | /* XXX - unix_listener() calls error() not perror() */ | 1166 | /* XXX - unix_listener() calls error() not perror() */ |
1165 | *socket_name = '\0'; /* Don't unlink any existing file */ | 1167 | *socket_name = '\0'; /* Don't unlink any existing file */ |
1166 | cleanup_exit(1); | 1168 | cleanup_exit(1); |
1167 | } | 1169 | } |
1170 | umask(prev_mask); | ||
1168 | 1171 | ||
1169 | /* | 1172 | /* |
1170 | * Fork, and have the parent execute the command, if any, or present | 1173 | * Fork, and have the parent execute the command, if any, or present |