mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
Fix typos
A bunch of typos reported by codespell, most of them comments in the code
This commit is contained in:
2
FAQ
2
FAQ
@@ -128,7 +128,7 @@ A. Contributors
|
||||
recommended to not install Ubuntu on a system with existing LUKS
|
||||
containers without complete backups.
|
||||
|
||||
Update 11/2014: There seem to be other problems withe existing LUKS
|
||||
Update 11/2014: There seem to be other problems with existing LUKS
|
||||
containers and Ubuntu as well, be extra careful when using LUKS
|
||||
on Ubuntu in any way, but exactly as the Ubuntu installer does.
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
* @subsection cformat crypt_format() - header and payload on mutual device
|
||||
* This section covers basic use cases for formatting LUKS devices. Format operation
|
||||
* sets device type in context and in case of LUKS header is written at the beginning
|
||||
* of block device. In the example bellow we use the scenario where LUKS header and data
|
||||
* of block device. In the example below we use the scenario where LUKS header and data
|
||||
* are both stored on the same device. There's also a possibility to store header and
|
||||
* data separately.
|
||||
*
|
||||
|
||||
@@ -30,7 +30,7 @@ Changes since version 2.0.1
|
||||
|
||||
* Add LUKS2 specific options for cryptsetup-reencrypt.
|
||||
Tokens and persistent flags are now transferred during reencryption;
|
||||
change of PBKDF keyslot parameters is now supported and alllows
|
||||
change of PBKDF keyslot parameters is now supported and allows
|
||||
to set precalculated values (no benchmarks).
|
||||
|
||||
* Do not allow LUKS2 --persistent and --test-passphrase cryptsetup flags
|
||||
|
||||
@@ -93,7 +93,7 @@ extern "C" {
|
||||
#define ARGON2_FLAG_CLEAR_SECRET (UINT32_C(1) << 1)
|
||||
|
||||
/* Global flag to determine if we are wiping internal memory buffers. This flag
|
||||
* is defined in core.c and deafults to 1 (wipe internal memory). */
|
||||
* is defined in core.c and defaults to 1 (wipe internal memory). */
|
||||
extern int FLAG_clear_internal_memory;
|
||||
|
||||
/* Error codes */
|
||||
|
||||
@@ -49,7 +49,7 @@ struct crypt_cipher {
|
||||
*
|
||||
* ENOENT - algorithm not available
|
||||
* ENOTSUP - AF_ALG family not available
|
||||
* (but cannot check specificaly for skcipher API)
|
||||
* (but cannot check specifically for skcipher API)
|
||||
*/
|
||||
int crypt_cipher_init(struct crypt_cipher **ctx, const char *name,
|
||||
const char *mode, const void *key, size_t key_length)
|
||||
|
||||
@@ -546,8 +546,8 @@ int crypt_format(struct crypt_device *cd,
|
||||
*
|
||||
* @note Currently, only LUKS1->LUKS2 and LUKS2->LUKS1 conversions are supported.
|
||||
* Not all LUKS2 devices may be converted back to LUKS1. To make such a conversion
|
||||
* posible all active LUKS2 keyslots must be in LUKS1 compatible mode (i.e. pbkdf
|
||||
* type must be PBKDF2) and device cannot be formated with any authenticated
|
||||
* possible all active LUKS2 keyslots must be in LUKS1 compatible mode (i.e. pbkdf
|
||||
* type must be PBKDF2) and device cannot be formatted with any authenticated
|
||||
* encryption mode.
|
||||
*
|
||||
* @note Device must be offline for conversion. UUID change is not possible for active
|
||||
@@ -1886,7 +1886,7 @@ typedef void (*crypt_token_buffer_free_func) (void *buffer, size_t buffer_len);
|
||||
|
||||
/**
|
||||
* Token handler validate function prototype.
|
||||
* This fuction validates JSON representation of user defined token for additional data
|
||||
* This function validates JSON representation of user defined token for additional data
|
||||
* specific for its token type. If defined in the handler, it's called
|
||||
* during @link crypt_activate_by_token @endlink. It may also be called during
|
||||
* @link crypt_token_json_set @endlink when appropriate token handler was registered before
|
||||
@@ -1899,7 +1899,7 @@ typedef int (*crypt_token_validate_func) (struct crypt_device *cd, const char *j
|
||||
|
||||
/**
|
||||
* Token handler dump function prototype.
|
||||
* This fuction is supposed to print token implementation specific details. It gets
|
||||
* This function is supposed to print token implementation specific details. It gets
|
||||
* called during @link crypt_dump @endlink if token handler was registered before.
|
||||
*
|
||||
* @param cd crypt device handle
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2009-2018, Red Hat, Inc. All rights reserved.
|
||||
*
|
||||
* AFsplitter diffuses information over a large stripe of data,
|
||||
* therefor supporting secure data destruction.
|
||||
* therefore supporting secure data destruction.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2009-2018, Red Hat, Inc. All rights reserved.
|
||||
*
|
||||
* AFsplitter diffuses information over a large stripe of data,
|
||||
* therefor supporting secure data destruction.
|
||||
* therefore supporting secure data destruction.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
||||
@@ -539,7 +539,7 @@ int placeholder_keyslot_alloc(struct crypt_device *cd,
|
||||
json_object_object_add(jobj_keyslot, "type", json_object_new_string("placeholder"));
|
||||
/*
|
||||
* key_size = -1 makes placeholder keyslot impossible to pass validation.
|
||||
* It's a safeguard against accidentaly storing temporary conversion
|
||||
* It's a safeguard against accidentally storing temporary conversion
|
||||
* LUKS2 header.
|
||||
*/
|
||||
json_object_object_add(jobj_keyslot, "key_size", json_object_new_int(-1));
|
||||
|
||||
@@ -573,7 +573,7 @@ static int device_info(struct crypt_device *cd,
|
||||
} else {
|
||||
/* If the device can be opened read-write, i.e. readonly is still 0, then
|
||||
* check whether BKROGET says that it is read-only. E.g. read-only loop
|
||||
* devices may be openend read-write but are read-only according to BLKROGET
|
||||
* devices may be opened read-write but are read-only according to BLKROGET
|
||||
*/
|
||||
if (real_readonly == 0 && (r = ioctl(fd, BLKROGET, &real_readonly)) < 0)
|
||||
goto out;
|
||||
|
||||
@@ -178,7 +178,7 @@ static void release_lock_handle(struct crypt_lock_handle *h)
|
||||
!flock(h->flock_fd, LOCK_EX | LOCK_NB) && /* lock to drop the file */
|
||||
!resource_by_devno(res, sizeof(res), h->devno, 1) && /* acquire lock resource name */
|
||||
!fstat(h->flock_fd, &buf_a) && /* read inode id referred by fd */
|
||||
!stat(res, &buf_b) && /* does path file stil exist? */
|
||||
!stat(res, &buf_b) && /* does path file still exist? */
|
||||
same_inode(buf_a, buf_b)) { /* is it same id as the one referenced by fd? */
|
||||
/* coverity[toctou] */
|
||||
if (unlink(res)) /* yes? unlink the file */
|
||||
|
||||
@@ -477,7 +477,7 @@ type from token slot specified by \-\-token\-id option.
|
||||
|
||||
Action \fIimport\fR can store arbitrary valid token json in LUKS2 header. It may be passed via
|
||||
standard input or via file passed in \-\-json\-file option. If you specify \-\-key\-slot then
|
||||
successfuly imported token is also assigned to the key slot.
|
||||
successfully imported token is also assigned to the key slot.
|
||||
|
||||
Action \fIexport\fR writes requested token json to a file passed with \-\-json\-file or
|
||||
to standard output.
|
||||
|
||||
@@ -123,7 +123,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
/*
|
||||
* Need to create temporary keyslot device-mapper devices and allocate loop if needed,
|
||||
* so root is requried here.
|
||||
* so root is required here.
|
||||
*/
|
||||
if (getuid() != 0) {
|
||||
printf("You must be root to run this program.\n");
|
||||
|
||||
@@ -1552,7 +1552,7 @@ static int run_reencrypt(const char *device)
|
||||
|
||||
log_dbg("Storing backup of LUKS headers.");
|
||||
if (rc.reencrypt_mode == ENCRYPT) {
|
||||
/* Create fake header for exising device */
|
||||
/* Create fake header for existing device */
|
||||
if ((r = backup_fake_header(&rc)))
|
||||
goto out;
|
||||
} else {
|
||||
|
||||
@@ -2307,7 +2307,7 @@ static void Pbkdf(void)
|
||||
pbkdf2.flags &= ~CRYPT_PBKDF_NO_BENCHMARK;
|
||||
FAIL_(crypt_set_pbkdf_type(cd, &pbkdf2), "Illegal time value.");
|
||||
|
||||
// hash is relevent ony with pbkdf2
|
||||
// hash is relevant only with pbkdf2
|
||||
pbkdf2.time_ms = 9;
|
||||
pbkdf2.hash = NULL;
|
||||
FAIL_(crypt_set_pbkdf_type(cd, &pbkdf2), "Hash is mandatory for pbkdf2");
|
||||
|
||||
@@ -185,7 +185,7 @@ run_all() {
|
||||
# length = 0 is significant here
|
||||
RUN "P" $1 read_lseek_blockwise 0 $BSIZE $((DEVSIZE+1))
|
||||
|
||||
# begining of device
|
||||
# beginning of device
|
||||
RUN "P" $1 read_lseek_blockwise 1 $BSIZE 0
|
||||
RUN "P" $1 read_lseek_blockwise 1 $BSIZE 1
|
||||
RUN "P" $1 read_lseek_blockwise 1 $BSIZE $((BSIZE-1))
|
||||
@@ -239,7 +239,7 @@ run_all() {
|
||||
RUN "P" $1 write_lseek_blockwise 0 $BSIZE 1
|
||||
RUN "P" $1 write_lseek_blockwise 0 $BSIZE $BSIZE
|
||||
|
||||
# begining of device
|
||||
# beginning of device
|
||||
RUN "P" $1 write_lseek_blockwise 1 $BSIZE 0
|
||||
RUN "P" $1 write_lseek_blockwise 1 $BSIZE 1
|
||||
RUN "P" $1 write_lseek_blockwise 1 $BSIZE $((BSIZE-1))
|
||||
|
||||
@@ -130,7 +130,7 @@ function rollback()
|
||||
losetup $LOOPDEV1 $IMG
|
||||
}
|
||||
|
||||
function check_slot() #space separeted list of ENABLED key slots
|
||||
function check_slot() #space separated list of ENABLED key slots
|
||||
{
|
||||
local _KS0=DISABLED
|
||||
local _KS1=$_KS0 _KS2=$_KS0 _KS3=$_KS0 _KS4=$_KS0 _KS5=$_KS0 _KS6=$_KS0 _KS7=$_KS0
|
||||
|
||||
@@ -137,7 +137,7 @@ function rollback()
|
||||
cp $ORIG_IMG $IMG
|
||||
}
|
||||
|
||||
function check_slot() #space separeted list of active key slots
|
||||
function check_slot() #space separated list of active key slots
|
||||
{
|
||||
local _out=$($CRYPTSETUP luksDump $IMG | grep -e ": luks2" | sed -e 's/[[:space:]]*\([0-9]\+\):.*/\1/g')
|
||||
|
||||
|
||||
@@ -320,7 +320,7 @@ function checkUserSpaceRepair()
|
||||
PARAMS="--data-block-size=$2 --hash-block-size=$2 --fec-roots=$3"
|
||||
[ "$1" -gt 0 ] && PARAMS="$PARAMS --data-blocks=$1" && BS=$2 && COUNT=$1
|
||||
|
||||
# different parameters for diffrent number of devices
|
||||
# different parameters for different number of devices
|
||||
[ "$6" -eq 1 ] && HASH_DEV=$IMG && FEC=$IMG && PARAMS="$PARAMS --hash-offset=$4 --fec-offset=$5" && echo -n "[One device]"
|
||||
[ "$6" -eq 2 ] && HASH_DEV=$IMG && FEC=$FEC_DEV && PARAMS="$PARAMS --hash-offset=$4" && echo -n "[Two separate data/hash and fec devices]"
|
||||
[ "$6" -eq 3 ] && HASH_DEV=$IMG_HASH && FEC=$FEC_DEV && echo -n "[Three separate devices]"
|
||||
|
||||
Reference in New Issue
Block a user