TW
e5e360d5b6
Merge pull request #6507 from ThomasWaldmann/update-security-support-1.2
...
borg 1.2 is security supported
2022-03-30 00:11:57 +02:00
Thomas Waldmann
017f9b2102
borg 1.2 is security supported
2022-03-29 23:55:25 +02:00
TW
28c7494455
Merge pull request #6503 from aspargas2/1.2-maint
...
1.2-maint backport: delete: add repository id and location to prompt
2022-03-28 18:42:36 +02:00
Thomas Deutschmann
821d814af3
delete: add repository id and location to prompt
...
Closes: https://github.com/borgbackup/borg/issues/6453
2022-03-28 10:16:53 -04:00
TW
b5443da6cb
Merge pull request #6493 from ThomasWaldmann/use-compare_digest-1.2
...
use hmac.compare_digest instead of ==, fixes #6470
2022-03-26 19:48:05 +01:00
TW
4ecf0d4d78
Merge pull request #6491 from ThomasWaldmann/crypto-fixes-1.2
...
avoid losing the key (old crypto)
2022-03-26 19:05:54 +01:00
Thomas Waldmann
b75079c0f8
use hmac.compare_digest instead of ==, fixes #6470
2022-03-26 18:52:41 +01:00
Thomas Waldmann
3e91694a0a
avoid losing the key (old crypto)
...
if we just have a pointer to a bytes object which might go out of scope, we can lose it.
also: cython can directly assign a bytes object into a same-size char array.
2022-03-26 18:32:44 +01:00
TW
2e45e19e02
Merge pull request #6488 from ThomasWaldmann/update-ubuntu-link-1.2
...
docs: update link to ubuntu packages, fixes #6485
2022-03-26 18:20:54 +01:00
Thomas Waldmann
c14bc52189
docs: update link to ubuntu packages, fixes #6485
2022-03-26 18:07:03 +01:00
TW
df9322c4a9
Merge pull request #6475 from bket/unused-code-1.2
...
1.2 - Remove unused code
2022-03-21 19:51:09 +01:00
Björn Ketelaars
71fa056c47
1.2 - Remove unused code
...
#6473 Removed AEAD ciphers AES-OCB and CHACHA20-POLY1305 from 1.2. As a
result some additional code can be removed.
Passes regression tests.
2022-03-21 18:54:50 +01:00
TW
87f0b9803b
Merge pull request #6473 from ThomasWaldmann/remove-aead-1.2
...
remove AEAD ciphers AES-OCB and CHACHA20-POLY1305, fixes #6472
2022-03-20 23:44:40 +01:00
Thomas Waldmann
aa57a3cb57
remove AEAD ciphers AES-OCB and CHACHA20-POLY1305, fixes #6472
...
not used in 1.2.x, we'll start using them in 1.3.
2022-03-20 23:05:30 +01:00
TW
d41908166f
Merge pull request #6435 from hexagonrecursion/1-2-fallthrough
...
1.2: Make switch fallthrough explicit
2022-03-10 12:04:12 +01:00
TW
e25d6c8c4b
Merge pull request #6436 from hexagonrecursion/1-2-numeric
...
1.2: use --numeric-ids in pull doc
2022-03-10 11:55:42 +01:00
Michael Bauer
1345f06f2b
use --numeric-ids in pull doc
...
replace flag --numeric-owner with --numeric-ids
2022-03-10 08:34:27 +03:00
Andrey Bienkowski
a58fd3db5c
1.2: Make switch fallthrough explicit
2022-03-10 08:24:23 +03:00
TW
791720407b
Merge pull request #6432 from hexagonrecursion/1-2-cflags
...
1.2: Allow extra compiler flags for every extension build
2022-03-10 00:13:44 +01:00
James Buren
793d543328
Allow extra compiler flags for every extension build
...
This is mainly intended for explicit warnings but it can be
used for other flags as well.
Conflicts:
setup.py
2022-03-10 00:50:59 +03:00
TW
f698c12129
Merge pull request #6403 from ThomasWaldmann/fix-savefile-mode-1.2
...
respect umask for files / dirs (1.2)
2022-03-09 16:53:35 +01:00
braewoods
8b4c501d8d
[1.2-maint] Backport implicit warning patches from master ( #6427 )
...
* suppress -Wimplicit-fallthrough warning
These instances of implicit switch case fallthrough appear to be
intentional. Add comments that the compiler understands to suppress
the false positive warning.
2022-03-09 16:10:21 +01:00
TW
450610b168
Merge pull request #6423 from ThomasWaldmann/fix-cython-warnings-1.2
...
fix "useless trailing comma" cython warnings
2022-03-08 22:19:47 +01:00
Thomas Waldmann
dc811bda6f
fix "'HMAC_CTX' already defined" cython warning
2022-03-08 21:47:14 +01:00
Thomas Waldmann
cd629d32cb
fix "useless trailing comma" cython warnings
2022-03-08 21:27:20 +01:00
TW
7a1d12d007
Merge pull request #6418 from hexagonrecursion/bp12-unicode
...
1.2-maint: ‘PyUnicode_AsUnicode’ is deprecated
2022-03-07 20:14:15 +01:00
Andrey Bienkowski
f05036cbcb
‘PyUnicode_AsUnicode’ is deprecated
...
Fix compilation warnings:
```
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/opt/hostedtoolcache/Python/3.9.10/x64/include/python3.9 -c src/borg/platform/posix.c -o build/temp.linux-x86_64-3.9/src/borg/platform/posix.o
src/borg/platform/posix.c: In function ‘__pyx_pf_4borg_8platform_5posix_2swidth’:
src/borg/platform/posix.c:1572:3: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
1572 | __pyx_t_2 = __Pyx_PyUnicode_AsUnicode(__pyx_v_s); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 19, __pyx_L1_error)
| ^~~~~~~~~
In file included from /opt/hostedtoolcache/Python/3.9.10/x64/include/python3.9/unicodeobject.h:1026,
from /opt/hostedtoolcache/Python/3.9.10/x64/include/python3.9/Python.h:93,
from src/borg/platform/posix.c:19:
/opt/hostedtoolcache/Python/3.9.10/x64/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
| ^~~~~~~~~~~~~~~~~~~
```
Ref: https://docs.python.org/3/c-api/unicode.html#c.PyUnicode_AsUnicode
2022-03-07 21:40:39 +03:00
TW
20a9df18f7
Merge pull request #6413 from aspargas2/1.2-maint
...
Backport: fix codeql complaining about missing headers needed by borg
2022-03-07 17:59:53 +01:00
aspargas2
2425f54bdb
tweak what is backported, as requested
...
- don't backport `pyproject.toml` or related changes
- install some additional -dev packages with `apt-get` for CodeQL
- run CodeQL in a python venv
2022-03-07 10:14:22 -05:00
TW
bb76dca114
Merge pull request #6414 from hexagonrecursion/bp-blake
...
1.2-maint: hmac and blake2b minor optimizations and cleanups
2022-03-06 14:39:51 +01:00
Thomas Waldmann
ce72a87f2d
fixup: fix SELFTEST_COUNT
2022-03-06 11:31:05 +03:00
Thomas Waldmann
65ccbc2c69
fixup: remove now unused import
2022-03-06 11:31:05 +03:00
Thomas Waldmann
8dd2612fc6
remove the blake2b compat checker script
...
this was used to compare compatibility of our vendored
blake2b code (which we do not have any more) against the
python stdlib blake2b code (which we always use now anyway).
2022-03-06 11:31:05 +03:00
Thomas Waldmann
45ef108d46
remove our blake2b_128/256 tests
...
as we're just calling python stdlib there,
we can assume that they have tests for it.
Conflicts:
src/borg/testsuite/crypto.py
2022-03-06 11:30:58 +03:00
Thomas Waldmann
c2211a7ef9
remove our hmac_sha256 tests
...
as we're just calling python stdlib there,
we can assume that they have tests for it.
Conflicts:
src/borg/testsuite/crypto.py
2022-03-06 11:28:27 +03:00
Thomas Waldmann
72ccafb4b8
hmac.digest: some more minor optimizations
...
also some cosmetic changes:
- import hmac module
- use hmac.compare_digest
2022-03-06 11:26:04 +03:00
Thomas Waldmann
bcd1d49d3b
hmac_sha256: replace own cython wrapper code by hmac.digest python stdlib (since py38)
...
i measured performance of both: pretty much the same.
2022-03-06 11:26:04 +03:00
Thomas Waldmann
4fb6df813a
fix codeql complaining about missing headers needed by borg
...
thus:
- install requirements first
- codeql init
- build borg
- codeql analyzse
2022-03-05 23:28:37 -05:00
aspargas2
aa27294927
fix codeql complaining about missing cython
...
backports commits 6cbb7d6
, 142bb0e
, 4df8255
, and 30c145e
2022-03-05 23:21:20 -05:00
TW
d0fb234f46
Merge pull request #6404 from ThomasWaldmann/import-tar-fixes-1.2
...
import-tar fixes
2022-03-05 14:26:59 +01:00
TW
8abb0aa7ab
Merge pull request #6375 from ThomasWaldmann/fix-6374-1.2
...
create: skip with warning if opening the parent dir of recursion root fails, fixes #6374
2022-03-05 14:18:40 +01:00
Thomas Waldmann
7dc800fecd
kill filter process in case of borg exceptions, fixes #6401
...
in the finally-block, we wait for the filter process to die. but it only dies
voluntarily if all data was processed by the filter and it terminates due to EOF.
otoh, if borg has thrown an early exception, e.g. "archive already exists",
we need to kill the filter process to bring it to an early end. in that
case, we also do not need to check the filter rc, because we know we killed it.
2022-03-04 23:33:53 +01:00
Thomas Waldmann
33192e5e5d
import-tar: fix mtime type bug
...
looks like with a .tar file created by the tar tool,
tarinfo.mtime is a float [s]. So, after converting to
nanoseconds, we need to cast to int because that's what
Item.mtime wants.
also added a safe_ns() there to clip values to the safe range.
2022-03-04 23:33:53 +01:00
TW
ea668417c9
Merge pull request #6405 from ThomasWaldmann/fix-ci
...
fix wrong branch name in github actions
2022-03-04 23:32:47 +01:00
Thomas Waldmann
412e39b898
fix wrong branch name in github actions
2022-03-04 22:50:23 +01:00
Thomas Waldmann
f5a47d86e3
ensure_dir: respect umask for created directory modes, fixes #6400
...
we tried to be very private / secure here, but that created the issue
that a less secure umask (like e.g. 0o007) just did not work.
to make the umask work, we must start from 0o777 mode and let the
umask do its work, like e.g. 0o777 & ~0o007 --> 0o770.
with borg's default umask of 0o077, it usually ends up being 0o700,
so only permissions for the user (not group, not others).
2022-03-04 21:24:42 +01:00
Thomas Waldmann
9ea1d2a7d6
SaveFile: respect umask for final file mode, fixes #6400
2022-03-04 20:53:10 +01:00
TW
057ae69537
Merge pull request #6384 from ThomasWaldmann/pyupgrade-38-1.2
...
run pyupgrade (1.2-maint)
2022-02-27 22:52:43 +01:00
Thomas Waldmann
8edb1dc085
manual formatting fixes (cosmetic / pep8)
2022-02-27 21:13:04 +01:00
Thomas Waldmann
c4ed840c7b
pyupgrade --py38-plus ./**/*.py
2022-02-27 21:12:44 +01:00