only allow manipulation of runtime settings via xattrs. closes #22

This commit is contained in:
Antonio SJ Musumeci 2014-07-29 00:00:42 -04:00
parent 45cec2d301
commit 7b0d703f00
35 changed files with 50 additions and 419 deletions

View file

@ -31,11 +31,8 @@
#include <errno.h>
#include <fcntl.h>
#include "config.hpp"
#include "fileinfo.hpp"
using namespace mergerfs;
static
int
_fallocate(const int fd,
@ -74,13 +71,9 @@ namespace mergerfs
int mode,
off_t offset,
off_t len,
struct fuse_file_info *fi)
struct fuse_file_info *ffi)
{
const config::Config &config = config::get();
const FileInfo *fileinfo = (FileInfo*)fi->fh;
if(fusepath == config.controlfile)
return -EINVAL;
const FileInfo *fileinfo = (FileInfo*)ffi->fh;
return _fallocate(fileinfo->fd,
mode,