From 4143d9871e943003780a66f454c3350c6b99a2be Mon Sep 17 00:00:00 2001 From: Yuri Chornoivan Date: Fri, 28 Jun 2019 12:02:39 +0000 Subject: [PATCH] Fix minor typos --- docs/v1.5.0-ReleaseNotes | 2 +- lib/integrity/integrity.h | 2 +- lib/libcryptsetup.h | 4 ++-- lib/libdevmapper.c | 10 +++++----- lib/luks2/luks2_keyslot.c | 2 +- lib/luks2/luks2_keyslot_luks2.c | 2 +- lib/luks2/luks2_reencrypt.c | 8 ++++---- lib/tcrypt/tcrypt.h | 2 +- lib/utils_device.c | 2 +- tests/api-test-2.c | 2 +- tests/api-test.c | 8 ++++---- 11 files changed, 22 insertions(+), 22 deletions(-) diff --git a/docs/v1.5.0-ReleaseNotes b/docs/v1.5.0-ReleaseNotes index 16a34cbe..9f1e1d1a 100644 --- a/docs/v1.5.0-ReleaseNotes +++ b/docs/v1.5.0-ReleaseNotes @@ -46,7 +46,7 @@ Side effect of reencryption is that final device will contain only ciphertext (for all sectors) so even if device was not properly wiped by random data, after reencryption you cannot distinguish which sectors are used. -(Reecryption is done always for the whole device.) +(Reencryption is done always for the whole device.) There are for sure bugs, please TEST IT IN TEST ENVIRONMENT before use for your data. diff --git a/lib/integrity/integrity.h b/lib/integrity/integrity.h index 063acc64..4fa99ee9 100644 --- a/lib/integrity/integrity.h +++ b/lib/integrity/integrity.h @@ -1,5 +1,5 @@ /* - * Integrity header defitinion + * Integrity header definition * * Copyright (C) 2016-2019 Milan Broz * diff --git a/lib/libcryptsetup.h b/lib/libcryptsetup.h index 7dc79da0..7a2b8733 100644 --- a/lib/libcryptsetup.h +++ b/lib/libcryptsetup.h @@ -1752,7 +1752,7 @@ int crypt_header_restore(struct crypt_device *cd, /** Debug all */ #define CRYPT_DEBUG_ALL -1 -/** Debug all with adidtional JSON dump (for LUKS2) */ +/** Debug all with additional JSON dump (for LUKS2) */ #define CRYPT_DEBUG_JSON -2 /** Debug none */ #define CRYPT_DEBUG_NONE 0 @@ -2236,7 +2236,7 @@ typedef enum { * LUKS2 reencryption status. * * @param cd crypt device handle - * @param params reecryption parameters + * @param params reencryption parameters * * @return reencryption status info and parameters. */ diff --git a/lib/libdevmapper.c b/lib/libdevmapper.c index 8a9d5f6c..a249033d 100644 --- a/lib/libdevmapper.c +++ b/lib/libdevmapper.c @@ -728,7 +728,7 @@ static char *get_dm_integrity_params(const struct dm_target *tgt, uint32_t flags if (tgt->u.integrity.journal_watermark) { num_options++; snprintf(feature, sizeof(feature), - /* bitmap oveloaded values */ + /* bitmap overloaded values */ (flags & CRYPT_ACTIVATE_NO_JOURNAL_BITMAP) ? "sectors_per_bit:%u " : "journal_watermark:%u ", tgt->u.integrity.journal_watermark); strncat(features, feature, sizeof(features) - strlen(features) - 1); @@ -736,7 +736,7 @@ static char *get_dm_integrity_params(const struct dm_target *tgt, uint32_t flags if (tgt->u.integrity.journal_commit_time) { num_options++; snprintf(feature, sizeof(feature), - /* bitmap oveloaded values */ + /* bitmap overloaded values */ (flags & CRYPT_ACTIVATE_NO_JOURNAL_BITMAP) ? "bitmap_flush_interval:%u " : "commit_time:%u ", tgt->u.integrity.journal_commit_time); strncat(features, feature, sizeof(features) - strlen(features) - 1); @@ -1539,7 +1539,7 @@ int dm_create_device(struct crypt_device *cd, const char *name, if (r == -EINVAL && dmd->segment.type == DM_INTEGRITY && (dmd->flags & CRYPT_ACTIVATE_NO_JOURNAL_BITMAP) && !(dmt_flags & DM_INTEGRITY_BITMAP_SUPPORTED)) - log_err(cd, _("Requested dm-integtity bitmap mode is not supported.")); + log_err(cd, _("Requested dm-integrity bitmap mode is not supported.")); out: dm_exit_context(); return r; @@ -2210,12 +2210,12 @@ static int _dm_target_query_integrity(struct crypt_device *cd, else if (sscanf(arg, "sectors_per_bit:%" PRIu64, &val64) == 1) { if (val64 > UINT_MAX) goto err; - /* overrloaded value for bitmap mode */ + /* overloaded value for bitmap mode */ tgt->u.integrity.journal_watermark = (unsigned int)val64; } else if (sscanf(arg, "commit_time:%u", &val) == 1) tgt->u.integrity.journal_commit_time = val; else if (sscanf(arg, "bitmap_flush_interval:%u", &val) == 1) - /* overrloaded value for bitmap mode */ + /* overloaded value for bitmap mode */ tgt->u.integrity.journal_commit_time = val; else if (sscanf(arg, "interleave_sectors:%u", &val) == 1) tgt->u.integrity.interleave_sectors = val; diff --git a/lib/luks2/luks2_keyslot.c b/lib/luks2/luks2_keyslot.c index 02731f96..b5cacf61 100644 --- a/lib/luks2/luks2_keyslot.c +++ b/lib/luks2/luks2_keyslot.c @@ -76,7 +76,7 @@ int LUKS2_keyslot_find_empty(struct luks2_hdr *hdr) return -EINVAL; } -/* Check if a keyslot is asssigned to specific segment */ +/* Check if a keyslot is assigned to specific segment */ static int _keyslot_for_segment(struct luks2_hdr *hdr, int keyslot, int segment) { int keyslot_digest, segment_digest, s, count = 0; diff --git a/lib/luks2/luks2_keyslot_luks2.c b/lib/luks2/luks2_keyslot_luks2.c index ed4e24f3..7b438a8b 100644 --- a/lib/luks2/luks2_keyslot_luks2.c +++ b/lib/luks2/luks2_keyslot_luks2.c @@ -28,7 +28,7 @@ #define LUKS_SLOT_ITERATIONS_MIN 1000 #define LUKS_STRIPES 4000 -/* Serialize memory-hard keyslot access: opttional workaround for parallel processing */ +/* Serialize memory-hard keyslot access: optional workaround for parallel processing */ #define MIN_MEMORY_FOR_SERIALIZE_LOCK_KB 32*1024 /* 32MB */ static int luks2_encrypt_to_storage(char *src, size_t srcLength, diff --git a/lib/luks2/luks2_reencrypt.c b/lib/luks2/luks2_reencrypt.c index 9718a680..03159ae1 100644 --- a/lib/luks2/luks2_reencrypt.c +++ b/lib/luks2/luks2_reencrypt.c @@ -1658,7 +1658,7 @@ static int _encrypt_set_segments(struct crypt_device *cd, struct luks2_hdr *hdr, first_segment_offset = data_offset; first_segment_length = dev_size; } else { - /* future data_device layout with deatached header: [first data segment] */ + /* future data_device layout with detached header: [first data segment] */ first_segment_offset = data_offset; first_segment_length = 0; /* dynamic */ } @@ -1993,7 +1993,7 @@ static int reenc_init_helper_devices(struct crypt_device *cd, /* swap origin mapping to overlay device */ r = reenc_swap_backing_device(cd, rh->device_name, rh->overlay_name, CRYPT_ACTIVATE_KEYRING_KEY); if (r) { - log_err(cd, _("Failed to load new maping for device %s."), rh->device_name); + log_err(cd, _("Failed to load new mapping for device %s."), rh->device_name); goto err; } @@ -2013,7 +2013,7 @@ err: /* TODO: * 1) audit error path. any error in this routine is fatal and should be unlikely. - * usualy it would hint some collision with another userspace process touching + * usually it would hint some collision with another userspace process touching * dm devices directly. */ static int reenc_refresh_helper_devices(struct crypt_device *cd, const char *overlay, const char *hotzone) @@ -2021,7 +2021,7 @@ static int reenc_refresh_helper_devices(struct crypt_device *cd, const char *ove int r; /* - * we have to explicitely suspend the overlay device before suspending + * we have to explicitly suspend the overlay device before suspending * the hotzone one. Resuming overlay device (aka switching tables) only * after suspending the hotzone may lead to deadlock. * diff --git a/lib/tcrypt/tcrypt.h b/lib/tcrypt/tcrypt.h index 2f8835f2..26e68f75 100644 --- a/lib/tcrypt/tcrypt.h +++ b/lib/tcrypt/tcrypt.h @@ -1,5 +1,5 @@ /* - * TCRYPT (TrueCrypt-compatible) header defitinion + * TCRYPT (TrueCrypt-compatible) header definition * * Copyright (C) 2012-2019 Red Hat, Inc. All rights reserved. * Copyright (C) 2012-2019 Milan Broz diff --git a/lib/utils_device.c b/lib/utils_device.c index a6d7f202..9b82a2d8 100644 --- a/lib/utils_device.c +++ b/lib/utils_device.c @@ -758,7 +758,7 @@ static int device_internal_prepare(struct crypt_device *cd, struct device *devic log_dbg(cd, "Allocating a free loop device."); - /* Keep the loop open, dettached on last close. */ + /* Keep the loop open, detached on last close. */ loop_fd = crypt_loop_attach(&loop_device, device->path, 0, 1, &readonly); if (loop_fd == -1) { log_err(cd, _("Attaching loopback device failed " diff --git a/tests/api-test-2.c b/tests/api-test-2.c index b92cf38b..df6bebbb 100644 --- a/tests/api-test-2.c +++ b/tests/api-test-2.c @@ -966,7 +966,7 @@ static void UseTempVolumes(void) crypt_free(cd); // Dirty checks: device without UUID - // we should be able to remove it but not manuipulate with it + // we should be able to remove it but not manipulate with it snprintf(tmp, sizeof(tmp), "dmsetup create %s --table \"" "0 100 crypt aes-cbc-essiv:sha256 deadbabedeadbabedeadbabedeadbabe 0 " "%s 2048\"", CDEVICE_2, DEVICE_2); diff --git a/tests/api-test.c b/tests/api-test.c index d6cc10c3..81a968ed 100644 --- a/tests/api-test.c +++ b/tests/api-test.c @@ -917,7 +917,7 @@ static void AddDeviceLuks(void) crypt_set_iteration_time(cd, 1); EQ_(1, crypt_keyslot_add_by_volume_key(cd, 1, key, key_size, KEY1, strlen(KEY1))); - // PBKDF info (in LUKS1 slots are ther same) + // PBKDF info (in LUKS1 slots are the same) FAIL_(crypt_keyslot_get_pbkdf(cd, 1, NULL), "PBKDF struct required"); OK_(crypt_keyslot_get_pbkdf(cd, 1, &pbkdf)); OK_(strcmp(pbkdf.type, CRYPT_KDF_PBKDF2)); @@ -1010,7 +1010,7 @@ static void UseTempVolumes(void) crypt_free(cd); // Dirty checks: device without UUID - // we should be able to remove it but not manuipulate with it + // we should be able to remove it but not manipulate with it snprintf(tmp, sizeof(tmp), "dmsetup create %s --table \"" "0 100 crypt aes-cbc-essiv:sha256 deadbabedeadbabedeadbabedeadbabe 0 " "%s 2048\"", CDEVICE_2, DEVICE_2); @@ -1571,11 +1571,11 @@ static void VerityTest(void) /* block size */ params.data_block_size = 333; FAIL_(crypt_format(cd, CRYPT_VERITY, NULL, NULL, NULL, NULL, 0, ¶ms), - "Unsupppored block size."); + "Unsupported block size."); params.data_block_size = 4096; params.hash_block_size = 333; FAIL_(crypt_format(cd, CRYPT_VERITY, NULL, NULL, NULL, NULL, 0, ¶ms), - "Unsupppored block size."); + "Unsupported block size."); params.hash_block_size = 4096; /* salt size */