[PATCH] Don't allow mountpoints to start with /dev (#891447).

Chris Lumens clumens at redhat.com
Fri Jan 4 22:32:31 UTC 2013


---
 pyanaconda/ui/gui/spokes/custom.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 5e90202..9d73c03 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -195,6 +195,8 @@ def validate_mountpoint(mountpoint, used_mountpoints, strict=True):
         valid = MOUNTPOINT_IN_USE
     elif not mountpoint:
         valid = MOUNTPOINT_EMPTY
+    elif mountpoint.startswith("/dev"):
+        valid = MOUNTPOINT_INVALID
     elif (mountpoint.lower() not in fake_mountpoints and
           ((len(mountpoint) > 1 and mountpoint.endswith("/")) or
            not mountpoint.startswith("/") or
-- 
1.7.11.2



More information about the anaconda-patches mailing list