summaryrefslogtreecommitdiff
path: root/netfs/fuse
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-07-20 21:00:22 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2015-07-20 21:00:22 +0100
commit9c7d9414051a9b6febdff80ae3f508b62ab10455 (patch)
treebf000780e628f5cdb0bbe505f34a0545a76a6ed3 /netfs/fuse
parentSupport specification of configuration files when creating a test core (diff)
downloadnetfs-9c7d9414051a9b6febdff80ae3f508b62ab10455.tar.bz2
netfs-9c7d9414051a9b6febdff80ae3f508b62ab10455.tar.xz
netfs-9c7d9414051a9b6febdff80ae3f508b62ab10455.zip
Implement authtoken security
Diffstat (limited to 'netfs/fuse')
-rw-r--r--netfs/fuse/fuseApp.cpp5
-rw-r--r--netfs/fuse/fuseConfig.ice3
2 files changed, 7 insertions, 1 deletions
diff --git a/netfs/fuse/fuseApp.cpp b/netfs/fuse/fuseApp.cpp
index ac0dab5..a752e47 100644
--- a/netfs/fuse/fuseApp.cpp
+++ b/netfs/fuse/fuseApp.cpp
@@ -118,7 +118,7 @@ void
NetFS::FuseApp::connectToVolume()
{
if (!volume) {
- volume = service->connect(fcr->ExportName, "bar");
+ volume = service->connect(fcr->ExportName, fcr->AuthToken);
if (!volume) {
throw std::runtime_error("Invalid filesystem proxy");
}
@@ -188,6 +188,9 @@ NetFS::FuseApp::onError(const std::exception & e) throw()
connectHandles();
return 0;
}
+ if (dynamic_cast<const NetFS::AuthError *>(&e)) {
+ return -EPERM;
+ }
return FuseAppBase::onError(e);
}
diff --git a/netfs/fuse/fuseConfig.ice b/netfs/fuse/fuseConfig.ice
index db37770..d4cee41 100644
--- a/netfs/fuse/fuseConfig.ice
+++ b/netfs/fuse/fuseConfig.ice
@@ -12,6 +12,9 @@ module NetFS {
["slicer:name:endpoints"]
EndpointList Endpoints;
+
+ ["slicer:name:authtoken"]
+ string AuthToken;
};
["slicer:key:name","slicer:value:resource","slicer:item:resource"]