projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
005fd26
)
build: override sys.user.getpasswd and nixio.fs.access in sdk environment
author
Jo-Philipp Wich
<jow@openwrt.org>
Tue, 13 Mar 2012 23:18:13 +0000
(23:18 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Tue, 13 Mar 2012 23:18:13 +0000
(23:18 +0000)
build/setup.lua
patch
|
blob
|
history
diff --git
a/build/setup.lua
b/build/setup.lua
index 7888d23eca0b58bc46dffcba77d2dd1e7fa37364..f4ed76954817787878f139eb448bc4aec1391a11 100644
(file)
--- a/
build/setup.lua
+++ b/
build/setup.lua
@@
-18,6
+18,7
@@
uci_model.inst_state = uci_model.cursor_state()
-- allow any password in local sdk
local sys = require "luci.sys"
sys.user.checkpasswd = function() return true end
+sys.user.getpasswd = function() return "x" end
-- dummy sysinfo on Darwin
require "nixio"
@@
-37,3
+38,9
@@
if not nixio.sysinfo then
}
end
end
+
+-- override nixio.fs.access() to check sysroot first
+local _access = nixio.fs.access
+function nixio.fs.access(file)
+ return _access(SYSROOT .. "/" .. file) or _access(file)
+end