diff --git a/src/cryfs-cli/Cli.cpp b/src/cryfs-cli/Cli.cpp index f1d63408..dedd2e9c 100644 --- a/src/cryfs-cli/Cli.cpp +++ b/src/cryfs-cli/Cli.cpp @@ -227,7 +227,7 @@ namespace cryfs { CryDevice device(std::move(config), std::move(blockStore)); _sanityCheckFilesystem(&device); fspp::FilesystemImpl fsimpl(&device); - fspp::fuse::Fuse fuse(&fsimpl); + fspp::fuse::Fuse fuse(&fsimpl, "cryfs"); _initLogfile(options); diff --git a/src/fspp/fuse/Fuse.cpp b/src/fspp/fuse/Fuse.cpp index 2af4d605..9a12e83a 100644 --- a/src/fspp/fuse/Fuse.cpp +++ b/src/fspp/fuse/Fuse.cpp @@ -217,8 +217,8 @@ Fuse::~Fuse() { _argv.clear(); } -Fuse::Fuse(Filesystem *fs) - :_fs(fs), _mountdir(), _running(false) { +Fuse::Fuse(Filesystem *fs, const std::string &fsname) + :_fs(fs), _mountdir(), _running(false), _fsname(fsname) { } void Fuse::_logException(const std::exception &e) { @@ -235,7 +235,7 @@ void Fuse::run(const bf::path &mountdir, const vector &fuseOptions) { ASSERT(_argv.size() == 0, "Filesystem already started"); _argv.reserve(2 + fuseOptions.size()); - _argv.push_back(_create_c_string("cryfs")); // The first argument is the executable name + _argv.push_back(_create_c_string(_fsname)); // The first argument is the file system name _argv.push_back(_create_c_string(mountdir.native())); // The second argument is the mountdir for (const string &option : fuseOptions) { _argv.push_back(_create_c_string(option)); diff --git a/src/fspp/fuse/Fuse.h b/src/fspp/fuse/Fuse.h index 6072e539..c94feb25 100644 --- a/src/fspp/fuse/Fuse.h +++ b/src/fspp/fuse/Fuse.h @@ -18,7 +18,7 @@ class Filesystem; class Fuse final { public: - explicit Fuse(Filesystem *fs); + explicit Fuse(Filesystem *fs, const std::string &fsname); ~Fuse(); void run(const boost::filesystem::path &mountdir, const std::vector &fuseOptions); @@ -65,6 +65,7 @@ private: boost::filesystem::path _mountdir; std::vector _argv; bool _running; + std::string _fsname; DISALLOW_COPY_AND_ASSIGN(Fuse); };