From 81f4829d1195276d037f8bd23a2ef69e88f5ae6c Mon Sep 17 00:00:00 2001 From: Rahat Mahmood Date: Wed, 20 Mar 2019 14:30:00 -0700 Subject: Record sockets created during accept(2) for all families. Track new sockets created during accept(2) in the socket table for all families. Previously we were only doing this for unix domain sockets. PiperOrigin-RevId: 239475550 Change-Id: I16f009f24a06245bfd1d72ffd2175200f837c6ac --- pkg/sentry/socket/epsocket/epsocket.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pkg/sentry/socket/epsocket/epsocket.go') diff --git a/pkg/sentry/socket/epsocket/epsocket.go b/pkg/sentry/socket/epsocket/epsocket.go index 468e65373..e74bd1bdd 100644 --- a/pkg/sentry/socket/epsocket/epsocket.go +++ b/pkg/sentry/socket/epsocket/epsocket.go @@ -504,6 +504,8 @@ func (s *SocketOperations) Accept(t *kernel.Task, peerRequested bool, flags int, } fd, e := t.FDMap().NewFDFrom(0, ns, fdFlags, t.ThreadGroup().Limits()) + t.Kernel().RecordSocket(ns, s.family) + return fd, addr, addrLen, syserr.FromError(e) } -- cgit v1.2.3