Using realloc to remove MAX_LISTEN_SOCKS limit on sshd.c

Dan Armstrong dan at aoindustries.com
Sat Dec 20 09:25:46 EST 2008


OpenSSH developers,

I have removed the fixed, arbitrary limit on the number of ListenAddress 
allowed by using realloc to dynamically expand listen_socks as needed.  
This completely removes MAX_LISTEN_SOCKS from the source.  I made this 
change on the version of OpenSSH shipped with CentOS 5.2, version 
4.3p2.  Please see the attached .c file and .diff file.  Please add 
these changes to OpenSSH to save people from having to predetermine 
their workload before compilation.  It can also save some people some 
grief - I've been unable to login to a server because of this one.

sshd.c.orig is the original file bundled in the CentOS source RPM

sshd.c is the new version

sshd.c.diff is the difference between then: diff sshd.c.orig sshd.c


Thank you,

-- 
Dan Armstrong
AO Industries, Inc.
dan at aoindustries.com
Work: (251) 607-9556
Cell: (205) 454-2556

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sshd.c
Type: text/x-csrc
Size: 56316 bytes
Desc: not available
Url : http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20081219/51d6495b/attachment-0002.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sshd.c.diff
Type: text/x-patch
Size: 925 bytes
Desc: not available
Url : http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20081219/51d6495b/attachment-0003.bin 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sshd.c.orig
Url: http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20081219/51d6495b/attachment-0001.ksh 


More information about the openssh-unix-dev mailing list