core: replace 'whitelist' with 'allowlist' and 'blacklist' with 'blocklist'

We keep the 'WHITELIST-ONLY' filter type name still as an option in
--filter-policy=[POLICY], but deprecated and with the better
'ALLOWLIST-ONLY' replacement suggested from now on.
This commit is contained in:
Aleksander Morgado
2021-11-04 22:40:28 +01:00
parent eae2e28577
commit 3444b02932
8 changed files with 101 additions and 97 deletions
+7 -3
View File
@@ -48,8 +48,12 @@ filter_policy_option_arg (const gchar *option_name,
gpointer data,
GError **error)
{
if (!g_ascii_strcasecmp (value, "whitelist-only")) {
filter_policy = MM_FILTER_POLICY_WHITELIST_ONLY;
if (!g_ascii_strcasecmp (value, "allowlist-only")
#ifndef MM_DISABLE_DEPRECATED
|| !g_ascii_strcasecmp (value, "whitelist-only")
#endif
) {
filter_policy = MM_FILTER_POLICY_ALLOWLIST_ONLY;
return TRUE;
}
@@ -67,7 +71,7 @@ filter_policy_option_arg (const gchar *option_name,
static const GOptionEntry entries[] = {
{
"filter-policy", 0, 0, G_OPTION_ARG_CALLBACK, filter_policy_option_arg,
"Filter policy: one of WHITELIST-ONLY, STRICT",
"Filter policy: one of ALLOWLIST-ONLY, STRICT",
"[POLICY]"
},
{