Review at  https://gerrit.osmocom.org/6417

remove unused "auth policy" VTY command

This is yet another unsused bit from the OsmoNITB legacy.

Related: OS#2528
Change-Id: I825e659da529257e5edec94d9d59f0e10c1b4c63
---
M include/osmocom/msc/gsm_data.h
M src/libcommon-cs/common_cs_vty.c
M src/libcommon/gsm_data.c
M src/libmsc/msc_vty.c
4 files changed, 0 insertions(+), 49 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/17/6417/1

diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 9701288..67b657a 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -207,13 +207,6 @@
        msc_ctr_description,
 };
 
-enum gsm_auth_policy {
-       GSM_AUTH_POLICY_CLOSED, /* only subscribers authorized in DB */
-       GSM_AUTH_POLICY_ACCEPT_ALL, /* accept everyone, even if not authorized 
in DB */
-       GSM_AUTH_POLICY_TOKEN, /* accept first, send token per sms, then revoke 
authorization */
-       GSM_AUTH_POLICY_REGEXP, /* accept IMSIs matching given regexp */
-};
-
 #define MSC_PAGING_RESPONSE_TIMER_DEFAULT 10
 
 struct gsm_tz {
@@ -235,7 +228,6 @@
        uint16_t network_code;
        char *name_long;
        char *name_short;
-       enum gsm_auth_policy auth_policy;
        /* bit-mask of permitted encryption algorithms. LSB=A5/0, MSB=A5/7 */
        uint8_t a5_encryption_mask;
        bool authentication_required;
@@ -371,9 +363,6 @@
 
 extern void *tall_bsc_ctx;
 extern int ipacc_rtp_direct;
-
-enum gsm_auth_policy gsm_auth_policy_parse(const char *arg);
-const char *gsm_auth_policy_name(enum gsm_auth_policy policy);
 
 enum rrlp_mode rrlp_mode_parse(const char *arg);
 const char *rrlp_mode_name(enum rrlp_mode mode);
diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c
index 2fbe09c..01c6b35 100644
--- a/src/libcommon-cs/common_cs_vty.c
+++ b/src/libcommon-cs/common_cs_vty.c
@@ -103,24 +103,6 @@
        return CMD_SUCCESS;
 }
 
-DEFUN(cfg_net_auth_policy,
-      cfg_net_auth_policy_cmd,
-      "auth policy (closed|accept-all|regexp|token)",
-       "Authentication (not cryptographic)\n"
-       "Set the GSM network authentication policy\n"
-       "Require the MS to be activated in HLR\n"
-       "Accept all MS, whether in HLR or not\n"
-       "Use regular expression for IMSI authorization decision\n"
-       "Use SMS-token based authentication\n")
-{
-       enum gsm_auth_policy policy = gsm_auth_policy_parse(argv[0]);
-       struct gsm_network *gsmnet = gsmnet_from_vty(vty);
-
-       gsmnet->auth_policy = policy;
-
-       return CMD_SUCCESS;
-}
-
 DEFUN(cfg_net_encryption,
       cfg_net_encryption_cmd,
       "encryption a5 <0-3> [<0-3>] [<0-3>] [<0-3>]",
@@ -290,7 +272,6 @@
        install_element(GSMNET_NODE, &cfg_net_mnc_cmd);
        install_element(GSMNET_NODE, &cfg_net_name_short_cmd);
        install_element(GSMNET_NODE, &cfg_net_name_long_cmd);
-       install_element(GSMNET_NODE, &cfg_net_auth_policy_cmd);
        install_element(GSMNET_NODE, &cfg_net_encryption_cmd);
        install_element(GSMNET_NODE, &cfg_net_authentication_cmd);
        install_element(GSMNET_NODE, &cfg_net_rrlp_mode_cmd);
diff --git a/src/libcommon/gsm_data.c b/src/libcommon/gsm_data.c
index 66b6e29..a0ca81a 100644
--- a/src/libcommon/gsm_data.c
+++ b/src/libcommon/gsm_data.c
@@ -36,24 +36,6 @@
 
 void *tall_bsc_ctx;
 
-static const struct value_string auth_policy_names[] = {
-       { GSM_AUTH_POLICY_CLOSED,       "closed" },
-       { GSM_AUTH_POLICY_ACCEPT_ALL,   "accept-all" },
-       { GSM_AUTH_POLICY_TOKEN,        "token" },
-       { GSM_AUTH_POLICY_REGEXP,       "regexp" },
-       { 0,                            NULL }
-};
-
-enum gsm_auth_policy gsm_auth_policy_parse(const char *arg)
-{
-       return get_string_value(auth_policy_names, arg);
-}
-
-const char *gsm_auth_policy_name(enum gsm_auth_policy policy)
-{
-       return get_value_string(auth_policy_names, policy);
-}
-
 static const struct value_string rrlp_mode_names[] = {
        { RRLP_MODE_NONE,       "none" },
        { RRLP_MODE_MS_BASED,   "ms-based" },
diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index 49081c6..77ced8e 100644
--- a/src/libmsc/msc_vty.c
+++ b/src/libmsc/msc_vty.c
@@ -186,7 +186,6 @@
        vty_out(vty, " mobile network code %u%s", gsmnet->network_code, 
VTY_NEWLINE);
        vty_out(vty, " short name %s%s", gsmnet->name_short, VTY_NEWLINE);
        vty_out(vty, " long name %s%s", gsmnet->name_long, VTY_NEWLINE);
-       vty_out(vty, " auth policy %s%s", 
gsm_auth_policy_name(gsmnet->auth_policy), VTY_NEWLINE);
        vty_out(vty, " encryption a5");
        for (i = 0; i < 8; i++) {
                if (gsmnet->a5_encryption_mask & (1 << i))

-- 
To view, visit https://gerrit.osmocom.org/6417
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I825e659da529257e5edec94d9d59f0e10c1b4c63
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <lafo...@gnumonks.org>

Reply via email to