aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil/filesystem.h
diff options
context:
space:
mode:
authorRoland Knall <rknall@gmail.com>2019-08-05 10:04:22 +0200
committerRoland Knall <rknall@gmail.com>2019-08-05 13:47:11 +0000
commit5c678288bcbf4fe870a1582cf31eed6eaa17841c (patch)
treed9b3391ea0408a720fb4d9428a163bdf4cb8799a /wsutil/filesystem.h
parentb31d1168f79164afac7b18babe7a3de6e7c17490 (diff)
Qt: Check filename before import
Before the unzipped files are being copied from the temp directory, they are checked against the stored list of profile names, to ensure, that only allowed files are being imported. Also ensures, that no empty directory exists for the skipped one Bug: 15969 Change-Id: I6ae8c9fb5f63d089d42fc0ef18dbe84baec515a2 Reviewed-on: https://code.wireshark.org/review/34184 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'wsutil/filesystem.h')
-rw-r--r--wsutil/filesystem.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/wsutil/filesystem.h b/wsutil/filesystem.h
index e00794899e..441586eab3 100644
--- a/wsutil/filesystem.h
+++ b/wsutil/filesystem.h
@@ -162,6 +162,11 @@ WS_DLL_PUBLIC int create_persconffile_profile(const char *profilename,
char **pf_dir_path_return);
/*
+ * Returns the list of known profile config filesnames
+ */
+WS_DLL_PUBLIC const GHashTable * allowed_profile_filenames(void);
+
+/*
* Delete the directory for the given configuration profile.
* If we attempted to delete it, and failed, return -1 and
* set "*pf_dir_path_return" to the pathname of the directory we failed