Avoid trying to set uid/gid on windows
This commit is contained in:
Родитель
a90bcb08c3
Коммит
bbba9f9f52
|
@ -50,7 +50,8 @@ module Puppet::Util::SUIDManager
|
|||
|
||||
# Runs block setting uid and gid if provided then restoring original ids
|
||||
def asuser(new_uid=nil, new_gid=nil)
|
||||
return yield unless root?
|
||||
return yield if Puppet.features.win32? or !root?
|
||||
|
||||
# We set both because some programs like to drop privs, i.e. bash.
|
||||
old_uid, old_gid = self.uid, self.gid
|
||||
old_euid, old_egid = self.euid, self.egid
|
||||
|
|
Загрузка…
Ссылка в новой задаче