From 23d2fb33221f41361fb1042e41a73a5127f4a641 Mon Sep 17 00:00:00 2001
From: Igor Gnatenko <ignatenko@redhat.com>
Date: Thu, 4 Aug 2016 08:54:11 +0200
Subject: [PATCH] Revert "Remove "-o default_permissions" unless needed."
This reverts commit 82ceb88998fccfdbe21d2e66cd8764adef7d55e5.
---
encfs/main.cpp | 27 +++++++--------------------
1 file changed, 7 insertions(+), 20 deletions(-)
diff --git a/encfs/main.cpp b/encfs/main.cpp
index 0fdcb0c..5dd93ab 100644
--- a/encfs/main.cpp
+++ b/encfs/main.cpp
@@ -373,6 +373,13 @@ static bool processArgs(int argc, char *argv[],
if (!out->isThreaded) PUSHARG("-s");
+ if (useDefaultFlags) {
+ PUSHARG("-o");
+ PUSHARG("use_ino");
+ PUSHARG("-o");
+ PUSHARG("default_permissions");
+ }
+
// we should have at least 2 arguments left over - the source directory and
// the mount point.
if (optind + 2 <= argc) {
@@ -395,26 +402,6 @@ static bool processArgs(int argc, char *argv[],
}
}
- // Add default flags unless --no-default-flags was passed
- if (useDefaultFlags) {
-
- // Expose the underlying stable inode number
- PUSHARG("-o");
- PUSHARG("use_ino");
-
- // "default_permissions" comes with a performance cost. Only enable
- // it if makes sense.
- for(int i=0; i < out->fuseArgc; i++) {
- if ( out->fuseArgv[i] == NULL ) {
- continue;
- } else if (strcmp(out->fuseArgv[i], "allow_other") == 0) {
- PUSHARG("-o");
- PUSHARG("default_permissions");
- break;
- }
- }
- }
-
// sanity check
if (out->isDaemon && (!isAbsolutePath(out->mountPoint.c_str()) ||
!isAbsolutePath(out->opts->rootDir.c_str()))) {
--
2.7.4