aboutsummaryrefslogtreecommitdiff
path: root/mount.go
diff options
context:
space:
mode:
authorCharles Duffy2017-05-30 16:01:06 -0500
committerrfjakob2017-06-01 00:26:17 +0200
commitcf1ded5236157e2f9ec06eeea26023b67b40f16d (patch)
tree48c9926efd8c10a76b6f28943397f8b1ae5cc3da /mount.go
parentfc2a5f5ab0149d48b5d45a9af96799b07d802ae6 (diff)
Implement force_owner option to display ownership as a specific user.
Diffstat (limited to 'mount.go')
-rw-r--r--mount.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/mount.go b/mount.go
index c10f90b..c2d1f74 100644
--- a/mount.go
+++ b/mount.go
@@ -217,6 +217,11 @@ func initFuseFrontend(key []byte, args *argContainer, confFile *configfile.ConfF
if args.aessiv {
cryptoBackend = cryptocore.BackendAESSIV
}
+ // forceOwner implies allow_other, as documented.
+ // Set this early, so args.allow_other can be relied on below this point.
+ if args._forceOwner != nil {
+ args.allow_other = true
+ }
frontendArgs := fusefrontend.Args{
Cipherdir: args.cipherdir,
Masterkey: key,
@@ -229,6 +234,7 @@ func initFuseFrontend(key []byte, args *argContainer, confFile *configfile.ConfF
HKDF: args.hkdf,
SerializeReads: args.serialize_reads,
ForceDecode: args.forcedecode,
+ ForceOwner: args._forceOwner,
}
// confFile is nil when "-zerokey" or "-masterkey" was used
if confFile != nil {