#5976 [Other] add opt-in strata-private-files Rust crate for ACL/mode enforcement

open · @stuchapin909 · 0 comentários · No GitHub

WindowsLinux

Descrição

## Summary
- Add `crates/strata-private-files` (`std`-only, Win32 `advapi32`/`kernel32` FFI + POSIX `0600`/`0700`) for `current-user-sid`, `dacl-sddl`, `restrict`, and `is-unshared`.
- Wire `_rust_restrict_to_current_user` into `strata_control/private_files.py` (`restrict_to_current_user`) with a pure-Python fallback when `strata-private-files` is not built.
- Register `strata_control/private_files.py` in `tests/terminal/test_no_debugger_children.py` (`OTHER_PROGRAMS`).

## Validation
Revision: `a90ebe2d9` on Windows 11.

### Passed
- `cargo test`: 2 passed, 0 failed (`offenders_detects_everyone`, `restrict_and_check_temp_file`)
- `cargo clippy --all-targets -- -D warnings`: 0 warnings
- `cargo build --release`: succeeded
- Differential check (`strata-private-files.exe` vs `strata_control.private_files`): `current-user-sid`, `dacl-sddl`, `restrict`, `is_private`, `is_unshared` matched
- `python -m unittest tests/terminal/test_private_files.py tests/terminal/test_no_debugger_children.py`: Ran 31 tests in 5.647s, OK (skipped=1)

### Failed
- None

### Not run
- Linux and macOS local builds/tests (covered by GitHub Actions CI)
- Remaining `tests/terminal` suites outside the targeted modules above

No site

Links install, modelos, releases.