From e78c49d053699fdad677cd4fedbc2662276e12c6 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Sat, 20 May 1995 18:23:46 +0000 Subject: [PATCH] If kpropd invoked with -r option, invoke kdb5_edit with different realm git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5829 dc483132-0cff-0310-8789-dd5450dbe970 --- src/slave/ChangeLog | 3 +++ src/slave/kpropd.c | 14 ++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/slave/ChangeLog b/src/slave/ChangeLog index d8650f598..4f2efc674 100644 --- a/src/slave/ChangeLog +++ b/src/slave/ChangeLog @@ -1,5 +1,8 @@ Sat May 20 13:46:36 1995 Ezra Peisach + * kpropd.c (load_database): If realm specified then invoke + kdb5_edit with -r option. + * kprop.M: Document -P (port) option. * kpropd.M: Document -P (port) option. diff --git a/src/slave/kpropd.c b/src/slave/kpropd.c index 6005742f3..0a2dac886 100644 --- a/src/slave/kpropd.c +++ b/src/slave/kpropd.c @@ -795,9 +795,10 @@ load_database(context, kdb5_edit, database_file_name) char *kdb5_edit; char *database_file_name; { - static char *edit_av[4]; + static char *edit_av[10]; int error_ret, save_stderr; int child_pid; + int count; /* has been included, so BSD will be defined on BSD systems */ @@ -818,9 +819,14 @@ load_database(context, kdb5_edit, database_file_name) sprintf(request, "load_db %s %s", database_file_name, kerb_database); edit_av[0] = kdb5_edit; - edit_av[1] = "-R"; - edit_av[2] = request; - edit_av[3] = NULL; + count = 1; + if (realm) { + edit_av[count++] = "-r"; + edit_av[count++] = realm; + } + edit_av[count++] = "-R"; + edit_av[count++] = request; + edit_av[count++] = NULL; switch(child_pid = fork()) { case -1: -- 2.26.2