]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
extrahd: Skip relative mountpoints
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 2 Aug 2023 09:14:14 +0000 (09:14 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 2 Aug 2023 09:14:46 +0000 (09:14 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/extrahd/extrahd.pl

index be91e27f604d94f1136b0a711fc70533497ee4d7..eba3f9b37bfe162575cfca2472b50380f7629d58 100644 (file)
@@ -40,6 +40,12 @@ extrahd_mount() {
                        continue
                fi
 
+               # Check that the mountpoint starts with a slash
+               if [ "${mountpoint:0:1}" != "/" ]; then
+                       log "Skipping invalid mountpoint: ${mountpoint}"
+                       continue
+               fi
+
                # Skip mounting if something is already mounted at the mountpoint
                if mountpoint "${mountpoint}" &>/dev/null; then
                        continue