|
|
@ -32,6 +32,9 @@ const systemCall = ( |
|
|
|
export const date = (...args: string[]) => |
|
|
|
export const date = (...args: string[]) => |
|
|
|
systemCall(SERVER_PATHS.usr.bin.date.self, args); |
|
|
|
systemCall(SERVER_PATHS.usr.bin.date.self, args); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export const getent = (...args: string[]) => |
|
|
|
|
|
|
|
systemCall(SERVER_PATHS.usr.bin.getent.self, args); |
|
|
|
|
|
|
|
|
|
|
|
export const mkfifo = (...args: string[]) => |
|
|
|
export const mkfifo = (...args: string[]) => |
|
|
|
systemCall(SERVER_PATHS.usr.bin.mkfifo.self, args); |
|
|
|
systemCall(SERVER_PATHS.usr.bin.mkfifo.self, args); |
|
|
|
|
|
|
|
|
|
|
@ -44,6 +47,13 @@ export const rm = (...args: string[]) => |
|
|
|
export const uuidgen = (...args: string[]) => |
|
|
|
export const uuidgen = (...args: string[]) => |
|
|
|
systemCall(SERVER_PATHS.usr.bin.uuidgen.self, args); |
|
|
|
systemCall(SERVER_PATHS.usr.bin.uuidgen.self, args); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export const resolveId = (id: number | string, database: string) => |
|
|
|
|
|
|
|
Number.parseInt(getent(database, String(id)).split(':', 3)[2]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export const resolveGid = (id: number | string) => resolveId(id, 'group'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export const resolveUid = (id: number | string) => resolveId(id, 'passwd'); |
|
|
|
|
|
|
|
|
|
|
|
export const stderr = (message: string) => print(message, { stream: 'stderr' }); |
|
|
|
export const stderr = (message: string) => print(message, { stream: 'stderr' }); |
|
|
|
|
|
|
|
|
|
|
|
export const stdout = (message: string) => print(message); |
|
|
|
export const stdout = (message: string) => print(message); |
|
|
|