mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-12-23 18:32:26 +00:00
- (djm) OpenBSD CVS Sync
- djm@cvs.openbsd.org 2003/11/23 23:17:34 [ssh-keyscan.c] from portable - use sysconf to detect fd limit; ok markus@ (tidy diff by adding SSH_SSFDMAX macro to defines.h)
This commit is contained in:
parent
927f52783e
commit
e00074a726
@ -1,6 +1,11 @@
|
||||
20031123
|
||||
- (djm) [canohost.c] Move IPv4inV6 mapped address normalisation to its own
|
||||
function and call it unconditionally
|
||||
- (djm) OpenBSD CVS Sync
|
||||
- djm@cvs.openbsd.org 2003/11/23 23:17:34
|
||||
[ssh-keyscan.c]
|
||||
from portable - use sysconf to detect fd limit; ok markus@
|
||||
(tidy diff by adding SSH_SSFDMAX macro to defines.h)
|
||||
|
||||
20031122
|
||||
- (dtucker) [channels.c] Make AIX write limit code clearer. Suggested by djm@
|
||||
@ -1514,4 +1519,4 @@
|
||||
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
|
||||
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
|
||||
|
||||
$Id: ChangeLog,v 1.3126 2003/11/24 01:57:25 djm Exp $
|
||||
$Id: ChangeLog,v 1.3127 2003/11/24 02:07:45 djm Exp $
|
||||
|
10
defines.h
10
defines.h
@ -25,7 +25,7 @@
|
||||
#ifndef _DEFINES_H
|
||||
#define _DEFINES_H
|
||||
|
||||
/* $Id: defines.h,v 1.104 2003/11/21 12:48:55 djm Exp $ */
|
||||
/* $Id: defines.h,v 1.105 2003/11/24 02:07:46 djm Exp $ */
|
||||
|
||||
|
||||
/* Constants */
|
||||
@ -529,6 +529,14 @@ struct winsize {
|
||||
# define krb5_get_err_text(context,code) error_message(code)
|
||||
#endif
|
||||
|
||||
/* Maximum number of file descriptors available */
|
||||
#ifdef HAVE_SYSCONF
|
||||
# define SSH_SYSFDMAX sysconf(_SC_OPEN_MAX)
|
||||
#else
|
||||
# define SSH_SYSFDMAX 10000
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Define this to use pipes instead of socketpairs for communicating with the
|
||||
* client program. Socketpairs do not seem to work on all systems.
|
||||
|
@ -214,13 +214,11 @@ fdlim_get(int hard)
|
||||
if (getrlimit(RLIMIT_NOFILE, &rlfd) < 0)
|
||||
return (-1);
|
||||
if ((hard ? rlfd.rlim_max : rlfd.rlim_cur) == RLIM_INFINITY)
|
||||
return 10000;
|
||||
return SSH_SYSFDMAX;
|
||||
else
|
||||
return hard ? rlfd.rlim_max : rlfd.rlim_cur;
|
||||
#elif defined (HAVE_SYSCONF)
|
||||
return sysconf (_SC_OPEN_MAX);
|
||||
#else
|
||||
return 10000;
|
||||
return SSH_SYSFDMAX;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user