summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-01-21 06:23:10 +0000
committerJeremy Allison <jra@samba.org>2003-01-21 06:23:10 +0000
commite97e51f5fd05e533d064ab8dd68a9039f4d44d0c (patch)
tree2f1563f80acb2af9c38905ca3926ffd5068814e7 /source3/libsmb
parent4d3ec0020dadbda02f1e972b0806854ec5694cc6 (diff)
downloadsamba-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/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
*/