Commit 19e992d
committed
Onboarding: get Cmdr into the Full Disk Access list on macOS 13+ by probing a protected directory
On macOS 13+ (Tahoe especially) a notarized app no longer appears in System Settings → Privacy & Security → Full Disk Access from our probe, so users had to add Cmdr by hand with "+". Traced the cause against Path Finder: its whole FDA probe is a raw `open()` on the `~/Library/Mail` *directory*, and it lands in the list the instant it does. A denied file `read()` (what Cmdr did) stopped registering notarized bundles on Tahoe; a denied directory `open()` still does.
- `permissions.rs`: on a denied probe, `check_full_disk_access` now also fires a raw `open()` on each existing protected directory (`fda_probe_dirs`: `~/Library/Mail`, `~/Library/Safari`, `~/Library/Messages`, and the always-present TCC dir) via the new `try_open_path`. Detection logic is unchanged: the file reads still decide granted/denied, so there's no behavior risk there. We keep the file/`mmap`/`NSData`/`read_dir` triggers for macOS 12 and earlier, where the file `read()` is what registered.
- Corrected the now-falsified docs: the old "Tahoe short-circuits `read()` denials" framing in `onboarding/DETAILS.md` and `docs/architecture.md` was wrong; it's specifically that file reads don't register but directory opens do.
- The quiet 500 ms poller stays side-effect-free (file reads only); registration rides on the heavy probe, which fires at boot, on onboarding mount, and right before opening System Settings.
Verification is deferred to the next release: this only manifests on a real notarized build, so reset the TCC state (`tccutil reset SystemPolicyAllFiles com.veszelovszki.cmdr`) and confirm Cmdr appears in the list after launch. The "+" step-tip stays as a backstop.1 parent 3bcbc28 commit 19e992d
4 files changed
Lines changed: 79 additions & 29 deletions
File tree
- apps/desktop
- src-tauri/src
- src/lib
- ipc
- onboarding
- docs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
10 | 11 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
37 | 58 | | |
38 | 59 | | |
39 | 60 | | |
| |||
46 | 67 | | |
47 | 68 | | |
48 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
49 | 79 | | |
50 | 80 | | |
51 | 81 | | |
| |||
181 | 211 | | |
182 | 212 | | |
183 | 213 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
189 | 220 | | |
190 | 221 | | |
191 | 222 | | |
| |||
230 | 261 | | |
231 | 262 | | |
232 | 263 | | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
233 | 278 | | |
234 | 279 | | |
235 | 280 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2214 | 2214 | | |
2215 | 2215 | | |
2216 | 2216 | | |
2217 | | - | |
2218 | | - | |
2219 | | - | |
2220 | | - | |
2221 | | - | |
| 2217 | + | |
| 2218 | + | |
| 2219 | + | |
| 2220 | + | |
| 2221 | + | |
| 2222 | + | |
2222 | 2223 | | |
2223 | 2224 | | |
2224 | 2225 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
341 | 344 | | |
342 | 345 | | |
343 | 346 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
206 | | - | |
207 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
208 | 209 | | |
209 | 210 | | |
210 | 211 | | |
| |||
0 commit comments