From a5dd3bad5b5b32ecd2fae3890343a468bf7bd32d Mon Sep 17 00:00:00 2001 From: strategictraveler Date: Sat, 2 Nov 2024 18:24:26 +0000 Subject: [PATCH] Hide local timezone from VMs with specific tag Set fake timezone for VMs with the "anon-timezone" tag. Fixes QubesOS/qubes-issues#8381 --- qubes/vm/qubesvm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qubes/vm/qubesvm.py b/qubes/vm/qubesvm.py index ab059a969..7d3d0acd1 100644 --- a/qubes/vm/qubesvm.py +++ b/qubes/vm/qubesvm.py @@ -2395,7 +2395,10 @@ def create_qdb_entries(self): tzname = qubes.utils.get_timezone() if tzname: - self.untrusted_qdb.write('/qubes-timezone', tzname) + if 'anon-timezone' in list(self.tags): + self.untrusted_qdb.write('/qubes-timezone', 'Etc/UTC') + else: + self.untrusted_qdb.write('/qubes-timezone', tzname) self.untrusted_qdb.write('/qubes-block-devices', '') self.untrusted_qdb.write('/qubes-usb-devices', '')