mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
only allow manipulation of runtime settings via xattrs. closes #22
This commit is contained in:
parent
45cec2d301
commit
7b0d703f00
35 changed files with 50 additions and 419 deletions
|
|
@ -24,30 +24,15 @@
|
|||
|
||||
#include <fuse.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "config.hpp"
|
||||
#include "ugid.hpp"
|
||||
#include "fileinfo.hpp"
|
||||
|
||||
using std::string;
|
||||
using mergerfs::FileInfo;
|
||||
|
||||
static
|
||||
int
|
||||
_release_controlfile(uint64_t &fh)
|
||||
{
|
||||
string *strbuf = (string*)fh;
|
||||
|
||||
delete strbuf;
|
||||
|
||||
fh = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static
|
||||
int
|
||||
_release(uint64_t &fh)
|
||||
|
|
@ -71,11 +56,6 @@ namespace mergerfs
|
|||
release(const char *fusepath,
|
||||
struct fuse_file_info *fi)
|
||||
{
|
||||
const config::Config &config = config::get();
|
||||
|
||||
if(fusepath == config.controlfile)
|
||||
return _release_controlfile(fi->fh);
|
||||
|
||||
return _release(fi->fh);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue