Need to copy the client principal out of ticket before calling krb5_ok on a
authorEzra Peisach <epeisach@mit.edu>
Thu, 27 Apr 1995 12:20:04 +0000 (12:20 +0000)
committerEzra Peisach <epeisach@mit.edu>
Thu, 27 Apr 1995 12:20:04 +0000 (12:20 +0000)
NULL principal.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5535 dc483132-0cff-0310-8789-dd5450dbe970

src/appl/bsd/ChangeLog
src/appl/bsd/krshd.c

index f3288005ebc3c22cd6f02bda49ab877266bf8df7..394afcb0284dbff5610fd20767cd3ecf6ee66cbb 100644 (file)
@@ -1,5 +1,8 @@
 Thu Apr 27 01:09:19 1995  Ezra Peisach  <epeisach@kangaroo.mit.edu>
 
+       * krshd.c (recvauth): extract the client principal from ticket
+               before calling krb5_kuserok on a NULL principal.
+
        * krcp.c: (main): Missing htons on port number when specified on
                command line.
 
index 2b77593a44f8eff621d9bb2b59ec0fa1053d12d0..287843a381d5ad59e07ff58b2fbebe3d41ab5cbc 100644 (file)
@@ -1681,6 +1681,10 @@ recvauth(netf, peersin, peeraddr)
                                   &kremuser))
        return status;
     
+    if (status = krb5_copy_principal(bsd_context, ticket->enc_part2->client, 
+                                    &client))
+       return status;
+
     /* Setup eblock for encrypted sessions. */
     krb5_use_keytype(bsd_context, &eblock, ticket->enc_part2->session->keytype);
     if (status = krb5_process_key(bsd_context, &eblock, ticket->enc_part2->session))