]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix check for KDB: prefix in kinit
authorRichard Basch <basch@alum.mit.edu>
Fri, 10 May 2013 16:24:21 +0000 (12:24 -0400)
committerGreg Hudson <ghudson@mit.edu>
Fri, 10 May 2013 16:25:00 +0000 (12:25 -0400)
The string "KDB:" has four characters, not three; check for all four
of them.

[ghudson@mit.edu: commit message]

ticket: 7636

src/clients/kinit/kinit.c

index 71a2fec5861848805eea9ba7a8a91f4088cf5687..5ceede89d04f873629c180a477ad65447838992f 100644 (file)
@@ -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) {