Signed-off-by: John Howard <jhoward@microsoft.com>
John Howard authored on 2016/11/09 04:05:56... | ... |
@@ -301,6 +301,7 @@ func (clnt *client) AddProcess(ctx context.Context, containerID, processFriendly |
301 | 301 |
// Configure the environment for the process |
302 | 302 |
createProcessParms.Environment = setupEnvironmentVariables(procToAdd.Env) |
303 | 303 |
createProcessParms.CommandLine = strings.Join(procToAdd.Args, " ") |
304 |
+ createProcessParms.User = procToAdd.User.Username |
|
304 | 305 |
|
305 | 306 |
logrus.Debugf("libcontainerd: commandLine: %s", createProcessParms.CommandLine) |
306 | 307 |
|
... | ... |
@@ -81,6 +81,7 @@ func (ctr *container) start(attachStdio StdioCallback) error { |
81 | 81 |
// Configure the environment for the process |
82 | 82 |
createProcessParms.Environment = setupEnvironmentVariables(ctr.ociSpec.Process.Env) |
83 | 83 |
createProcessParms.CommandLine = strings.Join(ctr.ociSpec.Process.Args, " ") |
84 |
+ createProcessParms.User = ctr.ociSpec.Process.User.Username |
|
84 | 85 |
|
85 | 86 |
// Start the command running in the container. |
86 | 87 |
newProcess, err := ctr.hcsContainer.CreateProcess(createProcessParms) |