remove unused "auth policy" VTY command

This is yet another unsused bit from the OsmoNITB legacy.

Related: OS#2528
Change-Id: I825e659da529257e5edec94d9d59f0e10c1b4c63
changes/17/6417/4
Harald Welte 5 years ago
parent 2346619c1a
commit 098aa71e83
  1. 1
      doc/examples/osmo-msc/osmo-msc.cfg
  2. 1
      doc/examples/osmo-msc/osmo-msc_custom-sccp.cfg
  3. 1
      doc/examples/osmo-msc/osmo-msc_multi-cs7.cfg
  4. 11
      include/osmocom/msc/gsm_data.h
  5. 19
      src/libcommon-cs/common_cs_vty.c
  6. 18
      src/libcommon/gsm_data.c
  7. 1
      src/libmsc/msc_vty.c
  8. 8
      tests/vty_test_runner.py

@ -9,7 +9,6 @@ network
mobile network code 1
short name OsmoMSC
long name OsmoMSC
auth policy closed
encryption a5 0
rrlp mode none
mm info 1

@ -9,7 +9,6 @@ network
mobile network code 1
short name OsmoMSC
long name OsmoMSC
auth policy closed
encryption a5 0
rrlp mode none
mm info 1

@ -9,7 +9,6 @@ network
mobile network code 1
short name OsmoMSC
long name OsmoMSC
auth policy closed
encryption a5 0
rrlp mode none
mm info 1

@ -207,13 +207,6 @@ static const struct rate_ctr_group_desc msc_ctrg_desc = {
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 @@ struct gsm_network {
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;
@ -372,9 +364,6 @@ extern void talloc_ctx_init(void *ctx_root);
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);

@ -103,24 +103,6 @@ DEFUN(cfg_net_name_long,
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 @@ int common_cs_vty_init(struct gsm_network *network,
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);

@ -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" },

@ -186,7 +186,6 @@ static int config_write_net(struct vty *vty)
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))

@ -150,14 +150,6 @@ class TestVTYMSC(TestVTYBase):
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")

Loading…
Cancel
Save