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:
@@ -331,8 +331,17 @@ change (krb5_auth_context auth_context,
|
|||||||
free (ent.modified_by);
|
free (ent.modified_by);
|
||||||
}
|
}
|
||||||
ent.modified_by = e;
|
ent.modified_by = e;
|
||||||
if (ent.pw_end)
|
if (ent.pw_end){
|
||||||
*ent.pw_end = e->time + 3600; /* XXX - Change here! */
|
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);
|
ret = db->store (context, db, 1, &ent);
|
||||||
}
|
}
|
||||||
krb5_data_free (&salt);
|
krb5_data_free (&salt);
|
||||||
|
Reference in New Issue
Block a user