From: Richard Basch Date: Fri, 10 May 2013 16:24:21 +0000 (-0400) Subject: Fix check for KDB: prefix in kinit X-Git-Tag: krb5-1.12-alpha1~178 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=962e70a085314b44246263f5d8c9dc670a39eccb;p=thirdparty%2Fkrb5.git Fix check for KDB: prefix in kinit The string "KDB:" has four characters, not three; check for all four of them. [ghudson@mit.edu: commit message] ticket: 7636 --- diff --git a/src/clients/kinit/kinit.c b/src/clients/kinit/kinit.c index 71a2fec586..5ceede89d0 100644 --- a/src/clients/kinit/kinit.c +++ b/src/clients/kinit/kinit.c @@ -719,7 +719,7 @@ k5_kinit(opts, k5) if ((opts->action == INIT_KT) && opts->keytab_name) { #ifndef _WIN32 - if (strncmp(opts->keytab_name, "KDB:", 3) == 0) { + if (strncmp(opts->keytab_name, "KDB:", 4) == 0) { code = kinit_kdb_init(&k5->ctx, krb5_princ_realm(k5->ctx, k5->me)->data); if (code != 0) {