Skip to content

Commit 7087e02

Browse files
refactor
1 parent 886a4b8 commit 7087e02

File tree

5 files changed

+1
-24
lines changed

5 files changed

+1
-24
lines changed

boundary.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,6 @@ func (b *Boundary) ConfigureAfterCommandExecution(processPID int) error {
8282
return b.jailer.ConfigureAfterCommandExecution(processPID)
8383
}
8484

85-
func (b *Boundary) GetNetworkConfiguration() jail.NetworkConfiguration {
86-
return b.jailer.GetNetworkConfiguration()
87-
}
88-
8985
func (b *Boundary) Close() error {
9086
// Stop proxy server
9187
if b.proxyServer != nil {

jail/jail.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ type Jailer interface {
1212
Command(command []string) *exec.Cmd
1313
ConfigureAfterCommandExecution(processPID int) error
1414
Close() error
15-
GetNetworkConfiguration() NetworkConfiguration
16-
}
17-
18-
type NetworkConfiguration struct {
19-
VethJailName string
2015
}
2116

2217
type Config struct {

jail/linux.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func (l *LinuxJail) ConfigureBeforeCommandExecution() error {
6262
return nil
6363
}
6464

65-
// Command returns an exec.Cmd configured to run within the network namespace
65+
// Command returns an exec.Cmd configured to run within the network namespace.
6666
func (l *LinuxJail) Command(command []string) *exec.Cmd {
6767
l.logger.Debug("Creating command with namespace", "namespace", l.namespace)
6868

@@ -99,12 +99,6 @@ func (l *LinuxJail) ConfigureAfterCommandExecution(pidInt int) error {
9999
return nil
100100
}
101101

102-
func (l *LinuxJail) GetNetworkConfiguration() NetworkConfiguration {
103-
return NetworkConfiguration{
104-
VethJailName: l.vethJailName,
105-
}
106-
}
107-
108102
// Close removes the network namespace and iptables rules
109103
func (l *LinuxJail) Close() error {
110104
l.logger.Debug("Close called")

jail/macos.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,3 @@ func (n *MacOSJail) cleanupTempFiles() {
348348
func (u *MacOSJail) ConfigureAfterCommandExecution(processPID int) error {
349349
return nil
350350
}
351-
352-
func (l *MacOSJail) GetNetworkConfiguration() NetworkConfiguration {
353-
return NetworkConfiguration{}
354-
}

jail/unprivileged.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,3 @@ func (u *Unprivileged) Close() error {
6464
func (u *Unprivileged) ConfigureAfterCommandExecution(processPID int) error {
6565
return nil
6666
}
67-
68-
func (l *Unprivileged) GetNetworkConfiguration() NetworkConfiguration {
69-
return NetworkConfiguration{}
70-
}

0 commit comments

Comments
 (0)