Correct the return code
authorZhanna Tsitkov <tsitkova@mit.edu>
Mon, 23 Feb 2009 18:47:28 +0000 (18:47 +0000)
committerZhanna Tsitkov <tsitkova@mit.edu>
Mon, 23 Feb 2009 18:47:28 +0000 (18:47 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22046 dc483132-0cff-0310-8789-dd5450dbe970

src/kdc/do_tgs_req.c

index e363782ecbdd73a44210a132926cf4f1979b25b4..a0ddf813479137ad07a0d3746981245c4720a1df 100644 (file)
@@ -1125,11 +1125,13 @@ prep_reprocess_req(krb5_kdc_req *request, krb5_principal *krbtgt_princ)
             }
             if (realms == 0) {
                 printf(" (null)\n");
+                retval = KRB5KRB_AP_ERR_BADMATCH;
                 goto cleanup;
             }
             if (realms[0] == 0) {
                 printf(" (none)\n");
                 free(realms);
+                retval = KRB5KRB_AP_ERR_BADMATCH;
                 goto cleanup;
             }
             /* Modify request. 
@@ -1140,7 +1142,6 @@ prep_reprocess_req(krb5_kdc_req *request, krb5_principal *krbtgt_princ)
                                           (*request->server).realm.length, 
                                           (*request->server).realm.data, 
                                           "krbtgt", realms[0], (char *)0);
-                         
             for (cpp = realms; *cpp; cpp++)  
                    free(*cpp);
         }