[**-nofork**]
[**-port** *port-number*]
[**-P** *pid_file*]
+[**-p** *kdb5_util_path*]
+[**-K** *kprop_path*]
+[**-F** *dump_file*]
DESCRIPTION
-----------
whether kadmind is still running and to allow init scripts to stop
the correct process.
+**-p** *kdb5_util_path*
+ specifies the path to the kdb5_util command to use when dumping the
+ KDB in response to full resync requests when iprop is enabled.
+
+**-K** *kprop_path*
+ specifies the path to the kprop command to use to send full dumps
+ to slaves in response to full resync requests.
+
+**-F** *dump_file*
+ specifies the file path to be used for dumping the KDB in response
+ to full resync requests when iprop is enabled.
+
**-x** *db_args*
specifies database-specific arguments.
extern void *global_server_handle;
extern int nofork;
extern short l_port;
+extern char *kdb5_util;
+extern char *kprop;
+extern char *dump_file;
static char abuf[33];
/* Result is stored in a static buffer and is invalidated by the next call. */
#ifdef DPRINT
#undef DPRINT
#endif
-#define DPRINT(i, ...) \
- do { \
- if (nofork) { \
- fprintf(stderr, __VA_ARGS__); \
- fflush(stderr); \
- } \
+#define DPRINT(i, ...) \
+ do { \
+ if (nofork) { \
+ fprintf(stderr, __VA_ARGS__); \
+ fflush(stderr); \
+ } \
} while (0)
* subsequent updates very iprop).
*/
if (asprintf(&ubuf, "%s dump -i%d -c %s",
- KPROPD_DEFAULT_KDB5_UTIL, vers, KPROP_DEFAULT_FILE) < 0) {
+ kdb5_util, vers, dump_file) < 0) {
krb5_klog_syslog(LOG_ERR,
_("%s: cannot construct kdb5 util dump string too long; out of memory"),
whoami);
}
DPRINT("%s: exec `kprop -f %s %s' ...\n",
- whoami, KPROP_DEFAULT_FILE, clhost);
+ whoami, dump_file, clhost);
/* XXX Yuck! */
if (getenv("KPROP_PORT")) {
- pret = execl(KPROP_DEFAULT_FILE, "kprop", "-f",
- KPROP_DEFAULT_FILE, "-P", getenv("KPROP_PORT"),
- clhost, NULL);
+ pret = execl(kprop, "kprop", "-f", dump_file, "-P",
+ getenv("KPROP_PORT"), clhost, NULL);
} else {
- pret = execl(KPROP_DEFAULT_FILE, "kprop", "-f",
- KPROP_DEFAULT_FILE, clhost, NULL);
+ pret = execl(kprop, "kprop", "-f", dump_file, clhost, NULL);
}
perror(whoami);
krb5_klog_syslog(LOG_ERR,
{
fprintf(stderr, _("Usage: kadmind [-x db_args]* [-r realm] [-m] [-nofork] "
"[-port port-number]\n"
- "\t\t[-P pid_file]\n"
+ "\t\t[-p path-to-kdb5_util] [-F dump-file]\n"
+ "\t\t[-K path-to-kprop] [-P pid_file]\n"
"\nwhere,\n\t[-x db_args]* - any number of database "
"specific arguments.\n"
"\t\t\tLook at each database documentation for "
static krb5_context hctx;
int nofork = 0;
+char *kdb5_util = KPROPD_DEFAULT_KDB5_UTIL;
+char *kprop = KPROPD_DEFAULT_KPROP;
+char *dump_file = KPROP_DEFAULT_FILE;
int main(int argc, char *argv[])
{
pid_file = *argv;
} else if (strcmp(*argv, "-W") == 0) {
strong_random = 0;
+ } else if (strcmp(*argv, "-p") == 0) {
+ argc--; argv++;
+ if (!argc)
+ usage();
+ kdb5_util = *argv;
+ } else if (strcmp(*argv, "-F") == 0) {
+ argc--; argv++;
+ if (!argc)
+ usage();
+ dump_file = *argv;
+ } else if (strcmp(*argv, "-K") == 0) {
+ argc--; argv++;
+ if (!argc)
+ usage();
+ kprop = *argv;
} else
break;
argc--; argv++;