From 376a54c9f64fbb57813e5902bd46ed63e9b2c746 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Wed, 6 May 1998 20:21:28 +0000 Subject: [PATCH] t_ser.c (main): POSIX states that getopt returns -1 when it is done parsing options, not EOF. get_in_tkt.c (krb5_get_init_creds): If libdefaults/{REALM}/noaddresses is true, then don't put any addresses in the ticket request. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10549 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/ChangeLog | 11 +++++++++++ src/lib/krb5/krb/get_in_tkt.c | 16 ++++++++++++---- src/lib/krb5/krb/t_ser.c | 2 +- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index 3d0784c84..434459f9a 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,3 +1,14 @@ +1998-05-06 Theodore Ts'o + + * t_ser.c (main): POSIX states that getopt returns -1 + when it is done parsing options, not EOF. + +1998-05-05 Theodore Ts'o + + * get_in_tkt.c (krb5_get_init_creds): If + libdefaults/{REALM}/noaddresses is true, then don't put + any addresses in the ticket request. + Mon May 4 15:54:07 1998 Tom Yu * get_in_tkt.c: Add prototype for make_preauth_list. diff --git a/src/lib/krb5/krb/get_in_tkt.c b/src/lib/krb5/krb/get_in_tkt.c index c593e12cc..679ecc492 100644 --- a/src/lib/krb5/krb/get_in_tkt.c +++ b/src/lib/krb5/krb/get_in_tkt.c @@ -620,7 +620,7 @@ krb5_appdefault_string(context, realm, option, ret_value) /* * Try number one: * - * [appdefaults] + * [libdefaults] * REALM = { * option = * } @@ -636,7 +636,7 @@ krb5_appdefault_string(context, realm, option, ret_value) /* * Try number two: * - * [appdefaults] + * [libdefaults] * option = */ @@ -855,11 +855,19 @@ krb5_get_init_creds(context, creds, client, prompter, prompter_data, goto cleanup; } - if (options && (options->flags & KRB5_GET_INIT_CREDS_OPT_ADDRESS_LIST)) + if (options && (options->flags & KRB5_GET_INIT_CREDS_OPT_ADDRESS_LIST)) { request.addresses = options->address_list; - else + } + /* it would be nice if this parsed out an address list, but + that would be work. */ + else if (((ret = krb5_appdefault_boolean(context, &client->realm, + "noaddresses", &tempint)) == 0) + && tempint) { + ; + } else { if ((ret = krb5_os_localaddr(context, &request.addresses))) goto cleanup; + } request.authorization_data.ciphertext.length = 0; request.authorization_data.ciphertext.data = 0; diff --git a/src/lib/krb5/krb/t_ser.c b/src/lib/krb5/krb/t_ser.c index 9248f6d67..4ca3b5399 100644 --- a/src/lib/krb5/krb/t_ser.c +++ b/src/lib/krb5/krb/t_ser.c @@ -641,7 +641,7 @@ main(argc, argv) do_ptest = 1; do_rtest = 1; do_stest = 1; - while ((option = getopt(argc, argv, "acekprsxvACEKPRSX")) != EOF) { + while ((option = getopt(argc, argv, "acekprsxvACEKPRSX")) != -1) { switch (option) { case 'a': do_atest = 0; -- 2.26.2