1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

g13: Require a confirmation before g13 is used for DM-Crypt.

* g13/g13-syshelp.c (g13_syshelp_i_know_what_i_am_doing):
* g13/sh-dmcrypt.c (sh_dmcrypt_create_container): Call it.
(sh_dmcrypt_mount_container): Call it.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2016-02-13 17:30:14 +01:00
parent b0e6ab1109
commit 86f3bb144a
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
3 changed files with 27 additions and 1 deletions

View file

@ -1,5 +1,5 @@
/* sh-dmcrypt.c - The DM-Crypt part for g13-syshelp
* Copyright (C) 2015 Werner Koch
* Copyright (C) 2015, 2016 Werner Koch
*
* This file is part of GnuPG.
*
@ -235,6 +235,8 @@ sh_dmcrypt_create_container (ctrl_t ctrl, const char *devname, estream_t devfp)
if (!ctrl->devti)
return gpg_error (GPG_ERR_INV_ARG);
g13_syshelp_i_know_what_i_am_doing ();
header_space_size = SETUP_AREA_SECTORS * SECTOR_SIZE;
header_space = xtrymalloc (header_space_size);
if (!header_space)
@ -543,6 +545,8 @@ sh_dmcrypt_mount_container (ctrl_t ctrl, const char *devname,
if (!ctrl->devti)
return gpg_error (GPG_ERR_INV_ARG);
g13_syshelp_i_know_what_i_am_doing ();
/* Check that the device is not yet used by device mapper. */
err = check_blockdev (devname);
if (err)