diff --git a/Cargo.lock b/Cargo.lock index aa9ce5c..5c02323 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,24 +2,24 @@ # It is not intended for manual editing. [[package]] name = "addr2line" -version = "0.14.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a55f82cfe485775d02112886f4169bde0c5894d75e79ead7eafe7e40a25e45f7" +checksum = "1b6a2d3371669ab3ca9797670853d61402b03d0b4b9ebf33d677dfa720203072" dependencies = [ "gimli", ] [[package]] name = "adler" -version = "1.0.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" [[package]] name = "aho-corasick" -version = "0.7.15" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" +checksum = "043164d8ba5c4c3035fec9bbee8647c0261d788f3474306f93bb65901cae0e86" dependencies = [ "memchr", ] @@ -58,12 +58,12 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "backtrace" -version = "0.3.56" +version = "0.3.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d117600f438b1707d4e4ae15d3595657288f8235a0eb593e80ecc98ab34e1bc" +checksum = "46254cf2fdcdf1badb5934448c1bcbe046a56537b3987d96c51a7afc5d03f293" dependencies = [ "addr2line", - "cfg-if 1.0.0", + "cfg-if", "libc", "miniz_oxide", "object", @@ -78,7 +78,7 @@ checksum = "66c0bb6167449588ff70803f4127f0684f9063097eca5016f37eb52b92c2cf36" dependencies = [ "bitflags", "cexpr", - "cfg-if 0.1.10", + "cfg-if", "clang-sys", "clap", "env_logger", @@ -86,8 +86,8 @@ dependencies = [ "lazycell", "log", "peeking_take_while", - "proc-macro2 1.0.24", - "quote 1.0.9", + "proc-macro2 1.0.27", + "quote 1.0.7", "regex", "rustc-hash", "shlex", @@ -114,9 +114,9 @@ dependencies = [ [[package]] name = "byteorder" -version = "1.4.2" +version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" +checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" [[package]] name = "cbor-codec" @@ -130,9 +130,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.67" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd" +checksum = "66120af515773fb005778dc07c261bd201ec8ce50bd6e7144c927753fe013381" [[package]] name = "cexpr" @@ -149,12 +149,6 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - [[package]] name = "clang-sys" version = "0.29.3" @@ -196,7 +190,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69323bff1fb41c635347b8ead484a5ca6c3f11914d784170b158d8449ab07f8e" dependencies = [ - "cfg-if 0.1.10", + "cfg-if", "crossbeam-channel", "crossbeam-deque", "crossbeam-epoch", @@ -232,7 +226,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" dependencies = [ "autocfg 1.0.1", - "cfg-if 0.1.10", + "cfg-if", "crossbeam-utils", "lazy_static", "maybe-uninit", @@ -246,7 +240,7 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" dependencies = [ - "cfg-if 0.1.10", + "cfg-if", "crossbeam-utils", "maybe-uninit", ] @@ -258,15 +252,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" dependencies = [ "autocfg 1.0.1", - "cfg-if 0.1.10", + "cfg-if", "lazy_static", ] [[package]] name = "csv" -version = "1.1.5" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d58633299b24b515ac72a3f869f8b91306a3cec616a602843a383acd6f9e97" +checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1" dependencies = [ "bstr", "csv-core", @@ -325,10 +319,10 @@ checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.24", - "quote 1.0.9", + "proc-macro2 1.0.27", + "quote 1.0.7", "strsim 0.9.3", - "syn 1.0.60", + "syn 1.0.73", ] [[package]] @@ -338,8 +332,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" dependencies = [ "darling_core", - "quote 1.0.9", - "syn 1.0.60", + "quote 1.0.7", + "syn 1.0.73", ] [[package]] @@ -350,9 +344,9 @@ checksum = "a2658621297f2cf68762a6f7dc0bb7e1ff2cfd6583daef8ee0fed6f7ec468ec0" dependencies = [ "darling", "derive_builder_core", - "proc-macro2 1.0.24", - "quote 1.0.9", - "syn 1.0.60", + "proc-macro2 1.0.27", + "quote 1.0.7", + "syn 1.0.73", ] [[package]] @@ -362,16 +356,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2791ea3e372c8495c0bc2033991d76b512cd799d07491fbd6890124db9458bef" dependencies = [ "darling", - "proc-macro2 1.0.24", - "quote 1.0.9", - "syn 1.0.60", + "proc-macro2 1.0.27", + "quote 1.0.7", + "syn 1.0.73", ] [[package]] name = "either" -version = "1.6.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "cd56b59865bce947ac5958779cfa508f6c3b9497cc762b7e24a12d11ccde2c4f" [[package]] name = "env_logger" @@ -402,9 +396,9 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.9", - "syn 1.0.60", + "proc-macro2 1.0.27", + "quote 1.0.7", + "syn 1.0.73", "synstructure", ] @@ -442,22 +436,11 @@ version = "0.3.55" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" -[[package]] -name = "getrandom" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "wasi", -] - [[package]] name = "gimli" -version = "0.23.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce" +checksum = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724" [[package]] name = "glob" @@ -467,18 +450,18 @@ checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" [[package]] name = "heck" -version = "0.3.2" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cbf45460356b7deeb5e3415b5563308c0a9b057c85e12b06ad551f98d0a6ac" +checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" dependencies = [ "unicode-segmentation", ] [[package]] name = "hermit-abi" -version = "0.1.18" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c" +checksum = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9" dependencies = [ "libc", ] @@ -506,9 +489,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "itoa" -version = "0.4.7" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" +checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" [[package]] name = "lazy_static" @@ -524,21 +507,21 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.86" +version = "0.2.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7282d924be3275cec7f6756ff4121987bc6481325397dde6ba3e7802b1a8b1c" +checksum = "755456fae044e6fa1ebbbd1b3e902ae19e73097ed4ed87bb79934a867c007bc3" [[package]] name = "libcryptsetup-rs" -version = "0.4.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaaea21a390c993052243b98c5b41bc1f3a09325d6f97542614d49a90043f8aa" +checksum = "b9042dbf4b7e4309494949696496e230c9052af64559d3441627d639898c172c" dependencies = [ "either", "libc", "libcryptsetup-rs-sys", "pkg-config", - "semver 0.11.0", + "semver", "serde_json", "uuid", ] @@ -552,7 +535,7 @@ dependencies = [ "bindgen", "cc", "pkg-config", - "semver 0.9.0", + "semver", ] [[package]] @@ -567,11 +550,11 @@ dependencies = [ [[package]] name = "log" -version = "0.4.14" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -582,27 +565,26 @@ checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" [[package]] name = "memchr" -version = "2.3.4" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" +checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" [[package]] name = "memoffset" -version = "0.5.6" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" +checksum = "c198b026e1bbf08a937e94c6c60f9ec4a2267f5b0d2eec9c1b21b061ce2be55f" dependencies = [ "autocfg 1.0.1", ] [[package]] name = "miniz_oxide" -version = "0.4.4" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" +checksum = "4d7559a8a40d0f97e1edea3220f698f78b1c5ab67532e49f68fde3910323b722" dependencies = [ "adler", - "autocfg 1.0.1", ] [[package]] @@ -628,24 +610,18 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611" dependencies = [ "autocfg 1.0.1", ] [[package]] name = "object" -version = "0.23.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a7ab5d64814df0fe4a4b5ead45ed6c5f181ee3ff04ba344313a6c80446c5d4" - -[[package]] -name = "once_cell" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10acf907b94fc1b1a152d08ef97e7759650268cf986bf127f387e602b02c7e5a" +checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" [[package]] name = "peeking_take_while" @@ -653,20 +629,11 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" -[[package]] -name = "pest" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" -dependencies = [ - "ucd-trie", -] - [[package]] name = "pkg-config" -version = "0.3.19" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" +checksum = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33" [[package]] name = "proc-macro-error" @@ -675,9 +642,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.24", - "quote 1.0.9", - "syn 1.0.60", + "proc-macro2 1.0.27", + "quote 1.0.7", + "syn 1.0.73", "version_check", ] @@ -687,8 +654,8 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.9", + "proc-macro2 1.0.27", + "quote 1.0.7", "version_check", ] @@ -703,9 +670,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.24" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" +checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038" dependencies = [ "unicode-xid 0.2.1", ] @@ -727,11 +694,11 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.9" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" dependencies = [ - "proc-macro2 1.0.24", + "proc-macro2 1.0.27", ] [[package]] @@ -874,9 +841,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.4.3" +version = "1.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9251239e129e16308e70d853559389de218ac275b515068abc96829d05b948a" +checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" dependencies = [ "aho-corasick", "memchr", @@ -886,18 +853,15 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4" -dependencies = [ - "byteorder", -] +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" [[package]] name = "regex-syntax" -version = "0.6.22" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581" +checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8" [[package]] name = "ring" @@ -936,9 +900,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.18" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232" +checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" [[package]] name = "rustc-hash" @@ -970,16 +934,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" dependencies = [ - "semver-parser 0.7.0", -] - -[[package]] -name = "semver" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" -dependencies = [ - "semver-parser 0.10.2", + "semver-parser", ] [[package]] @@ -988,37 +943,28 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -[[package]] -name = "semver-parser" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" -dependencies = [ - "pest", -] - [[package]] name = "serde" -version = "1.0.123" +version = "1.0.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d5161132722baa40d802cc70b15262b98258453e85e5d1d365c757c73869ae" +checksum = "ec7505abeacaec74ae4778d9d9328fe5a5d04253220a85c4ee022239fc996d03" [[package]] name = "serde_derive" -version = "1.0.123" +version = "1.0.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9391c295d64fc0abb2c556bad848f33cb8296276b1ad2677d1ae1ace4f258f31" +checksum = "963a7dbc9895aeac7ac90e74f34a5d5261828f79df35cbed41e10189d3804d43" dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.9", - "syn 1.0.60", + "proc-macro2 1.0.27", + "quote 1.0.7", + "syn 1.0.73", ] [[package]] name = "serde_json" -version = "1.0.64" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79" +checksum = "164eacbdb13512ec2745fb09d51fd5b22b0d65ed294a1dcf7285a360c80a675c" dependencies = [ "itoa", "ryu", @@ -1045,9 +991,9 @@ checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" [[package]] name = "structopt" -version = "0.3.21" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5277acd7ee46e63e5168a80734c9f6ee81b1367a7d8772a2d765df2a3705d28c" +checksum = "6cc388d94ffabf39b5ed5fadddc40147cb21e605f53db6f8f36a625d27489ac5" dependencies = [ "clap", "lazy_static", @@ -1056,15 +1002,15 @@ dependencies = [ [[package]] name = "structopt-derive" -version = "0.4.14" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ba9cdfda491b814720b6b06e0cac513d922fc407582032e8706e9f137976f90" +checksum = "5e2513111825077552a6751dfad9e11ce0fba07d7276a3943a037d7e93e64c5f" dependencies = [ "heck", "proc-macro-error", - "proc-macro2 1.0.24", - "quote 1.0.9", - "syn 1.0.60", + "proc-macro2 1.0.27", + "quote 1.0.7", + "syn 1.0.73", ] [[package]] @@ -1080,12 +1026,12 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.60" +version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c700597eca8a5a762beb35753ef6b94df201c81cca676604f547495a0d7f0081" +checksum = "f71489ff30030d2ae598524f61326b902466f72a0fb1a8564c001cc63425bcc7" dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.9", + "proc-macro2 1.0.27", + "quote 1.0.7", "unicode-xid 0.2.1", ] @@ -1095,17 +1041,17 @@ version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701" dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.9", - "syn 1.0.60", + "proc-macro2 1.0.27", + "quote 1.0.7", + "syn 1.0.73", "unicode-xid 0.2.1", ] [[package]] name = "termcolor" -version = "1.1.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +checksum = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" dependencies = [ "winapi-util", ] @@ -1121,34 +1067,29 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.1.3" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" +checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" dependencies = [ - "once_cell", + "lazy_static", ] [[package]] name = "time" -version = "0.1.43" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" +checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" dependencies = [ "libc", + "wasi", "winapi", ] -[[package]] -name = "ucd-trie" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" - [[package]] name = "unicode-segmentation" -version = "1.7.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796" +checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" [[package]] name = "unicode-width" @@ -1176,11 +1117,11 @@ checksum = "55cd1f4b4e96b46aeb8d4855db4a7a9bd96eeeb5c6a1ab54593328761642ce2f" [[package]] name = "uuid" -version = "0.8.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +checksum = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" dependencies = [ - "getrandom", + "rand 0.6.5", ] [[package]] @@ -1197,9 +1138,9 @@ checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" [[package]] name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" +version = "0.10.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" [[package]] name = "which" diff --git a/PKGBUILD b/PKGBUILD index 99dfb59..d4155b9 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,26 +1,37 @@ # Maintainer: shimunn -pkgname=fido2luks -pkgver=0.2.12 + +pkgname=fido2luks-git +pkgver=0.2.16.7e6b33a pkgrel=1 -makedepends=('rust' 'cargo' 'cryptsetup' 'clang') +makedepends=('rust' 'cargo' 'cryptsetup' 'clang' 'git') depends=('cryptsetup') arch=('i686' 'x86_64' 'armv6h' 'armv7h') pkgdesc="Decrypt your LUKS partition using a FIDO2 compatible authenticator" url="https://github.com/shimunn/fido2luks" license=('MPL-2.0') +source=('git+https://github.com/shimunn/fido2luks') +sha512sums=('SKIP') pkgver() { - # Use tag version if possible otherwise concat project version and git ref - git describe --exact-match --tags HEAD 2> /dev/null || \ - echo "$(cargo pkgid | cut -d'#' -f2).$(git describe --always)" + cd fido2luks + + # Use tag version if possible otherwise concat project version and git ref + git describe --exact-match --tags HEAD 2>/dev/null || + echo "$(cargo pkgid | cut -d'#' -f2).$(git describe --always)" } build() { + cd fido2luks cargo build --release --locked --all-features --target-dir=target } package() { - install -Dm 755 target/release/${pkgname} -t "${pkgdir}/usr/bin" - install -Dm 755 ../pam_mount/fido2luksmounthelper.sh -t "${pkgdir}/usr/bin" - install -Dm 644 ../fido2luks.bash "${pkgdir}/usr/share/bash-completion/completions/fido2luks" + cd fido2luks + + install -Dm 755 target/release/fido2luks -t "${pkgdir}/usr/bin" + install -Dm 755 pam_mount/fido2luksmounthelper.sh -t "${pkgdir}/usr/bin" + install -Dm 644 initcpio/hooks/fido2luks -t "${pkgdir}/usr/lib/initcpio/hooks" + install -Dm 644 initcpio/install/fido2luks -t "${pkgdir}/usr/lib/initcpio/install" + install -Dm 644 fido2luks.bash "${pkgdir}/usr/share/bash-completion/completions/fido2luks" + install -Dm 644 fido2luks.fish -t "${pkgdir}/usr/share/fish/vendor_completions.d" } diff --git a/initcpio/Makefile b/initcpio/Makefile new file mode 100644 index 0000000..b752589 --- /dev/null +++ b/initcpio/Makefile @@ -0,0 +1,18 @@ +.PHONY: install remove + +install: + install -Dm644 hooks/fido2luks -t /usr/lib/initcpio/hooks + install -Dm644 install/fido2luks -t /usr/lib/initcpio/install +ifdef preset + mkinitcpio -p $(preset) +else + mkinitcpio -P +endif + +remove: + rm /usr/lib/initcpio/{hooks,install}/fido2luks +ifdef preset + mkinitcpio -p $(preset) +else + mkinitcpio -P +endif diff --git a/initcpio/README.md b/initcpio/README.md new file mode 100644 index 0000000..f29ddab --- /dev/null +++ b/initcpio/README.md @@ -0,0 +1,52 @@ +## fido2luks hook for mkinitcpio (ArchLinux and derivatives) + +> ⚠️ Before proceeding, it is very advised to [backup your existing LUKS2 header](https://wiki.archlinux.org/title/dm-crypt/Device_encryption#Backup_using_cryptsetup) to external storage + +### Setup + +1. Connect your FIDO2 authenticator +2. Generate credential id + +```shell +fido2luks credential +``` + +3. Generate salt (random string) + +```shell +pwgen 48 1 +``` + +4. Add key to your LUKS2 device + +```shell +fido2luks add-key -Pt --salt +``` + +`-P` - request PIN to unlock the authenticator +`-t` - add token (including credential id) to the LUKS2 header +`-e` - wipe all other keys + +For the full list of options see `fido2luks add-key --help` + +5. Edit [/etc/fido2luks.conf](/initcpio/fido2luks.conf) + +Keyslot (`FIDO2LUKS_DEVICE_SLOT`) can be obtained from the output of + +```shell +cryptsetup luksDump +``` + +6. Add fido2luks hook to /etc/mkinitcpio.conf + +Before or instead of `encrypt` hook, for example: + +```shell +HOOKS=(base udev autodetect modconf keyboard block fido2luks filesystems fsck) +``` + +7. Recreate initial ramdisk + +```shell +mkinitcpio -p +``` diff --git a/initcpio/fido2luks.conf b/initcpio/fido2luks.conf new file mode 100644 index 0000000..b2fb6fa --- /dev/null +++ b/initcpio/fido2luks.conf @@ -0,0 +1,18 @@ +# Set credential *ONLY IF* it's not embedded in the LUKS2 header +FIDO2LUKS_CREDENTIAL_ID= + +# Encrypted device and its name under /dev/mapper +# Can be overridden by `cryptdevice` kernel parameter +FIDO2LUKS_DEVICE= +FIDO2LUKS_MAPPER_NAME= + +FIDO2LUKS_SALT=string: + +# Use specific keyslot (ignore all other slots) +FIDO2LUKS_DEVICE_SLOT= + +# Await for an authenticator to be connected (in seconds) +FIDO2LUKS_DEVICE_AWAIT= + +# Set to 1 if PIN is required to unlock the authenticator +FIDO2LUKS_ASK_PIN= diff --git a/initcpio/hooks/fido2luks b/initcpio/hooks/fido2luks new file mode 100644 index 0000000..f96be78 --- /dev/null +++ b/initcpio/hooks/fido2luks @@ -0,0 +1,55 @@ +#!/usr/bin/ash + +run_hook() { + modprobe -a -q dm-crypt >/dev/null 2>&1 + . /etc/fido2luks.conf + + if [ -z "$cryptdevice" ]; then + device="$FIDO2LUKS_DEVICE" + dmname="$FIDO2LUKS_MAPPER_NAME" + else + IFS=: read cryptdev dmname _cryptoptions < Fido2LuksResult<()> { } else { None }; - let cred = make_credential_id(name.as_ref().map(|n| n.as_ref()), pin)?; + let cred = make_credential_id(Some(name.as_ref()), pin)?; println!("{}", hex::encode(&cred.id)); Ok(()) } diff --git a/src/cli_args/config.rs b/src/cli_args/config.rs index a223b83..12298c8 100644 --- a/src/cli_args/config.rs +++ b/src/cli_args/config.rs @@ -7,6 +7,7 @@ use std::fs::File; use std::io::Read; use std::path::PathBuf; use std::process::Command; +use std::process::Stdio; use std::str::FromStr; #[derive(Debug, Clone, PartialEq)] @@ -168,6 +169,8 @@ impl PasswordHelper { let password = Command::new("sh") .arg("-c") .arg(&password_helper) + .stdin(Stdio::inherit()) + .stderr(Stdio::inherit()) .output() .map_err(|e| Fido2LuksError::AskPassError { cause: error::AskPassError::IO(e), diff --git a/src/cli_args/mod.rs b/src/cli_args/mod.rs index 354066b..935cc51 100644 --- a/src/cli_args/mod.rs +++ b/src/cli_args/mod.rs @@ -250,9 +250,9 @@ pub enum Command { Credential { #[structopt(flatten)] authenticator: AuthenticatorParameters, - /// Name to be displayed on the authenticator if it has a display - #[structopt(env = "FIDO2LUKS_CREDENTIAL_NAME")] - name: Option, + /// Name to be displayed on the authenticator display + #[structopt(env = "FIDO2LUKS_CREDENTIAL_NAME", default_value = "fido2luks")] + name: String, }, /// Check if an authenticator is connected #[structopt(name = "connected")]