Skip to content

Commit

Permalink
Include uid/gid handling in child process
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentin Lux committed Apr 18, 2016
1 parent e814689 commit 62a0deb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions config/pbsserver.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"ssh_exec" : "/usr/bin/ssh",
"scp_exec" : "/usr/bin/scp",
"username" : "user",
"uid" : "10000",
"gid" : "10000"
"serverName" : "pbsserver",
"secretAccessKey" : "/home/user/.ssh/id_rsa",
"local_shell" : "/bin/sh",
Expand Down
6 changes: 4 additions & 2 deletions pbsjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function spawnProcess(spawnCmd, spawnType, spawnDirection, pbs_config){
break;
case "local":
spawnExec = spawnCmd.shift();
spawnOpts.shell = pbs_config.local_shell;
spawnOpts.shell = "su " + pbs_config.username + " -s " + pbs_config.local_shell;
break;
}
break;
Expand All @@ -67,6 +67,7 @@ function spawnProcess(spawnCmd, spawnType, spawnDirection, pbs_config){
// Special case if we can use a shared file system
if (pbs_config.useSharedDir){
spawnExec = pbs_config.local_copy;
spawnOpts.shell = "su " + pbs_config.username + " -s " + pbs_config.local_shell;
}else{
switch (pbs_config.method){
// Build the scp command
Expand All @@ -88,7 +89,8 @@ function spawnProcess(spawnCmd, spawnType, spawnDirection, pbs_config){
break;
case "local":
spawnExec = pbs_config.local_copy;
break;
spawnOpts.shell = "su " + pbs_config.username + " -s " + pbs_config.local_shell;
break;
}
}
break;
Expand Down

0 comments on commit 62a0deb

Please sign in to comment.