diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ssh-agent.c | 8 |
2 files changed, 4 insertions, 9 deletions
@@ -1,3 +1,6 @@ | |||
1 | 20040911 | ||
2 | - (djm) [ssh-agent.c] unifdef some cygwin code; ok dtucker@ | ||
3 | |||
1 | 20040830 | 4 | 20040830 |
2 | - (dtucker) [session.c openbsd-compat/bsd-cygwin_util.{c,h}] Bug #915: only | 5 | - (dtucker) [session.c openbsd-compat/bsd-cygwin_util.{c,h}] Bug #915: only |
3 | copy required environment variables on Cygwin. Patch from vinschen at | 6 | copy required environment variables on Cygwin. Patch from vinschen at |
@@ -1716,4 +1719,4 @@ | |||
1716 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM | 1719 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM |
1717 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu | 1720 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu |
1718 | 1721 | ||
1719 | $Id: ChangeLog,v 1.3539 2004/08/30 11:33:02 dtucker Exp $ | 1722 | $Id: ChangeLog,v 1.3540 2004/09/11 05:18:05 djm Exp $ |
diff --git a/ssh-agent.c b/ssh-agent.c index bc4d8d33a..7bc4c240e 100644 --- a/ssh-agent.c +++ b/ssh-agent.c | |||
@@ -1010,9 +1010,7 @@ main(int ac, char **av) | |||
1010 | #ifdef HAVE_SETRLIMIT | 1010 | #ifdef HAVE_SETRLIMIT |
1011 | struct rlimit rlim; | 1011 | struct rlimit rlim; |
1012 | #endif | 1012 | #endif |
1013 | #ifdef HAVE_CYGWIN | ||
1014 | int prev_mask; | 1013 | int prev_mask; |
1015 | #endif | ||
1016 | extern int optind; | 1014 | extern int optind; |
1017 | extern char *optarg; | 1015 | extern char *optarg; |
1018 | pid_t pid; | 1016 | pid_t pid; |
@@ -1129,19 +1127,13 @@ main(int ac, char **av) | |||
1129 | memset(&sunaddr, 0, sizeof(sunaddr)); | 1127 | memset(&sunaddr, 0, sizeof(sunaddr)); |
1130 | sunaddr.sun_family = AF_UNIX; | 1128 | sunaddr.sun_family = AF_UNIX; |
1131 | strlcpy(sunaddr.sun_path, socket_name, sizeof(sunaddr.sun_path)); | 1129 | strlcpy(sunaddr.sun_path, socket_name, sizeof(sunaddr.sun_path)); |
1132 | #ifdef HAVE_CYGWIN | ||
1133 | prev_mask = umask(0177); | 1130 | prev_mask = umask(0177); |
1134 | #endif | ||
1135 | if (bind(sock, (struct sockaddr *) & sunaddr, sizeof(sunaddr)) < 0) { | 1131 | if (bind(sock, (struct sockaddr *) & sunaddr, sizeof(sunaddr)) < 0) { |
1136 | perror("bind"); | 1132 | perror("bind"); |
1137 | #ifdef HAVE_CYGWIN | ||
1138 | umask(prev_mask); | 1133 | umask(prev_mask); |
1139 | #endif | ||
1140 | cleanup_exit(1); | 1134 | cleanup_exit(1); |
1141 | } | 1135 | } |
1142 | #ifdef HAVE_CYGWIN | ||
1143 | umask(prev_mask); | 1136 | umask(prev_mask); |
1144 | #endif | ||
1145 | if (listen(sock, SSH_LISTEN_BACKLOG) < 0) { | 1137 | if (listen(sock, SSH_LISTEN_BACKLOG) < 0) { |
1146 | perror("listen"); | 1138 | perror("listen"); |
1147 | cleanup_exit(1); | 1139 | cleanup_exit(1); |