svn commit: lorikeet r138 - in trunk/heimdal/lib/hdb: .
abartlet at samba.org
abartlet at samba.org
Thu Dec 23 05:24:37 GMT 2004
Author: abartlet
Date: 2004-12-23 05:24:36 +0000 (Thu, 23 Dec 2004)
New Revision: 138
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=lorikeet&rev=138
Log:
Add another synonym for 'krbtgt'. (Needed by my WinXP SP2)
Andrew Bartlett
Modified:
trunk/heimdal/lib/hdb/hdb-ldb.c
Changeset:
Modified: trunk/heimdal/lib/hdb/hdb-ldb.c
===================================================================
--- trunk/heimdal/lib/hdb/hdb-ldb.c 2004-12-02 18:12:47 UTC (rev 137)
+++ trunk/heimdal/lib/hdb/hdb-ldb.c 2004-12-23 05:24:36 UTC (rev 138)
@@ -606,7 +606,29 @@
}
free(krbtgt_princ);
+ krbtgt_princ = NULL;
+ rc = asprintf(&krbtgt_princ, "%s/%s", KRB5_TGS_NAME, realm);
+
+ if (rc < 0) {
+ krb5_set_error_string(context, "asprintf: out of memory");
+ krb5_free_principal(context, p_copy);
+ return ENOMEM;
+ }
+
+ if (strcasecmp(krbtgt_princ, princ) == 0) {
+ free(princ);
+ princ = strdup(KRB5_TGS_NAME);
+ if (!princ) {
+ krb5_set_error_string(context, "strdup: out of memory");
+ krb5_free_principal(context, p_copy);
+ return ENOMEM;
+ }
+ is_tgs = TRUE;
+ }
+
+ free(krbtgt_princ);
+
krb5_warnx(context, "LDB_principal2message: principal: '%s' realm: %s\n", princ, realm);
ret = LDB_lookup_principal(context, (struct ldb_context *)db->hdb_db,
More information about the samba-cvs
mailing list