Commit graph

703 commits

Author SHA1 Message Date
Thomas Waldmann
d2c2b9a67c Merge branch 'merge' into merge-all 2015-03-20 02:35:03 +01:00
Thomas Waldmann
dd8ff50a5c PR #245 - Merge branch 'fix_exceptions' into merge
Conflicts:
	attic/archive.py
2015-03-20 02:34:10 +01:00
Thomas Waldmann
2da70c7d7a fix some exception handlers
don't catch "Exception" when OSError was meant (otherwise e.errno is not there anyway)
don't use bare "except:" if one can avoid (copied code fragment from similar handler)
2015-03-20 02:31:39 +01:00
Thomas Waldmann
2dfaab0f6c Merge branch 'merge' into merge-all 2015-03-20 01:43:51 +01:00
Thomas Waldmann
f31897bb1f PR #244 - Merge branch 'fix_atime' into merge 2015-03-20 01:43:04 +01:00
Thomas Waldmann
8fba904b16 fix noatime mode, fixes #243
added "nonlocal euid" - without this, euid just gets redefined in inner scope instead of assigned to outer scope
added check for euid 0 - if we run as root, we always have permissions (not just if we are file owner)

note: due to caching and OS behaviour on linux, the bug was a bit tricky to reproduce
and also the fix was a bit tricky to test.

one needs strictatime mount option to enfore traditional atime updating.

for repeated tests, always change file contents (e.g. from /dev/urandom) or attic's caching
will prevent that the file gets read ("accessed") again.

check atimes with ls -lu

i could reproduce code was broken and is fixed with this changeset. and root now doesn't touch any atimes.
2015-03-20 01:40:51 +01:00
Thomas Waldmann
4f7c8326b7 tuning: add a note about scrolling 2015-03-19 01:26:56 +01:00
Thomas Waldmann
f767d5803e fix max unpack length 2015-03-18 21:37:12 +01:00
Thomas Waldmann
ce89707c19 Merge branch 'merge' into merge-all 2015-03-18 18:21:50 +01:00
Thomas Waldmann
fd16debb05 PR #235 - Merge branch 'fix_xattr' into merge 2015-03-18 18:21:21 +01:00
Thomas Waldmann
767e795597 dummy acl implementation for unsupported platforms
the API_VERSION there was not in sync (and that was even true, as "st" was missing in acl_get()) - fixed.
2015-03-18 18:21:04 +01:00
Thomas Waldmann
ae62e3c84c Merge branch 'merge' into merge-all 2015-03-18 17:49:23 +01:00
Thomas Waldmann
f1af650d9e PR #235 - Merge branch 'fix_xattr' into merge 2015-03-18 17:48:48 +01:00
Thomas Waldmann
1fe844a896 dummy xattr implementation for unsupported platforms
raising "Unsupported platform" (and making attic completely unusable) just because there is no xattr support isn't necessary.
2015-03-18 17:45:05 +01:00
Thomas Waldmann
f71c18bfea Merge branch 'merge' into merge-all 2015-03-18 15:58:20 +01:00
Thomas Waldmann
c4f3068c55 PR #241 - Merge branch 'patch-1' of https://github.com/adept/attic into merge 2015-03-18 15:30:53 +01:00
Dmitry Astapov
6be2734b7e Do not create items_buffer and chunker unless we are creating new archive
Listing repositories with lots of archives on low-memory systems would cause attic to run out of memory due to items_buffer and chunker being created for each visited archive.

See https://github.com/jborg/attic/issues/163
2015-03-18 12:42:28 +00:00
Thomas Waldmann
79ab84ee75 Merge branch 'merge' into merge-all 2015-03-18 03:23:44 +01:00
Thomas Waldmann
3daaceb6bf PR #238 - Merge branch 'fix_fuse_error_msg' into merge 2015-03-18 03:22:38 +01:00
Thomas Waldmann
ee1dc89b52 fix misleading hint the fuse ImportError handler gave, fixes #237 2015-03-18 02:33:34 +01:00
Thomas Waldmann
421c7f22a4 Merge branch 'merge' into merge-all
Conflicts:
	attic/key.py
2015-03-18 00:39:38 +01:00
Thomas Waldmann
b7cefacb69 Merge branch 'python_cleanup' into merge
Conflicts:
	attic/archiver.py
	attic/remote.py
2015-03-18 00:23:41 +01:00
Thomas Waldmann
e9aacad9a3 remove unused imports 2015-03-17 23:54:05 +01:00
Thomas Waldmann
4ef6125f45 cleanup pep8 issues found by pycharm 2015-03-17 23:47:21 +01:00
Thomas Waldmann
3a33d57c7d triple-double-quotes for docstrings 2015-03-17 23:23:56 +01:00
Thomas Waldmann
a21da5d2e0 no bare except 2015-03-17 23:16:12 +01:00
Thomas Waldmann
dee9869a03 use "with" with open() 2015-03-17 23:09:14 +01:00
Thomas Waldmann
fec5572836 no Class(object) in py3 2015-03-17 23:03:36 +01:00
Thomas Waldmann
30f48879da add tuning docs 2015-03-15 14:27:47 +01:00
Thomas Waldmann
1e21ad85b4 improve attic init --help 2015-03-15 05:05:19 +01:00
Thomas Waldmann
b275d18c6b msgpack: limit unpacker, use bin type for bytes
we only need a little metadata and 1 medium sized piece of data, so
avoid memory allocation issues that could be caused by tampered input data.

bin type is more appropriate for binary data than str type (which could be also encoded text).
2015-03-15 04:45:52 +01:00
Thomas Waldmann
61f84efa60 misc. small fixes, discovered by pycharm
removed unused import
fixed format string
2015-03-15 01:52:56 +01:00
Thomas Waldmann
31f8af4423 Merge branch 'merge' into merge-all 2015-03-15 00:23:31 +01:00
Thomas Waldmann
2f5e5e01ea PR #235 - Merge branch 'fix_xattr' into merge 2015-03-15 00:22:01 +01:00
Thomas Waldmann
6116fa72b2 give specific path to xattr.is_enabled(), disable symlink setattr call that always fails 2015-03-15 00:20:50 +01:00
Thomas Waldmann
99daa2794d for zero compression (and decompression), avoid going through zlib
for level 0, zlib.compress is still at some cost, it doesn't just give back the data 1:1.
in fact, it even does add some overhead, creating larger output than input.

thus, it is replaced by NullCompressor, which really does nothing.
2015-03-14 22:06:18 +01:00
Thomas Waldmann
55db07b3b4 Merge branch 'merge' into merge-all 2015-03-14 20:54:06 +01:00
Thomas Waldmann
89ffe98ba2 PR #234 - Merge branch 'fix_pipe' into merge 2015-03-14 20:53:06 +01:00
Thomas Waldmann
cbbe0fcc9b serve: use os.write(stdout_fd, ...), fixes #233
this way, serve() is more consistent with the other code, which always uses os.read/write (not sys.std*.buffer.read/write).

also: reduce code duplication a bit.
2015-03-14 19:45:01 +01:00
Thomas Waldmann
8a36478287 implement GMAC based on GHASH, use GHASH, faster compression, comments
note: zlib level 0 is even faster, but crashes one RemoteArchiver unittest, huh!?
2015-03-14 02:48:54 +01:00
Thomas Waldmann
6aca9383d7 reintegrate AEAD cipher made from AES CTR + HMAC-SHA256 2015-03-14 00:52:54 +01:00
Thomas Waldmann
c1c94a8682 cosmetics: comments, rename crypt... -> key... 2015-03-13 23:13:41 +01:00
Thomas Waldmann
f042845762 make the cipher variable, uses AEAD-like interface for authentication/encryption 2015-03-13 22:30:22 +01:00
Thomas Waldmann
47887fb2bc Merge branch 'merge' into merge-all
Conflicts:
	setup.py
2015-03-12 20:10:23 +01:00
Thomas Waldmann
615ca87c17 Merge branch 'msgpack_corruption' into merge 2015-03-12 20:07:46 +01:00
Thomas Waldmann
4c7d0762a9 as msgpack-python 0.4.6 is released now, just use that. 2015-03-12 20:06:53 +01:00
Thomas Waldmann
4cdb1c37ba use GMAC as default for now, integrate into maccer type system, adapt tests 2015-03-12 19:03:27 +01:00
Thomas Waldmann
20d1a74aaa Merge branch 'aes_gcm' into merge-all
Note: this is just a rather quick merge, just to get things working as
they did in aes-gcm branch. As gcm replaced ctr, more work is needed to
re-integrate aes-ctr (for backwards compat). And also to use self.maccer
for the id_hash.

Conflicts:
	attic/key.py
	attic/testsuite/key.py
2015-03-12 17:07:16 +01:00
Thomas Waldmann
f99dc8d413 Merge branch 'flexible_compression' into merge-all
Conflicts:
	setup.py
2015-03-12 14:32:32 +01:00
Thomas Waldmann
8032089d62 add remark about potential memory issue with tampered input 2015-03-12 12:20:26 +01:00