From af2a900276ee1d8b1fe84df96a6cd9005bf505ae Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 4 Jul 2019 15:55:54 +0200 Subject: [PATCH] [luksbootkeyfile] Fix lax permissions on file. --- src/modules/luksbootkeyfile/LuksBootKeyFileJob.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/luksbootkeyfile/LuksBootKeyFileJob.cpp b/src/modules/luksbootkeyfile/LuksBootKeyFileJob.cpp index b1a5fffdb..9b49b91cb 100644 --- a/src/modules/luksbootkeyfile/LuksBootKeyFileJob.cpp +++ b/src/modules/luksbootkeyfile/LuksBootKeyFileJob.cpp @@ -20,6 +20,7 @@ #include "utils/CalamaresUtilsSystem.h" #include "utils/Logger.h" +#include "utils/UMask.h" #include "utils/Variant.h" #include "GlobalStorage.h" @@ -111,6 +112,7 @@ static const char keyfile[] = "/crypto_keyfile.bin"; static bool generateTargetKeyfile() { + CalamaresUtils::UMask m( CalamaresUtils::UMask::Safe ); auto r = CalamaresUtils::System::instance()->targetEnvCommand( { "dd", "bs=512", "count=4", "if=/dev/urandom", QString( "of=%1" ).arg( keyfile ) } ); if ( r.getExitCode() != 0 )