Include salt in dump.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2533 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
22
admin/dump.c
22
admin/dump.c
@@ -40,6 +40,16 @@
|
|||||||
|
|
||||||
RCSID("$Id$");
|
RCSID("$Id$");
|
||||||
|
|
||||||
|
static void
|
||||||
|
append_hex(char *str, krb5_data *data)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
char *p = malloc(data->length * 2 + 1);
|
||||||
|
for(i = 0; i < data->length; i++)
|
||||||
|
sprintf(p + 2 * i, "%02x", ((u_char*)data->data)[i]);
|
||||||
|
strcat(str, p);
|
||||||
|
free(p);
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
hdb_entry2string(hdb_entry *ent, char **str)
|
hdb_entry2string(hdb_entry *ent, char **str)
|
||||||
@@ -60,12 +70,12 @@ hdb_entry2string(hdb_entry *ent, char **str)
|
|||||||
ent->keys.val[i].key.keytype);
|
ent->keys.val[i].key.keytype);
|
||||||
strcat(buf, p);
|
strcat(buf, p);
|
||||||
free(p);
|
free(p);
|
||||||
for(j = 0; j < ent->keys.val[i].key.keyvalue.length; j++){
|
append_hex(buf, &ent->keys.val[i].key.keyvalue);
|
||||||
asprintf(&p, "%02x",
|
strcat(buf, ":");
|
||||||
((unsigned char*)ent->keys.val[i].key.keyvalue.data)[j]);
|
if(ent->keys.val[i].salt)
|
||||||
strcat(buf, p);
|
append_hex(buf, ent->keys.val[i].salt);
|
||||||
free(p);
|
else
|
||||||
}
|
strcat(buf, "-");
|
||||||
}
|
}
|
||||||
strcat(buf, " ");
|
strcat(buf, " ");
|
||||||
event2string(&ent->created_by, &p);
|
event2string(&ent->created_by, &p);
|
||||||
|
@@ -40,6 +40,16 @@
|
|||||||
|
|
||||||
RCSID("$Id$");
|
RCSID("$Id$");
|
||||||
|
|
||||||
|
static void
|
||||||
|
append_hex(char *str, krb5_data *data)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
char *p = malloc(data->length * 2 + 1);
|
||||||
|
for(i = 0; i < data->length; i++)
|
||||||
|
sprintf(p + 2 * i, "%02x", ((u_char*)data->data)[i]);
|
||||||
|
strcat(str, p);
|
||||||
|
free(p);
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
hdb_entry2string(hdb_entry *ent, char **str)
|
hdb_entry2string(hdb_entry *ent, char **str)
|
||||||
@@ -60,12 +70,12 @@ hdb_entry2string(hdb_entry *ent, char **str)
|
|||||||
ent->keys.val[i].key.keytype);
|
ent->keys.val[i].key.keytype);
|
||||||
strcat(buf, p);
|
strcat(buf, p);
|
||||||
free(p);
|
free(p);
|
||||||
for(j = 0; j < ent->keys.val[i].key.keyvalue.length; j++){
|
append_hex(buf, &ent->keys.val[i].key.keyvalue);
|
||||||
asprintf(&p, "%02x",
|
strcat(buf, ":");
|
||||||
((unsigned char*)ent->keys.val[i].key.keyvalue.data)[j]);
|
if(ent->keys.val[i].salt)
|
||||||
strcat(buf, p);
|
append_hex(buf, ent->keys.val[i].salt);
|
||||||
free(p);
|
else
|
||||||
}
|
strcat(buf, "-");
|
||||||
}
|
}
|
||||||
strcat(buf, " ");
|
strcat(buf, " ");
|
||||||
event2string(&ent->created_by, &p);
|
event2string(&ent->created_by, &p);
|
||||||
|
Reference in New Issue
Block a user