[PATCH 1/4] Don't allow mountpoints to start with /proc or /sys either.

Chris Lumens clumens at redhat.com
Tue Jan 22 21:31:58 UTC 2013


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

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



More information about the anaconda-patches mailing list