From 8b6ed672dd8cac97d2b9be9b5f1ce7c8b7fe533e Mon Sep 17 00:00:00 2001 From: Pavlo Ratushnyi Date: Wed, 7 Oct 2026 01:07:51 +0200 Subject: [PATCH] Fix portable sticky-bit mask lint --- control-plane/src/kar_writer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/control-plane/src/kar_writer.rs b/control-plane/src/kar_writer.rs index a4ad4603..9d0fe1e8 100644 --- a/control-plane/src/kar_writer.rs +++ b/control-plane/src/kar_writer.rs @@ -292,7 +292,7 @@ fn validate_private_archive_parent(parent: &Path) -> Result<(), String> { return Err("KAR parent is not owned by the service or root".into()); } let mode = metadata.mode(); - let sticky = mode & libc::S_ISVTX as u32 != 0; + let sticky = mode & 0o1000 != 0; // POSIX S_ISVTX is mode bit 01000. if mode & 0o022 != 0 && !sticky { return Err("KAR parent allows untrusted path replacement".into()); }