mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 13:21:10 +00:00
refactor pvf security module (#3047)
resolve https://github.com/paritytech/polkadot-sdk/issues/2321 - [x] refactor `security` module into a conditionally compiled - [x] rename `amd64` into x86-64 for consistency with conditional compilation guards and remove reference to a particular vendor - [x] run unit tests and zombienet --------- Co-authored-by: s0me0ne-unkn0wn <48632512+s0me0ne-unkn0wn@users.noreply.github.com>
This commit is contained in:
@@ -86,3 +86,33 @@ pub fn framed_recv_blocking(r: &mut (impl Read + Unpin)) -> io::Result<Vec<u8>>
|
||||
r.read_exact(&mut buf)?;
|
||||
Ok(buf)
|
||||
}
|
||||
|
||||
#[cfg(all(test, not(feature = "test-utils")))]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn default_secure_status() {
|
||||
let status = SecurityStatus::default();
|
||||
assert!(
|
||||
!status.secure_validator_mode,
|
||||
"secure_validator_mode is false for default security status"
|
||||
);
|
||||
assert!(
|
||||
!status.can_enable_landlock,
|
||||
"can_enable_landlock is false for default security status"
|
||||
);
|
||||
assert!(
|
||||
!status.can_enable_seccomp,
|
||||
"can_enable_seccomp is false for default security status"
|
||||
);
|
||||
assert!(
|
||||
!status.can_unshare_user_namespace_and_change_root,
|
||||
"can_unshare_user_namespace_and_change_root is false for default security status"
|
||||
);
|
||||
assert!(
|
||||
!status.can_do_secure_clone,
|
||||
"can_do_secure_clone is false for default security status"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user