unsigned int num_comp;
bool ok;
char *upper = NULL;
+ bool get_krbtgt = false;
*entry = (struct sdb_entry) {};
if (flags & SDB_F_GET_SERVER) {
bool is_krbtgt = false;
+<<<<<<< HEAD
ret = is_principal_component_equal(context, principal, 0, KRB5_TGS_NAME, &is_krbtgt);
if (ret) {
TALLOC_FREE(frame);
*/
TALLOC_FREE(frame);
return 0;
+=======
+ ret = principal_comp_strcmp(context, principal, 0, KRB5_TGS_NAME);
+ if (ret == 0) {
+ if (num_comp != 2) {
+ TALLOC_FREE(frame);
+ return SDB_ERR_NOENTRY;
+ }
+ get_krbtgt = true;
+>>>>>>> 85820e0ba8a1 (CHECK s4:kdc: fix samba_kdc_lookup_realm() with krbtgt/OTHER.REALM/OUR.REALM)
}
/*
return 0;
}
+ if (get_krbtgt) {
+ ok = strequal(realm, tdo->domain_name.string);
+ if (ok) {
+ /*
+ * This principal has to be local
+ */
+ TALLOC_FREE(frame);
+ return 0;
+ }
+ ok = strequal(realm, tdo->netbios_name.string);
+ if (ok) {
+ /*
+ * This principal has to be local
+ */
+ TALLOC_FREE(frame);
+ return 0;
+ }
+ }
+
if (tdo->trust_attributes & LSA_TRUST_ATTRIBUTE_WITHIN_FOREST) {
/*
* TODO: handle the routing within the forest