Skip to content
This repository has been archived by the owner on Feb 27, 2020. It is now read-only.

Commit

Permalink
Fix corner case with user == current user
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasfj committed Sep 7, 2017
1 parent 8f1c75f commit 4533853
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engines/native/system/process_posix.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func StartProcess(options ProcessOptions) (*Process, error) {
// accounts unable to execute process.
// If the passed owner matches the current user, we set owner to
// nil to allow non-root accounts to succeed.
if currentUser.uid == options.Owner.uid {
if currentUser.uid == options.Owner.uid && len(options.Groups) == 0 {
options.Owner = nil
}
}
Expand Down

0 comments on commit 4533853

Please sign in to comment.