Get password expiration time from config file.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3997 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1997-11-16 01:44:57 +00:00
parent 0ea88896de
commit c317cbaa9a

View File

@@ -331,8 +331,17 @@ change (krb5_auth_context auth_context,
free (ent.modified_by);
}
ent.modified_by = e;
if (ent.pw_end)
*ent.pw_end = e->time + 3600; /* XXX - Change here! */
if (ent.pw_end){
int t = krb5_config_get_time(context->cf,
"libdefaults",
"pw_expiration", NULL);
if(t > 0)
*ent.pw_end = e->time + t;
else{
free(ent.pw_end);
ent.pw_end = NULL;
}
}
ret = db->store (context, db, 1, &ent);
}
krb5_data_free (&salt);