Skip to content

Commit

Permalink
some doc for direct_io and suid_support
Browse files Browse the repository at this point in the history
  • Loading branch information
radumarias committed Apr 27, 2024
1 parent 6a824fb commit 76dffb2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/encryptedfs_fuse3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ impl EncryptedFsFuse3 {
}

fn creation_mode(&self, mode: u32) -> u16 {
if !self.suid_support {
(mode & !(libc::S_ISUID | libc::S_ISGID)) as u16
} else {
if self.suid_support {
mode as u16
} else {
(mode & !(libc::S_ISUID | libc::S_ISGID)) as u16
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@
//! - `cipher`: The encryption algorithm to use. Currently, it supports these ciphers [Cipher](Cipher).
//! - `allow_root`: Allow root to access the file system.
//! - `allow_other`: Allow other users to access the file system.
//! - `direct_io`: Use direct I/O.
//! - `suid_support`: Enable suid support.
//! - `direct_io`: Use direct I/O (bypass page cache for open files).
//! - `suid_support`: If it should allow setting `SUID` and `SGID` when files are created. On `false` it will unset those flags when creating files.
//!
//! ## Or directly work with [EncryptedFs](EncryptedFs)
//!
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,14 @@ fn get_cli_args() -> ArgMatches {
.short('i')
.action(ArgAction::SetTrue)
.requires("mount-point")
.help("Mount FUSE with direct IO"),
.help("Use direct I/O (bypass page cache for an open file)"),
)
.arg(
Arg::new("suid")
.long("suid")
.short('s')
.action(ArgAction::SetTrue)
.help("Enable setuid support when run as root"),
.help("If it should allow setting SUID and SGID when files are created. Default is false and it will unset those flags when creating files"),
)
.arg(
Arg::new("change-password")
Expand Down

0 comments on commit 76dffb2

Please sign in to comment.