aboutsummaryrefslogtreecommitdiff
path: root/ssh-agent-filter.C
diff options
context:
space:
mode:
Diffstat (limited to 'ssh-agent-filter.C')
-rw-r--r--ssh-agent-filter.C5
1 files changed, 4 insertions, 1 deletions
diff --git a/ssh-agent-filter.C b/ssh-agent-filter.C
index 61255a0..cadfd1d 100644
--- a/ssh-agent-filter.C
+++ b/ssh-agent-filter.C
@@ -88,6 +88,9 @@ using std::pair;
#ifndef SOCK_CLOEXEC
#define SOCK_CLOEXEC 0
#endif
+#ifndef SOCK_NONBLOCK
+#define SOCK_NONBLOCK 0
+#endif
vector<string> allowed_b64;
vector<string> allowed_md5;
@@ -172,7 +175,7 @@ int make_upstream_agent_conn () {
}
int make_listen_sock () {
- int const sock = make_cloexec_socket(AF_UNIX, SOCK_STREAM, 0);
+ int const sock = make_cloexec_socket(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0);
alter_fd_flags<F_SETFL, O_NONBLOCK, 0>(sock);