Dump etypes.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4726 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1998-04-05 05:47:47 +00:00
parent 913a95f602
commit 1631faa3fb

View File

@@ -61,6 +61,7 @@ RCSID("$Id$");
max ticket life
max renewable life
flags
supported etypes
*/
static void
@@ -174,6 +175,19 @@ hdb_entry2string(hdb_entry *ent, char **str)
strcat(buf, p);
free(p);
strcat(buf, " ");
if(ent->etypes == NULL || ent->etypes->len == 0)
strcat(buf, "-");
else {
for(i = 0; i < ent->etypes->len; i++){
asprintf(&p, "%u", ent->etypes->val[i]);
strcat(buf, p);
free(p);
if(i != ent->etypes->len - 1)
strcat(buf, ":");
}
}
*str = strdup(buf);
return 0;