--- clean-21018/autogen.sh	2007-04-14 04:08:13.000000000 -0400
+++ autogen.sh	2007-06-08 22:46:32.000000000 -0400
@@ -1,5 +1,18 @@
 #!/bin/sh
+#
+for d in `find . -type d \\( -name .svn -prune -or -print \\)` ; do
+    (cd $d && svn pg svn:ignore . | xargs rm -f)
+done
+#
 # to really generate all files you need to run "make distcheck" in a
 # object tree, but this will do if you have all parts of the required
 # tool-chain installed
 autoreconf -f -i || { echo "autoreconf failed: $?"; exit 1; }
+#
+# This is to build the DISTFILES into the disttree for heimdal-lorikeet
+#
+./configure || exit 1
+make distdir-in-tree || exit 1
+make distclean || exit 1
+exit 0
+
--- clean-21018/kdc/kerberos5.c 2007-06-08 11:48:54.000000000 -0400
+++ kdc/kerberos5.c   2007-06-08 11:09:20.000000000 -0400
@@ -1194,7 +1194,7 @@
 			(unsigned)abs(kdc_time - p.patimestamp), 
 			context->max_skew,
 			client_name);
-#if 0
+#if 1
 		/* This code is from samba, needs testing */
 		/* 
 		 * the following is needed to make windows clients
--- clean-21018/lib/hdb/hdb.c   2007-06-08 11:48:37.000000000 -0400
+++ lib/hdb/hdb.c     2007-06-08 11:09:20.000000000 -0400
@@ -55,6 +55,9 @@
     {"ldap:",  hdb_ldap_create},
     {"ldapi:", hdb_ldapi_create},
 #endif
+#ifdef _SAMBA_BUILD_
+    {"ldb:",   hdb_ldb_create},
+#endif
 #ifdef HAVE_LDB /* Used for integrated samba build */
     {"ldb:",   hdb_ldb_create},
 #endif
--- clean-21018/lib/hdb/hdb_locl.h      2007-06-08 11:48:37.000000000 -0400
+++ lib/hdb/hdb_locl.h        2007-06-08 11:09:20.000000000 -0400
@@ -64,4 +64,11 @@
 #include <hdb.h>
 #include <hdb-private.h>
 
+krb5_error_code
+hdb_ldb_create (
+       krb5_context /*context*/,
+       HDB ** /*db*/,
+       const char */*arg*/);
+
+
 #endif /* __HDB_LOCL_H__ */
--- clean-21018/lib/hdb/keytab.c        2007-06-08 11:48:37.000000000 -0400
+++ lib/hdb/keytab.c  2007-06-08 11:09:20.000000000 -0400
@@ -59,7 +59,7 @@
        return ENOMEM;
     }
     db = name;
-    mkey = strchr(name, ':');
+    mkey = strrchr(name, ':');
     if(mkey == NULL || mkey[1] == '\0') {
        if(*name == '\0')
            d->dbname = NULL;
--- /data/heimdal-svn/lib/hcrypto/camellia-ntt.h	2007-08-07 09:21:33.000000000 +1000
+++ lib/hcrypto/camellia-ntt.h	2007-01-11 18:27:37.000000000 +1100
@@ -1,28 +1,21 @@
-/* camellia.h ver 1.2.0
+/* camellia.h	ver 1.2.0
  *
- * Copyright (c) 2006,2007
- * NTT (Nippon Telegraph and Telephone Corporation) . All rights reserved.
+ * Copyright (C) 2006,2007
+ * NTT (Nippon Telegraph and Telephone Corporation).
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer as
- *   the first lines of this file unmodified.
- * 2. Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
  *
- * THIS SOFTWARE IS PROVIDED BY NTT ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL NTT BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 
 #ifndef HEADER_CAMELLIA_H
--- /data/heimdal-svn/lib/hcrypto/camellia-ntt.c	2007-08-07 09:21:33.000000000 +1000
+++ lib/hcrypto/camellia-ntt.c	2007-01-11 18:28:12.000000000 +1100
@@ -1,28 +1,21 @@
-/* camellia.c ver 1.2.0
+/* camellia.h	ver 1.2.0
  *
- * Copyright (c) 2006,2007
- * NTT (Nippon Telegraph and Telephone Corporation) . All rights reserved.
+ * Copyright (C) 2006,2007
+ * NTT (Nippon Telegraph and Telephone Corporation).
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer as
- *   the first lines of this file unmodified.
- * 2. Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
  *
- * THIS SOFTWARE IS PROVIDED BY NTT ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL NTT BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 
 /*
--- lib/krb5/get_in_tkt.c.orig	2008-06-09 14:55:25.000000000 +1000
+++ lib/krb5/get_in_tkt.c	2008-06-09 15:36:07.000000000 +1000
@@ -367,7 +367,17 @@
 	goto out;
     }
 
-    /* compare client and save */
+    /*
+     * HACK:
+     * this is really a ugly hack, to support using the Netbios Domain Name
+     * as realm against windows KDC's, they always return the full realm
+     * based on the DNS Name.
+     */
+    flags |= EXTRACT_TICKET_ALLOW_SERVER_MISMATCH;
+    flags |=EXTRACT_TICKET_ALLOW_CNAME_MISMATCH ;
+    
+
+   /* compare client and save */
     ret = _krb5_principalname2krb5_principal (context,
 					      &tmp_principal,
 					      rep->kdc_rep.cname,
Index: lib/krb5/send_to_kdc.c
===================================================================
--- lib/krb5/send_to_kdc.c	(revision 800)
+++ lib/krb5/send_to_kdc.c	(working copy)
@@ -385,7 +385,7 @@
 		 struct send_to_kdc *s = context->send_to_kdc;
 
 		 ret = (*s->func)(context, s->data, 
-				  hi, send_data, receive);
+				  hi, context->kdc_timeout, send_data, receive);
 		 if (ret == 0 && receive->length != 0)
 		     goto out;
 		 continue;
Index: lib/krb5/krb5.h
===================================================================
--- lib/krb5/krb5.h	(revision 800)
+++ lib/krb5/krb5.h	(working copy)
@@ -725,6 +725,7 @@
 typedef krb5_error_code (*krb5_send_to_kdc_func)(krb5_context, 
 						 void *, 
 						 krb5_krbhst_info *,
+						 time_t timeout,
 						 const krb5_data *,
 						 krb5_data *);
 
