diff options
| author | TitanSnow <[email protected]> | 2017-05-23 07:59:21 +0800 |
|---|---|---|
| committer | TitanSnow <[email protected]> | 2017-05-23 07:59:21 +0800 |
| commit | 2cb7a91bf266680266de51636ce6620cbecc9362 (patch) | |
| tree | 3724fb8df0a97fa27b87b6bc8fdb57d0b470956c /xmake/core/base/privilege.lua | |
| parent | c78a2867af7dca124aecbd56ecf6e0490b2a78c9 (diff) | |
fix privilege
Diffstat (limited to 'xmake/core/base/privilege.lua')
| -rw-r--r-- | xmake/core/base/privilege.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/core/base/privilege.lua b/xmake/core/base/privilege.lua index 5c66ba5f1..275a7e7b5 100644 --- a/xmake/core/base/privilege.lua +++ b/xmake/core/base/privilege.lua @@ -48,12 +48,12 @@ function privilege.store() end -- set gid - if os.gid(owner.gid).setegid_errno ~= 0 then + if os.gid(owner.gid).errno ~= 0 then return false end -- set uid - if os.uid(owner.uid).seteuid_errno ~= 0 then + if os.uid({["ruid"] = owner.uid}).errno ~= 0 or os.uid({["euid"] = owner.uid}).errno ~= 0 then return false end @@ -76,12 +76,12 @@ function privilege.get() end -- set uid - if os.uid(0).seteuid_errno ~= 0 then + if os.uid({["euid"] = 0}).errno ~= 0 or os.uid({["ruid"] = 0}).errno ~= 0 then return false end -- set gid - if os.gid(0).setegid_errno ~= 0 then + if os.gid(0).errno ~= 0 then return false end |
