Return-Path: Received: from stikonas.eu (0540907c.skybroadband.com [5.64.144.124]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Thu, 14 Dec 2017 20:22:12 +0100 (CET) From: Andrius =?utf-8?B?xaB0aWtvbmFz?= Date: Thu, 14 Dec 2017 19:22:03 +0000 Message-ID: <4374834.k1hxxgQrRe@laptop> In-Reply-To: <07e6f1a3-7564-4e01-2277-594195ca3049@redhat.com> References: <39820307.Nb82flZgKB@laptop> <2297498.LbHdjMTUMS@laptop> <07e6f1a3-7564-4e01-2277-594195ca3049@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1874065.tQ6hnMO9kA"; micalg="pgp-sha256"; protocol="application/pgp-signature" Subject: Re: [dm-crypt] LUKS2 resizing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de Cc: Ondrej Kozina --nextPart1874065.tQ6hnMO9kA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Hi, I don't think --ask-always option would be necessary... I think cryptsetup= status is more than enough. I have to do some screen scrubbing in other places too, e.g. new file syste= m (and version version) detection code now screen scrubs "udevadm info --query property" to detect whether e.= g. it is LUKS1 or LUKS2 or even FAT12. Actually, do I even need cryptsetup status KDE Partitition Manager only all= ows resizing unlocked LUKS volumes (so that internal file system can also be resized). So if I understand corr= ectly it will never ask for passphrase in LUKS1 case but it will always ask in LUKS2 case. Andrius 2017 m. gruod=C5=BEio 14 d., ketvirtadienis 10:23:21 GMT ra=C5=A1=C4=97te: > On 12/13/2017 07:05 PM, Andrius =C5=A0tikonas wrote: >=20 > > Exit code status should be fine for me. I'll just check for it to be 0.= I can't really > > use libcryptsetup anyway, I need to use cryptsetup executable as > > KDE Partition Manager is a GUI app and linking to libcryptsetup would > > require the whole app to be running as root which is a security issue f= or > > GUI apps. >=20 > I see. >=20 > Well, you may either detect volume key was passed via kernel keyring to=20 > dm-crypt by following command: cryptsetup status >=20 > It prints usual status information together with line: > "key location: keyring". If you see such line you know cryptsetup > resize will ask for passphrase. But yes, it's screen scrubbing, not=20 > comfortable. >=20 > Or, we may implement option --ask-always (or similar) and cryptsetup=20 > resize will ask always for the passphrase to verify (and also load)=20 > volume key during resize operation. >=20 > Would it help? >=20 > Also do you mind if I repost this e-mail back to mail list so that=20 > others see my answer? >=20 > O. >=20 >=20 =2D-=20 I encourage the use of end to end email encryption GPG key: https://stikonas.eu/andrius.asc =46ingerprint: 1EE5 A320 5904 BAA2 B88C 0A9D 24FD 3194 0095 C0E1 --nextPart1874065.tQ6hnMO9kA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA7vyw/TikxvaXjKoyGEVyAkXkuwFAloyz1sACgkQyGEVyAkX kuyDbxAAubbpvHnP4qTbF3QOMs3WTdEIPI9SHnLK5yvz4astCkB68PtIvscYtSP5 FXGCnB9H/Egk85IFgC617gMWF/A8Cv5e805nDojXtU60V6eaqfPb9zlYw0ntHHGj 1zbKMS8CaZaDCYXLj9VgZHTCH/FFrfYXiz3aaGoELWuSTrfsFWfXe0eYYzzG1zvH pcwKY2sigNubNWFAc7y84DMGRuHmQiT1/9bcodVHS6ZdjtGrpuGSy7jd3JluG5Ln 2Q2dllrCttOxZLXrdKge6BHA+/4nkp3jvlYOPCYoibCb0cuFENWfxWBBWdQ8mb7z pLfG5KpZFIykrDjcNohTKqCI9ABNB4jI6DjiQfS0zPUEKRMP1lZbIqs49TunCgOA cBXIV/0iLcGNz3z9OjaC02/W9FwAIuOkogZfXekMG8TDauRMzHFwNyhH7+IHnENc MOP7m3+2jTKcy9+Tgnm3gzcUdAF8QO2dkFkWEdH2larxmsPqu0/7a/2RY7gH4dTO KK64/xIwqAivPXun0W0ZCiuQUNH9yprpGwp6Z6VqiH7K8HYnDqZkUP3Hlg+vQPnX 4nilq2CeVcT1jP9VA3ZzSIfsforLoti4+egdi1OBE7gZnSYEXdxQluJA8/wh6Lgi IuDWZfkGnTejgqCxR2pFzcc434u9H5yYhZSCGqPuhDUXOjCNBjo= =2Tik -----END PGP SIGNATURE----- --nextPart1874065.tQ6hnMO9kA--