silly casts
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10120 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -646,7 +646,7 @@ auth_gen_printsub(unsigned char *data, int cnt, unsigned char *buf, int buflen)
|
|||||||
buf[buflen-2] = '*';
|
buf[buflen-2] = '*';
|
||||||
buflen -= 2;
|
buflen -= 2;
|
||||||
for (; cnt > 0; cnt--, data++) {
|
for (; cnt > 0; cnt--, data++) {
|
||||||
snprintf(tbuf, sizeof(tbuf), " %d", *data);
|
snprintf((char*)tbuf, sizeof(tbuf), " %d", *data);
|
||||||
for (cp = tbuf; *cp && buflen > 0; --buflen)
|
for (cp = tbuf; *cp && buflen > 0; --buflen)
|
||||||
*buf++ = *cp++;
|
*buf++ = *cp++;
|
||||||
if (buflen <= 0)
|
if (buflen <= 0)
|
||||||
|
@@ -200,7 +200,8 @@ kerberos4_send(char *name, Authenticator *ap)
|
|||||||
printf("get_cred failed: %s\r\n", krb_get_err_text(r));
|
printf("get_cred failed: %s\r\n", krb_get_err_text(r));
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
if (!auth_sendname(UserNameRequested, strlen(UserNameRequested))) {
|
if (!auth_sendname((unsigned char*)UserNameRequested,
|
||||||
|
strlen(UserNameRequested))) {
|
||||||
if (auth_debug_mode)
|
if (auth_debug_mode)
|
||||||
printf("Not enough room for user name\r\n");
|
printf("Not enough room for user name\r\n");
|
||||||
return(0);
|
return(0);
|
||||||
@@ -571,11 +572,11 @@ kerberos4_printsub(unsigned char *data, int cnt, unsigned char *buf, int buflen)
|
|||||||
goto common2;
|
goto common2;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
snprintf(buf, buflen, " %d (unknown)", data[3]);
|
snprintf((char*)buf, buflen, " %d (unknown)", data[3]);
|
||||||
common2:
|
common2:
|
||||||
BUMP(buf, buflen);
|
BUMP(buf, buflen);
|
||||||
for (i = 4; i < cnt; i++) {
|
for (i = 4; i < cnt; i++) {
|
||||||
snprintf(buf, buflen, " %d", data[i]);
|
snprintf((char*)buf, buflen, " %d", data[i]);
|
||||||
BUMP(buf, buflen);
|
BUMP(buf, buflen);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -647,7 +648,7 @@ pack_cred(CREDENTIALS *cred, unsigned char *buf)
|
|||||||
static int
|
static int
|
||||||
unpack_cred(unsigned char *buf, int len, CREDENTIALS *cred)
|
unpack_cred(unsigned char *buf, int len, CREDENTIALS *cred)
|
||||||
{
|
{
|
||||||
unsigned char *p = buf;
|
char *p = (char*)buf;
|
||||||
u_int32_t tmp;
|
u_int32_t tmp;
|
||||||
|
|
||||||
strncpy (cred->service, p, ANAME_SZ);
|
strncpy (cred->service, p, ANAME_SZ);
|
||||||
|
@@ -118,7 +118,7 @@ Data(Authenticator *ap, int type, void *d, int c)
|
|||||||
unsigned char *cd = (unsigned char *)d;
|
unsigned char *cd = (unsigned char *)d;
|
||||||
|
|
||||||
if (c == -1)
|
if (c == -1)
|
||||||
c = strlen(cd);
|
c = strlen((char*)cd);
|
||||||
|
|
||||||
if (auth_debug_mode) {
|
if (auth_debug_mode) {
|
||||||
printf("%s:%d: [%d] (%d)",
|
printf("%s:%d: [%d] (%d)",
|
||||||
@@ -713,11 +713,11 @@ kerberos5_printsub(unsigned char *data, int cnt, unsigned char *buf, int buflen)
|
|||||||
goto common2;
|
goto common2;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
snprintf(buf, buflen, " %d (unknown)", data[3]);
|
snprintf((char*)buf, buflen, " %d (unknown)", data[3]);
|
||||||
common2:
|
common2:
|
||||||
BUMP(buf, buflen);
|
BUMP(buf, buflen);
|
||||||
for (i = 4; i < cnt; i++) {
|
for (i = 4; i < cnt; i++) {
|
||||||
snprintf(buf, buflen, " %d", data[i]);
|
snprintf((char*)buf, buflen, " %d", data[i]);
|
||||||
BUMP(buf, buflen);
|
BUMP(buf, buflen);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@@ -1564,7 +1564,7 @@ env_init(void)
|
|||||||
* "unix:0.0", we have to get rid of "unix" and insert our
|
* "unix:0.0", we have to get rid of "unix" and insert our
|
||||||
* hostname.
|
* hostname.
|
||||||
*/
|
*/
|
||||||
if ((ep = env_find("DISPLAY"))
|
if ((ep = env_find((unsigned char*)"DISPLAY"))
|
||||||
&& (*ep->value == ':'
|
&& (*ep->value == ':'
|
||||||
|| strncmp((char *)ep->value, "unix:", 5) == 0)) {
|
|| strncmp((char *)ep->value, "unix:", 5) == 0)) {
|
||||||
char hbuf[256+1];
|
char hbuf[256+1];
|
||||||
@@ -1604,7 +1604,8 @@ env_init(void)
|
|||||||
* USER with the value from LOGNAME. By default, we
|
* USER with the value from LOGNAME. By default, we
|
||||||
* don't export the USER variable.
|
* don't export the USER variable.
|
||||||
*/
|
*/
|
||||||
if ((env_find("USER") == NULL) && (ep = env_find("LOGNAME"))) {
|
if ((env_find((unsigned char*)"USER") == NULL) &&
|
||||||
|
(ep = env_find((unsigned char*)"LOGNAME"))) {
|
||||||
env_define((unsigned char *)"USER", ep->value);
|
env_define((unsigned char *)"USER", ep->value);
|
||||||
env_unexport((unsigned char *)"USER");
|
env_unexport((unsigned char *)"USER");
|
||||||
}
|
}
|
||||||
|
@@ -180,7 +180,7 @@ main(int argc, char **argv)
|
|||||||
/* sometimes we don't want a mangled display */
|
/* sometimes we don't want a mangled display */
|
||||||
char *p;
|
char *p;
|
||||||
if((p = getenv("DISPLAY")))
|
if((p = getenv("DISPLAY")))
|
||||||
env_define("DISPLAY", (unsigned char*)p);
|
env_define((unsigned char*)"DISPLAY", (unsigned char*)p);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'E':
|
case 'E':
|
||||||
|
Reference in New Issue
Block a user