Fix portable sticky-bit mask lint
Linux / verify (pull_request) Successful in 2m13s
Linux / changed-scope-coverage (pull_request) Skipped
Linux / keyless-cuda (pull_request) Skipped
Linux / hosted-cuda-package (pull_request) Skipped
Linux / linux-cli-container (pull_request) Successful in 1m33s
Linux / linux-static-cli (pull_request) Successful in 5m27s
Linux / release-cli (pull_request) Skipped

This commit is contained in:
Pavlo Ratushnyi
2026-10-07 01:07:51 +02:00
parent 30d2867aea
commit 8b6ed672dd
+1 -1
View File
@@ -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());
}