From b2c2e3441c2c7893758ece49429eeb04472364ae Mon Sep 17 00:00:00 2001 From: Radu Marias Date: Mon, 19 Aug 2024 21:24:19 +0300 Subject: [PATCH 1/2] mark some required relations between CLI args --- src/run.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/run.rs b/src/run.rs index ea8c0eaa..9191996a 100644 --- a/src/run.rs +++ b/src/run.rs @@ -131,6 +131,7 @@ fn get_cli_args() -> ArgMatches { .short('m') .required(true) .value_name("MOUNT_POINT") + .requires("data-dir") .help("Act as a client, and mount FUSE at given path"), ) .arg( @@ -139,6 +140,7 @@ fn get_cli_args() -> ArgMatches { .short('d') .required(true) .value_name("DATA_DIR") + .requires("mount-point") .help("Where to store the encrypted data"), ) .arg( @@ -146,6 +148,8 @@ fn get_cli_args() -> ArgMatches { .long("umount-on-start") .short('u') .action(ArgAction::SetTrue) + .requires("mount-point") + .requires("data-dir") .help("If we should try to umount the mountpoint before starting the FUSE server. This can be useful when the previous run crashed or was forced kll and the mountpoint is still mounted."), ) .arg( @@ -153,6 +157,8 @@ fn get_cli_args() -> ArgMatches { .long("allow-root") .short('r') .action(ArgAction::SetTrue) + .requires("mount-point") + .requires("data-dir") .help("Allow root user to access filesystem"), ) .arg( @@ -160,6 +166,8 @@ fn get_cli_args() -> ArgMatches { .long("allow-other") .short('o') .action(ArgAction::SetTrue) + .requires("mount-point") + .requires("data-dir") .help("Allow other user to access filesystem"), ) .arg( @@ -168,6 +176,7 @@ fn get_cli_args() -> ArgMatches { .short('i') .action(ArgAction::SetTrue) .requires("mount-point") + .requires("data-dir") .help("Use direct I/O (bypass page cache for an open file)"), ) .arg( @@ -175,6 +184,8 @@ fn get_cli_args() -> ArgMatches { .long("suid") .short('s') .action(ArgAction::SetTrue) + .requires("mount-point") + .requires("data-dir") .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"), ) ).subcommand( From e0d5f822789922aae5df51020b75fe3afb4498e2 Mon Sep 17 00:00:00 2001 From: Radu Marias Date: Mon, 19 Aug 2024 21:25:26 +0300 Subject: [PATCH 2/2] version --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 63f4d250..174068d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1589,7 +1589,7 @@ checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "rencfs" -version = "0.13.60" +version = "0.13.61" dependencies = [ "anyhow", "argon2", diff --git a/Cargo.toml b/Cargo.toml index 22e9a811..73e3bf47 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ cargo-features = ["profile-rustflags"] [package] name = "rencfs" description = "An encrypted file system that is mounted with FUSE on Linux. It can be used to create encrypted directories." -version = "0.13.60" +version = "0.13.61" edition = "2021" license = "MIT OR Apache-2.0" authors = ["Radu Marias "]