aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-11-28 16:31:29 +0100
committerHarald Welte <laforge@gnumonks.org>2017-11-29 11:48:49 +0000
commitad47f7108aff5438bd2c6f7c0e898f4aa3b66fbe (patch)
treee5b40aaa22e7b4ba06d4a9a1831e0216749b2a59 /src
parentd0f479e744873174e2b021a4f06ab688019d42b7 (diff)
auth: remove obsolete VTY commands
Authentication is no longer done in the BSC, the variables that set the authentication policy and the IMSI regex have no longer any effect. Remove auth policy and authorized-regexp Change-Id: Ie31b921b5fd0af5501ec0c77c0f08089c10075e2
Diffstat (limited to 'src')
-rw-r--r--src/libbsc/bsc_init.c8
-rw-r--r--src/libbsc/bsc_vty.c7
-rw-r--r--src/libcommon-cs/common_cs.c6
-rw-r--r--src/libcommon-cs/common_cs_vty.c36
4 files changed, 0 insertions, 57 deletions
diff --git a/src/libbsc/bsc_init.c b/src/libbsc/bsc_init.c
index fa8c477e3..18742009f 100644
--- a/src/libbsc/bsc_init.c
+++ b/src/libbsc/bsc_init.c
@@ -477,14 +477,6 @@ static int bootstrap_bts(struct gsm_bts *bts)
return -EINVAL;
}
- if (bts->network->auth_policy == GSM_AUTH_POLICY_ACCEPT_ALL &&
- !bts->si_common.rach_control.cell_bar)
- LOGP(DNM, LOGL_ERROR, "\nWARNING: You are running an 'accept-all' "
- "network on a BTS that is not barred. This "
- "configuration is likely to interfere with production "
- "GSM networks and should only be used in a RF "
- "shielded environment such as a faraday cage!\n\n");
-
/* Control Channel Description is set from vty/config */
/* T3212 is set from vty/config */
diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index 71c2ceff6..cd18e3a1a 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -171,10 +171,6 @@ static void net_dump_vty(struct vty *vty, struct gsm_network *net)
net->name_long, VTY_NEWLINE);
vty_out(vty, " Short network name: '%s'%s",
net->name_short, VTY_NEWLINE);
- vty_out(vty, " Authentication policy: %s",
- gsm_auth_policy_name(net->auth_policy));
- if (net->authorized_reg_str)
- vty_out(vty, ", authorized regexp: %s", net->authorized_reg_str);
vty_out(vty, "%s", VTY_NEWLINE);
vty_out(vty, " Location updating reject cause: %u%s",
net->reject_cause, VTY_NEWLINE);
@@ -803,9 +799,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);
- if (gsmnet->authorized_reg_str)
- vty_out(vty, " authorized-regexp %s%s", gsmnet->authorized_reg_str, VTY_NEWLINE);
vty_out(vty, " location updating reject cause %u%s",
gsmnet->reject_cause, VTY_NEWLINE);
vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE);
diff --git a/src/libcommon-cs/common_cs.c b/src/libcommon-cs/common_cs.c
index 16d51a15a..b3037c683 100644
--- a/src/libcommon-cs/common_cs.c
+++ b/src/libcommon-cs/common_cs.c
@@ -44,16 +44,10 @@ struct gsm_network *gsm_network_init(void *ctx,
{
struct gsm_network *net;
- const char *default_regexp = ".*";
-
net = talloc_zero(ctx, struct gsm_network);
if (!net)
return NULL;
- if (gsm_parse_reg(net, &net->authorized_regexp, &net->authorized_reg_str, 1,
- &default_regexp) != 0)
- return NULL;
-
net->country_code = country_code;
net->network_code = network_code;
diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c
index 040aa154d..51f16c4c5 100644
--- a/src/libcommon-cs/common_cs_vty.c
+++ b/src/libcommon-cs/common_cs_vty.c
@@ -103,40 +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_authorize_regexp, cfg_net_authorize_regexp_cmd,
- "authorized-regexp REGEXP",
- "Set regexp for IMSI which will be used for authorization decision\n"
- "Regular expression, IMSIs matching it are allowed to use the network\n")
-{
- struct gsm_network *gsmnet = gsmnet_from_vty(vty);
- if (gsm_parse_reg(gsmnet, &gsmnet->authorized_regexp,
- &gsmnet->authorized_reg_str, argc, argv) != 0) {
- vty_out(vty, "%%Failed to parse the authorized-regexp: '%s'%s",
- argv[0], VTY_NEWLINE);
- return CMD_WARNING;
- }
-
- return CMD_SUCCESS;
-}
-
DEFUN(cfg_net_reject_cause,
cfg_net_reject_cause_cmd,
"location updating reject cause <2-111>",
@@ -329,8 +295,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_authorize_regexp_cmd);
install_element(GSMNET_NODE, &cfg_net_reject_cause_cmd);
install_element(GSMNET_NODE, &cfg_net_encryption_cmd);
install_element(GSMNET_NODE, &cfg_net_authentication_cmd);