summaryrefslogtreecommitdiff
path: root/repo/system/openrc/0008-bootmisc-switch-wipe_tmp-setting-to-no-by-default.patch
blob: f498d05f17feb2667ff5081bfbf9d2b67d129350 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From a756576ae62e4f24a2ea36e87053187cdfc1be63 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Wed, 13 Oct 2021 21:12:10 -0600
Subject: [PATCH] bootmisc: switch wipe_tmp setting to no by default

When wipe_tmp=yes, an insufficiently bounded rm -rf occurs that,
under specific unknown circumstances, can escape into other filesystems
resulting in data loss.

See alpine/aports#13070.
---
 conf.d/bootmisc    | 2 +-
 init.d/bootmisc.in | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/conf.d/bootmisc b/conf.d/bootmisc
index dd5b08e0..5cf18d33 100644
--- a/conf.d/bootmisc
+++ b/conf.d/bootmisc
@@ -3,7 +3,7 @@ clean_tmp_dirs="/tmp"
 
 # Should we wipe the tmp paths completely or just selectively remove known
 # locks / files / etc... ?
-wipe_tmp="YES"
+wipe_tmp="NO"
 
 # Write the initial dmesg log into /var/log/dmesg after boot
 # This may be useful if you need the kernel boot log afterwards
diff --git a/init.d/bootmisc.in b/init.d/bootmisc.in
index b1a849a3..8485110a 100644
--- a/init.d/bootmisc.in
+++ b/init.d/bootmisc.in
@@ -17,7 +17,7 @@ depend()
 	keyword -prefix -timeout
 }
 
-: ${wipe_tmp:=${WIPE_TMP:-yes}}
+: ${wipe_tmp:=${WIPE_TMP:-no}}
 : ${log_dmesg:=${LOG_DMESG:-yes}}
 
 cleanup_tmp_dir()
-- 
2.33.1