summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--netfs/daemon/daemonVolume.cpp3
-rw-r--r--netfs/fuse/fuseApp.cpp2
2 files changed, 4 insertions, 1 deletions
diff --git a/netfs/daemon/daemonVolume.cpp b/netfs/daemon/daemonVolume.cpp
index 0556d9a..afc0d36 100644
--- a/netfs/daemon/daemonVolume.cpp
+++ b/netfs/daemon/daemonVolume.cpp
@@ -249,6 +249,9 @@ VolumeServer::open(const NetFS::ReqEnv & re, const std::string & path, Ice::Int
errno = 0;
boost::filesystem::path p(resolvePath(path));
tp.AssertRead(p);
+ if (flags & O_CREAT) {
+ throw NetFS::SystemError(EINVAL);
+ }
int fd = ::open(p.string().c_str(), flags);
if (fd == -1) {
throw NetFS::SystemError(errno);
diff --git a/netfs/fuse/fuseApp.cpp b/netfs/fuse/fuseApp.cpp
index fdcce57..940d0e6 100644
--- a/netfs/fuse/fuseApp.cpp
+++ b/netfs/fuse/fuseApp.cpp
@@ -117,7 +117,7 @@ NetFS::FuseApp::connectHandles()
of.second->remote->ice_ping();
}
catch (const Ice::ObjectNotExistException &) {
- of.second->remote = volume->open(reqEnv(), of.second->path, of.second->flags);
+ of.second->remote = volume->open(reqEnv(), of.second->path, of.second->flags & !O_CREAT);
}
}
for (const OpenDirs::value_type & of : openDirs) {