replace the command line option -a with the auth-policy config option
diff --git a/openbsc/src/bsc_hack.c b/openbsc/src/bsc_hack.c
index 6de6fd2..6243b42 100644
--- a/openbsc/src/bsc_hack.c
+++ b/openbsc/src/bsc_hack.c
@@ -1115,7 +1115,6 @@
 	printf("  -s --disable-color\n");
 	printf("  -c --config-file filename The config file to use.\n");
 	printf("  -l --database db-name The database to use\n");
-	printf("  -a --authorize-everyone Allow everyone into the network.\n");
 	printf("  -r --reject-cause number The reject cause for LOCATION UPDATING REJECT.\n");
 	printf("  -p --pcap file  The filename of the pcap file\n");
 	printf("  -C --cardnr number  For bs11 select E1 card number other than 0\n");
@@ -1165,9 +1164,6 @@
 		case 'c':
 			config_file = strdup(optarg);
 			break;
-		case 'a':
-			gsm0408_allow_everyone(1);
-			break;
 		case 'r':
 			gsm0408_set_reject_cause(atoi(optarg));
 			break;
diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c
index f0ec3ff..65940a0 100644
--- a/openbsc/src/gsm_04_08.c
+++ b/openbsc/src/gsm_04_08.c
@@ -304,13 +304,6 @@
 	u_int16_t lac;
 };
 
-static int authorize_everonye = 0;
-void gsm0408_allow_everyone(int everyone)
-{
-	printf("Allowing everyone?\n");
-	authorize_everonye = everyone;
-}
-
 static int reject_cause = 0;
 void gsm0408_set_reject_cause(int cause)
 {
@@ -333,10 +326,15 @@
 	if (loc && (loc->waiting_for_imsi || loc->waiting_for_imei))
 		return 0;
 
-	if (authorize_everonye)
+	switch (subscriber->net->auth_policy) {
+	case GSM_AUTH_POLICY_CLOSED:
+		return subscriber->authorized;
+	case GSM_AUTH_POLICY_ACCEPT_ALL:
 		return 1;
-
-	return subscriber->authorized;
+	case GSM_AUTH_POLICY_TOKEN:
+	default:
+		return 0;
+	}
 }
 
 static void release_loc_updating_req(struct gsm_lchan *lchan)