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;
|
||||
}
|
||||
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);
|
||||
memset(&cip, 0, sizeof(cip));
|
||||
}
|
||||
@@ -317,9 +317,8 @@ void klist(void)
|
||||
strcpy(buf2, short_date(c.issue_date));
|
||||
else
|
||||
strcpy(buf2, ">>> Expired <<< ");
|
||||
lreply(200, "%s %s %s%s%s%s%s (%d)", buf1, buf2,
|
||||
c.service, (c.instance[0] ? "." : ""), c.instance,
|
||||
(c.realm[0] ? "@" : ""), c.realm, c.kvno);
|
||||
lreply(200, "%s %s %s (%d)", buf1, buf2,
|
||||
krb_unparse_name(c.service, c.instance, c.realm), c.kvno);
|
||||
}
|
||||
if (header && err == EOF) {
|
||||
lreply(200, "No tickets in file.");
|
||||
|
@@ -313,12 +313,13 @@ kerberos4_is(ap, data, cnt)
|
||||
|
||||
if (msg == NULL)
|
||||
Data(ap, KRB_REJECT, (void *)0, 0);
|
||||
sprintf (msg, "user `%s%s%s@%s' is not authorized "
|
||||
"to login as `%s'", adat.pname,
|
||||
*adat.pinst == '\0' ? "" : ".",
|
||||
sprintf (msg, "user `%s' is not authorized to "
|
||||
"login as `%s'",
|
||||
krb_unparse_name(adat.pname,
|
||||
adat.pinst,
|
||||
adat.prealm,
|
||||
adat.realm),
|
||||
UserNameRequested);
|
||||
|
||||
Data(ap, KRB_REJECT, (void *)msg, -1);
|
||||
free(msg);
|
||||
}
|
||||
|
Reference in New Issue
Block a user