summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2023-12-16 17:14:02 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2023-12-16 17:14:02 +0100
commit5d19ff5fe919da438cf49bc8de92015156d9eaec (patch)
tree7fda2378fcd9db5a3a77ddbd80cf1196e9bc3810
parent41cf2eb229be1f076041cf68265cb853272a6477 (diff)
live: validate rw access to image folder after remount
check that it is readable and writable
-rw-r--r--src/live/ogOperations.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py
index ff1a099..1747364 100644
--- a/src/live/ogOperations.py
+++ b/src/live/ogOperations.py
@@ -442,6 +442,11 @@ class OgLiveOperations:
raise ValueError('Target partition has no filesystem present')
cambiar_acceso(user=self._smb_user, pwd=self._smb_pass)
+
+ if os.access(f'/opt/opengnsys/images', os.R_OK | os.W_OK) == False:
+ logging.error('Cannot open /opt/opengnsys/images')
+ raise ValueError('Cannot access image folder')
+
ogCopyEfiBootLoader(disk, partition)
ogReduceFs(disk, partition)