Documentation
¶
Overview ¶
Package ipc provides communication between parent and child processes that setup Drop sandbox. The communication is via a Unix domain socket.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewParentChildSocket ¶
Types ¶
type ChildArgs ¶
ChildArgs contains arguments needed by both parent and child that the parent constructs and sends to the child.
Note for future extensions: unexported fields or interface types if included within ChildArgs chierarchy will not be encoded and sent (encoding/gob limitation).
type ChildEnd ¶
type ChildEnd struct {
// Public, so parent process can pass it to the executed child as
// ExtraFiles
Socket *os.File
}
func NewChildEnd ¶
func (*ChildEnd) RecvChildArgs ¶
RecvChildArgs receives arguments sent by the parent process to the child. The function blocks until the arguments are available.
type ParentEnd ¶
type ParentEnd struct {
// contains filtered or unexported fields
}
func NewParentEnd ¶
func (*ParentEnd) RecvPty ¶
RecvPty receives a parent descriptor of a sandboxed pseudoterminal and wraps it into os.File
func (*ParentEnd) SendChildArgs ¶
SendChildArgs serializes and sends to the child all the necessary arguments and configuration options obtained by the parent from command line and from config files.
Parent sends the arguments after all the necessary setup needed by the child is finished (network setup is done), so the child can assume that after the arguments are received, a sandboxed process can be launched.