Repository navigation
Commit 249a6d9
fix(desktop): run the WSL install-dir release check as root
ensureWindowsPathReleased spawned the holder scan as the default WSL
user. find_holders inspects /proc/<pid>/{cwd,exe,fd,maps}, which the
kernel exposes only to the process owner and root, so the unprivileged
scan silently got EACCES for any process it did not own. A root- or
other-user-owned process holding the install directory was therefore
invisible: the check returned RELEASED without ever seeing (let alone
killing) it, defeating the guard in exactly the case it exists for.
Spawn the probe as `wsl -u root` (WSL grants root with no password,
gated by the Windows host) so the scan sees every holder and its kills
land on holders it does not own. find_holders is already scoped to
processes that reference the install dir, so this cannot reach
unrelated processes.
Verified on Windows 11 + WSL2 (Ubuntu, mirrored): a root-owned holder
with cwd in the install dir that the old code left untouched is now
detected and SIGTERM-cleared before the installer handoff.
Co-Authored-By: Claude Opus 4.8 <[email protected]>1 parent 0fdb80d commit 249a6d9
2 files changed
Lines changed: 62 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
276 | | - | |
| 275 | + | |
277 | 276 | | |
278 | 277 | | |
279 | 278 | | |
| |||
341 | 340 | | |
342 | 341 | | |
343 | 342 | | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
| 343 | + | |
348 | 344 | | |
349 | 345 | | |
350 | 346 | | |
351 | 347 | | |
352 | 348 | | |
353 | 349 | | |
354 | | - | |
355 | | - | |
356 | | - | |
| 350 | + | |
357 | 351 | | |
358 | 352 | | |
359 | 353 | | |
360 | 354 | | |
361 | 355 | | |
362 | 356 | | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
| 357 | + | |
367 | 358 | | |
368 | 359 | | |
369 | 360 | | |
370 | 361 | | |
371 | 362 | | |
372 | 363 | | |
373 | 364 | | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
| 365 | + | |
378 | 366 | | |
379 | 367 | | |
380 | 368 | | |
| |||
455 | 443 | | |
456 | 444 | | |
457 | 445 | | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
458 | 480 | | |
459 | 481 | | |
460 | 482 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
917 | 917 | | |
918 | 918 | | |
919 | 919 | | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
920 | 930 | | |
921 | 931 | | |
922 | | - | |
923 | | - | |
924 | | - | |
925 | | - | |
926 | | - | |
927 | | - | |
928 | | - | |
929 | | - | |
930 | | - | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
931 | 945 | | |
932 | 946 | | |
933 | 947 | | |
| |||
0 commit comments