Use krb_unparse_name()
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@941 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -224,7 +224,7 @@ void kauth(char *principal, char *ticket)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
base64_encode(cip.dat, cip.length, &p);
|
base64_encode(cip.dat, cip.length, &p);
|
||||||
reply(300, "P=%s%s%s@%s T=%s", name, *inst?".":"", inst, realm, p);
|
reply(300, "P=%s T=%s", krb_unparse_name(name, inst, realm), p);
|
||||||
free(p);
|
free(p);
|
||||||
memset(&cip, 0, sizeof(cip));
|
memset(&cip, 0, sizeof(cip));
|
||||||
}
|
}
|
||||||
@@ -317,9 +317,8 @@ void klist(void)
|
|||||||
strcpy(buf2, short_date(c.issue_date));
|
strcpy(buf2, short_date(c.issue_date));
|
||||||
else
|
else
|
||||||
strcpy(buf2, ">>> Expired <<< ");
|
strcpy(buf2, ">>> Expired <<< ");
|
||||||
lreply(200, "%s %s %s%s%s%s%s (%d)", buf1, buf2,
|
lreply(200, "%s %s %s (%d)", buf1, buf2,
|
||||||
c.service, (c.instance[0] ? "." : ""), c.instance,
|
krb_unparse_name(c.service, c.instance, c.realm), c.kvno);
|
||||||
(c.realm[0] ? "@" : ""), c.realm, c.kvno);
|
|
||||||
}
|
}
|
||||||
if (header && err == EOF) {
|
if (header && err == EOF) {
|
||||||
lreply(200, "No tickets in file.");
|
lreply(200, "No tickets in file.");
|
||||||
|
@@ -313,12 +313,13 @@ kerberos4_is(ap, data, cnt)
|
|||||||
|
|
||||||
if (msg == NULL)
|
if (msg == NULL)
|
||||||
Data(ap, KRB_REJECT, (void *)0, 0);
|
Data(ap, KRB_REJECT, (void *)0, 0);
|
||||||
sprintf (msg, "user `%s%s%s@%s' is not authorized "
|
sprintf (msg, "user `%s' is not authorized to "
|
||||||
"to login as `%s'", adat.pname,
|
"login as `%s'",
|
||||||
*adat.pinst == '\0' ? "" : ".",
|
krb_unparse_name(adat.pname,
|
||||||
adat.pinst,
|
adat.pinst,
|
||||||
adat.prealm,
|
adat.realm),
|
||||||
UserNameRequested);
|
UserNameRequested);
|
||||||
|
|
||||||
Data(ap, KRB_REJECT, (void *)msg, -1);
|
Data(ap, KRB_REJECT, (void *)msg, -1);
|
||||||
free(msg);
|
free(msg);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user