From 990a0c86db55e7af83598f08d46d8834ece79cd6 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Thu, 9 Sep 2004 23:25:56 +0000 Subject: [PATCH] ms2mit.c: Apply KRB5_TC_NOTICKET to MSLSA: while searching for the presence of an initial ticket to copy to the MIT cache ticket: 2688 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16733 dc483132-0cff-0310-8789-dd5450dbe970 --- src/windows/ms2mit/ChangeLog | 5 +++++ src/windows/ms2mit/ms2mit.c | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/windows/ms2mit/ChangeLog b/src/windows/ms2mit/ChangeLog index 0448e0498..a346c09be 100644 --- a/src/windows/ms2mit/ChangeLog +++ b/src/windows/ms2mit/ChangeLog @@ -1,3 +1,8 @@ +2004-09-09 Jeffrey Altman + + * ms2mit.c: apply KRB5_TC_NOTICKET to MSLSA: ccache while + searching for an initial ticket + 2004-08-20 Jeffrey Altman * ms2mit.c: add -c ccache command line option diff --git a/src/windows/ms2mit/ms2mit.c b/src/windows/ms2mit/ms2mit.c index 3a7f7d5a2..5999a1847 100644 --- a/src/windows/ms2mit/ms2mit.c +++ b/src/windows/ms2mit/ms2mit.c @@ -86,6 +86,13 @@ main( exit(1); } + if (code = krb5_cc_set_flags(kcontext, mslsa_ccache, KRB5_TC_NOTICKET)) { + com_err(argv[0], code, "while setting KRB5_TC_NOTICKET flag"); + krb5_cc_close(kcontext, mslsa_ccache); + krb5_free_context(kcontext); + exit(1); + } + /* Enumerate tickets from cache looking for an initial ticket */ if ((code = krb5_cc_start_seq_get(kcontext, mslsa_ccache, &cursor))) { com_err(argv[0], code, "while initiating the cred sequence of MS LSA ccache"); @@ -105,6 +112,13 @@ main( } krb5_cc_end_seq_get(kcontext, mslsa_ccache, &cursor); + if (code = krb5_cc_set_flags(kcontext, mslsa_ccache, 0)) { + com_err(argv[0], code, "while clearing flags"); + krb5_cc_close(kcontext, mslsa_ccache); + krb5_free_context(kcontext); + exit(1); + } + if ( !initial_ticket ) { fprintf(stderr, "%s: Initial Ticket Getting Tickets are not available from the MS LSA\n", argv[0]); -- 2.26.2