Skip to content

Commit

Permalink
Implement kpropd -A
Browse files Browse the repository at this point in the history
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
  • Loading branch information
greghudson committed Feb 21, 2014
1 parent 2ed8ebf commit 90c11ff
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doc/admin/admin_commands/kpropd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ SYNOPSIS

**kpropd**
[**-r** *realm*]
[**-A** *admin_server*]
[**-a** *acl_file*]
[**-f** *slave_dumpfile*]
[**-F** *principal_database*]
Expand Down Expand Up @@ -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|\
Expand Down
8 changes: 8 additions & 0 deletions src/slave/kpropd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 90c11ff

Please sign in to comment.