Nmap Development mailing list archives

Re: ncat 6.40 solaris 10 util.c tweaks


From: Daniel Miller <bonsaiviking () gmail com>
Date: Tue, 03 Dec 2013 13:02:11 -0600

On 11/20/2013 02:54 PM, chris cobucci wrote:
developers:

a few findings you may or may not find useful.

solaris 10 sparc(earlier edition)
gcc 3.4.6
no crazy compile options

this applies to ncat 6.40 only

1. gmake worked for me -- make did not

2. also needed:
bash-3.00# diff nmap-6.40/ncat/test/test-addrset.sh /usr/local/source/nmap-6.40/ncat/test/test-addrset.sh.new
1c1
< #!/bin/sh
---
#!/bin/bash

3. finally, I was getting the EINVAL from bind like:

http://seclists.org/nmap-dev/2008/q3/174


I clearly don't understand this proto from man -s3socket bind:
int bind(int s, const struct sockaddr *name, int namelen)

however, this worked for me:

bash-3.00# diff nmap-6.40/ncat/util.c /usr/local/source/nmap-6.40/ncat/util.c.new
427c427
<     if (srcaddr_u->storage.ss_family == AF_UNIX)
---
     if (srcaddr_u->storage.ss_family == AF_UNIX)
434c434,442
<         sa_len = sizeof(*srcaddr_u);
---
         if (srcaddr_u->storage.ss_family == AF_INET6) {
           sa_len = sizeof(srcaddr_u->in6);
         }
         else if (srcaddr_u->storage.ss_family == AF_INET) {
           sa_len = sizeof(srcaddr_u->in);
         }
         else {
           sa_len = sizeof(*srcaddr_u);
         }
16 bytes length ipV4 and 32 bytes length ipV6


Chris




                                        
_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/

Chris,

Thanks for reporting this. I think I've addressed the bash issue by downgrading compatibility regarding arithmetic expansion. Apparently your system's shell is not POSIX compatible.

I have not looked at your changes to util.c, but I will try to take a look. Hopefully someone with a Solaris system available to test could help there, as well.

Dan
_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/


Current thread: