Project

General

Profile

fakeroot is fully functional

Added by Igor Pashev almost 5 years ago

Both versions of fakeroot (tcp and sysv) work like a charm. For some reason faked wasn't even trying to bind on port 0 (default). This might be working on linux. but not on illumos/solaris. But binding on port 0 is perfectly legit:

--- fakeroot.git.orig/faked.c
+++ fakeroot.git/faked.c
@@ -1434,7 +1434,6 @@ int main(int argc, char **argv){
   if (setsockopt(sd, SOL_TCP, TCP_NODELAY, &val, sizeof (val)) < 0)
     fail("setsockopt(TCP_NODELAY)");

-  if (port > 0) {
     memset((char *) &addr, 0, sizeof (addr));
     addr.sin_family = AF_INET;
     addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
@@ -1442,7 +1441,6 @@ int main(int argc, char **argv){

     if (bind(sd, (struct sockaddr *) &addr, sizeof (addr)) < 0)
       fail("bind");
-  }

   if (listen(sd, SOMAXCONN) < 0)
     fail("listen");

Comments