Przeglądaj źródła

limit config visibility to /etc and /var/lib

Serghey Rodin 7 lat temu
rodzic
commit
67a0e8d108
1 zmienionych plików z 5 dodań i 0 usunięć
  1. 5 0
      bin/v-open-fs-config

+ 5 - 0
bin/v-open-fs-config

@@ -35,6 +35,11 @@ if [ ! -z "$src_file" ]; then
         echo "Error: invalid source path $src_file"
         exit 2
     fi
+    spath=$(echo "$rpath" |egrep "/etc|/var/lib")
+    if [ -z "$spath" ]; then
+        echo "Error: invalid source path $src_file"
+        exit 2
+    fi
 fi
 
 # Reading conf