removed server-name config option

This commit is contained in:
Nikos Mavrogiannopoulos
2015-02-26 11:00:07 +01:00
parent c9efcae416
commit 7619895a25
11 changed files with 10 additions and 28 deletions
-4
View File
@@ -72,10 +72,6 @@ max-clients = 16
# multiple times). Unset or set to zero for unlimited.
max-same-clients = 2
# Used to identify this particular server. It is used as NAS identifier
# in radius, if the nas-identifier is not already set.
#server-name = ocserv@example.com
# Use listen-host to limit to specific IPs or to the IPs of a provided
# hostname.
#listen-host = [IP|HOSTNAME]
+1 -4
View File
@@ -40,7 +40,7 @@
static rc_handle *rh = NULL;
static char nas_identifier[64];
static void acct_radius_global_init(void *pool, const char *server_name, void *additional)
static void acct_radius_global_init(void *pool, void *additional)
{
radius_cfg_st *config = additional;
@@ -54,9 +54,6 @@ static void acct_radius_global_init(void *pool, const char *server_name, void *a
if (config->nas_identifier) {
strlcpy(nas_identifier, config->nas_identifier, sizeof(nas_identifier));
} else {
if (server_name)
strlcpy(nas_identifier, server_name, sizeof(nas_identifier));
else
nas_identifier[0] = 0;
}
+1 -1
View File
@@ -83,7 +83,7 @@ const gss_OID_set_desc desired_mechs = {
.elements = (gss_OID)&spnego_mech
};
static void gssapi_global_init(void *pool, const char *server_name, void *additional)
static void gssapi_global_init(void *pool, void *additional)
{
int ret;
OM_uint32 time, minor;
+1 -1
View File
@@ -49,7 +49,7 @@ struct plain_ctx_st {
static char *password_file = NULL;
static void plain_global_init(void *pool, const char *server_name, void *additional)
static void plain_global_init(void *pool, void *additional)
{
struct plain_cfg_st *config = additional;
+1 -4
View File
@@ -41,7 +41,7 @@
static rc_handle *rh = NULL;
static char nas_identifier[64];
static void radius_global_init(void *pool, const char *server_name, void *additional)
static void radius_global_init(void *pool, void *additional)
{
radius_cfg_st *config = additional;
@@ -56,9 +56,6 @@ static void radius_global_init(void *pool, const char *server_name, void *additi
if (config->nas_identifier) {
strlcpy(nas_identifier, config->nas_identifier, sizeof(nas_identifier));
} else {
if (server_name)
strlcpy(nas_identifier, server_name, sizeof(nas_identifier));
else
nas_identifier[0] = 0;
}
-3
View File
@@ -74,7 +74,6 @@ static struct cfg_options available_options[] = {
{ .name = "custom-header", .type = OPTION_MULTI_LINE, .mandatory = 0 },
{ .name = "split-dns", .type = OPTION_MULTI_LINE, .mandatory = 0 },
{ .name = "acct", .type = OPTION_STRING, .mandatory = 0 },
{ .name = "server-name", .type = OPTION_STRING, .mandatory = 0 },
{ .name = "listen-host", .type = OPTION_STRING, .mandatory = 0 },
{ .name = "listen-host-is-dyndns", .type = OPTION_BOOLEAN, .mandatory = 0 },
{ .name = "compression", .type = OPTION_BOOLEAN, .mandatory = 0 },
@@ -702,7 +701,6 @@ unsigned urlfw_size = 0;
READ_STRING("user-profile", config->xml_config_file);
#endif
READ_STRING("server-name", config->server_name);
READ_STRING("ca-cert", config->ca);
READ_STRING("default-domain", config->default_domain);
READ_STRING("crl", config->crl);
@@ -1084,7 +1082,6 @@ unsigned i;
DEL(config->banner);
DEL(config->dh_params_file);
DEL(config->listen_host);
DEL(config->server_name);
DEL(config->pin_file);
DEL(config->srk_pin_file);
DEL(config->ca);
-4
View File
@@ -147,10 +147,6 @@ max-clients = 16
# multiple times). Unset or set to zero for unlimited.
max-same-clients = 2
# Used to identify this particular server. It is used as NAS identifier
# in radius, if the nas-identifier is not already set.
#server-name = ocserv@example.com
# Use listen-host to limit to specific IPs or to the IPs of a provided
# hostname.
#listen-host = [IP|HOSTNAME]
+1 -1
View File
@@ -27,7 +27,7 @@
typedef struct acct_mod_st {
unsigned int type; /* ACCT_TYPE_ */
unsigned int auth_types; /* or of the AUTH_TYPEs which are compatible with this */
void (*global_init)(void *pool, const char *server_name, void* additional);
void (*global_init)(void *pool, void* additional);
void (*global_deinit)(void);
/* The context provided below is of the authentication method */
+2 -2
View File
@@ -65,11 +65,11 @@ void sec_auth_init(sec_mod_st * sec, struct cfg_st *config)
for (i=0;i<config->auth_methods;i++) {
if (config->auth[i].enabled && config->auth[i].amod && config->auth[i].amod->global_init)
config->auth[i].amod->global_init(sec, config->server_name, config->auth[i].additional);
config->auth[i].amod->global_init(sec, config->auth[i].additional);
}
if (config->acct.amod && config->acct.amod->global_init)
config->acct.amod->global_init(sec, config->server_name, config->acct.additional);
config->acct.amod->global_init(sec, config->acct.additional);
}
/* returns a negative number if we have reached the score for this client.
+1 -1
View File
@@ -30,7 +30,7 @@
typedef struct auth_mod_st {
unsigned int type;
unsigned int allows_retries; /* whether the module allows retries of the same password */
void (*global_init)(void *pool, const char *server_name, void* additional);
void (*global_init)(void *pool, void* additional);
void (*global_deinit)(void);
int (*auth_init)(void** ctx, void *pool, const char* username, const char* ip);
int (*auth_msg)(void* ctx, void *pool, char** msg);
-1
View File
@@ -265,7 +265,6 @@ typedef struct kkdcp_st {
} kkdcp_st;
struct cfg_st {
char *server_name;
char *listen_host;
unsigned int port;
unsigned int udp_port;