Skip to content

syscall: unnamed unix sockets on Linux report Name "@" in their address #7354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
remyoudompheng opened this issue Feb 19, 2014 · 8 comments
Closed

Comments

@remyoudompheng
Copy link
Contributor

What steps will reproduce the problem?
1. Run the code 
http://play.golang.org/p/GSJZRDJWpS

What is the expected output? What do you see instead?

The UnixAddr is "@" but one would expect an empty string.

Expected:
&net.UnixAddr{Name:"", Net:"unix"}

Got:
&net.UnixAddr{Name:"@", Net:"unix"}

Please use labels and text to provide additional information.
@mikioh
Copy link
Contributor

mikioh commented Feb 19, 2014

Comment 1:

changeset:   2435:8435e66a6b43
user:        Rob Pike <r@golang.org>
date:        Tue Jun 09 09:53:44 2009 -0700
https://code.google.com/p/go/source/browse/src/pkg/syscall/syscall_linux.go#355
No clues.

@remyoudompheng
Copy link
Contributor Author

Comment 2:

It's a common convention (e.g. in /proc/net/unix) to name "abstract" sockets with an
initial '@', but an unnamed socket does not look like an abstract-named socket so maybe
it should be:
if pp.Path[0] == 0 && pp.Path[1] == 0 {
    sa.Name = ""
}

@mikioh
Copy link
Contributor

mikioh commented Feb 19, 2014

Comment 3:

Feel free to send a CL if you can take care of both autobind and abstract namespace
features.

@remyoudompheng
Copy link
Contributor Author

Comment 4:

With https://golang.org/cl/69910043
autobind and abstract sockets keep their '@' but the unnamed sockets become "".

@rsc
Copy link
Contributor

rsc commented Mar 4, 2014

Comment 5:

Labels changed: added release-go1.3.

Status changed to Accepted.

@gopherbot
Copy link
Contributor

Comment 6:

CL https://golang.org/cl/69910043 references this issue.

@rsc
Copy link
Contributor

rsc commented Apr 22, 2014

Comment 7:

Labels changed: added release-none, removed release-go1.3.

@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@ysmolski
Copy link
Member

ysmolski commented Nov 1, 2018

According to the last comment from @rsc here https://codereview.appspot.com/69910043 and lack of attention I'm closing this bug.

@ysmolski ysmolski closed this as completed Nov 1, 2018
@golang golang locked and limited conversation to collaborators Nov 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants