From: Ken Raeburn Date: Wed, 11 Sep 2002 08:43:27 +0000 (+0000) Subject: * t_locate_kdc.c(main):Add new argument -m for looking up master KDC addresses X-Git-Tag: krb5-1.3-alpha1~405 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c432ab0787057e94d38b25f390a04c99478825e1;p=krb5.git * t_locate_kdc.c(main):Add new argument -m for looking up master KDC addresses git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14844 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index 993ef66b9..7819274b8 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -7,6 +7,9 @@ Ignore errors in the second address lookup. (krb5_locate_srv_conf_1) [TEST]: More debugging code. + * t_locate_kdc.c (main): Add new argument -m for looking up master + KDC addresses. + 2002-09-03 Ken Raeburn * accessor.c, an_to_ln.c, c_ustime.c, ccdefname.c, changepw.c, diff --git a/src/lib/krb5/os/t_locate_kdc.c b/src/lib/krb5/os/t_locate_kdc.c index 734411b18..8365c03a7 100644 --- a/src/lib/krb5/os/t_locate_kdc.c +++ b/src/lib/krb5/os/t_locate_kdc.c @@ -73,6 +73,7 @@ int main (int argc, char *argv[]) krb5_data realm; krb5_context ctx; krb5_error_code err; + int master = 0; p = strrchr (argv[0], '/'); if (p) @@ -90,13 +91,15 @@ int main (int argc, char *argv[]) how = LOOKUP_CONF; else if (!strcmp (argv[1], "-d")) how = LOOKUP_DNS; + else if (!strcmp (argv[1], "-m")) + master = 1; else goto usage; realmname = argv[2]; break; default: usage: - fprintf (stderr, "%s: usage: %s [-c | -d] realm\n", prog, prog); + fprintf (stderr, "%s: usage: %s [-c | -d | -m] realm\n", prog, prog); return 1; } @@ -118,7 +121,7 @@ int main (int argc, char *argv[]) break; case LOOKUP_WHATEVER: - err = krb5_locate_kdc (ctx, &realm, &al, 0, 0); + err = krb5_locate_kdc (ctx, &realm, &al, master, 0); break; } if (err) kfatal (err);