feat: add inherited sessions and desktop session teardown

This commit is contained in:
daniel committed 2026-08-14 10:33:20 +02:00
1 parent f8ded3c30e
commit 0f81276efc
17 files changed
+165

No files matched your search

+8
View File
@@ -159,6 +159,14 @@ namespace montauk::abi {
return Sched::KillProcess(pid);
}
static int Sys_SetSession() {
return Sched::CreateSession();
}
static int Sys_KillSession(int sessionId) {
return Sched::KillSession(sessionId);
}
static int Sys_SetUser(int pid, const char* name) {
if (name == nullptr) return -1;
auto* target = Sched::GetProcessByPid(pid);
+4
View File
@@ -359,6 +359,10 @@ namespace montauk::abi {
return (int64_t)Sys_ProcList((ProcInfo*)frame->arg1, (int)frame->arg2);
case SYS_KILL:
return (int64_t)Sys_Kill((int)frame->arg1);
case SYS_SETSESSION:
return (int64_t)Sys_SetSession();
case SYS_KILLSESSION:
return (int64_t)Sys_KillSession((int)frame->arg1);
case SYS_DEVLIST:
if ((int64_t)frame->arg2 < 0) return -1;
if (!UserMemory::Range(frame->arg1, (uint64_t)frame->arg2 * sizeof(DevInfo), true)) return -1;
+2
View File
@@ -194,6 +194,8 @@ namespace montauk::abi {
/* Process.hpp */
static constexpr uint64_t SYS_SETUSER = 92;
static constexpr uint64_t SYS_GETUSER = 93;
static constexpr uint64_t SYS_SETSESSION = 174;
static constexpr uint64_t SYS_KILLSESSION = 175;
/* Filesystem.hpp */
static constexpr uint64_t SYS_FRENAME = 94;