/home/user owned by user, user starts in cwd /home/user
This commit is contained in:
1 parent
b015d5880a
commit
a6d2f6dca7
11 files changed
+199
-46
No files matched your search
@@ -96,6 +96,9 @@ local function spawnShell(username, uid, shell, homedir)
|
||||
end
|
||||
|
||||
local chdirOk, chdirErr = pcall(syscall.chdir, homedir)
|
||||
if not chdirOk then
|
||||
pcall(syscall.chdir, "/")
|
||||
end
|
||||
|
||||
local ok, err = pcall(syscall.execspawn, shell, username .. ":shell")
|
||||
if not ok then
|
||||
|
||||
Reference in new issue
Block a user