whyno-core 0.5.0

Permission check pipeline, fix engine, and state types
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Filesystem inode flags from `ioctl(FS_IOC_GETFLAGS)`.
//!
//! Not overridden by root or capabilities -- immutable and
//! append-only apply unconditionally.

use serde::Serialize;

/// Filesystem flags that affect permission checks.
///
/// Retrieved via `ioctl(fd, FS_IOC_GETFLAGS, &flags)`. Block
/// operations regardless of DAC permissions or capabilities.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)]
pub struct FsFlags {
    /// `FS_IMMUTABLE_FL` -- no modifications, no deletion, no link creation.
    pub immutable: bool,
    /// `FS_APPEND_FL` -- file can only be opened in append mode for writing.
    pub append_only: bool,
}