filter: remove LEGACY and PARANOID filter types
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/390
This commit is contained in:
@@ -48,11 +48,6 @@ filter_policy_option_arg (const gchar *option_name,
|
||||
gpointer data,
|
||||
GError **error)
|
||||
{
|
||||
if (!g_ascii_strcasecmp (value, "legacy")) {
|
||||
filter_policy = MM_FILTER_POLICY_LEGACY;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (!g_ascii_strcasecmp (value, "whitelist-only")) {
|
||||
filter_policy = MM_FILTER_POLICY_WHITELIST_ONLY;
|
||||
return TRUE;
|
||||
@@ -63,11 +58,6 @@ filter_policy_option_arg (const gchar *option_name,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (!g_ascii_strcasecmp (value, "paranoid")) {
|
||||
filter_policy = MM_FILTER_POLICY_PARANOID;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED,
|
||||
"Invalid filter policy value given: %s",
|
||||
value);
|
||||
@@ -77,7 +67,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 LEGACY, WHITELIST-ONLY, STRICT, PARANOID",
|
||||
"Filter policy: one of WHITELIST-ONLY, STRICT",
|
||||
"[POLICY]"
|
||||
},
|
||||
{
|
||||
|
@@ -87,22 +87,6 @@ typedef enum { /*< underscore_name=mm_filter_rule >*/
|
||||
MM_FILTER_RULE_TTY_DEFAULT_FORBIDDEN | \
|
||||
MM_FILTER_RULE_WWAN)
|
||||
|
||||
/* This is the legacy ModemManager policy that tries to automatically probe
|
||||
* device ports unless they're blacklisted in some way or another. */
|
||||
#define MM_FILTER_POLICY_LEGACY \
|
||||
(MM_FILTER_RULE_EXPLICIT_WHITELIST | \
|
||||
MM_FILTER_RULE_EXPLICIT_BLACKLIST | \
|
||||
MM_FILTER_RULE_VIRTUAL | \
|
||||
MM_FILTER_RULE_NET | \
|
||||
MM_FILTER_RULE_USBMISC | \
|
||||
MM_FILTER_RULE_RPMSG | \
|
||||
MM_FILTER_RULE_TTY | \
|
||||
MM_FILTER_RULE_TTY_BLACKLIST | \
|
||||
MM_FILTER_RULE_TTY_MANUAL_SCAN_ONLY | \
|
||||
MM_FILTER_RULE_TTY_PLATFORM_DRIVER | \
|
||||
MM_FILTER_RULE_TTY_DEFAULT_ALLOWED | \
|
||||
MM_FILTER_RULE_WWAN)
|
||||
|
||||
/* This is a stricter policy which will only automatically probe device ports
|
||||
* if they are allowed by any of the automatic whitelist rules. */
|
||||
#define MM_FILTER_POLICY_STRICT \
|
||||
@@ -122,27 +106,6 @@ typedef enum { /*< underscore_name=mm_filter_rule >*/
|
||||
MM_FILTER_RULE_TTY_DEFAULT_FORBIDDEN | \
|
||||
MM_FILTER_RULE_WWAN)
|
||||
|
||||
/* This is equivalent to the strict policy, but also applying the device
|
||||
* blacklists explicitly */
|
||||
#define MM_FILTER_POLICY_PARANOID \
|
||||
(MM_FILTER_RULE_EXPLICIT_WHITELIST | \
|
||||
MM_FILTER_RULE_EXPLICIT_BLACKLIST | \
|
||||
MM_FILTER_RULE_PLUGIN_WHITELIST | \
|
||||
MM_FILTER_RULE_QRTR | \
|
||||
MM_FILTER_RULE_VIRTUAL | \
|
||||
MM_FILTER_RULE_NET | \
|
||||
MM_FILTER_RULE_USBMISC | \
|
||||
MM_FILTER_RULE_RPMSG | \
|
||||
MM_FILTER_RULE_TTY | \
|
||||
MM_FILTER_RULE_TTY_BLACKLIST | \
|
||||
MM_FILTER_RULE_TTY_MANUAL_SCAN_ONLY | \
|
||||
MM_FILTER_RULE_TTY_PLATFORM_DRIVER | \
|
||||
MM_FILTER_RULE_TTY_DRIVER | \
|
||||
MM_FILTER_RULE_TTY_ACM_INTERFACE | \
|
||||
MM_FILTER_RULE_TTY_WITH_NET | \
|
||||
MM_FILTER_RULE_TTY_DEFAULT_FORBIDDEN | \
|
||||
MM_FILTER_RULE_WWAN)
|
||||
|
||||
/* This policy only allows using device ports explicitly whitelisted via
|
||||
* udev rules. i.e. ModemManager won't do any kind of automatic probing. */
|
||||
#define MM_FILTER_POLICY_WHITELIST_ONLY MM_FILTER_RULE_EXPLICIT_WHITELIST
|
||||
|
Reference in New Issue
Block a user