summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--defines.h10
-rw-r--r--ssh-keyscan.c6
3 files changed, 17 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 4aa9e1d38..c04479d7b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
120031123 120031123
2 - (djm) [canohost.c] Move IPv4inV6 mapped address normalisation to its own 2 - (djm) [canohost.c] Move IPv4inV6 mapped address normalisation to its own
3 function and call it unconditionally 3 function and call it unconditionally
4 - (djm) OpenBSD CVS Sync
5 - djm@cvs.openbsd.org 2003/11/23 23:17:34
6 [ssh-keyscan.c]
7 from portable - use sysconf to detect fd limit; ok markus@
8 (tidy diff by adding SSH_SSFDMAX macro to defines.h)
4 9
520031122 1020031122
6 - (dtucker) [channels.c] Make AIX write limit code clearer. Suggested by djm@ 11 - (dtucker) [channels.c] Make AIX write limit code clearer. Suggested by djm@
@@ -1514,4 +1519,4 @@
1514 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. 1519 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
1515 Report from murple@murple.net, diagnosis from dtucker@zip.com.au 1520 Report from murple@murple.net, diagnosis from dtucker@zip.com.au
1516 1521
1517$Id: ChangeLog,v 1.3126 2003/11/24 01:57:25 djm Exp $ 1522$Id: ChangeLog,v 1.3127 2003/11/24 02:07:45 djm Exp $
diff --git a/defines.h b/defines.h
index adf45d7fa..6d197c769 100644
--- a/defines.h
+++ b/defines.h
@@ -25,7 +25,7 @@
25#ifndef _DEFINES_H 25#ifndef _DEFINES_H
26#define _DEFINES_H 26#define _DEFINES_H
27 27
28/* $Id: defines.h,v 1.104 2003/11/21 12:48:55 djm Exp $ */ 28/* $Id: defines.h,v 1.105 2003/11/24 02:07:46 djm Exp $ */
29 29
30 30
31/* Constants */ 31/* Constants */
@@ -529,6 +529,14 @@ struct winsize {
529# define krb5_get_err_text(context,code) error_message(code) 529# define krb5_get_err_text(context,code) error_message(code)
530#endif 530#endif
531 531
532/* Maximum number of file descriptors available */
533#ifdef HAVE_SYSCONF
534# define SSH_SYSFDMAX sysconf(_SC_OPEN_MAX)
535#else
536# define SSH_SYSFDMAX 10000
537#endif
538
539
532/* 540/*
533 * Define this to use pipes instead of socketpairs for communicating with the 541 * Define this to use pipes instead of socketpairs for communicating with the
534 * client program. Socketpairs do not seem to work on all systems. 542 * client program. Socketpairs do not seem to work on all systems.
diff --git a/ssh-keyscan.c b/ssh-keyscan.c
index 9506ec196..04d43da35 100644
--- a/ssh-keyscan.c
+++ b/ssh-keyscan.c
@@ -214,13 +214,11 @@ fdlim_get(int hard)
214 if (getrlimit(RLIMIT_NOFILE, &rlfd) < 0) 214 if (getrlimit(RLIMIT_NOFILE, &rlfd) < 0)
215 return (-1); 215 return (-1);
216 if ((hard ? rlfd.rlim_max : rlfd.rlim_cur) == RLIM_INFINITY) 216 if ((hard ? rlfd.rlim_max : rlfd.rlim_cur) == RLIM_INFINITY)
217 return 10000; 217 return SSH_SYSFDMAX;
218 else 218 else
219 return hard ? rlfd.rlim_max : rlfd.rlim_cur; 219 return hard ? rlfd.rlim_max : rlfd.rlim_cur;
220#elif defined (HAVE_SYSCONF)
221 return sysconf (_SC_OPEN_MAX);
222#else 220#else
223 return 10000; 221 return SSH_SYSFDMAX;
224#endif 222#endif
225} 223}
226 224