Store last password change date when parsing MIT dumps in hprop
If the MIT dump file includes a last password change date, allocate a database extension structure to hold that information and include it in the corresponding Heimdal database entry. Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
This commit is contained in:

committed by
Love Hornquist Astrand

parent
01d54cacc9
commit
73d0fc23a4
@@ -311,6 +311,20 @@ mit_prop_dump(void *arg, const char *file)
|
||||
#define mit_KRB5_TL_LAST_PWD_CHANGE 1
|
||||
#define mit_KRB5_TL_MOD_PRINC 2
|
||||
switch(tl_type) {
|
||||
case mit_KRB5_TL_LAST_PWD_CHANGE:
|
||||
buf = malloc(tl_length);
|
||||
if (buf == NULL)
|
||||
errx(ENOMEM, "malloc");
|
||||
getdata(&p, buf, tl_length); /* data itself */
|
||||
val = buf[0] | (buf[1] << 8) | (buf[2] << 16) | (buf[3] << 24);
|
||||
free(buf);
|
||||
ALLOC(ent.entry.extensions);
|
||||
ALLOC_SEQ(ent.entry.extensions, 1);
|
||||
ent.entry.extensions->val[0].mandatory = 0;
|
||||
ent.entry.extensions->val[0].data.element
|
||||
= choice_HDB_extension_data_last_pw_change;
|
||||
ent.entry.extensions->val[0].data.u.last_pw_change = val;
|
||||
break;
|
||||
case mit_KRB5_TL_MOD_PRINC:
|
||||
buf = malloc(tl_length);
|
||||
if (buf == NULL)
|
||||
|
Reference in New Issue
Block a user