mirror of
https://github.com/vgough/encfs.git
synced 2024-11-21 15:33:16 +01:00
run clang-format
This commit is contained in:
parent
250b257b7f
commit
95c7d92f94
@ -81,8 +81,9 @@ class EncFS_Context {
|
||||
* us.
|
||||
*/
|
||||
|
||||
typedef std::unordered_map<
|
||||
std::string, std::forward_list<std::shared_ptr<FileNode>>> FileMap;
|
||||
typedef std::unordered_map<std::string,
|
||||
std::forward_list<std::shared_ptr<FileNode>>>
|
||||
FileMap;
|
||||
|
||||
mutable pthread_mutex_t contextMutex;
|
||||
FileMap openFiles;
|
||||
|
@ -100,8 +100,7 @@ static bool setIV(const std::shared_ptr<FileIO> &io, uint64_t iv) {
|
||||
bool FileNode::setName(const char *plaintextName_, const char *cipherName_,
|
||||
uint64_t iv, bool setIVFirst) {
|
||||
// Lock _lock( mutex );
|
||||
if (cipherName_)
|
||||
VLOG(1) << "calling setIV on " << cipherName_;
|
||||
if (cipherName_) VLOG(1) << "calling setIV on " << cipherName_;
|
||||
|
||||
if (setIVFirst) {
|
||||
if (fsConfig->config->externalIVChaining && !setIV(io, iv)) return false;
|
||||
|
@ -866,8 +866,9 @@ static void selectBlockMAC(int *macBytes, int *macRandBytes, bool forceMac) {
|
||||
"performance but it also means [almost] any modifications or errors\n"
|
||||
"within a block will be caught and will cause a read error."));
|
||||
} else {
|
||||
cout << "\n\n" << _("You specified --require-macs. "
|
||||
"Enabling block authentication code headers...")
|
||||
cout << "\n\n"
|
||||
<< _("You specified --require-macs. "
|
||||
"Enabling block authentication code headers...")
|
||||
<< "\n\n";
|
||||
addMAC = true;
|
||||
}
|
||||
@ -1545,8 +1546,7 @@ RootPtr initFS(EncFS_Context *ctx, const std::shared_ptr<EncFS_Opts> &opts) {
|
||||
/* Reverse mounts are read-only by default (set in main.cpp).
|
||||
* If uniqueIV is off, writing can be allowed, because there
|
||||
* is no header that could be overwritten */
|
||||
if (config->uniqueIV == false)
|
||||
opts->readOnly = false;
|
||||
if (config->uniqueIV == false) opts->readOnly = false;
|
||||
}
|
||||
|
||||
// first, instanciate the cipher.
|
||||
|
@ -82,7 +82,8 @@ Interface RawFileIO::interface() const { return RawFileIO_iface; }
|
||||
be called with a lock around it so that there won't be a race condition
|
||||
with calls to lstat picking up the wrong permissions.
|
||||
|
||||
This works around the problem described in https://github.com/vgough/encfs/issues/181
|
||||
This works around the problem described in
|
||||
https://github.com/vgough/encfs/issues/181
|
||||
Without this, "umask 0777 ; echo foo > bar" fails.
|
||||
*/
|
||||
static int open_readonly_workaround(const char *path, int flags) {
|
||||
|
@ -220,7 +220,7 @@ int encfs_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
|
||||
st.st_ino = inode;
|
||||
st.st_mode = fileType << 12;
|
||||
|
||||
// TODO: add offset support.
|
||||
// TODO: add offset support.
|
||||
#if defined(fuse_fill_dir_flags)
|
||||
if (filler(buf, name.c_str(), &st, 0, 0)) break;
|
||||
#else
|
||||
|
@ -182,27 +182,31 @@ static int showInfo(int argc, char **argv) {
|
||||
return EXIT_FAILURE;
|
||||
case Config_V3:
|
||||
// xgroup(diag)
|
||||
cout << "\n" << autosprintf(_("Version 3 configuration; "
|
||||
"created by %s\n"),
|
||||
config->creator.c_str());
|
||||
cout << "\n"
|
||||
<< autosprintf(_("Version 3 configuration; "
|
||||
"created by %s\n"),
|
||||
config->creator.c_str());
|
||||
break;
|
||||
case Config_V4:
|
||||
// xgroup(diag)
|
||||
cout << "\n" << autosprintf(_("Version 4 configuration; "
|
||||
"created by %s\n"),
|
||||
config->creator.c_str());
|
||||
cout << "\n"
|
||||
<< autosprintf(_("Version 4 configuration; "
|
||||
"created by %s\n"),
|
||||
config->creator.c_str());
|
||||
break;
|
||||
case Config_V5:
|
||||
// xgroup(diag)
|
||||
cout << "\n" << autosprintf(_("Version 5 configuration; "
|
||||
"created by %s (revision %i)\n"),
|
||||
config->creator.c_str(), config->subVersion);
|
||||
cout << "\n"
|
||||
<< autosprintf(_("Version 5 configuration; "
|
||||
"created by %s (revision %i)\n"),
|
||||
config->creator.c_str(), config->subVersion);
|
||||
break;
|
||||
case Config_V6:
|
||||
// xgroup(diag)
|
||||
cout << "\n" << autosprintf(_("Version 6 configuration; "
|
||||
"created by %s (revision %i)\n"),
|
||||
config->creator.c_str(), config->subVersion);
|
||||
cout << "\n"
|
||||
<< autosprintf(_("Version 6 configuration; "
|
||||
"created by %s (revision %i)\n"),
|
||||
config->creator.c_str(), config->subVersion);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -155,7 +155,8 @@ static void usage(const char *name) {
|
||||
" encfs ~/.crypt ~/crypt\n"
|
||||
"\n")
|
||||
// xgroup(usage)
|
||||
<< _("For more information, see the man page encfs(1)") << "\n" << endl;
|
||||
<< _("For more information, see the man page encfs(1)") << "\n"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
static void FuseUsage() {
|
||||
|
Loading…
Reference in New Issue
Block a user