Make attach sockets directory an argument in Conmon

This is required to enable ongoing work in libpod

Signed-off-by: Matthew Heon <mheon@redhat.com>
This commit is contained in:
Matthew Heon 2017-10-23 11:35:38 -04:00
parent e95f75e8f2
commit ae5fc471ea
3 changed files with 12 additions and 3 deletions

View file

@ -67,7 +67,7 @@ func (ss streamService) Attach(containerID string, inputStream io.Reader, output
}
})
attachSocketPath := filepath.Join("/var/run/crio", c.ID(), "attach")
attachSocketPath := filepath.Join(oci.ContainerAttachSocketDir, c.ID(), "attach")
conn, err := net.DialUnix("unixpacket", nil, &net.UnixAddr{Name: attachSocketPath, Net: "unixpacket"})
if err != nil {
return fmt.Errorf("failed to connect to container %s attach socket: %v", c.ID(), err)