Ondrej Kozina
738b9ee645
Use proper write_buffer in LUKS1 reencryption code.
...
The raw write() syscal may write less bytes than requested. We
have write_buffer in utils_io.c that handles it properly.
2024-05-07 12:30:05 +00:00
Ondrej Kozina
94ef8a7610
Use proper read_buffer function from utils.
...
Legacy LUKS1 reencryption used custom read buffer
function. Use implementation from utils_io instead.
2024-05-07 12:30:05 +00:00
Ondrej Kozina
bede116926
Fix various coverity issues.
...
Mostly INTEGER_OVERFLOW (CWE-190).
2024-05-03 11:58:35 +02:00
Milan Broz
bd0ef58b3a
Update copyright notice to include 2024 year.
2024-01-23 16:10:44 +01:00
Milan Broz
72f799b393
Update Copyright year.
2023-02-09 17:11:18 +01:00
Khem Raj
8e7f07841e
Replace off64_t with off_t
...
AC_SYS_LARGEFILE autoconf macro is in use in configure script which will
add needed feature macros on commandline to enable 64bit off_t.
Also replace lseek64 with lseek, since it will be same when
_FILE_OFFSET_BITS=64 is defined on relevant platforms via AC_SYS_LARGEFILE
This fixes build with latest musl, where LFS64 interfaces are moved out
of _GNU_SOURCE feature test macros namespace [1]
[1] https://git.musl-libc.org/cgit/musl/commit/?id=25e6fee27f4a293728dd15b659170e7b9c7db9bc
Signed-off-by: Khem Raj <raj.khem@gmail.com >
2022-12-23 15:49:00 +01:00
Milan Broz
8270b72bfc
Use bool instead od int in LUKS1 reencryption context.
2022-07-27 12:01:11 +02:00
Milan Broz
9c0cdcc2f9
Do not use huge LUKS1 reencryption context on heap.
...
This will reduce cryptsetup tool size (~20kB at least).
2022-07-27 11:57:05 +02:00
Milan Broz
1e2cb2d419
Avoid using huge dummy context in LUKS1 reencryption check.
...
This struct is not needed at all, just use NULL.
2022-07-27 11:47:06 +02:00
Milan Broz
e921991ba5
Annotate LGTM TOCTOU condition.
...
The race here is not avoidable.
2022-06-05 20:38:22 +02:00
Milan Broz
68796e12dd
Replace OPT_MASTER_KEY_FILE_ID with OPT_VOLUME_KEY_FILE_ID.
2022-03-29 19:06:38 +00:00
Ondrej Kozina
3cd5d83ee9
Add --progress-json parameter to utilities.
...
Progress data can now be printed out in json format
suitable for machine processing.
2022-03-07 12:35:38 +01:00
Ondrej Kozina
6852c49d0c
Merge progress functions into single routine.
2022-03-07 12:35:38 +01:00
Milan Broz
677e06c48a
Check all snprintf calls for returning values.
2022-02-24 20:28:18 +01:00
Ondrej Kozina
e38a184907
Avoid partial read in luks1 reencryption loop.
...
Starting with kernel 5.17-rc there are some changes
in block layer aiming to block partial I/O in
O_DIRECT mode.
2022-02-04 11:28:05 +01:00
Milan Broz
ab975bc1c4
Update copyright year.
...
And unify format in several places.
2022-01-29 10:43:02 +01:00
Ondrej Kozina
686acf82a2
Add option to turn off O_EXCL flag in device_check()
2021-11-24 19:58:57 +01:00
Ondrej Kozina
cade8201d2
Enable legacy LUKS1 reencryption in cryptsetup utility.
2021-11-24 19:58:57 +01:00
Ondrej Kozina
390f3f5b73
Remove (legacy) LUKS2 code from former cryptsetup-reencrypt utility.
...
The old LUKS2 reencryption from cryptsetup-reencrypt will not be
supported anymore.
2021-11-24 19:58:57 +01:00
Ondrej Kozina
d5fdf47b19
Copy effective cryptsetup-reencrypt code in new file.
...
With only minor editing and drop of code path entry and
command line parameters parsing.
2021-11-24 19:58:57 +01:00