diff options
author | Ilan Joselevich <personal@ilanjoselevich.com> | 2024-07-29T15·12+0300 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-07-29T16·43+0000 |
commit | 3f6cd7aebc898e2b9c26db935491739b708b99b6 (patch) | |
tree | ebfabac5050062252d2206b619cc484ee7258649 /tvix | |
parent | 47a8baf17861b007f49114f5604a9ea09f8f3096 (diff) |
fix(tvix/store): Immediately return an error when using sled on / r/8424
We already do this for redb and for sled in SledDirectoryService. Change-Id: I34c7178257a6a04e9f12ed4037a4ef585d7b0d54 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12060 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de> Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Diffstat (limited to 'tvix')
-rw-r--r-- | tvix/store/src/pathinfoservice/sled.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tvix/store/src/pathinfoservice/sled.rs b/tvix/store/src/pathinfoservice/sled.rs index 4255bfd1d4d4..837eb9d079e1 100644 --- a/tvix/store/src/pathinfoservice/sled.rs +++ b/tvix/store/src/pathinfoservice/sled.rs @@ -21,6 +21,12 @@ pub struct SledPathInfoService { impl SledPathInfoService { pub fn new<P: AsRef<Path>>(p: P) -> Result<Self, sled::Error> { + if p.as_ref() == Path::new("/") { + return Err(sled::Error::Unsupported( + "cowardly refusing to open / with sled".to_string(), + )); + } + let config = sled::Config::default() .use_compression(false) // is a required parameter .path(p); |