fix astro's syscall redefiniton so files use it

This commit is contained in:
2026-02-21 14:12:05 -06:00
parent d026cfbb03
commit dd2437d4af
9 changed files with 29 additions and 29 deletions

View File

@@ -9,7 +9,7 @@ local currentUid = syscall.getuid()
local targetUid
if targetName then
targetUid = syscall.auth_getuid(targetName)
targetUid = syscall.getuid(targetName)
if not targetUid then
print("passwd: user '" .. targetName .. "' does not exist")
syscall.exit(1); return
@@ -36,7 +36,7 @@ if currentUid ~= 0 then
if #cur > 0 then cur=cur:sub(1,-2); syscall.write(1,"\b \b") end
else cur=cur..ch; syscall.write(1,"*") end
end
local ok, err = syscall.auth_elevate(targetName, cur)
local ok, err = syscall.elevate(targetName, cur)
if not ok then
sleep(1)
print("passwd: authentication failure")
@@ -71,7 +71,7 @@ if pw1 ~= pw2 then
syscall.exit(1); return
end
local ok, err = syscall.auth_setpassword(targetUid, pw1)
local ok, err = syscall.setpassword(targetUid, pw1)
if not ok then
print("passwd: " .. tostring(err))
syscall.exit(1); return