Hello community, here is the log from the commit of package libstorage-ng for openSUSE:Factory checked in at 2019-10-03 14:06:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libstorage-ng (Old) and /work/SRC/openSUSE:Factory/.libstorage-ng.new.2352 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libstorage-ng" Thu Oct 3 14:06:04 2019 rev:64 rq:734059 version:4.2.14 Changes: -------- --- /work/SRC/openSUSE:Factory/libstorage-ng/libstorage-ng.changes 2019-09-23 13:15:30.869125451 +0200 +++ /work/SRC/openSUSE:Factory/.libstorage-ng.new.2352/libstorage-ng.changes 2019-10-03 14:06:04.432622842 +0200 @@ -1,0 +2,29 @@ +Mon Sep 30 12:00:00 UTC 2019 - [email protected] + +- merge gh#openSUSE/libstorage-ng#673 +- parse cipher and key size in cryptsetup output +- added cipher and key size to Encryption (for jsc#SLE-7376) +- probe sector size for Encryption +- extended documentation +- added sanity check +- coding style +- added test case for paes cipher +- handle cipher and key size for encryption +- 4.2.14 + +-------------------------------------------------------------------- +Thu Sep 26 15:30:14 UTC 2019 - [email protected] + +- merge gh#openSUSE/libstorage-ng#672 +- Add open_options +- Bump version +- Extra options to open encryption +- 4.2.13 + +-------------------------------------------------------------------- +Thu Sep 26 00:14:20 UTC 2019 - [email protected] + +- Translated using Weblate (Danish) (bsc#1149754) +- 4.2.12 + +-------------------------------------------------------------------- Old: ---- libstorage-ng-4.2.11.tar.xz New: ---- libstorage-ng-4.2.14.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libstorage-ng.spec ++++++ --- /var/tmp/diff_new_pack.kpJvGw/_old 2019-10-03 14:06:05.872619138 +0200 +++ /var/tmp/diff_new_pack.kpJvGw/_new 2019-10-03 14:06:05.912619035 +0200 @@ -18,7 +18,7 @@ %define libname %{name}1 Name: libstorage-ng -Version: 4.2.11 +Version: 4.2.14 Release: 0 Summary: Library for storage management License: GPL-2.0-only ++++++ libstorage-ng-4.2.11.tar.xz -> libstorage-ng-4.2.14.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.2.11/LIBVERSION new/libstorage-ng-4.2.14/LIBVERSION --- old/libstorage-ng-4.2.11/LIBVERSION 2019-09-10 16:52:02.000000000 +0200 +++ new/libstorage-ng-4.2.14/LIBVERSION 2019-09-30 14:00:00.000000000 +0200 @@ -1 +1 @@ -1.16.0 +1.18.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.2.11/VERSION new/libstorage-ng-4.2.14/VERSION --- old/libstorage-ng-4.2.11/VERSION 2019-09-10 16:52:02.000000000 +0200 +++ new/libstorage-ng-4.2.14/VERSION 2019-09-30 14:00:00.000000000 +0200 @@ -1 +1 @@ -4.2.11 +4.2.14 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.2.11/doc/status.md new/libstorage-ng-4.2.14/doc/status.md --- old/libstorage-ng-4.2.11/doc/status.md 2019-09-10 16:52:02.000000000 +0200 +++ new/libstorage-ng-4.2.14/doc/status.md 2019-09-30 14:00:00.000000000 +0200 @@ -82,6 +82,7 @@ Missing: * Handling different mount-by options. +* Detached header. * LUKS2 integrity (experimental in cryptsetup). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.2.11/po/da.po new/libstorage-ng-4.2.14/po/da.po --- old/libstorage-ng-4.2.11/po/da.po 2019-09-10 16:52:02.000000000 +0200 +++ new/libstorage-ng-4.2.14/po/da.po 2019-09-30 14:00:00.000000000 +0200 @@ -7,16 +7,16 @@ "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-09-04 09:26+0200\n" -"PO-Revision-Date: 2019-02-07 05:52+0000\n" +"PO-Revision-Date: 2019-09-26 02:52+0000\n" "Last-Translator: scootergrisen <[email protected]>\n" -"Language-Team: Danish <https://l10n.opensuse.org/projects/libstorage/ng-" -"master/da/>\n" +"Language-Team: Danish <https://l10n.opensuse.org/projects/libstorage/" +"ng-master/da/>\n" "Language: da\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 3.3\n" +"X-Generator: Weblate 3.6.1\n" msgid "" "\n" @@ -352,11 +352,13 @@ #. %6$s is replaced with a comma-spearated list of the devices #. the RAID is built from and their sizes: e.g. #. /dev/sda (512 GiB), /dev/sdb (512 GiB), /dev/sdc (512 GiB) -#, fuzzy, c-format +#, c-format msgid "" "Create %1$s %2$s (%3$s) for %4$s with %5$s\n" "from %6$s" -msgstr "Opret RAID-partition %1$s (%2$s)" +msgstr "" +"Opret %1$s %2$s (%3$s) til %4$s med %5$s\n" +"fra %6$s" #. TRANSLATORS: #. %1$s is replaced with the md level (e.g. RAID1), @@ -365,11 +367,13 @@ #. %4$s is replaced with a comma-spearated list of the devices #. the RAID is built from and their sizes: e.g. #. /dev/sda (512 GiB), /dev/sdb (512 GiB), /dev/sdc (512 GiB) -#, fuzzy, c-format +#, c-format msgid "" "Create %1$s %2$s (%3$s) for swap\n" "from %4$s" -msgstr "Opret swap-diskområde %1$s (%2$s)" +msgstr "" +"Opret %1$s %2$s (%3$s) til swap\n" +"fra %4$s" #. TRANSLATORS: #. %1$s is replaced with the md level (e.g. RAID1), @@ -378,9 +382,9 @@ #. %4$s is replaced with a comma-spearated list of the devices #. the RAID is built from and their sizes: e.g. #. /dev/sda (512 GiB), /dev/sdb (512 GiB), /dev/sdc (512 GiB) -#, fuzzy, c-format +#, c-format msgid "Create %1$s %2$s (%3$s) from %4$s" -msgstr "Opret swap-diskområde %1$s (%2$s)" +msgstr "Opret %1$s %2$s (%3$s) fra %4$s" #. TRANSLATORS: #. %1$s is replaced with the md name (e.g. /dev/md0), @@ -390,31 +394,33 @@ #. %5$s is replaced with a comma-spearated list of the devices #. the RAID is built from and their sizes: e.g. #. /dev/sda (512 GiB), /dev/sdb (512 GiB), /dev/sdc (512 GiB) -#, fuzzy, c-format +#, c-format msgid "" "Create %1$s %2$s (%3$s) with %4$s\n" "from %5$s" -msgstr "Opret RAID-partition %1$s (%2$s)" +msgstr "" +"Opret %1$s %2$s (%3$s) med %4$s\n" +"fra %5$s" #. TRANSLATORS: displayed before action, #. %1$s is replaced by file system name (e.g. ext4), #. %2$s is replaced by one or more devices (e.g /dev/sda1 (1.0 GiB) and #. /dev/sdb2 (1.0 GiB)) -#, fuzzy, c-format +#, c-format msgid "Create %1$s on %2$s" -msgstr "Opret swap-diskområde %1$s (%2$s)" +msgstr "Opret %1$s på %2$s" #. TRANSLATORS: displayed before action, #. %1$s is replaced by device name (e.g. /dev/sda) -#, fuzzy, c-format +#, c-format msgid "Create DASD partition table on %1$s" -msgstr "Opretter RAID-partition %1$s" +msgstr "Opret DASD-partitionstabel på %1$s" #. TRANSLATORS: displayed before action, #. %1$s is replaced by device name (e.g. /dev/sda) -#, fuzzy, c-format +#, c-format msgid "Create GPT on %1$s" -msgstr "Opret %1$s" +msgstr "Opret GPT på %1$s" #. TRANSLATORS: #. %1$s is replaced with the logical volume name (e.g. root), @@ -836,16 +842,16 @@ #. TRANSLATORS: #. %1$s is replaced with the subvolume path (e.g. var/log), #. %2$s is replaced with the block device name (e.g. /dev/sda1) -#, fuzzy, c-format +#, c-format msgid "Create subvolume %1$s on %2$s" -msgstr "Opret underdiskområde %1$s på enheden %2$s" +msgstr "Opret underdiskområdet %1$s på %2$s" #. TRANSLATORS: #. %1$s is replaced with the subvolume path (e.g. var/log), #. %2$s is replaced with the block device name (e.g. /dev/sda1) -#, fuzzy, c-format +#, c-format msgid "Create subvolume %1$s on %2$s with option 'no copy on write'" -msgstr "Opret underdiskområde %1$s på enheden %2$s" +msgstr "Opret underdiskområdet %1$s på %2$s med tilvalget 'no copy on write'" #. TRANSLATORS: displayed before action, #. %1$s is replaced by logical volume name (e.g. root), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.2.11/storage/Devices/BlkDeviceImpl.cc new/libstorage-ng-4.2.14/storage/Devices/BlkDeviceImpl.cc --- old/libstorage-ng-4.2.11/storage/Devices/BlkDeviceImpl.cc 2019-09-10 16:52:02.000000000 +0200 +++ new/libstorage-ng-4.2.14/storage/Devices/BlkDeviceImpl.cc 2019-09-30 14:00:00.000000000 +0200 @@ -142,7 +142,11 @@ // size is always in 512 byte blocks unsigned long long a = size_file.get<unsigned long long>(); + unsigned long long b = logical_block_size_file.get<unsigned long long>(); + if (b < 512) + ST_THROW(Exception("invalid logical block size")); + unsigned long long c = a * 512 / b; set_region(Region(0, c, b)); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.2.11/storage/Devices/Encryption.cc new/libstorage-ng-4.2.14/storage/Devices/Encryption.cc --- old/libstorage-ng-4.2.11/storage/Devices/Encryption.cc 2019-09-10 16:52:02.000000000 +0200 +++ new/libstorage-ng-4.2.14/storage/Devices/Encryption.cc 2019-09-30 14:00:00.000000000 +0200 @@ -75,7 +75,7 @@ } - const std::vector<string>& + const vector<string>& Encryption::get_crypt_options() const { return get_impl().get_crypt_options().get_opts();; @@ -138,7 +138,7 @@ } - const std::string& + const string& Encryption::get_password() const { return get_impl().get_password(); @@ -146,13 +146,13 @@ void - Encryption::set_password(const std::string& password) + Encryption::set_password(const string& password) { get_impl().set_password(password); } - const std::string& + const string& Encryption::get_key_file() const { return get_impl().get_key_file(); @@ -160,12 +160,40 @@ void - Encryption::set_key_file(const std::string& key_file) + Encryption::set_key_file(const string& key_file) { get_impl().set_key_file(key_file); } + const string& + Encryption::get_cipher() const + { + return get_impl().get_cipher(); + } + + + void + Encryption::set_cipher(const string& cipher) + { + get_impl().set_cipher(cipher); + } + + + unsigned int + Encryption::get_key_size() const + { + return get_impl().get_key_size(); + } + + + void + Encryption::set_key_size(unsigned int key_size) + { + get_impl().set_key_size(key_size); + } + + const BlkDevice* Encryption::get_blk_device() const { @@ -173,6 +201,20 @@ } + const string& + Encryption::get_open_options() const + { + return get_impl().get_open_options(); + } + + + void + Encryption::set_open_options(const string& open_options) + { + get_impl().set_open_options(open_options); + } + + vector<Encryption*> Encryption::get_all(Devicegraph* devicegraph) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.2.11/storage/Devices/Encryption.h new/libstorage-ng-4.2.14/storage/Devices/Encryption.h --- old/libstorage-ng-4.2.11/storage/Devices/Encryption.h 2019-09-10 16:52:02.000000000 +0200 +++ new/libstorage-ng-4.2.14/storage/Devices/Encryption.h 2019-09-30 14:00:00.000000000 +0200 @@ -84,6 +84,36 @@ void set_key_file(const std::string& key_file); /** + * Get the cipher. + * + * Currently only supported for LUKS. + */ + const std::string& get_cipher() const; + + /** + * Set the cipher. If the cipher is empty the default of + * cryptsetup will be used during creation. + * + * Currently only supported for LUKS. + */ + void set_cipher(const std::string& cipher); + + /** + * Get the key size in bytes. + * + * Currently only supported for LUKS. + */ + unsigned int get_key_size() const; + + /** + * Set the key size in bytes. If the key size is zero the + * default of cryptsetup will be used during creation. + * + * Currently only supported for LUKS. + */ + void set_key_size(unsigned int key_size); + + /** * Get the mount-by method. For encrypted devices the mount-by method * defines the name used for the second parameter in /etc/crypttab. */ @@ -129,6 +159,17 @@ */ const BlkDevice* get_blk_device() const; + /** + * Get extra options for open calls. + */ + const std::string& get_open_options() const; + + /** + * Set extra options for open calls. The options are + * injected as-is to the command so must be properly quoted. + */ + void set_open_options(const std::string& open_options); + static std::vector<Encryption*> get_all(Devicegraph* devicegraph); static std::vector<const Encryption*> get_all(const Devicegraph* devicegraph); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.2.11/storage/Devices/EncryptionImpl.cc new/libstorage-ng-4.2.14/storage/Devices/EncryptionImpl.cc --- old/libstorage-ng-4.2.11/storage/Devices/EncryptionImpl.cc 2019-09-10 16:52:02.000000000 +0200 +++ new/libstorage-ng-4.2.14/storage/Devices/EncryptionImpl.cc 2019-09-30 14:00:00.000000000 +0200 @@ -51,15 +51,16 @@ Encryption::Impl::Impl(const string& dm_table_name) : BlkDevice::Impl(DEV_MAPPER_DIR "/" + dm_table_name), type(EncryptionType::LUKS1), password(), - mount_by(MountByType::DEVICE), in_etc_crypttab(true) + key_file(), cipher(), key_size(0), mount_by(MountByType::DEVICE), in_etc_crypttab(true), + open_options() { set_dm_table_name(dm_table_name); } Encryption::Impl::Impl(const xmlNode* node) - : BlkDevice::Impl(node), type(EncryptionType::LUKS1), password(), mount_by(MountByType::DEVICE), - in_etc_crypttab(true) + : BlkDevice::Impl(node), type(EncryptionType::LUKS1), password(), key_file(), cipher(), + key_size(0), mount_by(MountByType::DEVICE), in_etc_crypttab(true), open_options() { string tmp; @@ -73,6 +74,9 @@ getChildValue(node, "key-file", key_file); + getChildValue(node, "cipher", cipher); + getChildValue(node, "key-size", key_size); + if (getChildValue(node, "mount-by", tmp)) mount_by = toValueWithFallback(tmp, MountByType::DEVICE); @@ -80,6 +84,8 @@ crypt_options.parse(tmp); getChildValue(node, "in-etc-crypttab", in_etc_crypttab); + + getChildValue(node, "open-options", open_options); } @@ -98,11 +104,7 @@ if (is_active()) { - SystemInfo& system_info = prober.get_system_info(); - - const File& size_file = get_sysfs_file(system_info, "size"); - set_region(Region(0, size_file.get<unsigned long long>(), 512)); - + probe_size(prober); probe_topology(prober); } } @@ -198,12 +200,17 @@ setChildValueIf(node, "key-file", key_file, !key_file.empty()); + setChildValueIf(node, "cipher", cipher, !cipher.empty()); + setChildValueIf(node, "key-size", key_size, key_size != 0); + setChildValue(node, "mount-by", toString(mount_by)); if (!crypt_options.empty()) setChildValue(node, "crypt-options", crypt_options.format()); setChildValue(node, "in-etc-crypttab", in_etc_crypttab); + + setChildValueIf(node, "open-options", open_options, !open_options.empty()); } @@ -314,8 +321,9 @@ return false; return type == rhs.type && password == rhs.password && key_file == rhs.key_file && + cipher == rhs.cipher && key_size == rhs.key_size && mount_by == rhs.mount_by && crypt_options == rhs.crypt_options && - in_etc_crypttab == rhs.in_etc_crypttab; + in_etc_crypttab == rhs.in_etc_crypttab && open_options == rhs.open_options; } @@ -333,11 +341,16 @@ storage::log_diff(log, "key-file", key_file, rhs.key_file); + storage::log_diff(log, "cipher", cipher, rhs.cipher); + storage::log_diff(log, "key-size", key_size, rhs.key_size); + storage::log_diff_enum(log, "mount-by", mount_by, rhs.mount_by); storage::log_diff(log, "crypt-options", crypt_options.get_opts(), rhs.crypt_options.get_opts()); storage::log_diff(log, "in-etc-crypttab", in_etc_crypttab, rhs.in_etc_crypttab); + + storage::log_diff(log, "open-options", open_options, rhs.open_options); } @@ -355,12 +368,21 @@ if (!key_file.empty()) out << " key-file:" << get_key_file(); + if (!cipher.empty()) + out << " cipher:" << cipher; + + if (key_size != 0) + out << " key-size:" << key_size; + out << " mount-by:" << toString(mount_by); out << " crypt-options:" << crypt_options.get_opts(); if (in_etc_crypttab) out << " in-etc-crypttab"; + + if (!open_options.empty()) + out << " open-options:" << open_options; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.2.11/storage/Devices/EncryptionImpl.h new/libstorage-ng-4.2.14/storage/Devices/EncryptionImpl.h --- old/libstorage-ng-4.2.11/storage/Devices/EncryptionImpl.h 2019-09-10 16:52:02.000000000 +0200 +++ new/libstorage-ng-4.2.14/storage/Devices/EncryptionImpl.h 2019-09-30 14:00:00.000000000 +0200 @@ -74,6 +74,15 @@ const string& get_key_file() const { return key_file; } void set_key_file(const string& key_file) { Impl::key_file = key_file; } + const string& get_open_options() const { return open_options; } + void set_open_options(const string& open_options) { Impl::open_options = open_options; } + + const string& get_cipher() const { return cipher; } + void set_cipher(const string& cipher) { Impl::cipher = cipher; } + + unsigned int get_key_size() const { return key_size; } + void set_key_size(unsigned int key_size) { Impl::key_size = key_size; } + MountByType get_mount_by() const { return mount_by; } void set_mount_by(MountByType mount_by) { Impl::mount_by = mount_by; } @@ -152,6 +161,9 @@ string key_file; + string cipher; + unsigned int key_size; + MountByType mount_by; CryptOpts crypt_options; @@ -160,6 +172,8 @@ string crypttab_blk_device_name; // block device name as found in /etc/crypttab + string open_options; + }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.2.11/storage/Devices/LuksImpl.cc new/libstorage-ng-4.2.14/storage/Devices/LuksImpl.cc --- old/libstorage-ng-4.2.11/storage/Devices/LuksImpl.cc 2019-09-10 16:52:02.000000000 +0200 +++ new/libstorage-ng-4.2.14/storage/Devices/LuksImpl.cc 2019-09-30 14:00:00.000000000 +0200 @@ -350,6 +350,8 @@ const CmdCryptsetupLuksDump& cmd_cryptsetup_luks_dump = system_info.getCmdCryptsetupLuksDump(blk_device->get_name()); luks->get_impl().Encryption::Impl::set_type(cmd_cryptsetup_luks_dump.get_encryption_type()); + luks->get_impl().set_cipher(cmd_cryptsetup_luks_dump.get_cipher()); + luks->get_impl().set_key_size(cmd_cryptsetup_luks_dump.get_key_size()); if (crypttab_entry) { @@ -521,7 +523,16 @@ ST_THROW(Exception("invalid encryption type")); } - cmd_line += " --tries 1 " + get_format_options(); + cmd_line += " --tries 1"; + + if (!get_cipher().empty()) + cmd_line += " --cipher " + quote(get_cipher()); + + if (get_key_size() != 0) + cmd_line += " --key-size " + to_string(get_key_size() * 8); + + if (!get_format_options().empty()) + cmd_line += " " + get_format_options(); add_key_file_option_and_execute(cmd_line); @@ -551,7 +562,7 @@ const BlkDevice* blk_device = get_blk_device(); string cmd_line = CRYPTSETUPBIN " --batch-mode luksOpen " + quote(blk_device->get_name()) + - " " + quote(get_dm_table_name()) + " --tries 1"; + " " + quote(get_dm_table_name()) + " --tries 1 " + get_open_options(); add_key_file_option_and_execute(cmd_line); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.2.11/storage/Devices/PlainEncryptionImpl.cc new/libstorage-ng-4.2.14/storage/Devices/PlainEncryptionImpl.cc --- old/libstorage-ng-4.2.11/storage/Devices/PlainEncryptionImpl.cc 2019-09-10 16:52:02.000000000 +0200 +++ new/libstorage-ng-4.2.14/storage/Devices/PlainEncryptionImpl.cc 2019-09-30 14:00:00.000000000 +0200 @@ -196,7 +196,7 @@ const BlkDevice* blk_device = get_blk_device(); string cmd_line = CRYPTSETUPBIN " --batch-mode plainOpen " + quote(blk_device->get_name()) + " " - + quote(get_dm_table_name()) + " --tries 1"; + + quote(get_dm_table_name()) + " --tries 1 " + get_open_options(); add_key_file_option_and_execute(cmd_line); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.2.11/storage/SystemInfo/CmdCryptsetup.cc new/libstorage-ng-4.2.14/storage/SystemInfo/CmdCryptsetup.cc --- old/libstorage-ng-4.2.11/storage/SystemInfo/CmdCryptsetup.cc 2019-09-10 16:52:02.000000000 +0200 +++ new/libstorage-ng-4.2.14/storage/SystemInfo/CmdCryptsetup.cc 2019-09-30 14:00:00.000000000 +0200 @@ -26,6 +26,7 @@ #include "storage/Utils/SystemCmd.h" #include "storage/Utils/AppUtil.h" #include "storage/Utils/StorageDefines.h" +#include "storage/Utils/StorageTmpl.h" #include "storage/SystemInfo/CmdCryptsetup.h" #include "storage/Devices/EncryptionImpl.h" @@ -91,7 +92,7 @@ CmdCryptsetupLuksDump::CmdCryptsetupLuksDump(const string& name) - : name(name), encryption_type(EncryptionType::UNKNOWN) + : name(name), encryption_type(EncryptionType::UNKNOWN), cipher(), key_size(0) { SystemCmd cmd(CRYPTSETUPBIN " luksDump " + quote(name)); if (cmd.retcode() == 0 && !cmd.stdout().empty()) @@ -119,15 +120,128 @@ } } + switch (encryption_type) + { + case EncryptionType::LUKS1: + parse_version1(lines); + break; + + case EncryptionType::LUKS2: + parse_version2(lines); + break; + + default: + y2err("failed to parse luks version in cryptsetup output"); + } + y2mil(*this); } + void + CmdCryptsetupLuksDump::parse_version1(const vector<string>& lines) + { + static const regex cipher_name_regex("Cipher name:[ \t]*([^ \t]+)[ \t]*", regex::extended); + static const regex cipher_mode_regex("Cipher mode:[ \t]*([^ \t]+)[ \t]*", regex::extended); + static const regex mk_bits_regex("MK bits:[ \t]*([0-9]+)[ \t]*", regex::extended); + + string cipher_name, cipher_mode; + + smatch match; + + for (const string& line : lines) + { + if (regex_match(line, match, cipher_name_regex) && match.size() == 2) + cipher_name = match[1]; + + if (regex_match(line, match, cipher_mode_regex) && match.size() == 2) + cipher_mode = match[1]; + + if (regex_match(line, match, mk_bits_regex) && match.size() == 2) + { + match[1] >> key_size; + key_size /= 8; + } + } + + if (cipher_name.empty() || cipher_mode.empty()) + y2err("failed to parse cipher in cryptsetup output"); + else + cipher = cipher_name + "-" + cipher_mode; + } + + + void + CmdCryptsetupLuksDump::parse_version2(const vector<string>& lines) + { + /* + * For the meaning of the output of luksDump for LUKS2 have a + * look at the on-disk format, e.g. + * https://gitlab.com/cryptsetup/cryptsetup/blob/master/docs/on-disk-format-luks2.pdf. + */ + + static const regex data_section_regex("Data segments:[ \t]*", regex::extended); + static const regex keyslot_section_regex("Keyslots:[ \t]*", regex::extended); + static const regex token_section_regex("Tokens:[ \t]*", regex::extended); + static const regex digest_section_regex("Digests:[ \t]*", regex::extended); + + static const regex cipher_regex("[ \t]*cipher:[ \t]*([^ \t]+)[ \t]*", regex::extended); + + static const regex key_regex("[ \t]*Key:[ \t]*([0-9]+) bits[ \t]*", regex::extended); + + enum { DATA_SECTION, KEYSLOT_SECTION, UNUSED_SECTION } section = UNUSED_SECTION; + + smatch match; + + for (const string& line : lines) + { + if (line.empty()) + section = UNUSED_SECTION; + else if (regex_match(line, match, data_section_regex)) + section = DATA_SECTION; + else if (regex_match(line, match, keyslot_section_regex)) + section = KEYSLOT_SECTION; + else if (regex_match(line, match, token_section_regex)) + section = UNUSED_SECTION; + else if (regex_match(line, match, digest_section_regex)) + section = UNUSED_SECTION; + + switch (section) + { + case DATA_SECTION: + { + if (regex_match(line, match, cipher_regex) && match.size() == 2) + cipher = match[1]; + } + break; + + case KEYSLOT_SECTION: + { + if (regex_match(line, match, key_regex) && match.size() == 2) + { + match[1] >> key_size; + key_size /= 8; + } + } + break; + + case UNUSED_SECTION: + break; + } + } + + if (cipher.empty()) + y2err("failed to parse cipher in cryptsetup output"); + } + + std::ostream& operator<<(std::ostream& s, const CmdCryptsetupLuksDump& cmd_cryptsetup_luks_dump) { s << "name:" << cmd_cryptsetup_luks_dump.name << " encryption-type:" - << toString(cmd_cryptsetup_luks_dump.encryption_type); + << toString(cmd_cryptsetup_luks_dump.encryption_type) << " cipher:" + << cmd_cryptsetup_luks_dump.cipher << " key-size:" + << cmd_cryptsetup_luks_dump.key_size; return s; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.2.11/storage/SystemInfo/CmdCryptsetup.h new/libstorage-ng-4.2.14/storage/SystemInfo/CmdCryptsetup.h --- old/libstorage-ng-4.2.11/storage/SystemInfo/CmdCryptsetup.h 2019-09-10 16:52:02.000000000 +0200 +++ new/libstorage-ng-4.2.14/storage/SystemInfo/CmdCryptsetup.h 2019-09-30 14:00:00.000000000 +0200 @@ -69,11 +69,16 @@ friend std::ostream& operator<<(std::ostream& s, const CmdCryptsetupLuksDump& cmd_cryptsetup_luks_dump); EncryptionType get_encryption_type() const { return encryption_type; } + const string& get_cipher() const { return cipher; } + unsigned int get_key_size() const { return key_size; } private: void parse(const vector<string>& lines); + void parse_version1(const vector<string>& lines); + void parse_version2(const vector<string>& lines); + string name; /** @@ -81,6 +86,17 @@ */ EncryptionType encryption_type; + /** + * The cipher, e.g. aes-xts-plain64, twofish-cbc-plain or aes-cbc-plain:sha512. + */ + string cipher; + + /** + * The size of the master key, e.g. 32 or 64 bytes. Note: + * Usually displayed in bits. + */ + unsigned int key_size; + }; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.2.11/testsuite/SystemInfo/cryptsetup-luks-dump.cc new/libstorage-ng-4.2.14/testsuite/SystemInfo/cryptsetup-luks-dump.cc --- old/libstorage-ng-4.2.11/testsuite/SystemInfo/cryptsetup-luks-dump.cc 2019-09-10 16:52:02.000000000 +0200 +++ new/libstorage-ng-4.2.14/testsuite/SystemInfo/cryptsetup-luks-dump.cc 2019-09-30 14:00:00.000000000 +0200 @@ -67,7 +67,7 @@ }; vector<string> output = { - "name:/dev/sdc1 encryption-type:luks1" + "name:/dev/sdc1 encryption-type:luks1 cipher:aes-xts-plain64 key-size:64" }; check("/dev/sdc1", input, output); @@ -119,13 +119,66 @@ " Salt: 93 80 06 cb de f6 c5 a2 a8 71 c0 72 79 17 ed 93 ", " bc 59 c9 a7 0f 83 33 49 7d 2d e6 8b b3 63 ce e0 ", " Digest: 89 3e cf f2 a2 88 fb 33 f5 35 8f f5 c7 9a aa ec ", - " 21 32 bd 30 cc e7 66 6a 68 bc 6b 30 e9 4a 21 63 ", - + " 21 32 bd 30 cc e7 66 6a 68 bc 6b 30 e9 4a 21 63 " }; vector<string> output = { - "name:/dev/sdc1 encryption-type:luks2" + "name:/dev/sdc1 encryption-type:luks2 cipher:aes-xts-plain64 key-size:64" }; check("/dev/sdc1", input, output); } + + +BOOST_AUTO_TEST_CASE(parse3_paes) +{ + vector<string> input = { + "LUKS header information", + "Version: 2", + "Epoch: 4", + "Metadata area: 12288 bytes", + "UUID: 22ff3407-ae5d-4bc6-b0cf-462b75e0b6a0", + "Label: (no label)", + "Subsystem: (no subsystem)", + "Flags: (no flags)", + "", + "Data segments:", + " 0: crypt", + " offset: 4194304 [bytes]", + " length: (whole device)", + " cipher: paes-xts-plain64", + " sector: 4096 [bytes]", + "", + "Keyslots:", + " 0: luks2", + " Key: 1024 bits", + " Priority: normal", + " Cipher: aes-xts-plain64", + " PBKDF: argon2i", + " Time cost: 4", + " Memory: 418482", + " Threads: 2", + " Salt: d0 c0 97 e1 81 54 10 cd 00 42 01 89 b1 13 2b 36 ", + " 40 bc 92 c0 75 2a 5d cd 47 38 d6 8f cc 1d ec 61 ", + " AF stripes: 4000", + " Area offset:32768 [bytes]", + " Area length:512000 [bytes]", + " Digest ID: 0", + "Tokens:", + " 0: paes-verification-pattern", + "Digests:", + " 0: pbkdf2", + " Hash: sha256", + " Iterations: 34204", + " Salt: 34 da 2c b0 59 73 a0 db b2 98 15 14 68 de 0a 13 ", + " f0 cc e7 ef b6 9a 56 39 53 5e 55 88 c7 e3 f4 17 ", + " Digest: b2 72 ac 7d 9f 7b 11 77 0b c6 2e 09 b9 28 95 8e ", + " 6e ed 93 91 00 5d c7 0b 68 3c 06 44 2f 7d 35 72 " + }; + + vector<string> output = { + "name:/dev/dasdb1 encryption-type:luks2 cipher:paes-xts-plain64 key-size:128" + }; + + check("/dev/dasdb1", input, output); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.2.11/testsuite/probe/luks+lvm1-devicegraph.xml new/libstorage-ng-4.2.14/testsuite/probe/luks+lvm1-devicegraph.xml --- old/libstorage-ng-4.2.11/testsuite/probe/luks+lvm1-devicegraph.xml 2019-09-10 16:52:02.000000000 +0200 +++ new/libstorage-ng-4.2.14/testsuite/probe/luks+lvm1-devicegraph.xml 2019-09-30 14:00:00.000000000 +0200 @@ -130,6 +130,8 @@ <block-size>512</block-size> </region> <dm-table-name>cr_sda2</dm-table-name> + <cipher>aes-xts-plain64</cipher> + <key-size>64</key-size> <mount-by>uuid</mount-by> <in-etc-crypttab>true</in-etc-crypttab> <uuid>7dd2d696-765d-4951-80bf-54d9ad4655f3</uuid> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.2.11/testsuite/probe/luks+lvm1-mockup.xml new/libstorage-ng-4.2.14/testsuite/probe/luks+lvm1-mockup.xml --- old/libstorage-ng-4.2.11/testsuite/probe/luks+lvm1-mockup.xml 2019-09-10 16:52:02.000000000 +0200 +++ new/libstorage-ng-4.2.14/testsuite/probe/luks+lvm1-mockup.xml 2019-09-30 14:00:00.000000000 +0200 @@ -25,6 +25,9 @@ <!-- output faked and incomplete --> <name>/sbin/cryptsetup luksDump '/dev/sda2'</name> <stdout>Version: 1</stdout> + <stdout>Cipher name: aes</stdout> + <stdout>Cipher mode: xts-plain64</stdout> + <stdout>MK bits: 512</stdout> </Command> <Command> <name>/sbin/dmraid --sets=active -ccc</name> @@ -732,5 +735,9 @@ <name>/sys/devices/virtual/block/dm-0/queue/optimal_io_size</name> <content>0</content> </File> + <File> + <name>/sys/devices/virtual/block/dm-0/queue/logical_block_size</name> + <content>512</content> + </File> </Files> </Mockup> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.2.11/testsuite/probe/luks1-devicegraph.xml new/libstorage-ng-4.2.14/testsuite/probe/luks1-devicegraph.xml --- old/libstorage-ng-4.2.11/testsuite/probe/luks1-devicegraph.xml 2019-09-10 16:52:02.000000000 +0200 +++ new/libstorage-ng-4.2.14/testsuite/probe/luks1-devicegraph.xml 2019-09-30 14:00:00.000000000 +0200 @@ -71,6 +71,8 @@ <block-size>512</block-size> </region> <dm-table-name>cr_home</dm-table-name> + <cipher>aes-xts-plain64</cipher> + <key-size>64</key-size> <mount-by>id</mount-by> <crypt-options>verify</crypt-options> <in-etc-crypttab>true</in-etc-crypttab> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.2.11/testsuite/probe/luks1-mockup.xml new/libstorage-ng-4.2.14/testsuite/probe/luks1-mockup.xml --- old/libstorage-ng-4.2.11/testsuite/probe/luks1-mockup.xml 2019-09-10 16:52:02.000000000 +0200 +++ new/libstorage-ng-4.2.14/testsuite/probe/luks1-mockup.xml 2019-09-30 14:00:00.000000000 +0200 @@ -19,6 +19,9 @@ <!-- output faked and incomplete --> <name>/sbin/cryptsetup luksDump '/dev/sda2'</name> <stdout>Version: 1</stdout> + <stdout>Cipher name: aes</stdout> + <stdout>Cipher mode: xts-plain64</stdout> + <stdout>MK bits: 512</stdout> </Command> <Command> <name>/sbin/dmsetup table</name> @@ -455,5 +458,9 @@ <name>/sys/devices/virtual/block/dm-0/queue/optimal_io_size</name> <content>0</content> </File> + <File> + <name>/sys/devices/virtual/block/dm-0/queue/logical_block_size</name> + <content>512</content> + </File> </Files> </Mockup> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.2.11/testsuite/probe/luks2-devicegraph.xml new/libstorage-ng-4.2.14/testsuite/probe/luks2-devicegraph.xml --- old/libstorage-ng-4.2.11/testsuite/probe/luks2-devicegraph.xml 2019-09-10 16:52:02.000000000 +0200 +++ new/libstorage-ng-4.2.14/testsuite/probe/luks2-devicegraph.xml 2019-09-30 14:00:00.000000000 +0200 @@ -91,6 +91,8 @@ <block-size>512</block-size> </region> <dm-table-name>cr-test1</dm-table-name> + <cipher>aes-xts-plain64</cipher> + <key-size>64</key-size> <mount-by>uuid</mount-by> <in-etc-crypttab>true</in-etc-crypttab> <uuid>109ae070-3bf4-452c-9680-93df9b01a368</uuid> @@ -104,6 +106,8 @@ <block-size>512</block-size> </region> <dm-table-name>cr-test2</dm-table-name> + <cipher>aes-xts-plain64</cipher> + <key-size>64</key-size> <mount-by>uuid</mount-by> <in-etc-crypttab>true</in-etc-crypttab> <uuid>cf01696e-1c94-40be-8088-4ad33c8a539b</uuid> @@ -118,6 +122,8 @@ <block-size>512</block-size> </region> <dm-table-name>cr-test3</dm-table-name> + <cipher>aes-xts-plain64</cipher> + <key-size>64</key-size> <mount-by>device</mount-by> <in-etc-crypttab>false</in-etc-crypttab> <uuid>aa68b93d-a5f9-4294-80a8-c4e660cc56dd</uuid> @@ -131,6 +137,8 @@ <block-size>512</block-size> </region> <dm-table-name>cr-auto-1</dm-table-name> + <cipher>aes-xts-plain64</cipher> + <key-size>64</key-size> <mount-by>device</mount-by> <in-etc-crypttab>false</in-etc-crypttab> <uuid>27f2bcc8-816c-422a-8e29-da92a708f0b4</uuid> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.2.11/testsuite/probe/luks2-mockup.xml new/libstorage-ng-4.2.14/testsuite/probe/luks2-mockup.xml --- old/libstorage-ng-4.2.11/testsuite/probe/luks2-mockup.xml 2019-09-10 16:52:02.000000000 +0200 +++ new/libstorage-ng-4.2.14/testsuite/probe/luks2-mockup.xml 2019-09-30 14:00:00.000000000 +0200 @@ -20,21 +20,33 @@ <!-- output faked and incomplete --> <name>/sbin/cryptsetup luksDump '/dev/sdb1'</name> <stdout>Version: 1</stdout> + <stdout>Cipher name: aes</stdout> + <stdout>Cipher mode: xts-plain64</stdout> + <stdout>MK bits: 512</stdout> </Command> <Command> <!-- output faked and incomplete --> <name>/sbin/cryptsetup luksDump '/dev/sdb2'</name> <stdout>Version: 1</stdout> + <stdout>Cipher name: aes</stdout> + <stdout>Cipher mode: xts-plain64</stdout> + <stdout>MK bits: 512</stdout> </Command> <Command> <!-- output faked and incomplete --> <name>/sbin/cryptsetup luksDump '/dev/sdb3'</name> <stdout>Version: 1</stdout> + <stdout>Cipher name: aes</stdout> + <stdout>Cipher mode: xts-plain64</stdout> + <stdout>MK bits: 512</stdout> </Command> <Command> <!-- output faked and incomplete --> <name>/sbin/cryptsetup luksDump '/dev/sdb4'</name> <stdout>Version: 1</stdout> + <stdout>Cipher name: aes</stdout> + <stdout>Cipher mode: xts-plain64</stdout> + <stdout>MK bits: 512</stdout> </Command> <Command> <name>/sbin/dmraid --sets=active -ccc</name> @@ -540,6 +552,10 @@ <content>0</content> </File> <File> + <name>/sys/devices/virtual/block/dm-6/queue/logical_block_size</name> + <content>512</content> + </File> + <File> <name>/sys/devices/virtual/block/dm-8/size</name> <content>58601472</content> </File> @@ -551,5 +567,9 @@ <name>/sys/devices/virtual/block/dm-8/queue/optimal_io_size</name> <content>0</content> </File> + <File> + <name>/sys/devices/virtual/block/dm-8/queue/logical_block_size</name> + <content>512</content> + </File> </Files> </Mockup> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.2.11/testsuite/probe/luks3-devicegraph.xml new/libstorage-ng-4.2.14/testsuite/probe/luks3-devicegraph.xml --- old/libstorage-ng-4.2.11/testsuite/probe/luks3-devicegraph.xml 2019-09-10 16:52:02.000000000 +0200 +++ new/libstorage-ng-4.2.14/testsuite/probe/luks3-devicegraph.xml 2019-09-30 14:00:00.000000000 +0200 @@ -45,6 +45,8 @@ <block-size>512</block-size> </region> <dm-table-name>cr-test2</dm-table-name> + <cipher>aes-xts-plain64</cipher> + <key-size>64</key-size> <mount-by>uuid</mount-by> <in-etc-crypttab>true</in-etc-crypttab> <uuid>9a80f55f-c8a8-4767-8852-92eccf494a58</uuid> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.2.11/testsuite/probe/luks3-mockup.xml new/libstorage-ng-4.2.14/testsuite/probe/luks3-mockup.xml --- old/libstorage-ng-4.2.11/testsuite/probe/luks3-mockup.xml 2019-09-10 16:52:02.000000000 +0200 +++ new/libstorage-ng-4.2.14/testsuite/probe/luks3-mockup.xml 2019-09-30 14:00:00.000000000 +0200 @@ -15,6 +15,9 @@ <!-- output faked and incomplete --> <name>/sbin/cryptsetup luksDump '/dev/sdc1'</name> <stdout>Version: 1</stdout> + <stdout>Cipher name: aes</stdout> + <stdout>Cipher mode: xts-plain64</stdout> + <stdout>MK bits: 512</stdout> </Command> <Command> <name>/sbin/dmraid --sets=active -ccc</name> @@ -300,5 +303,9 @@ <name>/sys/devices/virtual/block/dm-5/queue/optimal_io_size</name> <content>0</content> </File> + <File> + <name>/sys/devices/virtual/block/dm-5/queue/logical_block_size</name> + <content>512</content> + </File> </Files> </Mockup> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.2.11/testsuite/probe/lvm+luks1-devicegraph.xml new/libstorage-ng-4.2.14/testsuite/probe/lvm+luks1-devicegraph.xml --- old/libstorage-ng-4.2.11/testsuite/probe/lvm+luks1-devicegraph.xml 2019-09-10 16:52:02.000000000 +0200 +++ new/libstorage-ng-4.2.14/testsuite/probe/lvm+luks1-devicegraph.xml 2019-09-30 14:00:00.000000000 +0200 @@ -130,6 +130,8 @@ <block-size>512</block-size> </region> <dm-table-name>cr_home</dm-table-name> + <cipher>aes-xts-plain64</cipher> + <key-size>64</key-size> <mount-by>uuid</mount-by> <in-etc-crypttab>true</in-etc-crypttab> <uuid>333a89ba-c620-40fb-a69c-8b9896fa1baf</uuid> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.2.11/testsuite/probe/lvm+luks1-mockup.xml new/libstorage-ng-4.2.14/testsuite/probe/lvm+luks1-mockup.xml --- old/libstorage-ng-4.2.11/testsuite/probe/lvm+luks1-mockup.xml 2019-09-10 16:52:02.000000000 +0200 +++ new/libstorage-ng-4.2.14/testsuite/probe/lvm+luks1-mockup.xml 2019-09-30 14:00:00.000000000 +0200 @@ -25,6 +25,9 @@ <!-- output faked and incomplete --> <name>/sbin/cryptsetup luksDump '/dev/system/home'</name> <stdout>Version: 1</stdout> + <stdout>Cipher name: aes</stdout> + <stdout>Cipher mode: xts-plain64</stdout> + <stdout>MK bits: 512</stdout> </Command> <Command> <name>/sbin/dmraid --sets=active -ccc</name> @@ -730,5 +733,9 @@ <name>/sys/devices/virtual/block/dm-3/queue/optimal_io_size</name> <content>0</content> </File> + <File> + <name>/sys/devices/virtual/block/dm-3/queue/logical_block_size</name> + <content>512</content> + </File> </Files> </Mockup> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.2.11/testsuite/probe/multipath+luks1-devicegraph.xml new/libstorage-ng-4.2.14/testsuite/probe/multipath+luks1-devicegraph.xml --- old/libstorage-ng-4.2.11/testsuite/probe/multipath+luks1-devicegraph.xml 2019-09-10 16:52:02.000000000 +0200 +++ new/libstorage-ng-4.2.14/testsuite/probe/multipath+luks1-devicegraph.xml 2019-09-30 14:00:00.000000000 +0200 @@ -218,6 +218,8 @@ <block-size>512</block-size> </region> <dm-table-name>cr-test2</dm-table-name> + <cipher>aes-xts-plain64</cipher> + <key-size>64</key-size> <mount-by>uuid</mount-by> <in-etc-crypttab>true</in-etc-crypttab> <uuid>3cea1063-42de-4769-ad1b-bb6d1628bef0</uuid> @@ -232,6 +234,8 @@ <block-size>512</block-size> </region> <dm-table-name>cr-test1</dm-table-name> + <cipher>aes-xts-plain64</cipher> + <key-size>64</key-size> <mount-by>uuid</mount-by> <in-etc-crypttab>true</in-etc-crypttab> <uuid>ca64e8a2-7b38-4410-ad9a-683f23bbf8c5</uuid> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.2.11/testsuite/probe/multipath+luks1-mockup.xml new/libstorage-ng-4.2.14/testsuite/probe/multipath+luks1-mockup.xml --- old/libstorage-ng-4.2.11/testsuite/probe/multipath+luks1-mockup.xml 2019-09-10 16:52:02.000000000 +0200 +++ new/libstorage-ng-4.2.14/testsuite/probe/multipath+luks1-mockup.xml 2019-09-30 14:00:00.000000000 +0200 @@ -34,11 +34,17 @@ <!-- output faked and incomplete --> <name>/sbin/cryptsetup luksDump '/dev/mapper/36005076305ffc73a00000000000013b4-part1'</name> <stdout>Version: 1</stdout> + <stdout>Cipher name: aes</stdout> + <stdout>Cipher mode: xts-plain64</stdout> + <stdout>MK bits: 512</stdout> </Command> <Command> <!-- output faked and incomplete --> <name>/sbin/cryptsetup luksDump '/dev/mapper/36005076305ffc73a00000000000013b5'</name> <stdout>Version: 1</stdout> + <stdout>Cipher name: aes</stdout> + <stdout>Cipher mode: xts-plain64</stdout> + <stdout>MK bits: 512</stdout> </Command> <Command> <name>/sbin/dasdview --extended '/dev/dasda'</name> @@ -935,6 +941,10 @@ <content>0</content> </File> <File> + <name>/sys/devices/virtual/block/dm-2/queue/logical_block_size</name> + <content>512</content> + </File> + <File> <name>/sys/devices/virtual/block/dm-3/alignment_offset</name> <content>0</content> </File> @@ -966,5 +976,9 @@ <name>/sys/devices/virtual/block/dm-4/queue/optimal_io_size</name> <content>0</content> </File> + <File> + <name>/sys/devices/virtual/block/dm-4/queue/logical_block_size</name> + <content>512</content> + </File> </Files> </Mockup> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.2.11/testsuite/probe/plain-encryption1-mockup.xml new/libstorage-ng-4.2.14/testsuite/probe/plain-encryption1-mockup.xml --- old/libstorage-ng-4.2.11/testsuite/probe/plain-encryption1-mockup.xml 2019-09-10 16:52:02.000000000 +0200 +++ new/libstorage-ng-4.2.14/testsuite/probe/plain-encryption1-mockup.xml 2019-09-30 14:00:00.000000000 +0200 @@ -515,6 +515,10 @@ <content>0</content> </File> <File> + <name>/sys/devices/virtual/block/dm-7/queue/logical_block_size</name> + <content>512</content> + </File> + <File> <name>/sys/devices/virtual/block/dm-7/size</name> <content>2097152</content> </File> @@ -527,6 +531,10 @@ <content>0</content> </File> <File> + <name>/sys/devices/virtual/block/dm-8/queue/logical_block_size</name> + <content>512</content> + </File> + <File> <name>/sys/devices/virtual/block/dm-8/size</name> <content>2097152</content> </File>
