mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-12-04 22:00:15 -05:00
Only set allow_other when running as root
This commit is contained in:
parent
7890a4996c
commit
d6a2f06797
3 changed files with 24 additions and 14 deletions
|
|
@ -249,6 +249,7 @@ namespace l
|
|||
main(const int argc_,
|
||||
char **argv_)
|
||||
{
|
||||
int rv;
|
||||
Config::Read cfg;
|
||||
Config::ErrVec errs;
|
||||
fuse_args args;
|
||||
|
|
@ -283,9 +284,13 @@ namespace l
|
|||
|
||||
procfs::init();
|
||||
|
||||
return fuse_main(args.argc,
|
||||
args.argv,
|
||||
&ops);
|
||||
rv = fuse_main(args.argc,
|
||||
args.argv,
|
||||
&ops);
|
||||
|
||||
syslog_info("exiting main loop with return code %d",rv);
|
||||
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
#include "num.hpp"
|
||||
#include "policy.hpp"
|
||||
#include "str.hpp"
|
||||
#include "syslog.hpp"
|
||||
#include "version.hpp"
|
||||
|
||||
#include "fuse.h"
|
||||
|
|
@ -116,6 +117,10 @@ void
|
|||
set_default_options(fuse_args *args_)
|
||||
{
|
||||
set_option("default_permissions",args_);
|
||||
if(geteuid() == 0)
|
||||
set_option("allow_other",args_);
|
||||
else
|
||||
syslog_notice("not auto setting allow_other since not running as root");
|
||||
}
|
||||
|
||||
static
|
||||
|
|
@ -124,7 +129,6 @@ should_ignore(const std::string &key_)
|
|||
{
|
||||
static const std::set<std::string> IGNORED_KEYS =
|
||||
{
|
||||
"allow_other",
|
||||
"atomic_o_trunc",
|
||||
"big_writes",
|
||||
"cache.open",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue