From ea4708b37bf26700cf317353cadecd35784e699c Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Wed, 25 May 2011 21:45:40 +0000 Subject: [PATCH] Don't assume principal components are C strings in klist -s ticket: 6915 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24944 dc483132-0cff-0310-8789-dd5450dbe970 --- src/clients/klist/klist.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/clients/klist/klist.c b/src/clients/klist/klist.c index 6f378255c..3d34aedd8 100644 --- a/src/clients/klist/klist.c +++ b/src/clients/klist/klist.c @@ -24,7 +24,7 @@ * or implied warranty. */ -#include "autoconf.h" +#include "k5-int.h" #include #include #include @@ -386,10 +386,9 @@ void do_ccache(name) continue; if (status_only) { if (exit_status && creds.server->length == 2 && - strcmp(creds.server->realm.data, princ->realm.data) == 0 && - strcmp((char *)creds.server->data[0].data, "krbtgt") == 0 && - strcmp((char *)creds.server->data[1].data, - princ->realm.data) == 0 && + data_eq(creds.server->realm, princ->realm) && + data_eq_string(creds.server->data[0], "krbtgt") && + data_eq(creds.server->data[1], princ->realm) && creds.times.endtime > now) exit_status = 0; } else { -- 2.26.2