mirror of
https://github.com/systemd/systemd.git
synced 2025-01-03 05:18:09 +03:00
cryptenroll: Lock memory pages before operating on the device
This is what systemd-cryptsetup does. We will be unlocking the device, working with sensitive cryptographic material as well.
This commit is contained in:
parent
4a67075007
commit
97fb1fc4b1
@ -1,6 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <getopt.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
#include "ask-password-api.h"
|
||||
#include "build.h"
|
||||
@ -706,6 +707,9 @@ static int run(int argc, char *argv[]) {
|
||||
if (r <= 0)
|
||||
return r;
|
||||
|
||||
/* A delicious drop of snake oil */
|
||||
(void) mlockall(MCL_FUTURE);
|
||||
|
||||
cryptsetup_enable_logging(NULL);
|
||||
|
||||
if (arg_enroll_type < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user