bigass changes
- ls beginnings, - added groups to shellstate - made buffers optional in result factory functions, - made an enum signal map, - fixed a minor bug in path resolver that didnt output the '/' if the inode was at root (inode 0) from the moment it was called - added code that attaches the shell to the built-in IDE terminal -- tests need fixing, new code needs testing
This commit is contained in:
@@ -2,6 +2,12 @@ import { type HistoryState } from "./history_state";
|
||||
import { createShellState, type ShellState } from "./shell_state";
|
||||
import { createShellError, type LoginError, type UserNotFoundError } from "./util/errors";
|
||||
|
||||
export interface GroupInfo {
|
||||
readonly groupname: string;
|
||||
readonly gid: number;
|
||||
readonly members: number[];
|
||||
}
|
||||
|
||||
export interface UserInfo {
|
||||
readonly username: string;
|
||||
readonly uid: number;
|
||||
@@ -59,7 +65,7 @@ export function login(
|
||||
|
||||
const stack = [...state.sessionStack];
|
||||
stack.push(createInitialSessionState(user));
|
||||
return createShellState(state.filesystem, state.users, stack);
|
||||
return createShellState(state.filesystem, state.users, state.groups, stack);
|
||||
}
|
||||
|
||||
export function logout(state: ShellState): ShellState {
|
||||
@@ -67,7 +73,7 @@ export function logout(state: ShellState): ShellState {
|
||||
const stack = [...state.sessionStack];
|
||||
stack.pop();
|
||||
|
||||
return createShellState(state.filesystem, state.users, stack);
|
||||
return createShellState(state.filesystem, state.users, state.groups, stack);
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user