Skip to content

Commit b6be814

Browse files
Cargo.toml: deny unsafe code workspace-wide
We need to add a couple of exceptions in order to make ioctls. Hopefully we can remove those and set this to forbid, but for now it's a pretty strong statement going forward. Signed-off-by: Allison Karlitskaya <[email protected]>
1 parent 905101b commit b6be814

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ version = "0.2.0"
1212

1313
[workspace.lints.rust]
1414
missing_debug_implementations = "deny"
15+
unsafe_code = "deny" # https://github.com/containers/composefs-rs/issues/123
1516

1617
[workspace.dependencies]
1718
composefs = { version = "0.2.0", path = "crates/composefs", default-features = false }

crates/composefs/src/fsverity/ioctl.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(unsafe_code)]
2+
13
use core::mem::size_of;
24

35
use std::{io::Error, os::fd::AsFd};

crates/composefs/src/mountcompat.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ mod tmpmount {
166166
/// Required before 6.12: erofs can't directly mount files.
167167
#[cfg(feature = "rhel9")]
168168
mod loopback {
169+
#![allow(unsafe_code)]
169170
use std::{
170171
io::Result,
171172
os::fd::{AsFd, AsRawFd, OwnedFd},

0 commit comments

Comments
 (0)