summaryrefslogtreecommitdiff
path: root/sshconnect.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshconnect.c')
-rw-r--r--sshconnect.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sshconnect.c b/sshconnect.c
index 21eff6c6b..7c47ebe94 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -243,7 +243,11 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr,
243 243
244 /* Create a socket for connecting. */ 244 /* Create a socket for connecting. */
245 sock = ssh_create_socket(original_real_uid, 245 sock = ssh_create_socket(original_real_uid,
246#ifdef HAVE_CYGWIN
247 !anonymous && port < IPPORT_RESERVED,
248#else
246 !anonymous && geteuid() == 0 && port < IPPORT_RESERVED, 249 !anonymous && geteuid() == 0 && port < IPPORT_RESERVED,
250#endif
247 ai->ai_family); 251 ai->ai_family);
248 if (sock < 0) 252 if (sock < 0)
249 continue; 253 continue;