Hello Tim,
> My personal preference is in line with Dr. Waldeck's. It would be
> nice if the default was to listen only on localhost.
Fine!
> > + bind(Server, sockaddr_in($port, $binary))
>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> However, I think you might want to check the return value of this bind()
> call, just in case the localhost port is already taken.
Sorry, copy and WASTE!
I checked the patch and decided to avoid code duplication.
--- autopsy 2007-01-24 09:44:26.000000000 +0100
+++ autopsy_patched 2007-01-24 09:44:12.000000000 +0100
@@ -334,7 +334,12 @@
setsockopt(Server, SOL_SOCKET, SO_KEEPALIVE, 1)
or die "Error setting network socket options (keep alive): $!";
-bind(Server, sockaddr_in($port, INADDR_ANY))
+my $bindaddr = INADDR_ANY;
+
+if ($rema eq "localhost") {
+ $bindaddr = inet_aton('127.0.0.1');
+}
+bind(Server, sockaddr_in($port, $bindaddr))
or die "Error binding to port $port (is Autopsy already running?): $!";
listen(Server, SOMAXCONN)
Thanks
Dr. Markus Waldeck
--
"Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ...
Jetzt GMX ProMail testen: http://www.gmx.net/de/go/promail
|