]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Report extended errors in kinit -k -t KDB: 749/head
authorGreg Hudson <ghudson@mit.edu>
Sun, 18 Mar 2018 02:47:34 +0000 (22:47 -0400)
committerGreg Hudson <ghudson@mit.edu>
Tue, 20 Mar 2018 00:29:05 +0000 (20:29 -0400)
In kinit, if we recreate the context using kinit_kdb_init(), also
reset the global errctx so that we use the new context to retrieve
extended error messages.

ticket: 8652 (new)

src/clients/kinit/kinit.c

index a518284ea56875ce6fc9b4ab25f100cf338c9712..3fdae2878482b73cb3c092256aa4d61adfc0e21b 100644 (file)
@@ -718,6 +718,7 @@ k5_kinit(struct k_opts *opts, struct k5_data *k5)
 #ifndef _WIN32
         if (strncmp(opts->keytab_name, "KDB:", 4) == 0) {
             ret = kinit_kdb_init(&k5->ctx, k5->me->realm.data);
+            errctx = k5->ctx;
             if (ret) {
                 com_err(progname, ret,
                         _("while setting up KDB keytab for realm %s"),