Merge branch 'develop' of github.com:cryfs/cryfs into develop
This commit is contained in:
commit
54e0ffce2e
@ -2,11 +2,11 @@
|
|||||||
#ifndef MESSMER_CPPUTILS_SYSTEM_CLOCKGETTIME_H
|
#ifndef MESSMER_CPPUTILS_SYSTEM_CLOCKGETTIME_H
|
||||||
#define MESSMER_CPPUTILS_SYSTEM_CLOCKGETTIME_H
|
#define MESSMER_CPPUTILS_SYSTEM_CLOCKGETTIME_H
|
||||||
|
|
||||||
// Implements clock_gettime for Mac OS X (where it is not implemented by in the standard library)
|
// Implements clock_gettime for Mac OS X before 10.12 (where it is not implemented by in the standard library)
|
||||||
// Source: http://stackoverflow.com/a/9781275/829568
|
// Source: http://stackoverflow.com/a/9781275/829568
|
||||||
// Caution: The returned value is less precise than the returned value from a linux clock_gettime would be.
|
// Caution: The returned value is less precise than the returned value from a linux clock_gettime would be.
|
||||||
|
|
||||||
#ifdef __MACH__
|
#if defined(__MACH__) && !defined(CLOCK_REALTIME)
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#define CLOCK_REALTIME 0
|
#define CLOCK_REALTIME 0
|
||||||
inline int clock_gettime(int /*clk_id*/, struct timespec *result) {
|
inline int clock_gettime(int /*clk_id*/, struct timespec *result) {
|
||||||
|
@ -2,11 +2,13 @@
|
|||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <boost/optional.hpp>
|
#include <boost/optional.hpp>
|
||||||
|
#include <cryfs/config/CryConfigConsole.h>
|
||||||
#include <cryfs-cli/Environment.h>
|
#include <cryfs-cli/Environment.h>
|
||||||
|
|
||||||
namespace po = boost::program_options;
|
namespace po = boost::program_options;
|
||||||
namespace bf = boost::filesystem;
|
namespace bf = boost::filesystem;
|
||||||
using namespace cryfs::program_options;
|
using namespace cryfs::program_options;
|
||||||
|
using cryfs::CryConfigConsole;
|
||||||
using std::pair;
|
using std::pair;
|
||||||
using std::vector;
|
using std::vector;
|
||||||
using std::cerr;
|
using std::cerr;
|
||||||
@ -118,12 +120,16 @@ vector<const char*> Parser::_to_const_char_vector(const vector<string> &options)
|
|||||||
|
|
||||||
void Parser::_addAllowedOptions(po::options_description *desc) {
|
void Parser::_addAllowedOptions(po::options_description *desc) {
|
||||||
po::options_description options("Allowed options");
|
po::options_description options("Allowed options");
|
||||||
|
string cipher_description = "Cipher to use for encryption. See possible values by calling cryfs with --show-ciphers. Default: ";
|
||||||
|
cipher_description += CryConfigConsole::DEFAULT_CIPHER;
|
||||||
|
string blocksize_description = "The block size used when storing ciphertext blocks (in bytes). Default: ";
|
||||||
|
blocksize_description += std::to_string(CryConfigConsole::DEFAULT_BLOCKSIZE_BYTES);
|
||||||
options.add_options()
|
options.add_options()
|
||||||
("help,h", "show help message")
|
("help,h", "show help message")
|
||||||
("config,c", po::value<string>(), "Configuration file")
|
("config,c", po::value<string>(), "Configuration file")
|
||||||
("foreground,f", "Run CryFS in foreground.")
|
("foreground,f", "Run CryFS in foreground.")
|
||||||
("cipher", po::value<string>(), "Cipher to use for encryption. See possible values by calling cryfs with --show-ciphers.")
|
("cipher", po::value<string>(), cipher_description.c_str())
|
||||||
("blocksize", po::value<uint32_t>(), "The block size used when storing ciphertext blocks (in bytes).")
|
("blocksize", po::value<uint32_t>(), blocksize_description.c_str())
|
||||||
("show-ciphers", "Show list of supported ciphers.")
|
("show-ciphers", "Show list of supported ciphers.")
|
||||||
("unmount-idle", po::value<double>(), "Automatically unmount after specified number of idle minutes.")
|
("unmount-idle", po::value<double>(), "Automatically unmount after specified number of idle minutes.")
|
||||||
("logfile", po::value<string>(), "Specify the file to write log messages to. If this is not specified, log messages will go to stdout, or syslog if CryFS is running in the background.")
|
("logfile", po::value<string>(), "Specify the file to write log messages to. If this is not specified, log messages will go to stdout, or syslog if CryFS is running in the background.")
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include <blockstore/utils/Key.h>
|
#include <blockstore/utils/Key.h>
|
||||||
#include <fspp/fs_interface/Dir.h>
|
#include <fspp/fs_interface/Dir.h>
|
||||||
#include <cpp-utils/system/time.h>
|
#include <cpp-utils/system/time.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
|
||||||
// TODO Implement (and test) atime, noatime, strictatime, relatime mount options
|
// TODO Implement (and test) atime, noatime, strictatime, relatime mount options
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user