Mike Long <mike.long@analog.com> writes:
> The reason you see garbage when you run 'netstat | cat -v' is that
> (as of now) the null is stuffed into the wrong location in sun_path.
No. It's because kernel just copies sockaddr_un to another mbuf with
given length to bind system call. Whether terminating null byte is
included or not is up to userland program.
Now (in 4.4BSD?) the internal copy of sockaddr_un is visible to other
userland programs via getsockname/getpeername, then each member of it
should be well defined, isn't it?
So, if stand by the site that they should includes it, then my patches
in PR may applied. if stands by the side that they may or may not
includes it (current behaviour), then comment for sun_len in un.h and
netstat should be fixed.
# And anyway fix unix(4) needed?
enami.