From e3e8a55c92552d2f794ac4baaf47c56b28f4f523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sat, 26 Dec 2015 02:20:28 +0100 Subject: [PATCH] core: forbid 'lost+found' as VM name When /var/lib/qubes/appvms is a mount point of ext4 filesystem, there will be already 'lost+found' directory. Avoid this conflict. Fixes QubesOS/qubes-issues#1440 --- core-modules/000QubesVm.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core-modules/000QubesVm.py b/core-modules/000QubesVm.py index f72b51b2..fc15dde6 100644 --- a/core-modules/000QubesVm.py +++ b/core-modules/000QubesVm.py @@ -566,6 +566,10 @@ class QubesVm(object): return False if len(name) > 31: return False + if name == 'lost+found': + # avoid conflict when /var/lib/qubes/appvms is mounted on + # separate partition + return False return re.match(r"^[a-zA-Z][a-zA-Z0-9_.-]*$", name) is not None def pre_rename(self, new_name):