diff --git a/packages/cultnet-ts/src/idunn-runtime-authority.ts b/packages/cultnet-ts/src/idunn-runtime-authority.ts index de4f3579..ea07ba27 100644 --- a/packages/cultnet-ts/src/idunn-runtime-authority.ts +++ b/packages/cultnet-ts/src/idunn-runtime-authority.ts @@ -605,8 +605,7 @@ export function systemdListenPidMatches(listenPid: string | undefined, processPi } function readDescriptor(descriptor: number): Buffer { - const fdPath = `/proc/self/fd/${descriptor}`; - return fs.readFileSync(fdPath); + return fs.readFileSync(descriptor); } function privateKeyFromSeed(seed: Uint8Array): crypto.KeyObject { diff --git a/packages/cultnet-ts/test/idunn-runtime-authority.test.ts b/packages/cultnet-ts/test/idunn-runtime-authority.test.ts index cfd2b5a4..a2277c92 100644 --- a/packages/cultnet-ts/test/idunn-runtime-authority.test.ts +++ b/packages/cultnet-ts/test/idunn-runtime-authority.test.ts @@ -100,8 +100,8 @@ test("opens Idunn's machine-bound identity and signs the exact Expected incarnat process.env.LISTEN_FDNAMES = "gamecult-idunn-runtime-activation-key:gamecult-runtime-presence-identity"; const realReadFileSync = fs.readFileSync.bind(fs); mock.method(fs, "readFileSync", (filePath: fs.PathOrFileDescriptor, ...args: unknown[]) => { - if (filePath === "/proc/self/fd/3") return activationSeed; - if (filePath === "/proc/self/fd/4") return providerCredential; + if (filePath === 3) return activationSeed; + if (filePath === 4) return providerCredential; if (filePath === "/etc/machine-id") return machineId; return realReadFileSync(filePath as never, ...args as never[]); });