Second argument to process_v4 should be const
authorJohn Carr <jfc@mit.edu>
Wed, 3 Apr 1991 15:06:11 +0000 (15:06 +0000)
committerJohn Carr <jfc@mit.edu>
Wed, 3 Apr 1991 15:06:11 +0000 (15:06 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1985 dc483132-0cff-0310-8789-dd5450dbe970

src/kdc/kdc_util.h
src/kdc/kerberos_v4.c

index 10bc56a5fb1b091100f417b1c0519a332bbcdb26..e710b1017fba1112a0a284844f799e9c97f73616 100644 (file)
@@ -74,7 +74,7 @@ void kdc_insert_lookaside PROTOTYPE((krb5_data *, krb5_data *));
 #define realm_of_tgt(ticket) krb5_princ_realm(ticket->server)
 #ifdef KRB4
 krb5_error_code process_v4 PROTOTYPE((const krb5_data *,
-                                     krb5_fulladdr *,
+                                     const krb5_fulladdr *,
                                      krb5_data **));
 #else
 #define process_v4(foo,bar,foobar)     KRB5KRB_AP_ERR_BADVERSION
index d9fac46aa2eaa2a4950065459eb769a0908bf4ff..0640c1307d4380a659a3911d3883b26da5a3e88e 100644 (file)
@@ -380,7 +380,7 @@ krb5_error_code krb5_timeofday(), krb5_get_default_realm();
 krb5_error_code
 process_v4( pkt, client_fulladdr, resp)
 const krb5_data *pkt;
-krb5_fulladdr *client_fulladdr;
+const krb5_fulladdr *client_fulladdr;
 krb5_data **resp;
 {
     struct sockaddr_in client_sockaddr;
@@ -831,13 +831,13 @@ kerberos_v4(client, pkt)
            tk->length = 0;
            k_flags = 0;        /* various kerberos flags */
 
-           auth->length = 4 + strlen(pkt->dat + 3);
+           auth->length = 4 + strlen((char *)pkt->dat + 3);
            auth->length += (int) *(pkt->dat + auth->length) +
                (int) *(pkt->dat + auth->length + 1) + 2;
 
            bcopy(pkt->dat, auth->dat, auth->length);
 
-           strncpy(tktrlm, auth->dat + 3, REALM_SZ);
+           strncpy(tktrlm, (char *)auth->dat + 3, REALM_SZ);
            if (set_tgtkey(tktrlm)) {
                lt = klog(L_ERR_UNK,
                    "FAILED realm %s unknown. Host: %s ",