Add flags for http support, and port specifications.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3348 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
17
kdc/config.c
17
kdc/config.c
@@ -45,10 +45,12 @@ RCSID("$Id$");
|
|||||||
static char *config_file;
|
static char *config_file;
|
||||||
int require_preauth = -1;
|
int require_preauth = -1;
|
||||||
char *keyfile;
|
char *keyfile;
|
||||||
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 *database;
|
||||||
|
char *port_str;
|
||||||
|
int enable_http = -1;
|
||||||
|
|
||||||
#ifdef KRB4
|
#ifdef KRB4
|
||||||
char *v4_realm;
|
char *v4_realm;
|
||||||
@@ -77,12 +79,16 @@ static struct getargs args[] = {
|
|||||||
"database", 'd', arg_string, &database,
|
"database", 'd', arg_string, &database,
|
||||||
"location of database", "database"
|
"location of database", "database"
|
||||||
},
|
},
|
||||||
|
{ "enable-http", 'H', arg_flag, &enable_http, "turn on HTTP support" },
|
||||||
#ifdef KRB4
|
#ifdef KRB4
|
||||||
{
|
{
|
||||||
"v4-realm", 'r', arg_string, &v4_realm,
|
"v4-realm", 'r', arg_string, &v4_realm,
|
||||||
"realm to serve v4-requests for"
|
"realm to serve v4-requests for"
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
|
{ "ports", 'P', arg_string, &port_str,
|
||||||
|
"ports to listen to"
|
||||||
|
},
|
||||||
{ "help", 'h', arg_flag, &help },
|
{ "help", 'h', arg_flag, &help },
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -149,6 +155,15 @@ configure(int argc, char **argv)
|
|||||||
if(require_preauth == -1)
|
if(require_preauth == -1)
|
||||||
require_preauth = krb5_config_get_bool(cf, "kdc",
|
require_preauth = krb5_config_get_bool(cf, "kdc",
|
||||||
"require-preauth", NULL);
|
"require-preauth", NULL);
|
||||||
|
|
||||||
|
if(port_str == NULL){
|
||||||
|
p = krb5_config_get_string(cf, "kdc", "ports", NULL);
|
||||||
|
if(p == NULL)
|
||||||
|
p = "+";
|
||||||
|
port_str = (char*)p;
|
||||||
|
}
|
||||||
|
if(enable_http == -1)
|
||||||
|
enable_http = krb5_config_get_bool(cf, "kdc", "enable-http", NULL);
|
||||||
#ifdef KRB4
|
#ifdef KRB4
|
||||||
if(v4_realm == NULL){
|
if(v4_realm == NULL){
|
||||||
p = krb5_config_get_string (cf,
|
p = krb5_config_get_string (cf,
|
||||||
|
Reference in New Issue
Block a user