diff options
| author | tv <tv@krebsco.de> | 2026-12-01 00:51:48 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-12-01 00:51:48 +0000 |
| commit | 683e2128a5d00bcadea7cc2f71a48253032632a5 (patch) | |
| tree | 7d6804eb4908079db1309ae895fb265352a4cca2 /tests | |
| parent | f994019c242ecb097a8fdabc7650f00721dddf10 (diff) | |
enstate: the state directory is root's
The receptor makes the state directory 0700 whoever created it (a
deploy copying into incoming/, say), and the module has tmpfiles keep it
so.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/migrations.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/migrations.rs b/tests/migrations.rs index 05e3099..e66895c 100644 --- a/tests/migrations.rs +++ b/tests/migrations.rs @@ -370,6 +370,13 @@ fn incoming_submissions() { assert_eq!(host.view("a", "a").unwrap(), b"A"); assert!(host.snapshot("secrets").is_some()); assert!(!host.root.join("state/incoming/1").exists()); + // The deploy created the state directory, readable by all; it is root's now. + use std::os::unix::fs::PermissionsExt; + let mode = std::fs::metadata(host.root.join("state")) + .unwrap() + .permissions() + .mode(); + assert_eq!(mode & 0o777, 0o700); // Two in order, the second building on what the first makes; then one refused, // which refuses the switch, and is moved aside by it. |
