File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1227,7 +1227,8 @@ async fn run_from_opt(opt: Opt) -> Result<()> {
1227
1227
FsverityOpts :: Enable { path } => {
1228
1228
let fd =
1229
1229
std:: fs:: File :: open ( & path) . with_context ( || format ! ( "Reading {path}" ) ) ?;
1230
- fsverity:: enable_verity_raw :: < fsverity:: Sha256HashValue > ( & fd) ?;
1230
+ // Note this is not robust to forks, we're not using the _maybe_copy variant
1231
+ fsverity:: enable_verity_with_retry :: < fsverity:: Sha256HashValue > ( & fd) ?;
1231
1232
Ok ( ( ) )
1232
1233
}
1233
1234
} ,
Original file line number Diff line number Diff line change @@ -65,7 +65,11 @@ fn enable_fsverity_in_objdir(d: &Dir) -> anyhow::Result<()> {
65
65
let enabled =
66
66
composefs:: fsverity:: measure_verity_opt :: < Sha256HashValue > ( f. as_fd ( ) ) ?. is_some ( ) ;
67
67
if !enabled {
68
- composefs_fsverity:: enable_verity_raw :: < Sha256HashValue > ( & f) ?;
68
+ // NOTE: We're not using the _with_copy API here because for us it'd require
69
+ // copying all the metadata too which is mildly tedious.
70
+ // For main composefs we don't need to care about the per-file metadata
71
+ // in general which simplifies a lot.
72
+ composefs_fsverity:: enable_verity_with_retry :: < Sha256HashValue > ( f. as_fd ( ) ) ?;
69
73
}
70
74
}
71
75
Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments