Get rid of exec.cmd struct and setuid file

This commit is contained in:
Alex Dadgar
2015-11-04 17:20:52 -08:00
parent b0464a59e8
commit 8ed031c45e
5 changed files with 44 additions and 108 deletions

View File

@@ -70,7 +70,7 @@ type Executor interface {
// Command provides access the underlying Cmd struct in case the Executor
// interface doesn't expose the functionality you need.
Command() *cmd
Command() *exec.Cmd
}
// Command is a mirror of exec.Command that returns a platform-specific Executor
@@ -100,17 +100,3 @@ func OpenId(id string) (Executor, error) {
}
return executor, nil
}
// Cmd is an extension of exec.Cmd that incorporates functionality for
// re-attaching to processes, dropping priviledges, etc., based on platform-
// specific implementations.
type cmd struct {
exec.Cmd
// Resources is used to limit CPU and RAM used by the process, by way of
// cgroups or a similar mechanism.
Resources structs.Resources
// RunAs may be a username or Uid. The implementation will decide how to use it.
RunAs string
}