summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2014-01-26 22:18:18 -0500
committerGreg Hudson <ghudson@mit.edu>2014-02-20 20:45:55 -0500
commit90c11ff42008a90a72ee71444b0ad799e38b7ff0 (patch)
treeff3b2c5befac264d364a9f9067ef1a1d1039be0c
parent2ed8ebf18809af66aeaa2af6984754bdbefff500 (diff)
downloadkrb5-90c11ff42008a90a72ee71444b0ad799e38b7ff0.tar.gz
krb5-90c11ff42008a90a72ee71444b0ad799e38b7ff0.tar.xz
krb5-90c11ff42008a90a72ee71444b0ad799e38b7ff0.zip
Implement kpropd -A
The -A option causes kpropd to contact a specified admin server (normally an intermediate slave running kadmind -proponly) instead of the master admin server. Based on code submitted by Richard Basch. ticket: 7855
-rw-r--r--doc/admin/admin_commands/kpropd.rst5
-rw-r--r--src/slave/kpropd.c8
2 files changed, 13 insertions, 0 deletions
diff --git a/doc/admin/admin_commands/kpropd.rst b/doc/admin/admin_commands/kpropd.rst
index 0bd0a02608..43b6db762e 100644
--- a/doc/admin/admin_commands/kpropd.rst
+++ b/doc/admin/admin_commands/kpropd.rst
@@ -8,6 +8,7 @@ SYNOPSIS
**kpropd**
[**-r** *realm*]
+[**-A** *admin_server*]
[**-a** *acl_file*]
[**-f** *slave_dumpfile*]
[**-F** *principal_database*]
@@ -70,6 +71,10 @@ OPTIONS
**-r** *realm*
Specifies the realm of the master server.
+**-A** *admin_server*
+ Specifies the server to be contacted for incremental updates; by
+ default, the master admin server is contacted.
+
**-f** *file*
Specifies the filename where the dumped principal database file is
to be stored; by default the dumped database file is |kdcdir|\
diff --git a/src/slave/kpropd.c b/src/slave/kpropd.c
index 3573a262ba..55ca511599 100644
--- a/src/slave/kpropd.c
+++ b/src/slave/kpropd.c
@@ -174,6 +174,7 @@ usage()
progname);
fprintf(stderr, _("\t[-F kerberos_db_file ] [-p kdb5_util_pathname]\n"));
fprintf(stderr, _("\t[-x db_args]* [-P port] [-a acl_file]\n"));
+ fprintf(stderr, _("\t[-A admin_server]\n"));
exit(1);
}
@@ -1056,6 +1057,13 @@ parse_args(char **argv)
word++;
while (word != NULL && (ch = *word++) != '\0') {
switch (ch) {
+ case 'A':
+ params.mask |= KADM5_CONFIG_ADMIN_SERVER;
+ params.admin_server = (*word != '\0') ? word : *argv++;
+ if (params.admin_server == NULL)
+ usage();
+ word = NULL;
+ break;
case 'f':
file = (*word != '\0') ? word : *argv++;
if (file == NULL)