heimdal build fix: krb5_princ_component

Jim McDonough jmcd at us.ibm.com
Wed Jul 16 17:11:15 GMT 2003





So heimdal has replaced this "internal" macro with something that returns a
string instead of a krb5_data *.  I think this will fix, though it could be
made prettier, if it's the right fix.  comments?

Index: libads/kerberos_verify.c
===================================================================
RCS file: /cvsroot/samba/source/libads/kerberos_verify.c,v
retrieving revision 1.1.2.17
diff -u -r1.1.2.17 kerberos_verify.c
--- libads/kerberos_verify.c  12 Jul 2003 00:27:22 -0000    1.1.2.17
+++ libads/kerberos_verify.c  16 Jul 2003 17:10:07 -0000
@@ -113,7 +113,18 @@
       * the correct IP address.
       */

+#if !defined(krb5_princ_component)
+     {
+           krb5_data rc_data;
+           const char *comp = krb5_principal_get_comp_string(context,
host_princ, 0);
+           krb5_data_alloc(&rc_data, strlen(comp));
+           strncpy(rc_data.data, comp, rc_data.length);
+           ret = krb5_get_server_rcache(context, &rc_data, &rcache);
+           krb5_data_free(&rc_data);
+     }
+#else
      ret = krb5_get_server_rcache(context, krb5_princ_component(context,
host_princ, 0), &rcache);
+#endif
      if (ret) {
            DEBUG(1,("krb5_get_server_rcache failed (%s)\n",
error_message(ret)));
            sret = NT_STATUS_LOGON_FAILURE;

----------------------------
Jim McDonough
IBM Linux Technology Center
Samba Team
6 Minuteman Drive
Scarborough, ME 04074
USA

jmcd at us.ibm.com
jmcd at samba.org

Phone: (207) 885-5565
IBM tie-line: 776-9984




More information about the samba-technical mailing list