From: Ezra Peisach Date: Mon, 9 Jul 2001 12:08:41 +0000 (+0000) Subject: * kerberos.c (Data): Third argument now const X-Git-Tag: krb5-1.3-alpha1~1211 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=33c68e89ac14ffd2108b6a3bd0ac5c934e2a7813;p=krb5.git * kerberos.c (Data): Third argument now const * misc.c (printd): First argument now const. * misc-proto.h: Modify printd prototype to take const first argument. * auth.c: Cast argument to memcpy to unsigned. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13593 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/telnet/libtelnet/ChangeLog b/src/appl/telnet/libtelnet/ChangeLog index 82424a67b..7d519ecb2 100644 --- a/src/appl/telnet/libtelnet/ChangeLog +++ b/src/appl/telnet/libtelnet/ChangeLog @@ -1,3 +1,14 @@ +2001-07-08 Ezra Peisach + + * kerberos.c (Data): Third argument now const. + + * misc.c (printd): First argument now const. + + * misc-proto.h: Modify printd prototype to take const first + argument. + + * auth.c: Cast argument to memcpy to unsigned. + 2001-07-06 Ezra Peisach * configure.in: Check for need to provide setenv prototype if diff --git a/src/appl/telnet/libtelnet/auth.c b/src/appl/telnet/libtelnet/auth.c index f03c23b5d..0b709913f 100644 --- a/src/appl/telnet/libtelnet/auth.c +++ b/src/appl/telnet/libtelnet/auth.c @@ -387,7 +387,8 @@ auth_send(data, cnt) auth_send_cnt = cnt; if (auth_send_cnt > sizeof(_auth_send_data)) auth_send_cnt = sizeof(_auth_send_data); - memcpy((void *)_auth_send_data, (void *)data, auth_send_cnt); + memcpy((void *)_auth_send_data, (void *)data, + (unsigned) auth_send_cnt); auth_send_data = _auth_send_data; auth_send_retry(); @@ -513,7 +514,7 @@ auth_name(data, cnt) Name, cnt, (int) sizeof(savename)-1); return; } - memcpy((void *)savename, (void *)data, cnt); + memcpy((void *)savename, (void *)data, (unsigned) cnt); savename[cnt] = '\0'; /* Null terminate */ if (auth_debug_mode) printf(">>>%s: Got NAME [%s]\r\n", Name, savename); diff --git a/src/appl/telnet/libtelnet/kerberos.c b/src/appl/telnet/libtelnet/kerberos.c index 3bcd16bab..d9c092154 100644 --- a/src/appl/telnet/libtelnet/kerberos.c +++ b/src/appl/telnet/libtelnet/kerberos.c @@ -139,14 +139,14 @@ static Block challenge = { 0 }; Data(ap, type, d, c) Authenticator *ap; int type; - void *d; + const void *d; int c; { unsigned char *p = str_data + 4; - unsigned char *cd = (unsigned char *)d; + const unsigned char *cd = (const unsigned char *)d; if (c == -1) - c = strlen((char *)cd); + c = strlen((const char *)cd); if (auth_debug_mode) { printf("%s:%d: [%d] (%d)", @@ -387,7 +387,7 @@ kerberos4_is(ap, data, cnt) instance, 0, &adat, ""))) { if (auth_debug_mode) printf("Kerberos failed him as %s\r\n", name); - Data(ap, KRB_REJECT, (void *)krb_err_txt[r], -1); + Data(ap, KRB_REJECT, (const void *)krb_err_txt[r], -1); auth_finished(ap, AUTH_REJECT); return; } diff --git a/src/appl/telnet/libtelnet/misc-proto.h b/src/appl/telnet/libtelnet/misc-proto.h index 6e495c81d..d0c2c44f6 100644 --- a/src/appl/telnet/libtelnet/misc-proto.h +++ b/src/appl/telnet/libtelnet/misc-proto.h @@ -70,7 +70,7 @@ void auth_encrypt_init P((char *, char *, char *, int)); void auth_encrypt_user P((char *)); void auth_encrypt_connect P((int)); -void printd P((unsigned char *, int)); +void printd P((const unsigned char *, int)); /* * These functions are imported from the application diff --git a/src/appl/telnet/libtelnet/misc.c b/src/appl/telnet/libtelnet/misc.c index 96fb87bc2..0dd22c27f 100644 --- a/src/appl/telnet/libtelnet/misc.c +++ b/src/appl/telnet/libtelnet/misc.c @@ -84,7 +84,7 @@ auth_encrypt_connect(cnt) void printd(data, cnt) - unsigned char *data; + const unsigned char *data; int cnt; { if (cnt > 16)