fix: fix SYS_GETUSER missing in syscall switch, use getuser in shell username print
This commit is contained in:
1 parent
58a144fc1a
commit
6e471c2eb4
2 files changed
+15
-8
No files matched your search
@@ -17,14 +17,15 @@ char session_home[64] = "";
|
||||
// ---- Session info (read once at startup) ----
|
||||
|
||||
void read_session() {
|
||||
auto doc = montauk::config::load("session");
|
||||
const char* name = doc.get_string("session.username", "");
|
||||
if (name[0]) {
|
||||
scopy(session_user, name, sizeof(session_user));
|
||||
scopy(session_home, "0:/users/", sizeof(session_home));
|
||||
scat(session_home, session_user, sizeof(session_home));
|
||||
}
|
||||
doc.destroy();
|
||||
// TODO Why is getuser treated as not defined in VSCode intellisense?
|
||||
|
||||
montauk::getuser(
|
||||
(char *)&session_user, // Buffer
|
||||
32 // Buffer max size
|
||||
);
|
||||
|
||||
scopy(session_home, "0:/users/", sizeof(session_home));
|
||||
scat(session_home, session_user, sizeof(session_home));
|
||||
}
|
||||
|
||||
// ---- Command history ----
|
||||
|
||||
Reference in new issue
Block a user