From b878dd93db06e24755cbdc1093dcc635de767354 Mon Sep 17 00:00:00 2001 From: faumaray Date: Mon, 26 Oct 2026 23:19:50 +0300 Subject: [PATCH] windows: an OWNER RIGHTS entry Windows accepts An empty access mask is refused as an invalid ACL; read-control alone still takes the owner's implicit WRITE_DAC away. Co-Authored-By: Claude Opus 5.5 --- windows/crates/ps-service/src/paths.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows/crates/ps-service/src/paths.rs b/windows/crates/ps-service/src/paths.rs index 9ae5340..d18ade4 100644 --- a/windows/crates/ps-service/src/paths.rs +++ b/windows/crates/ps-service/src/paths.rs @@ -145,7 +145,7 @@ fn protect(dir: &Path) -> std::io::Result<()> { PROTECTED_DACL_SECURITY_INFORMATION, }; - let sddl: Vec = "O:SYD:P(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICI;0x0;;;OW)".encode_utf16().chain(Some(0)).collect(); + let sddl: Vec = "O:SYD:P(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICI;RC;;;OW)".encode_utf16().chain(Some(0)).collect(); let path: Vec = dir.as_os_str().encode_wide().chain(Some(0)).collect(); let mut sd: *mut c_void = null_mut(); // SAFETY: NUL-terminated inputs; the descriptor is freed below, and the DACL points into it.