fixed elevate VULN

This commit is contained in:
Astronand committed 2026-03-11 08:52:41 -04:00
1 parent b08b14763a
commit bbda3b3937
5 files changed
+30 -22

No files matched your search

+2 -2
View File
@@ -9,7 +9,7 @@ local currentUid = syscall.getuid()
local targetUid
if targetName then
targetUid = syscall.getuid(targetName)
targetUid = syscall.getuid()
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.elevate(targetName, cur)
local ok, err = syscall.login(targetUid, cur)
if not ok then
sleep(1)
print("passwd: authentication failure")