From db43cedcfdf918556ae3989209a4d984527a6416 Mon Sep 17 00:00:00 2001 From: Patrick Schleizer Date: Sun, 22 Aug 2021 05:23:24 -0400 Subject: [PATCH] LANG=C str_replace --- etc/default/grub.d/40_kernel_hardening.cfg | 4 ++-- usr/libexec/security-misc/pam-info | 4 ++-- usr/libexec/security-misc/remount-secure | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/etc/default/grub.d/40_kernel_hardening.cfg b/etc/default/grub.d/40_kernel_hardening.cfg index da609a4..64d85a7 100644 --- a/etc/default/grub.d/40_kernel_hardening.cfg +++ b/etc/default/grub.d/40_kernel_hardening.cfg @@ -62,9 +62,9 @@ GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX extra_latent_entropy" ## Prevent kernel info leaks in console during boot. ## https://phabricator.whonix.org/T950 -## str_replace is provided by package helper-scripts. +## LANG=C str_replace is provided by package helper-scripts. ## Remove "quiet" from GRUB_CMDLINE_LINUX_DEFAULT because "quiet" must be first. -GRUB_CMDLINE_LINUX_DEFAULT="$(echo "$GRUB_CMDLINE_LINUX_DEFAULT" | str_replace "quiet" "")" +GRUB_CMDLINE_LINUX_DEFAULT="$(echo "$GRUB_CMDLINE_LINUX_DEFAULT" | LANG=C str_replace "quiet" "")" GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX quiet loglevel=0" ## Restrict access to debugfs since it can contain a lot of sensitive information. diff --git a/usr/libexec/security-misc/pam-info b/usr/libexec/security-misc/pam-info index 1c69845..eef5733 100755 --- a/usr/libexec/security-misc/pam-info +++ b/usr/libexec/security-misc/pam-info @@ -89,7 +89,7 @@ fi ## 2021-08-10 16:26:54 RHOST V pam_faillock_output_first_line="$(echo "$pam_faillock_output" | head -1)" -user_name="$(echo "$pam_faillock_output_first_line" | str_replace ":" "")" +user_name="$(echo "$pam_faillock_output_first_line" | LANG=C str_replace ":" "")" pam_faillock_output_count="$(echo "$pam_faillock_output" | wc -l)" @@ -112,7 +112,7 @@ deny=3 if test -f /etc/security/faillock.conf ; then deny_line=$(grep --invert-match "#" /etc/security/faillock.conf | grep "deny =") - deny="$(echo "$deny_line" | str_replace "=" "" | str_replace "deny" "" | str_replace " " "")" + deny="$(echo "$deny_line" | LANG=C str_replace "=" "" | LANG=C str_replace "deny" "" | LANG=C str_replace " " "")" ## Example: #deny=50 fi diff --git a/usr/libexec/security-misc/remount-secure b/usr/libexec/security-misc/remount-secure index 8149148..ae41e79 100755 --- a/usr/libexec/security-misc/remount-secure +++ b/usr/libexec/security-misc/remount-secure @@ -55,8 +55,8 @@ remount_secure() { ## example status_file_full_path: ## /var/run/remount-secure/_home - ## str_replace is provided by package helper-scripts. - mount_folder="$(echo "${status_file_name}" | str_replace "_" "/")" + ## LANG=C str_replace is provided by package helper-scripts. + mount_folder="$(echo "${status_file_name}" | LANG=C str_replace "_" "/")" ## example mount_folder: ## /home