diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-02-15 20:10:51 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-02-15 20:10:51 +0000 |
commit | eff9c2c3055fdf900b7ad690b23eb53cd086608b (patch) | |
tree | 85cce29dc882e69136844b0bb80bcaa4352ffd42 /netfs/daemon | |
parent | Almost complete coverage of basic directory operations (diff) | |
download | netfs-eff9c2c3055fdf900b7ad690b23eb53cd086608b.tar.bz2 netfs-eff9c2c3055fdf900b7ad690b23eb53cd086608b.tar.xz netfs-eff9c2c3055fdf900b7ad690b23eb53cd086608b.zip |
Enforce O_EXCL on create
Diffstat (limited to 'netfs/daemon')
-rw-r--r-- | netfs/daemon/daemonVolume.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/netfs/daemon/daemonVolume.cpp b/netfs/daemon/daemonVolume.cpp index 2d67272..e4c65bd 100644 --- a/netfs/daemon/daemonVolume.cpp +++ b/netfs/daemon/daemonVolume.cpp @@ -262,7 +262,7 @@ VolumeServer::create(const NetFS::ReqEnv & re, const std::string & path, Ice::In errno = 0; boost::filesystem::path p(resolvePath(path)); mc.AssertWriteParent(p); - int fd = ::open(p.c_str(), O_CREAT | flags, mode); + int fd = ::open(p.c_str(), O_CREAT | O_EXCL | flags, mode); if (fd == -1) { throw NetFS::SystemError(errno); } |