Skip to content

Commit 8adcd47

Browse files
committed
Change the gid before you change the uid, silly.
1 parent 84a1b2e commit 8adcd47

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

chef/lib/chef/mixin/command.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,15 +231,15 @@ def popen4(cmd, args={}, &b)
231231

232232
STDOUT.sync = STDERR.sync = true
233233

234-
if args[:user]
235-
Process.euid = args[:user]
236-
Process.uid = args[:user]
237-
end
238-
239234
if args[:group]
240235
Process.egid = args[:group]
241236
Process.gid = args[:group]
242237
end
238+
239+
if args[:user]
240+
Process.euid = args[:user]
241+
Process.uid = args[:user]
242+
end
243243

244244
if args[:environment]
245245
args[:environment].each do |key,value|

0 commit comments

Comments
 (0)