Sebastian Messmer
5fb4098c8b
Implement relatime behavior for performance
2017-08-23 20:32:36 +01:00
Sebastian Messmer
679b14a4d8
* Allow mounting using system mount tool and /etc/fstab (e.g. mount -t fuse.cryfs basedir mountdir)
...
* Pass fuse options directly to cryfs (i.e. 'cryfs basedir mountdir -o allow_other' instead of 'cryfs basedir mountdir -- -o allow_other')
2017-08-23 09:56:03 +01:00
Sebastian Messmer
ffc0b5195c
- Fix CachingBlockStore2_Specific test cases to actually test CachingBlockStore2
...
- Remove old CachingBlockStore
2017-08-22 00:03:04 +01:00
Sebastian Messmer
9d298bad6c
Switch to new caching block store
2017-08-21 23:11:45 +01:00
Sebastian Messmer
4a602ce7a5
Remove old blockstore implementations
2017-07-20 19:32:42 -07:00
Sebastian Messmer
acf01ec4ff
Actually wire up CryDevice to use new block stores
2017-07-18 14:49:51 -07:00
Sebastian Messmer
317088e449
Rename unique_ref::isValid to is_valid to comply with naming scheme of other functions
2017-04-10 14:16:30 -07:00
Sebastian Messmer
9ada10db4d
Improve unique_ref
2017-04-03 14:43:32 +01:00
Sebastian Messmer
d84e65ad76
Merge from develop
2017-02-18 13:22:43 +00:00
Sebastian Messmer
19bfe97d52
du reports correct space usage
2017-02-18 13:21:54 +00:00
Sebastian Messmer
cab1c71cac
Merge from develop
2017-02-04 19:18:00 +00:00
Sebastian Messmer
54e0ffce2e
Merge branch 'develop' of github.com:cryfs/cryfs into develop
2017-02-04 19:03:32 +00:00
Sebastian Messmer
9a304fc52b
Upgrade spdlog to 0.11.0
2017-02-04 19:03:20 +00:00
Sebastian Messmer
596d9d0426
Merge from develop
2017-02-04 14:38:14 +00:00
Sebastian Messmer
7267bb5be4
Fix buid on Mac OS X
2017-02-04 14:21:00 +00:00
Sebastian Messmer
42765c6be6
Merge from develop
2017-01-21 20:24:09 +00:00
Sebastian Messmer
e37d84a3d6
fspp::Dir, fspp::File and fspp::Symlink don't inherit from fspp::Node anymore. This allows file systems to return a generic fspp::Node instead of a concrete subclass when the operation doesn't need to know what type of node it is.
2017-01-21 19:16:35 +00:00
Sebastian Messmer
b027f8c007
Merge from develop
2016-09-24 20:43:54 +02:00
Sebastian Messmer
1e9fdc9aa7
Refactor noninteractive mode. All yes/no questions are forced to define a default that will be used in noninteractive mode.
2016-09-24 20:28:56 +02:00
Sebastian Messmer
789bfc7527
Fix warning from static analysis tool about std::moving a large CryConfig object
2016-09-24 11:42:57 +02:00
Sebastian Messmer
e30656797b
Add compatibility with Crypto++ 5.6.4
2016-09-24 09:39:37 +02:00
Sebastian Messmer
46183976ee
Fix missing virtual destructor and potential integer overflow
2016-09-21 20:07:20 +02:00
Sebastian Messmer
457ca52eb3
Add assertions to unique_ref
2016-07-14 16:29:02 +02:00
Sebastian Messmer
9e9369b9ed
Performance optimization: When removing or shrinking a tree, we don't load/read leaves anymore. Loading inner nodes is enough to get all block IDs and then we can delete the leaves from their IDs without loading them.
2016-07-13 11:27:31 +02:00
Sebastian Messmer
b7b5dfba2a
Fix generation of new file systems
2016-06-27 22:31:06 -07:00
Sebastian Messmer
3425760daf
Implement migration for old filesystems that don't have parent pointers.
2016-06-27 20:03:44 -07:00
Sebastian Messmer
397de9372f
Each blob stores a parent pointer (i.e. the ID of the directory that contains this blob). This stores the directory structure in a conflict-proof way and can be used to resolve such conflicts.
2016-06-27 18:22:13 -07:00
Sebastian Messmer
a7f13ad7c1
When creating a file system, the user can choose whether to choose missing blocks as integrity violations.
2016-06-26 23:24:32 -07:00
Sebastian Messmer
be8dffb24d
MyClientId is generated outside of CryDevice to give the CryConfigCreator access to it.
2016-06-26 22:15:52 -07:00
Sebastian Messmer
7b56706c1a
Be explicit about types stored in config file
2016-06-26 22:15:52 -07:00
Sebastian Messmer
b838046246
Add a 'exclusive client' option to the config file
2016-06-26 22:15:52 -07:00
Sebastian Messmer
514dbcb6c7
ClientId is not loaded/generated inside of KnownBlockVersions, but in CryDevice. This way, CryDevice also has access to the ClientID. This is later needed to recognize whether we're in a single-client or in a multi-client setting.
2016-06-26 22:15:52 -07:00
Sebastian Messmer
839a511c4d
When an integrity violation is detected, any further access to the file system is blocked. This ensures that the user notices the integrity violation.
2016-06-26 22:15:52 -07:00
Sebastian Messmer
c84a230afd
VersionCountingBlockStore is initialized with a flag, saying whether missing blocks are integrity errors. This flag is meant to be activated in a single-client scenario to have this additional integrity check.
2016-06-26 22:15:52 -07:00
Sebastian Messmer
86c2144a37
Implement migration from file systems without version numbers
2016-06-26 22:15:52 -07:00
Sebastian Messmer
389273a24f
Test cases use a fake home directory for their configuration, so they don't clutter the actual home directory.
2016-06-26 22:15:52 -07:00
Sebastian Messmer
a5391a854d
Use VersionCountingBlockStore
2016-06-26 22:15:52 -07:00
Sebastian Messmer
0a61987594
Be explicit about types stored in config file
2016-06-26 15:34:53 -07:00
Sebastian Messmer
f6a80a4651
Remove default config values for mandatory values
2016-06-26 15:26:05 -07:00
Sebastian Messmer
e4501d51e5
Each file system gets a unique ID. This ID will later be used to store local configuration of a client for that file system.
2016-06-20 16:14:07 -07:00
Sebastian Messmer
c5ccd9c2d1
Set cache entry to dirty when timestamps are changed. Otherwise, it wouldn't be written back.
2016-06-09 17:32:35 -07:00
Sebastian Messmer
e8ad454e47
TODOs
2016-06-08 12:35:56 -07:00
Sebastian Messmer
e2ec72edde
Remove unused function
2016-06-08 12:29:28 -07:00
Sebastian Messmer
5aff394a16
Directory timestamps are updated correctly. Also added test cases for this.
2016-06-08 12:21:57 -07:00
Sebastian Messmer
5a5037c992
Symlinks update atime correctly. Also added a test case for this.
2016-06-07 21:47:23 -07:00
Sebastian Messmer
69f4c7976e
File::truncate() updates timestamps correctly. Also added test cases for this.
2016-06-07 21:30:57 -07:00
Sebastian Messmer
6448110975
OpenFile updates timestamps correctly, i.e. on read(), write() and truncate(). Also added test cases for it.
2016-06-07 21:25:02 -07:00
Sebastian Messmer
9bb2e2e89a
Implement fsync() and fdatasync() syscalls for flushing open files
2016-06-07 18:36:59 -07:00
Sebastian Messmer
2642507344
Allow loading file systems from future cryfs versions if user specifically asks for it
2016-06-06 15:31:09 -07:00
Sebastian Messmer
93927e76d6
TODOs
2016-06-02 20:25:14 -07:00
Sebastian Meßmer
3894157589
Merge pull request #61 from mhogomchungu/develop
...
remove compiler warnings
2016-06-02 20:21:54 -07:00
Sebastian Messmer
1402f54fec
Factor out platform inconsistency between Mac and Linux (stat.st_atim vs stat.st_atimespec)
2016-06-02 20:08:51 -07:00
Francis Banyikwa
c5a6f16cd5
use a macro to silence compiler warnings
2016-06-02 09:54:39 +03:00
Francis Banyikwa
de6462e548
remove compiler warnings
2016-06-01 11:34:19 +03:00
Sebastian Messmer
61e56cfeab
Fix small rename corner case and add test cases for timestamps in many rename corner cases
2016-05-27 21:19:04 -07:00
Sebastian Messmer
183b9cf74b
Fix utimens() behavior: It now updates ctime as well.
2016-05-27 17:26:23 -07:00
Sebastian Messmer
f6545bbcc3
Move fsblobstore::now() to cpputils
2016-05-27 15:46:05 -07:00
Sebastian Messmer
9a0b0a0c36
Ask before migrating an old CryFS file system to a new version.
2016-05-03 20:34:30 -07:00
Sebastian Messmer
257b028511
Prevent opening file systems that were created with newer versions of CryFS
2016-04-29 12:46:14 -07:00
Sebastian Messmer
2fbed11431
Remove debug output
2016-04-29 12:38:53 -07:00
Sebastian Messmer
bfba538818
Fix rename corner cases: Overwriting an existing directory with a file or the other way round
2016-04-28 22:49:57 -07:00
Sebastian Messmer
66b52b6434
Fix rename corner case: Renaming element to its old name
2016-04-28 22:36:53 -07:00
Sebastian Messmer
a03ab91aba
Fix rename when overwriting an existing file in the same directory
2016-04-28 13:27:54 -07:00
Sebastian Messmer
811c163bfa
Fix rename() when overwriting an existing file: (a) Keep the invariant that the list of directory entries is sorted and (b) delete the blob of the overwritten file
2016-04-25 17:42:17 -07:00
Sebastian Messmer
03f59b69da
Since 0.9.3-alpha set the config value cryfs.blocksizeBytes wrongly to 32768 (but didn't use the value), we have to add a workaround.
2016-03-26 23:56:56 +08:00
Sebastian Messmer
b9ac810414
- The version field in the config file is updated when the file system is opened with a newer CryFS version (i.e. it is migrated to the newer version).
...
- We introduced a CreatedWithVersion field instead which gets the semantics the version field had before (i.e. which version of CryFS was the file system originally created with)
- Move VersionCompare to gitversion package
2016-03-27 00:09:07 +08:00
Sebastian Messmer
67c5495db7
TODOs
2016-03-24 07:56:41 +00:00
Sebastian Messmer
6e7004d485
Rename operation allows overwriting existing files.
2016-03-24 02:47:50 +00:00
Sebastian Messmer
03ccead85b
Add test cases for rename
2016-03-24 01:45:53 +00:00
Sebastian Messmer
2ac47f480b
- Fix rename bug: When trying to rename a file to a name that already exists, it was deleted instead. This is now fixed.
...
- Additional test cases for rename
2016-03-23 18:03:30 +00:00
Sebastian Messmer
db53b597d4
Handle renaming root directory correctly
2016-03-23 16:07:08 +00:00
Sebastian Messmer
1c0199e147
When the user specifies a block size for the file system, this is taken as the physical block size, not virtual block size.
2016-03-16 19:30:26 +00:00
Sebastian Messmer
0cdfb8ba2e
Fix fstat (a bug in the fstat implementation caused problems with some text editors (e.g. nano) falsely thinking a file changed since they opened it).
2016-03-16 17:03:53 +00:00
Sebastian Messmer
52d85f4de3
Refactor DirEntries
2016-03-16 15:29:26 +00:00
Sebastian Messmer
5f8bf4cea4
Fix version number mentioned in comment
2016-03-09 00:23:11 +01:00
Sebastian Messmer
1ee3a8df86
Use uint64_t for block size
2016-03-09 00:20:04 +01:00
Sebastian Messmer
d7f34c0dfb
Make blocksize configurable
2016-03-08 23:57:34 +01:00
Sebastian Messmer
4dbb380263
Decouple DirBlob from CryDevice
2016-03-08 23:47:31 +01:00
Sebastian Messmer
526b749d1d
Add a command line option for blocksize
2016-03-04 23:12:41 +01:00
Sebastian Messmer
5753e4f71c
Switch to new git version number recognition
2016-03-02 13:53:37 +01:00
Sebastian Messmer
3254220987
Filesystems have a blocksizeBytes configuration option
2016-03-01 17:45:48 +01:00
Sebastian Messmer
ab5eb920a5
Show current time as modification time for mountdir. This probably confuses people less than if we show timestamp zero.
2016-02-26 10:47:47 +01:00
Sebastian Messmer
e48188f470
Restructure project to allow factoring out a library
2016-02-23 21:07:23 +01:00
Sebastian Messmer
f92c4a4f71
Show a message when update checking is disabled
2016-02-22 15:52:41 +01:00
Sebastian Messmer
5f67378bc9
Fix compiler error for older gcc versions
2016-02-22 11:44:59 +01:00
Sebastian Messmer
d5a0b725fe
Refactor interface for key derivation functions. This allows easily adding new (password based) key derivation functions.
2016-02-22 02:38:06 +01:00
Sebastian Messmer
7d9d72d82a
Improve help output
2016-02-21 22:33:36 +01:00
Sebastian Messmer
54d2fc516f
Add environment variables to help output
2016-02-21 22:28:29 +01:00
Sebastian Messmer
d95cc33a58
You can disable the automatic update check by setting CRYFS_NO_UPDATE_CHECK=true in your environment.
2016-02-21 22:15:27 +01:00
Sebastian Messmer
9c83d3b2a4
If CRYFS_FRONTEND=noninteractive is set in the environment, assume we're used by a tool and:
...
- Don't ask for config. Use default settings for everything that is not specified as command line parameter.
- Don't ask for password confirmation. Password only has to be passed in once to stdin.
2016-02-21 01:36:14 +01:00
Sebastian Messmer
346baf8e9b
Only show update check warning if version on server is actually newer
2016-02-20 18:23:46 +01:00
Sebastian Messmer
d00e097954
Do a sanity check when mounting the file system and fail if the root blob is not available.
2016-02-19 02:10:10 +01:00
Sebastian Messmer
df041ac845
Fix a bug where deleting a directory could leave over some blocks.
...
Details: Before, we allowed removing non-empty directories. Seems 'rm -rf' is trying to do that. Now, we return the correct error code ENOTEMPTY in this case, which causes that 'rm -rf' deletes the entries first.
2016-02-17 12:52:01 +01:00
Sebastian Messmer
7f1493ab92
Increase scrypt KDF effort for generating the config file key from the password
2016-02-16 20:35:51 +01:00
Sebastian Messmer
68acc27e88
Report file system statistics (like free space) to operating system
2016-02-15 14:20:21 +01:00
Sebastian Messmer
6fb46c7e73
Use inline for short functions
2016-02-15 13:22:21 +01:00
Sebastian Messmer
456b240e21
Add TODOs
2016-02-15 03:45:09 +01:00
Sebastian Messmer
5651a86b78
Improve CLI usage line and README
2016-02-15 02:40:56 +01:00
Sebastian Messmer
7ede09877e
Removed resolved TODO
2016-02-14 02:29:27 +01:00
Sebastian Messmer
e532885598
Fix crash on Mac OS X when parsing the command line parameters
2016-02-13 20:59:51 +01:00