enable_verity_raw

Function enable_verity_raw 

Source
pub fn enable_verity_raw<H: FsVerityHashValue>(
    fd: impl AsFd,
) -> Result<(), EnableVerityError>
Expand description

Enable fs-verity on the given file.

This essentially boils down to the FS_IOC_ENABLE_VERITY ioctl.

The file must be stored on a filesystem which supports fs-verity. The file descriptor must be opened O_RDONLY and there must be no other writable file descriptors or mappings for the file.

It’s possible to choose the hash algorithm (via the generic parameter) but the blocksize is currently hardcoded to 4096. Salt is not supported.