got rid of lots of stupid casts
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1057 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -648,7 +648,7 @@ globextend(const Char *path, glob_t *pglob)
|
||||
|
||||
newsize = sizeof(*pathv) * (2 + pglob->gl_pathc + pglob->gl_offs);
|
||||
pathv = pglob->gl_pathv ?
|
||||
realloc((char *)pglob->gl_pathv, newsize) :
|
||||
realloc(pglob->gl_pathv, newsize) :
|
||||
malloc(newsize);
|
||||
if (pathv == NULL)
|
||||
return(GLOB_NOSPACE);
|
||||
|
@@ -70,7 +70,7 @@ hookup(char *host, int port)
|
||||
if (hp == NULL) {
|
||||
warnx("%s: %s", host, hstrerror(h_errno));
|
||||
code = -1;
|
||||
return ((char *) 0);
|
||||
return NULL;
|
||||
}
|
||||
hisctladdr.sin_family = hp->h_addrtype;
|
||||
memmove(&hisctladdr.sin_addr,
|
||||
@@ -159,7 +159,7 @@ hookup(char *host, int port)
|
||||
return (hostname);
|
||||
bad:
|
||||
close(s);
|
||||
return ((char *)0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -1577,7 +1577,7 @@ gunique(char *local)
|
||||
*cp = '/';
|
||||
if (d < 0) {
|
||||
warn("local: %s", local);
|
||||
return ((char *) 0);
|
||||
return NULL;
|
||||
}
|
||||
strcpy(new, local);
|
||||
cp = new + strlen(new);
|
||||
|
@@ -428,7 +428,7 @@ OUT:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ((char *)0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#define HELPINDENT ((int) sizeof ("directory"))
|
||||
|
@@ -1599,7 +1599,7 @@ renamefrom(char *name)
|
||||
|
||||
if (stat(name, &st) < 0) {
|
||||
perror_reply(550, name);
|
||||
return ((char *)0);
|
||||
return NULL;
|
||||
}
|
||||
reply(350, "File exists, ready for destination name");
|
||||
return (name);
|
||||
@@ -1763,7 +1763,7 @@ gunique(char *local)
|
||||
*cp = '\0';
|
||||
if (stat(cp ? local : ".", &st) < 0) {
|
||||
perror_reply(553, cp ? local : ".");
|
||||
return ((char *) 0);
|
||||
return NULL;
|
||||
}
|
||||
if (cp)
|
||||
*cp = '/';
|
||||
|
@@ -43,7 +43,7 @@ FILE *file;
|
||||
|
||||
file_short[0] = (s & (unsigned)0xff00) >> 8;
|
||||
file_short[1] = s & 0xff;
|
||||
if (fwrite ((char *) file_short, (int) sizeof (file_short), 1, file) != 1)
|
||||
if (fwrite (file_short, sizeof (file_short), 1, file) != 1)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
@@ -111,7 +111,7 @@ void utmp_login(char *tty, char *username, char *hostname)
|
||||
ttyno = ttyslot();
|
||||
if (ttyno > 0 && (fd = open(_PATH_UTMP, O_WRONLY, 0)) >= 0) {
|
||||
lseek(fd, (long)(ttyno * sizeof(struct utmp)), SEEK_SET);
|
||||
write(fd, (char *)&utmp, sizeof(struct utmp));
|
||||
write(fd, &utmp, sizeof(struct utmp));
|
||||
close(fd);
|
||||
}
|
||||
}
|
||||
@@ -119,7 +119,7 @@ void utmp_login(char *tty, char *username, char *hostname)
|
||||
#endif /* HAVE_SETUTENT */
|
||||
|
||||
if ((fd = open(_PATH_WTMP, O_WRONLY|O_APPEND, 0)) >= 0) {
|
||||
write(fd, (char *)&utmp, sizeof(struct utmp));
|
||||
write(fd, &utmp, sizeof(struct utmp));
|
||||
close(fd);
|
||||
}
|
||||
}
|
||||
|
@@ -162,7 +162,7 @@ pop_init(POP *p,int argcount,char **argmessage)
|
||||
p->ipport = ntohs(cs.sin_port);
|
||||
|
||||
/* Get the canonical name of the host to whom I am speaking */
|
||||
ch = gethostbyaddr(&cs.sin_addr, sizeof(cs.sin_addr), AF_INET);
|
||||
ch = gethostbyaddr((char *)&cs.sin_addr, sizeof(cs.sin_addr), AF_INET);
|
||||
if (ch == NULL){
|
||||
pop_log(p,POP_PRIORITY,
|
||||
"Unable to get canonical name of client, err = %d",errno);
|
||||
|
@@ -15,7 +15,7 @@ int
|
||||
pop_quit (POP *p)
|
||||
{
|
||||
/* Release the message information list */
|
||||
if (p->mlp) free ((char *)p->mlp);
|
||||
if (p->mlp) free (p->mlp);
|
||||
|
||||
return(POP_SUCCESS);
|
||||
}
|
||||
|
@@ -414,7 +414,7 @@ auth_send(unsigned char *data, int cnt)
|
||||
auth_send_cnt = cnt > sizeof(_auth_send_data)
|
||||
? sizeof(_auth_send_data)
|
||||
: cnt;
|
||||
memmove((void *)_auth_send_data, (void *)data, auth_send_cnt);
|
||||
memmove(_auth_send_data, data, auth_send_cnt);
|
||||
auth_send_data = _auth_send_data;
|
||||
} else {
|
||||
/*
|
||||
@@ -533,7 +533,7 @@ auth_name(unsigned char *data, int cnt)
|
||||
Name, cnt, sizeof(savename)-1);
|
||||
return;
|
||||
}
|
||||
memmove((void *)savename, (void *)data, cnt);
|
||||
memmove(savename, data, cnt);
|
||||
savename[cnt] = '\0'; /* Null terminate */
|
||||
if (auth_debug_mode)
|
||||
printf(">>>%s: Got NAME [%s]\r\n", Name, savename);
|
||||
|
@@ -143,7 +143,7 @@ void ofb64_init(int server)
|
||||
|
||||
void fb64_init(struct fb *fbp)
|
||||
{
|
||||
memset((void *)fbp,0, sizeof(*fbp));
|
||||
memset(fbp,0, sizeof(*fbp));
|
||||
fbp->state[0] = fbp->state[1] = FAILED;
|
||||
fbp->fb_feed[0] = IAC;
|
||||
fbp->fb_feed[1] = SB;
|
||||
@@ -283,7 +283,7 @@ int fb64_is(unsigned char *data, int cnt, struct fb *fbp)
|
||||
if (encrypt_debug_mode)
|
||||
printf("Initializing Decrypt stream\r\n");
|
||||
|
||||
fb64_stream_iv((void *)data, &fbp->streams[DIR_DECRYPT-1]);
|
||||
fb64_stream_iv(data, &fbp->streams[DIR_DECRYPT-1]);
|
||||
|
||||
p = fbp->fb_feed + 3;
|
||||
*p++ = ENCRYPT_REPLY;
|
||||
@@ -397,7 +397,7 @@ static void fb64_session(Session_Key *key, int server, struct fb *fbp)
|
||||
key ? key->type : -1, SK_DES);
|
||||
return;
|
||||
}
|
||||
memcpy((void *)fbp->krbdes_key, (void *)key->data, sizeof(des_cblock));
|
||||
memcpy(fbp->krbdes_key, key->data, sizeof(des_cblock));
|
||||
|
||||
fb64_stream_key(fbp->krbdes_key, &fbp->streams[DIR_ENCRYPT-1]);
|
||||
fb64_stream_key(fbp->krbdes_key, &fbp->streams[DIR_DECRYPT-1]);
|
||||
@@ -508,8 +508,8 @@ void ofb64_printsub(unsigned char *data, int cnt,
|
||||
void fb64_stream_iv(des_cblock seed, struct stinfo *stp)
|
||||
{
|
||||
|
||||
memcpy((void *)stp->str_iv, (void *)seed,sizeof(des_cblock));
|
||||
memcpy((void *)stp->str_output, (void *)seed, sizeof(des_cblock));
|
||||
memcpy(stp->str_iv, seed,sizeof(des_cblock));
|
||||
memcpy(stp->str_output, seed, sizeof(des_cblock));
|
||||
|
||||
des_key_sched(&stp->str_ikey, stp->str_sched);
|
||||
|
||||
@@ -518,10 +518,10 @@ void fb64_stream_iv(des_cblock seed, struct stinfo *stp)
|
||||
|
||||
void fb64_stream_key(des_cblock key, struct stinfo *stp)
|
||||
{
|
||||
memcpy((void *)stp->str_ikey, (void *)key, sizeof(des_cblock));
|
||||
memcpy(stp->str_ikey, key, sizeof(des_cblock));
|
||||
des_key_sched((des_cblock*)key, stp->str_sched);
|
||||
|
||||
memcpy((void *)stp->str_output, (void *)stp->str_iv, sizeof(des_cblock));
|
||||
memcpy(stp->str_output, stp->str_iv, sizeof(des_cblock));
|
||||
|
||||
stp->str_index = sizeof(des_cblock);
|
||||
}
|
||||
@@ -558,7 +558,7 @@ void cfb64_encrypt(unsigned char *s, int c)
|
||||
if (index == sizeof(des_cblock)) {
|
||||
des_cblock b;
|
||||
des_ecb_encrypt(&stp->str_output, &b,stp->str_sched, 1);
|
||||
memcpy((void *)stp->str_feed, (void *)b, sizeof(des_cblock));
|
||||
memcpy(stp->str_feed, b, sizeof(des_cblock));
|
||||
index = 0;
|
||||
}
|
||||
|
||||
@@ -590,7 +590,7 @@ int cfb64_decrypt(int data)
|
||||
if (index == sizeof(des_cblock)) {
|
||||
des_cblock b;
|
||||
des_ecb_encrypt(&stp->str_output,&b, stp->str_sched, 1);
|
||||
memcpy((void *)stp->str_feed, (void *)b, sizeof(des_cblock));
|
||||
memcpy(stp->str_feed, b, sizeof(des_cblock));
|
||||
stp->str_index = 1; /* Next time will be 1 */
|
||||
index = 0; /* But now use 0 */
|
||||
}
|
||||
@@ -630,7 +630,7 @@ void ofb64_encrypt(unsigned char *s, int c)
|
||||
if (index == sizeof(des_cblock)) {
|
||||
des_cblock b;
|
||||
des_ecb_encrypt(&stp->str_feed,&b, stp->str_sched, 1);
|
||||
memcpy((void *)stp->str_feed, (void *)b, sizeof(des_cblock));
|
||||
memcpy(stp->str_feed, b, sizeof(des_cblock));
|
||||
index = 0;
|
||||
}
|
||||
*s++ ^= stp->str_feed[index];
|
||||
@@ -659,7 +659,7 @@ int ofb64_decrypt(int data)
|
||||
if (index == sizeof(des_cblock)) {
|
||||
des_cblock b;
|
||||
des_ecb_encrypt(&stp->str_feed,&b,stp->str_sched, 1);
|
||||
memcpy((void *)stp->str_feed, (void *)b, sizeof(des_cblock));
|
||||
memcpy(stp->str_feed, b, sizeof(des_cblock));
|
||||
stp->str_index = 1; /* Next time will be 1 */
|
||||
index = 0; /* But now use 0 */
|
||||
}
|
||||
|
@@ -124,8 +124,8 @@ get_for_creds(etype, sumtype, rhost, client, enc_key, forwardable, outbuf)
|
||||
return ENOMEM;
|
||||
}
|
||||
else
|
||||
memmove ((char *)addrs[i]->contents, hp->h_addr_list[i],
|
||||
addrs[i]->length);
|
||||
memmove (addrs[i]->contents, hp->h_addr_list[i],
|
||||
addrs[i]->length);
|
||||
}
|
||||
else {
|
||||
return ENOMEM;
|
||||
@@ -133,7 +133,7 @@ get_for_creds(etype, sumtype, rhost, client, enc_key, forwardable, outbuf)
|
||||
}
|
||||
addrs[i] = 0;
|
||||
|
||||
memset((char *)&creds, 0, sizeof(creds));
|
||||
memset(&creds, 0, sizeof(creds));
|
||||
if (retval = krb5_copy_principal(client, &creds.client))
|
||||
return retval;
|
||||
|
||||
@@ -220,7 +220,7 @@ get_for_creds(etype, sumtype, rhost, client, enc_key, forwardable, outbuf)
|
||||
return retval;
|
||||
#undef cleanup
|
||||
#define cleanup() {\
|
||||
memset((char *)dec_rep->enc_part2->session->contents, 0,\
|
||||
memset(dec_rep->enc_part2->session->contents, 0,\
|
||||
dec_rep->enc_part2->session->length);\
|
||||
krb5_free_kdc_rep(dec_rep); }
|
||||
|
||||
@@ -490,7 +490,7 @@ const krb5_address *recv_addr; /* optional */
|
||||
krb5_xfree(creds->ticket.data);
|
||||
return ENOMEM;
|
||||
}
|
||||
memmove((char *)creds->ticket.data, (char *) scratch->data, scratch->length);
|
||||
memmove(creds->ticket.data, scratch->data, scratch->length);
|
||||
|
||||
cleanup_scratch();
|
||||
|
||||
@@ -603,7 +603,7 @@ const krb5_address *recv_addr; /* optional */
|
||||
|
||||
#undef clean
|
||||
#define clean() {\
|
||||
memset((char *)creds->keyblock.contents, 0, creds->keyblock.length);}
|
||||
memset(creds->keyblock.contents, 0, creds->keyblock.length);}
|
||||
|
||||
creds->times = credmsg_enc_part->ticket_info[0]->times;
|
||||
creds->is_skey = FALSE;
|
||||
|
@@ -275,7 +275,7 @@ kerberos4_is(Authenticator *ap, unsigned char *data, int cnt)
|
||||
printf("No local realm\r\n");
|
||||
return;
|
||||
}
|
||||
memmove((void *)auth.dat, (void *)data, auth.length = cnt);
|
||||
memmove(auth.dat, data, auth.length = cnt);
|
||||
if (auth_debug_mode) {
|
||||
printf("Got %d bytes of authentication data\r\n", cnt);
|
||||
printf("CK: %d:", kerberos4_cksum(auth.dat, auth.length));
|
||||
@@ -296,14 +296,14 @@ kerberos4_is(Authenticator *ap, unsigned char *data, int cnt)
|
||||
krb_kntoln(&adat, name);
|
||||
|
||||
if (UserNameRequested && !kuserok(&adat, UserNameRequested))
|
||||
Data(ap, KRB_ACCEPT, (void *)0, 0);
|
||||
Data(ap, KRB_ACCEPT, NULL, 0);
|
||||
else {
|
||||
char *msg = malloc(ANAME_SZ + 1 + INST_SZ +
|
||||
REALM_SZ +
|
||||
strlen(UserNameRequested) + 80);
|
||||
|
||||
if (msg == NULL)
|
||||
Data(ap, KRB_REJECT, (void *)0, 0);
|
||||
Data(ap, KRB_REJECT, NULL, 0);
|
||||
sprintf (msg, "user `%s' is not authorized to "
|
||||
"login as `%s'",
|
||||
krb_unparse_name_long(adat.pname,
|
||||
@@ -319,7 +319,7 @@ kerberos4_is(Authenticator *ap, unsigned char *data, int cnt)
|
||||
|
||||
case KRB_CHALLENGE:
|
||||
#ifndef ENCRYPTION
|
||||
Data(ap, KRB_RESPONSE, (void *)0, 0);
|
||||
Data(ap, KRB_RESPONSE, NULL, 0);
|
||||
#else
|
||||
if(!VALIDKEY(session_key)){
|
||||
Data(ap, KRB_RESPONSE, NULL, 0);
|
||||
|
@@ -139,7 +139,7 @@ Data(ap, type, d, c)
|
||||
unsigned char *cd = (unsigned char *)d;
|
||||
|
||||
if (c == -1)
|
||||
c = strlen((char *)cd);
|
||||
c = strlen(cd);
|
||||
|
||||
if (auth_debug_mode) {
|
||||
printf("%s:%d: [%d] (%d)",
|
||||
@@ -249,7 +249,7 @@ kerberos5_send(ap)
|
||||
}
|
||||
|
||||
|
||||
memset((char *)&creds, 0, sizeof(creds));
|
||||
memset(&creds, 0, sizeof(creds));
|
||||
creds.server = server;
|
||||
|
||||
if (r = krb5_cc_get_principal(ccache, &creds.client)) {
|
||||
|
@@ -128,7 +128,7 @@ Data(ap, type, d, c)
|
||||
unsigned char *cd = (unsigned char *)d;
|
||||
|
||||
if (c == -1)
|
||||
c = strlen((char *)cd);
|
||||
c = strlen(cd);
|
||||
|
||||
if (0) {
|
||||
printf("%s:%d: [%d] (%d)",
|
||||
@@ -189,7 +189,7 @@ krb4encpwd_send(ap)
|
||||
return(0);
|
||||
}
|
||||
|
||||
if (!Data(ap, KRB4_ENCPWD_ACK, (void *)NULL, 0)) {
|
||||
if (!Data(ap, KRB4_ENCPWD_ACK, NULL, 0)) {
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -213,13 +213,13 @@ krb4encpwd_is(ap, data, cnt)
|
||||
return;
|
||||
switch (*data++) {
|
||||
case KRB4_ENCPWD_AUTH:
|
||||
memmove((void *)auth.dat, (void *)data, auth.length = cnt);
|
||||
memmove(auth.dat, data, auth.length = cnt);
|
||||
|
||||
k_gethostname(lhostname, sizeof(lhostname));
|
||||
if ((cp = strchr(lhostname, '.')) != 0) *cp = '\0';
|
||||
|
||||
if (r = krb_rd_encpwd_req(&auth, KRB_SERVICE_NAME, lhostname, 0, &adat, NULL, challenge, r_user, r_passwd)) {
|
||||
Data(ap, KRB4_ENCPWD_REJECT, (void *)"Auth failed", -1);
|
||||
Data(ap, KRB4_ENCPWD_REJECT, "Auth failed", -1);
|
||||
auth_finished(ap, AUTH_REJECT);
|
||||
return;
|
||||
}
|
||||
@@ -228,13 +228,13 @@ krb4encpwd_is(ap, data, cnt)
|
||||
/*
|
||||
* illegal username and password
|
||||
*/
|
||||
Data(ap, KRB4_ENCPWD_REJECT, (void *)"Illegal password", -1);
|
||||
Data(ap, KRB4_ENCPWD_REJECT, "Illegal password", -1);
|
||||
auth_finished(ap, AUTH_REJECT);
|
||||
return;
|
||||
}
|
||||
|
||||
memmove((void *)session_key, (void *)adat.session, sizeof(des_cblock));
|
||||
Data(ap, KRB4_ENCPWD_ACCEPT, (void *)0, 0);
|
||||
memmove(session_key, adat.session, sizeof(des_cblock));
|
||||
Data(ap, KRB4_ENCPWD_ACCEPT, 0, 0);
|
||||
auth_finished(ap, AUTH_USER);
|
||||
break;
|
||||
|
||||
@@ -243,7 +243,7 @@ krb4encpwd_is(ap, data, cnt)
|
||||
* Take the received random challenge text and save
|
||||
* for future authentication.
|
||||
*/
|
||||
memmove((void *)challenge, (void *)data, sizeof(des_cblock));
|
||||
memmove(challenge, data, sizeof(des_cblock));
|
||||
break;
|
||||
|
||||
|
||||
@@ -262,7 +262,7 @@ krb4encpwd_is(ap, data, cnt)
|
||||
|
||||
time(&now);
|
||||
sprintf(challenge, "%x", now);
|
||||
Data(ap, KRB4_ENCPWD_CHALLENGE, (void *)challenge, strlen(challenge));
|
||||
Data(ap, KRB4_ENCPWD_CHALLENGE, challenge, strlen(challenge));
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -309,7 +309,7 @@ krb4encpwd_reply(ap, data, cnt)
|
||||
|
||||
k_gethostname(hostname, sizeof(hostname));
|
||||
realm = krb_realmofhost(hostname);
|
||||
memmove((void *)challenge, (void *)data, cnt);
|
||||
memmove(challenge, data, cnt);
|
||||
memset(user_passwd, 0, sizeof(user_passwd));
|
||||
local_des_read_pw_string(user_passwd, sizeof(user_passwd)-1, "Password: ", 0);
|
||||
UserPassword = user_passwd;
|
||||
@@ -321,7 +321,7 @@ krb4encpwd_reply(ap, data, cnt)
|
||||
krb_token.length = 0;
|
||||
}
|
||||
|
||||
if (!Data(ap, KRB4_ENCPWD_AUTH, (void *)krb_token.dat, krb_token.length)) {
|
||||
if (!Data(ap, KRB4_ENCPWD_AUTH, krb_token.dat, krb_token.length)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -87,7 +87,7 @@ local_des_read_pw_string(s,max,prompt,verify)
|
||||
}
|
||||
|
||||
/* XXX assume jmp_buf is typedef'ed to an array */
|
||||
memmove((char *)env, (char *)old_env, sizeof(env));
|
||||
memmove(env, old_env, sizeof(env));
|
||||
if (setjmp(env))
|
||||
goto lose;
|
||||
|
||||
@@ -137,7 +137,7 @@ lose:
|
||||
/*
|
||||
pop_signals();
|
||||
*/
|
||||
memmove((char *)old_env, (char *)env, sizeof(env));
|
||||
memmove(old_env, env, sizeof(env));
|
||||
if (verify)
|
||||
memset(key_string, 0, sizeof (key_string));
|
||||
s[max-1] = 0; /* force termination */
|
||||
|
@@ -186,7 +186,7 @@ rsaencpwd_send(ap)
|
||||
if (!auth_sendname(UserNameRequested, strlen(UserNameRequested))) {
|
||||
return(0);
|
||||
}
|
||||
if (!Data(ap, NULL, (void *)NULL, 0)) {
|
||||
if (!Data(ap, NULL, NULL, 0)) {
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -212,10 +212,10 @@ rsaencpwd_is(ap, data, cnt)
|
||||
cnt--;
|
||||
switch (*data++) {
|
||||
case RSA_ENCPWD_AUTH:
|
||||
memmove((void *)auth.dat, (void *)data, auth.length = cnt);
|
||||
memmove(auth.dat, data, auth.length = cnt);
|
||||
|
||||
if ((fp=fopen(key_file, "r"))==NULL) {
|
||||
Data(ap, RSA_ENCPWD_REJECT, (void *)"Auth failed", -1);
|
||||
Data(ap, RSA_ENCPWD_REJECT, "Auth failed", -1);
|
||||
auth_finished(ap, AUTH_REJECT);
|
||||
return;
|
||||
}
|
||||
@@ -231,7 +231,7 @@ rsaencpwd_is(ap, data, cnt)
|
||||
r = accept_rsa_encpwd(&auth, key, challenge,
|
||||
challenge_len, r_passwd);
|
||||
if (r < 0) {
|
||||
Data(ap, RSA_ENCPWD_REJECT, (void *)"Auth failed", -1);
|
||||
Data(ap, RSA_ENCPWD_REJECT, "Auth failed", -1);
|
||||
auth_finished(ap, AUTH_REJECT);
|
||||
return;
|
||||
}
|
||||
@@ -240,12 +240,12 @@ rsaencpwd_is(ap, data, cnt)
|
||||
/*
|
||||
* illegal username and password
|
||||
*/
|
||||
Data(ap, RSA_ENCPWD_REJECT, (void *)"Illegal password", -1);
|
||||
Data(ap, RSA_ENCPWD_REJECT, "Illegal password", -1);
|
||||
auth_finished(ap, AUTH_REJECT);
|
||||
return;
|
||||
}
|
||||
|
||||
Data(ap, RSA_ENCPWD_ACCEPT, (void *)0, 0);
|
||||
Data(ap, RSA_ENCPWD_ACCEPT, 0, 0);
|
||||
auth_finished(ap, AUTH_USER);
|
||||
break;
|
||||
|
||||
@@ -270,7 +270,7 @@ rsaencpwd_is(ap, data, cnt)
|
||||
}
|
||||
|
||||
if ((fp=fopen(key_file, "r"))==NULL) {
|
||||
Data(ap, RSA_ENCPWD_REJECT, (void *)"Auth failed", -1);
|
||||
Data(ap, RSA_ENCPWD_REJECT, "Auth failed", -1);
|
||||
auth_finished(ap, AUTH_REJECT);
|
||||
return;
|
||||
}
|
||||
@@ -303,7 +303,7 @@ rsaencpwd_is(ap, data, cnt)
|
||||
ptr += NumEncodeLengthOctets(i);
|
||||
memmove(ptr, key, i);
|
||||
chalkey_len = 1+NumEncodeLengthOctets(chalkey_len)+chalkey_len;
|
||||
Data(ap, RSA_ENCPWD_CHALLENGEKEY, (void *)chalkey, chalkey_len);
|
||||
Data(ap, RSA_ENCPWD_CHALLENGEKEY, chalkey, chalkey_len);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -347,7 +347,7 @@ rsaencpwd_reply(ap, data, cnt)
|
||||
* Verify that the response to the challenge is correct.
|
||||
*/
|
||||
|
||||
memmove((void *)chalkey, (void *)data, cnt);
|
||||
memmove(chalkey, data, cnt);
|
||||
ptr = (char *) &chalkey[0];
|
||||
ptr += DecodeHeaderLength(chalkey);
|
||||
if (*ptr != 0x04) {
|
||||
@@ -374,7 +374,7 @@ rsaencpwd_reply(ap, data, cnt)
|
||||
token.length = 1;
|
||||
}
|
||||
|
||||
if (!Data(ap, RSA_ENCPWD_AUTH, (void *)token.dat, token.length)) {
|
||||
if (!Data(ap, RSA_ENCPWD_AUTH, token.dat, token.length)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -299,7 +299,7 @@ spx_send(ap)
|
||||
return(0);
|
||||
}
|
||||
|
||||
if (!Data(ap, SPX_AUTH, (void *)output_token.value, output_token.length)) {
|
||||
if (!Data(ap, SPX_AUTH, output_token.value, output_token.length)) {
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -387,7 +387,7 @@ spx_is(ap, data, cnt)
|
||||
src_name,
|
||||
&fullname_buffer,
|
||||
&fullname_type);
|
||||
Data(ap, SPX_REJECT, (void *)"auth failed", -1);
|
||||
Data(ap, SPX_REJECT, "auth failed", -1);
|
||||
auth_finished(ap, AUTH_REJECT);
|
||||
return;
|
||||
}
|
||||
@@ -398,7 +398,7 @@ spx_is(ap, data, cnt)
|
||||
&fullname_type);
|
||||
|
||||
|
||||
Data(ap, SPX_ACCEPT, (void *)output_token.value, output_token.length);
|
||||
Data(ap, SPX_ACCEPT, output_token.value, output_token.length);
|
||||
auth_finished(ap, AUTH_USER);
|
||||
break;
|
||||
|
||||
|
@@ -2172,7 +2172,7 @@ int tn(int argc, char **argv)
|
||||
char *cmd, *hostp = 0, *portp = 0, *user = 0;
|
||||
|
||||
/* clear the socket address prior to use */
|
||||
memset((char *)&sin, 0, sizeof(sin));
|
||||
memset(&sin, 0, sizeof(sin));
|
||||
|
||||
if (connected) {
|
||||
printf("?Already connected to %s\n", hostname);
|
||||
@@ -2350,7 +2350,7 @@ int tn(int argc, char **argv)
|
||||
fprintf(stderr, "telnet: connect to address %s: ",
|
||||
inet_ntoa(sin.sin_addr));
|
||||
errno = oerrno;
|
||||
perror((char *)0);
|
||||
perror(NULL);
|
||||
host->h_addr_list++;
|
||||
memmove(&sin.sin_addr,
|
||||
host->h_addr_list[0],
|
||||
@@ -2731,7 +2731,7 @@ sourceroute(arg, cpp, lenp)
|
||||
*cpp = cp;
|
||||
return(0);
|
||||
}
|
||||
memmove(lsrp, (char *)&sin_addr, 4);
|
||||
memmove(lsrp, &sin_addr, 4);
|
||||
lsrp += 4;
|
||||
if (cp2)
|
||||
cp = cp2;
|
||||
|
@@ -104,7 +104,7 @@ static u_long ring_clock = 0;
|
||||
|
||||
int ring_init(Ring *ring, unsigned char *buffer, int count)
|
||||
{
|
||||
memset((char *)ring, 0, sizeof *ring);
|
||||
memset(ring, 0, sizeof *ring);
|
||||
|
||||
ring->size = count;
|
||||
|
||||
|
@@ -46,7 +46,7 @@ RCSID("$Id$");
|
||||
net_write(unsigned char *str, int len)
|
||||
{
|
||||
if (nfrontp + len < netobuf + BUFSIZ) {
|
||||
memmove((void *)nfrontp, (void *)str, len);
|
||||
memmove(nfrontp, str, len);
|
||||
nfrontp += len;
|
||||
return(len);
|
||||
}
|
||||
@@ -82,6 +82,6 @@ telnet_getenv(char *val)
|
||||
char *
|
||||
telnet_gets(char *prompt, char *result, int length, int echo)
|
||||
{
|
||||
return((char *)0);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
@@ -188,7 +188,7 @@ copy_termbuf(cp, len)
|
||||
{
|
||||
if (len > sizeof(termbuf))
|
||||
len = sizeof(termbuf);
|
||||
memmove((char *)&termbuf, cp, len);
|
||||
memmove(&termbuf, cp, len);
|
||||
termbuf2 = termbuf;
|
||||
}
|
||||
#endif /* defined(LINEMODE) && defined(TIOCPKT_IOCTL) */
|
||||
@@ -199,7 +199,7 @@ set_termbuf(void)
|
||||
/*
|
||||
* Only make the necessary changes.
|
||||
*/
|
||||
if (memcmp((char *)&termbuf, (char *)&termbuf2, sizeof(termbuf)))
|
||||
if (memcmp(&termbuf, &termbuf2, sizeof(termbuf)))
|
||||
# ifdef STREAMSPTY
|
||||
if (really_stream)
|
||||
tcsetattr(ttyfd, TCSANOW, &termbuf);
|
||||
@@ -1020,7 +1020,7 @@ void getptyslave(void)
|
||||
init_termbuf();
|
||||
# ifdef TIOCGWINSZ
|
||||
if (def_row || def_col) {
|
||||
memset((char *)&ws, 0, sizeof(ws));
|
||||
memset(&ws, 0, sizeof(ws));
|
||||
ws.ws_col = def_col;
|
||||
ws.ws_row = def_row;
|
||||
ioctl(t, TIOCSWINSZ, (char *)&ws);
|
||||
@@ -1276,7 +1276,7 @@ startslave(char *host, int autologin, char *autoname)
|
||||
pututline(&wtmp);
|
||||
endutent();
|
||||
if ((i = open(wtmpf, O_WRONLY|O_APPEND)) >= 0) {
|
||||
write(i, (char *)&wtmp, sizeof(struct utmp));
|
||||
write(i, &wtmp, sizeof(struct utmp));
|
||||
close(i);
|
||||
}
|
||||
#ifdef CRAY
|
||||
@@ -1666,7 +1666,7 @@ rmut(void)
|
||||
if (!utmp)
|
||||
syslog(LOG_ERR, "utmp malloc failed");
|
||||
if (statbf.st_size && utmp) {
|
||||
nutmp = read(f, (char *)utmp, (int)statbf.st_size);
|
||||
nutmp = read(f, utmp, (int)statbf.st_size);
|
||||
nutmp /= sizeof(struct utmp);
|
||||
|
||||
for (u = utmp ; u < &utmp[nutmp] ; u++) {
|
||||
@@ -1679,7 +1679,7 @@ rmut(void)
|
||||
SCPYN(u->ut_host, "");
|
||||
#endif
|
||||
time(&u->ut_time);
|
||||
write(f, (char *)u, sizeof(wtmp));
|
||||
write(f, u, sizeof(wtmp));
|
||||
found++;
|
||||
}
|
||||
}
|
||||
@@ -1694,7 +1694,7 @@ rmut(void)
|
||||
SCPYN(wtmp.ut_host, "");
|
||||
#endif
|
||||
time(&wtmp.ut_time);
|
||||
write(f, (char *)&wtmp, sizeof(wtmp));
|
||||
write(f, &wtmp, sizeof(wtmp));
|
||||
close(f);
|
||||
}
|
||||
}
|
||||
|
@@ -402,7 +402,7 @@ int main(int argc, char **argv)
|
||||
int szi = sizeof(int);
|
||||
#endif /* SO_SEC_MULTI */
|
||||
|
||||
memset((char *)&dv, 0, sizeof(dv));
|
||||
memset(&dv, 0, sizeof(dv));
|
||||
|
||||
if (getsysv(&sysv, sizeof(struct sysv)) != 0) {
|
||||
perror("getsysv");
|
||||
|
@@ -599,7 +599,7 @@ defer_terminit()
|
||||
if (def_col || def_row) {
|
||||
struct winsize ws;
|
||||
|
||||
memset((char *)&ws, 0, sizeof(ws));
|
||||
memset(&ws, 0, sizeof(ws));
|
||||
ws.ws_col = def_col;
|
||||
ws.ws_row = def_row;
|
||||
ioctl(ourpty, TIOCSWINSZ, (char *)&ws);
|
||||
|
@@ -648,7 +648,7 @@ globextend(const Char *path, glob_t *pglob)
|
||||
|
||||
newsize = sizeof(*pathv) * (2 + pglob->gl_pathc + pglob->gl_offs);
|
||||
pathv = pglob->gl_pathv ?
|
||||
realloc((char *)pglob->gl_pathv, newsize) :
|
||||
realloc(pglob->gl_pathv, newsize) :
|
||||
malloc(newsize);
|
||||
if (pathv == NULL)
|
||||
return(GLOB_NOSPACE);
|
||||
|
Reference in New Issue
Block a user