Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
d90ada9b
Commit
d90ada9b
authored
Mar 31, 2015
by
Ho-Sheng Hsiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added fuse allow_other option
ipfs config Mounts.FuseAllowOther --bool true ipfs daemon --mount
parent
b107eb89
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
6 deletions
+20
-6
fuse/ipns/mount_unix.go
fuse/ipns/mount_unix.go
+4
-1
fuse/mount/fuse.go
fuse/mount/fuse.go
+10
-2
fuse/readonly/mount_unix.go
fuse/readonly/mount_unix.go
+3
-1
repo/config/mounts.go
repo/config/mounts.go
+3
-2
No files found.
fuse/ipns/mount_unix.go
View file @
d90ada9b
...
...
@@ -10,10 +10,13 @@ import (
// Mount mounts ipns at a given location, and returns a mount.Mount instance.
func
Mount
(
ipfs
*
core
.
IpfsNode
,
ipnsmp
,
ipfsmp
string
)
(
mount
.
Mount
,
error
)
{
cfg
:=
ipfs
.
Repo
.
Config
()
allow_other
:=
cfg
.
Mounts
.
FuseAllowOther
fsys
,
err
:=
NewFileSystem
(
ipfs
,
ipfs
.
PrivateKey
,
ipfsmp
)
if
err
!=
nil
{
return
nil
,
err
}
return
mount
.
NewMount
(
ipfs
,
fsys
,
ipnsmp
)
return
mount
.
NewMount
(
ipfs
,
fsys
,
ipnsmp
,
allow_other
)
}
fuse/mount/fuse.go
View file @
d90ada9b
...
...
@@ -23,8 +23,16 @@ type mount struct {
// Mount mounts a fuse fs.FS at a given location, and returns a Mount instance.
// parent is a ContextGroup to bind the mount's ContextGroup to.
func
NewMount
(
p
ctxgroup
.
ContextGroup
,
fsys
fs
.
FS
,
mountpoint
string
)
(
Mount
,
error
)
{
conn
,
err
:=
fuse
.
Mount
(
mountpoint
)
func
NewMount
(
p
ctxgroup
.
ContextGroup
,
fsys
fs
.
FS
,
mountpoint
string
,
allow_other
bool
)
(
Mount
,
error
)
{
var
conn
*
fuse
.
Conn
var
err
error
if
allow_other
{
conn
,
err
=
fuse
.
Mount
(
mountpoint
,
fuse
.
AllowOther
())
}
else
{
conn
,
err
=
fuse
.
Mount
(
mountpoint
)
}
if
err
!=
nil
{
return
nil
,
err
}
...
...
fuse/readonly/mount_unix.go
View file @
d90ada9b
...
...
@@ -10,6 +10,8 @@ import (
// Mount mounts ipfs at a given location, and returns a mount.Mount instance.
func
Mount
(
ipfs
*
core
.
IpfsNode
,
mountpoint
string
)
(
mount
.
Mount
,
error
)
{
cfg
:=
ipfs
.
Repo
.
Config
()
allow_other
:=
cfg
.
Mounts
.
FuseAllowOther
fsys
:=
NewFileSystem
(
ipfs
)
return
mount
.
NewMount
(
ipfs
,
fsys
,
mountpoint
)
return
mount
.
NewMount
(
ipfs
,
fsys
,
mountpoint
,
allow_other
)
}
repo/config/mounts.go
View file @
d90ada9b
...
...
@@ -4,4 +4,5 @@ package config
type
Mounts
struct
{
IPFS
string
IPNS
string
FuseAllowOther
bool
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment