static char *max_request_str; /* `max_request' as a string */
-#ifdef HAVE_DAEMON
int detach_from_console = -1;
#define DETACH_IS_DEFAULT FALSE
-#endif
static const char *system_cache_name = NULL;
static const char *system_keytab = NULL;
"max-request", 0, arg_string, &max_request,
"max size for a kcm-request", "size"
},
-#ifdef HAVE_DAEMON
#if DETACH_IS_DEFAULT
{
"detach", 'D', arg_negative_flag, &detach_from_console,
"detach", 0 , arg_flag, &detach_from_console,
"detach from console"
},
-#endif
#endif
{ "help", 'h', arg_flag, &help_flag },
{
krb5_err(kcm_context, 1, ret, "initializing system ccache");
}
-#ifdef HAVE_DAEMON
if(detach_from_console == -1)
detach_from_console = krb5_config_get_bool_default(kcm_context, NULL,
DETACH_IS_DEFAULT,
"kcm",
"detach", NULL);
-#endif
kcm_openlog();
if(max_request == 0)
max_request = 64 * 1024;
const char *port_str;
-#ifdef HAVE_DAEMON
int detach_from_console = -1;
#define DETACH_IS_DEFAULT FALSE
-#endif
int enable_http = -1;
krb5_boolean encode_as_rep_as_tgs_rep; /* bug compatibility */
{ "ports", 'P', arg_string, &port_str,
"ports to listen to", "portspec"
},
-#ifdef HAVE_DAEMON
#if DETACH_IS_DEFAULT
{
"detach", 'D', arg_negative_flag, &detach_from_console,
"detach", 0 , arg_flag, &detach_from_console,
"detach from console"
},
-#endif
#endif
{ "addresses", 0, arg_strings, &addresses_str,
"addresses to listen on", "list of addresses" },
"kdc_warn_pwexpire",
NULL);
-#ifdef HAVE_DAEMON
if(detach_from_console == -1)
detach_from_console = krb5_config_get_bool_default(context, NULL,
DETACH_IS_DEFAULT,
"kdc",
"detach", NULL);
-#endif
kdc_openlog();
if(max_request == 0)
max_request = 64 * 1024;
/*
- * Copyright (c) 1997-2002 Kungliga Tekniska Högskolan
+ * Copyright (c) 1997-2002, 2004-2005 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
sig_atomic_t exit_flag = 0;
krb5_context context;
-#ifdef HAVE_DAEMON
extern int detach_from_console;
-#endif
static RETSIGTYPE
sigterm(int sig)
signal(SIGTERM, sigterm);
signal(SIGPIPE, SIG_IGN);
#endif
-#ifdef HAVE_DAEMON
if (detach_from_console)
daemon(0, 0);
-#endif
pidfile(NULL);
loop();
krb5_free_context(context);
static char *database;
static char *config_file;
static char *port_str;
-#ifdef HAVE_DAEMON
static int detach_from_console = 0;
-#endif
static struct getargs args[] = {
{ "config-file", 'c', arg_string, &config_file },
{ "time-gone", 0, arg_string, &slave_time_gone,
"time of inactivity after which a slave is considered gone", "time"},
{ "port", 0, arg_string, &port_str,
- "port ipropd will listen too", "port"},
-#ifdef HAVE_DAEMON
+ "port ipropd will listen to", "port"},
{ "detach", 0, arg_flag, &detach_from_console,
"detach from console" },
-#endif
{ "version", 0, arg_flag, &version_flag },
{ "help", 0, arg_flag, &help_flag }
};
if (time_before_missing < 0)
krb5_errx (context, 1, "couldn't parse time: %s", slave_time_missing);
-#ifdef HAVE_DAEMON
if (detach_from_console)
daemon(0, 0);
-#endif
pidfile (NULL);
krb5_openlog (context, "ipropd-master", &log_facility);
krb5_set_warn_dest(context, log_facility);
/*
- * Copyright (c) 1997 - 2004 Kungliga Tekniska Högskolan
+ * Copyright (c) 1997 - 2005 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
static int help_flag;
static char *keytab_str;
static char *port_str;
-#ifdef HAVE_DAEMON
static int detach_from_console = 0;
-#endif
static struct getargs args[] = {
{ "config-file", 'c', arg_string, &config_file },
"time before server is considered lost", "time" },
{ "port", 0, arg_string, &port_str,
"port ipropd-slave will connect to", "port"},
-#ifdef HAVE_DAEMON
{ "detach", 0, arg_flag, &detach_from_console,
"detach from console" },
-#endif
{ "version", 0, arg_flag, &version_flag },
{ "help", 0, arg_flag, &help_flag }
};
master = argv[0];
-#ifdef HAVE_DAEMON
if (detach_from_console)
daemon(0, 0);
-#endif
pidfile (NULL);
krb5_openlog (context, "ipropd-slave", &log_facility);
krb5_set_warn_dest(context, log_facility);