Skip to content

Commit 9a046df

Browse files
authored
Revert "fix: canonicalize the writeable paths used in seatbelt policy… (openai#370)
This reverts commit 3356ac0. related openai#330
1 parent 8e2e77f commit 9a046df

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

codex-cli/src/utils/agent/sandbox/macos-seatbelt.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import type { SpawnOptions } from "child_process";
33

44
import { exec } from "./raw-exec.js";
55
import { log } from "../log.js";
6-
import { realpathSync } from "fs";
76
import { CONFIG_DIR } from "src/utils/config.js";
87

98
function getCommonRoots() {
@@ -30,9 +29,7 @@ export function execWithSeatbelt(
3029
const { policies, params } = writableRoots
3130
.map((root, index) => ({
3231
policy: `(subpath (param "WRITABLE_ROOT_${index}"))`,
33-
// the kernel resolves symlinks before handing them to seatbelt for checking
34-
// so store the canonicalized form in the policy to be compared against
35-
param: `-DWRITABLE_ROOT_${index}=${realpathSync(root)}`,
32+
param: `-DWRITABLE_ROOT_${index}=${root}`,
3633
}))
3734
.reduce(
3835
(

0 commit comments

Comments
 (0)