mirror of
https://github.com/vgough/encfs.git
synced 2025-06-24 22:12:10 +02:00
reformat files before major edits
git-svn-id: http://encfs.googlecode.com/svn/trunk@78 db9cf616-1c43-0410-9cb8-a902689de0d6
This commit is contained in:
parent
b28b97999e
commit
5d99db5376
2694
encfs/FileUtils.cpp
2694
encfs/FileUtils.cpp
File diff suppressed because it is too large
Load Diff
@ -44,96 +44,96 @@ class DirNode;
|
|||||||
|
|
||||||
struct EncFS_Root
|
struct EncFS_Root
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Cipher> cipher;
|
boost::shared_ptr<Cipher> cipher;
|
||||||
CipherKey volumeKey;
|
CipherKey volumeKey;
|
||||||
boost::shared_ptr<DirNode> root;
|
boost::shared_ptr<DirNode> root;
|
||||||
|
|
||||||
EncFS_Root();
|
EncFS_Root();
|
||||||
~EncFS_Root();
|
~EncFS_Root();
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef boost::shared_ptr<EncFS_Root> RootPtr;
|
typedef boost::shared_ptr<EncFS_Root> RootPtr;
|
||||||
|
|
||||||
enum ConfigMode
|
enum ConfigMode
|
||||||
{
|
{
|
||||||
Config_Prompt,
|
Config_Prompt,
|
||||||
Config_Standard,
|
Config_Standard,
|
||||||
Config_Paranoia
|
Config_Paranoia
|
||||||
};
|
};
|
||||||
|
|
||||||
struct EncFS_Opts
|
struct EncFS_Opts
|
||||||
{
|
{
|
||||||
std::string rootDir;
|
std::string rootDir;
|
||||||
bool createIfNotFound; // create filesystem if not found
|
bool createIfNotFound; // create filesystem if not found
|
||||||
bool idleTracking; // turn on idle monitoring of filesystem
|
bool idleTracking; // turn on idle monitoring of filesystem
|
||||||
bool mountOnDemand; // mounting on-demand
|
bool mountOnDemand; // mounting on-demand
|
||||||
|
|
||||||
bool checkKey; // check crypto key decoding
|
bool checkKey; // check crypto key decoding
|
||||||
bool forceDecode; // force decode on MAC block failures
|
bool forceDecode; // force decode on MAC block failures
|
||||||
|
|
||||||
std::string passwordProgram; // path to password program (or empty)
|
std::string passwordProgram; // path to password program (or empty)
|
||||||
bool useStdin; // read password from stdin rather then prompting
|
bool useStdin; // read password from stdin rather then prompting
|
||||||
bool annotate; // print annotation line prompt to stderr.
|
bool annotate; // print annotation line prompt to stderr.
|
||||||
|
|
||||||
bool ownerCreate; // set owner of new files to caller
|
bool ownerCreate; // set owner of new files to caller
|
||||||
|
|
||||||
bool reverseEncryption; // Reverse encryption
|
bool reverseEncryption; // Reverse encryption
|
||||||
|
|
||||||
ConfigMode configMode;
|
ConfigMode configMode;
|
||||||
|
|
||||||
EncFS_Opts()
|
EncFS_Opts()
|
||||||
{
|
{
|
||||||
createIfNotFound = true;
|
createIfNotFound = true;
|
||||||
idleTracking = false;
|
idleTracking = false;
|
||||||
mountOnDemand = false;
|
mountOnDemand = false;
|
||||||
checkKey = true;
|
checkKey = true;
|
||||||
forceDecode = false;
|
forceDecode = false;
|
||||||
useStdin = false;
|
useStdin = false;
|
||||||
annotate = false;
|
annotate = false;
|
||||||
ownerCreate = false;
|
ownerCreate = false;
|
||||||
reverseEncryption = false;
|
reverseEncryption = false;
|
||||||
configMode = Config_Prompt;
|
configMode = Config_Prompt;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Read existing config file. Looks for any supported configuration version.
|
Read existing config file. Looks for any supported configuration version.
|
||||||
*/
|
*/
|
||||||
ConfigType readConfig( const std::string &rootDir,
|
ConfigType readConfig( const std::string &rootDir,
|
||||||
const boost::shared_ptr<EncFSConfig> &config );
|
const boost::shared_ptr<EncFSConfig> &config );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Save the configuration. Saves back as the same configuration type as was
|
Save the configuration. Saves back as the same configuration type as was
|
||||||
read from.
|
read from.
|
||||||
*/
|
*/
|
||||||
bool saveConfig( ConfigType type, const std::string &rootdir,
|
bool saveConfig( ConfigType type, const std::string &rootdir,
|
||||||
const boost::shared_ptr<EncFSConfig> &config );
|
const boost::shared_ptr<EncFSConfig> &config );
|
||||||
|
|
||||||
class EncFS_Context;
|
class EncFS_Context;
|
||||||
|
|
||||||
RootPtr initFS( EncFS_Context *ctx, const boost::shared_ptr<EncFS_Opts> &opts );
|
RootPtr initFS( EncFS_Context *ctx, const boost::shared_ptr<EncFS_Opts> &opts );
|
||||||
|
|
||||||
RootPtr createV6Config( EncFS_Context *ctx,
|
RootPtr createV6Config( EncFS_Context *ctx,
|
||||||
const boost::shared_ptr<EncFS_Opts> &opts );
|
const boost::shared_ptr<EncFS_Opts> &opts );
|
||||||
|
|
||||||
void showFSInfo( const boost::shared_ptr<EncFSConfig> &config );
|
void showFSInfo( const boost::shared_ptr<EncFSConfig> &config );
|
||||||
|
|
||||||
bool readV4Config( const char *configFile,
|
bool readV4Config( const char *configFile,
|
||||||
const boost::shared_ptr<EncFSConfig> &config,
|
const boost::shared_ptr<EncFSConfig> &config,
|
||||||
struct ConfigInfo *);
|
struct ConfigInfo *);
|
||||||
bool writeV4Config( const char *configFile,
|
bool writeV4Config( const char *configFile,
|
||||||
const boost::shared_ptr<EncFSConfig> &config);
|
const boost::shared_ptr<EncFSConfig> &config);
|
||||||
|
|
||||||
bool readV5Config( const char *configFile,
|
bool readV5Config( const char *configFile,
|
||||||
const boost::shared_ptr<EncFSConfig> &config,
|
const boost::shared_ptr<EncFSConfig> &config,
|
||||||
struct ConfigInfo *);
|
struct ConfigInfo *);
|
||||||
bool writeV5Config( const char *configFile,
|
bool writeV5Config( const char *configFile,
|
||||||
const boost::shared_ptr<EncFSConfig> &config);
|
const boost::shared_ptr<EncFSConfig> &config);
|
||||||
|
|
||||||
bool readV6Config( const char *configFile,
|
bool readV6Config( const char *configFile,
|
||||||
const boost::shared_ptr<EncFSConfig> &config,
|
const boost::shared_ptr<EncFSConfig> &config,
|
||||||
struct ConfigInfo *);
|
struct ConfigInfo *);
|
||||||
bool writeV6Config( const char *configFile,
|
bool writeV6Config( const char *configFile,
|
||||||
const boost::shared_ptr<EncFSConfig> &config);
|
const boost::shared_ptr<EncFSConfig> &config);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user