Harald Welte has submitted this change and it was merged.

Change subject: remove unused "auth policy" VTY command
......................................................................


remove unused "auth policy" VTY command

This is yet another unsused bit from the OsmoNITB legacy.

Related: OS#2528
Change-Id: I825e659da529257e5edec94d9d59f0e10c1b4c63
---
M doc/examples/osmo-msc/osmo-msc.cfg
M doc/examples/osmo-msc/osmo-msc_custom-sccp.cfg
M doc/examples/osmo-msc/osmo-msc_multi-cs7.cfg
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
M tests/vty_test_runner.py
8 files changed, 0 insertions(+), 60 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/doc/examples/osmo-msc/osmo-msc.cfg 
b/doc/examples/osmo-msc/osmo-msc.cfg
index 4cccebe..91c9eee 100644
--- a/doc/examples/osmo-msc/osmo-msc.cfg
+++ b/doc/examples/osmo-msc/osmo-msc.cfg
@@ -9,7 +9,6 @@
  mobile network code 1
  short name OsmoMSC
  long name OsmoMSC
- auth policy closed
  encryption a5 0
  rrlp mode none
  mm info 1
diff --git a/doc/examples/osmo-msc/osmo-msc_custom-sccp.cfg 
b/doc/examples/osmo-msc/osmo-msc_custom-sccp.cfg
index ea92912..0b9fd2a 100644
--- a/doc/examples/osmo-msc/osmo-msc_custom-sccp.cfg
+++ b/doc/examples/osmo-msc/osmo-msc_custom-sccp.cfg
@@ -9,7 +9,6 @@
  mobile network code 1
  short name OsmoMSC
  long name OsmoMSC
- auth policy closed
  encryption a5 0
  rrlp mode none
  mm info 1
diff --git a/doc/examples/osmo-msc/osmo-msc_multi-cs7.cfg 
b/doc/examples/osmo-msc/osmo-msc_multi-cs7.cfg
index 7026293..44ac3f8 100644
--- a/doc/examples/osmo-msc/osmo-msc_multi-cs7.cfg
+++ b/doc/examples/osmo-msc/osmo-msc_multi-cs7.cfg
@@ -9,7 +9,6 @@
  mobile network code 1
  short name OsmoMSC
  long name OsmoMSC
- auth policy closed
  encryption a5 0
  rrlp mode none
  mm info 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))
diff --git a/tests/vty_test_runner.py b/tests/vty_test_runner.py
index 19d2c60..6d8ca6f 100644
--- a/tests/vty_test_runner.py
+++ b/tests/vty_test_runner.py
@@ -150,14 +150,6 @@
 
         self.assertEquals(self.vty.node(), 'config-mncc-int')
 
-    def testVtyAuthorization(self):
-        self.vty.enable()
-        self.vty.command("configure terminal")
-        self.vty.command("network")
-        self.assertTrue(self.vty.verify("auth policy closed", ['']))
-        self.assertTrue(self.vty.verify("auth policy regexp", ['']))
-        self.vty.command("end")
-
     def testSi2Q(self):
         self.vty.enable()
         self.vty.command("configure terminal")

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I825e659da529257e5edec94d9d59f0e10c1b4c63
Gerrit-PatchSet: 4
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Jenkins Builder

Reply via email to