starnix_uapi/
seal_flags.rs

1// Copyright 2023 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5use crate::uapi;
6use bitflags::bitflags;
7
8bitflags! {
9    /// The flags that are used to seal a memory-backed file descriptor (memfd)
10    /// and prevent it from being modified.
11    #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
12    pub struct SealFlags: u32 {
13      const FUTURE_WRITE = uapi::F_SEAL_FUTURE_WRITE;
14      const WRITE = uapi::F_SEAL_WRITE;
15      const GROW = uapi::F_SEAL_GROW;
16      const SHRINK = uapi::F_SEAL_SHRINK;
17      const SEAL = uapi::F_SEAL_SEAL;
18      const NO_EXEC = uapi::F_SEAL_EXEC;
19    }
20}