summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-01-21 06:23:49 +0000
committerJeremy Allison <jra@samba.org>2003-01-21 06:23:49 +0000
commitb0aadff2020886cbc2a35bf115e6c359ff28d870 (patch)
tree55563d520ad2dd34f01140c656bf1abc01368f28 /source3/libsmb
parent2d12fa42941d708f851283833ee35d9c507ea4d8 (diff)
downloadsamba-b0aadff2020886cbc2a35bf115e6c359ff28d870.tar.gz
samba-b0aadff2020886cbc2a35bf115e6c359ff28d870.tar.bz2
samba-b0aadff2020886cbc2a35bf115e6c359ff28d870.zip
More fixes getting us closer to full Heimdal compile....
Jeremy. (This used to be commit a7ee6ed64500a0d949849da6996b7dc837518f00)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clikrb5.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c
index 8b89763c3f..b56de62730 100644
--- a/source3/libsmb/clikrb5.c
+++ b/source3/libsmb/clikrb5.c
@@ -50,6 +50,26 @@ krb5_error_code krb5_set_default_tgs_ktypes(krb5_context ctx, const krb5_enctype
}
#endif
+#if defined(HAVE_ADDR_TYPE_IN_KRB5_ADDRESS)
+/* HEIMDAL */
+void setup_kaddr( krb5_address *pkaddr, struct sockaddr *paddr)
+{
+ pkaddr->addr_type = KRB5_ADDRESS_INET;
+ pkaddr->address.length = sizeof(((struct sockaddr_in *)paddr)->sin_addr);
+ pkaddr->address.data = (char *)&(((struct sockaddr_in *)paddr)->sin_addr);
+}
+#elif defined(HAVE_ADDRTYPE_IN_KRB5_ADDRESS)
+/* MIT */
+void setup_kaddr( krb5_address *pkaddr, struct sockaddr *paddr)
+{
+ pkaddr->addrtype = ADDRTYPE_INET;
+ pkaddr->length = sizeof(((struct sockaddr_in *)paddr)->sin_addr);
+ pkaddr->contents = (char *)&(((struct sockaddr_in *)paddr)->sin_addr);
+}
+#else
+__ERROR__XX__UNKNOWN_ADDRTYPE
+#endif
+
/*
we can't use krb5_mk_req because w2k wants the service to be in a particular format
*/