(ka_convert): print the failing principal. AFS 3.4a creates

krbtgt.REALMOFCELL as NOTGS+NOSEAL, work around.  From "Brandon
S. Allbery KF8NH" <allbery@kf8nh.apk.net>


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5985 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1999-04-19 10:24:42 +00:00
parent fc437b9e14
commit ee64feeaa1

View File

@@ -271,7 +271,9 @@ ka_convert(struct prop_data *pd, int fd, struct ka_entry *ent, const char *cell)
ret = krb5_425_conv_principal(pd->context, ent->name, ent->instance, realm,
&hdb.principal);
if(ret) {
krb5_warn(pd->context, ret, "krb5_425_conv_principal");
krb5_warn(pd->context, ret,
"krb5_425_conv_principal (%s.%s@%s)",
ent->name, ent->instance, realm);
return 0;
}
hdb.kvno = ntohl(ent->kvno);
@@ -320,6 +322,11 @@ ka_convert(struct prop_data *pd, int fd, struct ka_entry *ent, const char *cell)
hdb.flags.renewable = 1;
hdb.flags.proxiable = 1;
hdb.flags.postdate = 1;
/* XXX - AFS 3.4a creates krbtgt.REALMOFCELL as NOTGS+NOSEAL */
if (strcmp(ent->name, "krbtgt") == 0 &&
(flags & (KAFNOTGS|KAFNOSEAL)) == (KAFNOTGS|KAFNOSEAL))
flags &= ~KAFNOTGS;
hdb.flags.client = (flags & KAFNOTGS) == 0;
hdb.flags.server = (flags & KAFNOSEAL) == 0;