add detach options
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11297 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
24
kdc/config.c
24
kdc/config.c
@@ -53,6 +53,11 @@ int num_db;
|
|||||||
|
|
||||||
const char *port_str;
|
const char *port_str;
|
||||||
|
|
||||||
|
#ifdef HAVE_DAEMON
|
||||||
|
int detach_from_console = -1;
|
||||||
|
#define DETACH_IS_DEFAULT FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
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 */
|
||||||
|
|
||||||
@@ -112,6 +117,19 @@ static struct getargs args[] = {
|
|||||||
{ "ports", 'P', arg_string, &port_str,
|
{ "ports", 'P', arg_string, &port_str,
|
||||||
"ports to listen to", "portspec"
|
"ports to listen to", "portspec"
|
||||||
},
|
},
|
||||||
|
#ifdef HAVE_DAEMON
|
||||||
|
#if DETACH_IS_DEFAULT
|
||||||
|
{
|
||||||
|
"detach", 'D', arg_negative_flag, &detach_from_console,
|
||||||
|
"don't detach from console"
|
||||||
|
},
|
||||||
|
#else
|
||||||
|
{
|
||||||
|
"detach", 0 , arg_flag, &detach_from_console,
|
||||||
|
"detach from console"
|
||||||
|
},
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
{ "addresses", 0, arg_strings, &addresses_str,
|
{ "addresses", 0, arg_strings, &addresses_str,
|
||||||
"addresses to listen on", "list of addresses" },
|
"addresses to listen on", "list of addresses" },
|
||||||
{ "help", 'h', arg_flag, &help_flag },
|
{ "help", 'h', arg_flag, &help_flag },
|
||||||
@@ -358,6 +376,12 @@ configure(int argc, char **argv)
|
|||||||
"kdc",
|
"kdc",
|
||||||
"kdc_warn_pwexpire",
|
"kdc_warn_pwexpire",
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
|
if(detach_from_console == -1)
|
||||||
|
detach_from_console = krb5_config_get_bool_default(context, NULL,
|
||||||
|
DETACH_IS_DEFAULT,
|
||||||
|
"kdc",
|
||||||
|
"detach", NULL);
|
||||||
kdc_openlog();
|
kdc_openlog();
|
||||||
if(max_request == 0)
|
if(max_request == 0)
|
||||||
max_request = 64 * 1024;
|
max_request = 64 * 1024;
|
||||||
|
Reference in New Issue
Block a user