summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/socket/unix/unix_vfs2.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-08-17 18:45:37 +0000
committergVisor bot <gvisor-bot@google.com>2020-08-17 18:45:37 +0000
commit13546575552159b4bc62b8f7416a7b7173726c30 (patch)
tree9ab9901388038c44484a62120e74619f70e8177c /pkg/sentry/socket/unix/unix_vfs2.go
parentde4b89b80376e178a223bb0c91ff935066ba506b (diff)
parent3bd066d5032c297e501f5c71be301ffa2fe9ed34 (diff)
Merge release-20200810.0-39-g3bd066d50 (automated)
Diffstat (limited to 'pkg/sentry/socket/unix/unix_vfs2.go')
-rw-r--r--pkg/sentry/socket/unix/unix_vfs2.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/sentry/socket/unix/unix_vfs2.go b/pkg/sentry/socket/unix/unix_vfs2.go
index dfa25241a..d066ef8ab 100644
--- a/pkg/sentry/socket/unix/unix_vfs2.go
+++ b/pkg/sentry/socket/unix/unix_vfs2.go
@@ -183,10 +183,14 @@ func (s *SocketVFS2) Bind(t *kernel.Task, sockaddr []byte) *syserr.Error {
if t.IsNetworkNamespaced() {
return syserr.ErrInvalidEndpointState
}
- if err := t.AbstractSockets().Bind(t, p[1:], bep, s); err != nil {
+ asn := t.AbstractSockets()
+ name := p[1:]
+ if err := asn.Bind(t, name, bep, s); err != nil {
// syserr.ErrPortInUse corresponds to EADDRINUSE.
return syserr.ErrPortInUse
}
+ s.abstractName = name
+ s.abstractNamespace = asn
} else {
path := fspath.Parse(p)
root := t.FSContext().RootDirectoryVFS2()