]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Return G_WRONG_TOKID if the passed-in token id is different from the
authorMarc Horowitz <marc@mit.edu>
Mon, 3 Aug 1998 05:32:29 +0000 (05:32 +0000)
committerMarc Horowitz <marc@mit.edu>
Mon, 3 Aug 1998 05:32:29 +0000 (05:32 +0000)
id in the token.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/marc-3des@10770 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/gssapi/generic/util_token.c

index 627b5011bc80dec5b756f93966ad0aa9034a053f..9e186a1538983fcd4b61670478dd66c0a0fe4b27 100644 (file)
@@ -205,9 +205,12 @@ gss_int32 g_verify_token_header(mech, body_size, buf_in, tok_type, toksize)
    if ((toksize-=2) < 0)
       return(G_BAD_TOK_HEADER);
 
+   if (ret)
+       return(ret);
+
    if ((*buf++ != ((tok_type>>8)&0xff)) ||
-       (*buf++ != (tok_type&0xff)))
-      return(G_BAD_TOK_HEADER);
+       (*buf++ != (tok_type&0xff))) 
+      return(G_WRONG_TOKID);
 
    if (!ret) {
        *buf_in = buf;