diff options
author | Jeremy Allison <jra@samba.org> | 2003-01-21 06:23:10 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-01-21 06:23:10 +0000 |
commit | e97e51f5fd05e533d064ab8dd68a9039f4d44d0c (patch) | |
tree | 2f1563f80acb2af9c38905ca3926ffd5068814e7 /source3/libads/krb5_setpw.c | |
parent | 4d3ec0020dadbda02f1e972b0806854ec5694cc6 (diff) | |
download | samba-e97e51f5fd05e533d064ab8dd68a9039f4d44d0c.tar.gz samba-e97e51f5fd05e533d064ab8dd68a9039f4d44d0c.tar.bz2 samba-e97e51f5fd05e533d064ab8dd68a9039f4d44d0c.zip |
More fixes getting us closer to full Heimdal compile....
Jeremy.
(This used to be commit 193cc4f4fc876c66e97ea6b82bae431d0247c1fa)
Diffstat (limited to 'source3/libads/krb5_setpw.c')
-rw-r--r-- | source3/libads/krb5_setpw.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/source3/libads/krb5_setpw.c b/source3/libads/krb5_setpw.c index 8079c0953f..73d370d75f 100644 --- a/source3/libads/krb5_setpw.c +++ b/source3/libads/krb5_setpw.c @@ -141,7 +141,7 @@ static krb5_error_code build_setpw_request(krb5_context context, packet->data = (char *)malloc(ap_req->length + cipherpw.length + 6); /* see the RFC for details */ - p = packet->data + 2; + p = ((char *)packet->data) + 2; RSSVAL(p, 0, 0xff80); p += 2; RSSVAL(p, 0, ap_req->length); p += 2; memcpy(p, ap_req->data, ap_req->length); p += ap_req->length; @@ -172,10 +172,10 @@ static krb5_error_code parse_setpw_reply(krb5_context context, p = packet->data; - if (packet->data[0] == 0x7e || packet->data[0] == 0x5e) { + if (((char *)packet->data)[0] == 0x7e || ((char *)packet->data)[0] == 0x5e) { /* it's an error packet. We should parse it ... */ DEBUG(1,("Got error packet 0x%x from kpasswd server\n", - packet->data[0])); + ((char *)packet->data)[0])); return KRB5KRB_AP_ERR_MODIFIED; } @@ -196,7 +196,7 @@ static krb5_error_code parse_setpw_reply(krb5_context context, ap_rep.length = RSVAL(p, 0); p += 2; - if (p + ap_rep.length >= packet->data + packet->length) { + if (p + ap_rep.length >= (char *)packet->data + packet->length) { DEBUG(1,("ptr beyond end of packet from kpasswd server\n")); return KRB5KRB_AP_ERR_MODIFIED; } @@ -219,7 +219,7 @@ static krb5_error_code parse_setpw_reply(krb5_context context, krb5_free_ap_rep_enc_part(context, ap_rep_enc); cipherresult.data = p; - cipherresult.length = (packet->data + packet->length) - p; + cipherresult.length = ((char *)packet->data + packet->length) - p; ret = krb5_rd_priv(context, auth_context, &cipherresult, &clearresult, &replay); @@ -353,12 +353,8 @@ ADS_STATUS krb5_set_password(const char *kdc_host, const char *princ, const char addr_len = sizeof(local_addr); getsockname(sock, &local_addr, &addr_len); - remote_kaddr.addrtype = ADDRTYPE_INET; - remote_kaddr.length = sizeof(((struct sockaddr_in *)&remote_addr)->sin_addr); - remote_kaddr.contents = (char *)&(((struct sockaddr_in *)&remote_addr)->sin_addr); - local_kaddr.addrtype = ADDRTYPE_INET; - local_kaddr.length = sizeof(((struct sockaddr_in *)&local_addr)->sin_addr); - local_kaddr.contents = (char *)&(((struct sockaddr_in *)&local_addr)->sin_addr); + setup_kaddr(&remote_kaddr, &remote_addr); + setup_kaddr(&local_kaddr, &local_addr); ret = krb5_auth_con_setaddrs(context, auth_context, &local_kaddr, NULL); if (ret) { |