[PATCH] osmo-bsc[master]: auth: remove obsolete VTY commands

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

dexter gerrit-no-reply at lists.osmocom.org
Tue Nov 28 15:35:14 UTC 2017


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

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
---
M doc/examples/osmo-bsc/osmo-bsc.cfg
M doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
M include/osmocom/bsc/gsm_data.h
M src/libbsc/bsc_init.c
M src/libbsc/bsc_vty.c
M src/libcommon-cs/common_cs.c
M src/libcommon-cs/common_cs_vty.c
7 files changed, 0 insertions(+), 64 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/69/5069/1

diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg b/doc/examples/osmo-bsc/osmo-bsc.cfg
index 69f8ab7..60338d2 100644
--- a/doc/examples/osmo-bsc/osmo-bsc.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc.cfg
@@ -8,8 +8,6 @@
  mobile network code 1
  short name OsmoBSC
  long name OsmoBSC
- auth policy closed
- authorized-regexp .*
  location updating reject cause 13
  encryption a5 0
  authentication optional
diff --git a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
index 59e7090..f9f5ba6 100644
--- a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
@@ -7,8 +7,6 @@
  mobile network code 1
  short name OsmoBSC
  long name OsmoBSC
- auth policy closed
- authorized-regexp .*
  location updating reject cause 13
  encryption a5 0
  authentication optional
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index b9427b8..845e714 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -369,9 +369,6 @@
 	uint16_t network_code;
 	char *name_long;
 	char *name_short;
-	enum gsm_auth_policy auth_policy;
-	regex_t authorized_regexp;
-	char *authorized_reg_str;
 	enum gsm48_reject_value reject_cause;
 	int a5_encryption;
 	bool authentication_required;
diff --git a/src/libbsc/bsc_init.c b/src/libbsc/bsc_init.c
index fa8c477..1874200 100644
--- a/src/libbsc/bsc_init.c
+++ b/src/libbsc/bsc_init.c
@@ -477,14 +477,6 @@
 		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 71c2cef..cd18e3a 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -171,10 +171,6 @@
 		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 @@
 	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 16d51a1..b3037c6 100644
--- a/src/libcommon-cs/common_cs.c
+++ b/src/libcommon-cs/common_cs.c
@@ -44,14 +44,8 @@
 {
 	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;
diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c
index 040aa15..51f16c4 100644
--- a/src/libcommon-cs/common_cs_vty.c
+++ b/src/libcommon-cs/common_cs_vty.c
@@ -103,40 +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_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 @@
 	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);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie31b921b5fd0af5501ec0c77c0f08089c10075e2
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>



More information about the gerrit-log mailing list