allow us to have more than one database
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7333 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
13
kdc/config.c
13
kdc/config.c
@@ -48,8 +48,9 @@ char *keyfile;
|
|||||||
static char *max_request_str;
|
static char *max_request_str;
|
||||||
size_t max_request;
|
size_t max_request;
|
||||||
time_t kdc_warn_pwexpire;
|
time_t kdc_warn_pwexpire;
|
||||||
char *database;
|
char **databases;
|
||||||
HDB *db;
|
HDB **db;
|
||||||
|
int num_db;
|
||||||
char *port_str;
|
char *port_str;
|
||||||
int enable_http = -1;
|
int enable_http = -1;
|
||||||
krb5_boolean encode_as_rep_as_tgs_rep; /* bug compatibility */
|
krb5_boolean encode_as_rep_as_tgs_rep; /* bug compatibility */
|
||||||
@@ -85,7 +86,7 @@ static struct getargs args[] = {
|
|||||||
"max size for a kdc-request", "size"
|
"max size for a kdc-request", "size"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"database", 'd', arg_string, &database,
|
"database", 'd', arg_string, &databases,
|
||||||
"location of database", "database"
|
"location of database", "database"
|
||||||
},
|
},
|
||||||
{ "enable-http", 'H', arg_flag, &enable_http, "turn on HTTP support" },
|
{ "enable-http", 'H', arg_flag, &enable_http, "turn on HTTP support" },
|
||||||
@@ -157,10 +158,8 @@ configure(int argc, char **argv)
|
|||||||
keyfile = strdup(p);
|
keyfile = strdup(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(database == NULL){
|
if(databases == NULL)
|
||||||
p = krb5_config_get_string (context, cf, "kdc", "database", NULL);
|
databases = krb5_config_get_strings (context, cf, "kdc", "database", NULL);
|
||||||
if(p) database = strdup(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(max_request_str){
|
if(max_request_str){
|
||||||
max_request = parse_bytes(max_request_str, NULL);
|
max_request = parse_bytes(max_request_str, NULL);
|
||||||
|
Reference in New Issue
Block a user