[Freeipa-devel] [PATCH] check for LDAP ports during install

Rob Crittenden rcritten at redhat.com
Mon Oct 15 18:45:19 UTC 2007


Simo Sorce wrote:
> On Mon, 2007-10-15 at 13:27 -0400, Rob Crittenden wrote:
>> Simo Sorce wrote:
>>> On Mon, 2007-10-15 at 10:49 -0400, Rob Crittenden wrote:
>>>> Patch to verify that the LDAP ports are available when doing an 
>>>> installation. If they aren't the FDS installer will crash and burn.
>>> To properly check you should not try to connect to the ports, but
>>> instead try to bind the ports.
>>> Connect may fail because of firewall or maybe because a server is bound
>>> only to the public IP and not localhost, etc ...
>>> Trying to bind to the wildcard address will tell you exactly if binding
>>> is possible. Can you change the patch to try to bind instead of trying
>>> to connect?
>> Revised patch to use bind() instead of connect(). I added a test for 
>> both IPv4 and IPv6 ports though I don't currently have IPv6 enabled so I 
>> can't test this. It at least doesn't seem to affect the IPv4 test.
> 
> Looks good.
> Simo.
> 

Pushed. I included a shutdown(0) before the close() because otherwise 
this patch guaranteed that the FDS install would fail :-)

rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3245 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20071015/a5c63561/attachment.bin>


More information about the Freeipa-devel mailing list