LSaddon::posix: fix generate_shadowLastChange()

Just return a timestamp because its designed to be used with 
LSattr_ldap_shadowExpire that will handled the division by 86400.
This commit is contained in:
Benjamin Renard 2020-12-01 16:37:01 +01:00
parent 0addf22c2e
commit 4e8a6db06b

View file

@ -268,6 +268,11 @@ LSerror :: defineError('POSIX_01',
*
* Just return a shadowLastChange value corresponding to current date.
*
* Important: this function is designed to be used with LSattr_html_date
* & LSattr_ldap_shadowExpire classes. The returned value is just a timestamp
* and it will be converted by LSattr_ldap_shadowExpire as raw LDAP value, that is,
* divided by 86400.
*
* @author Benjamin Renard <brenard@easter-eggs.com>
*
* @param[in] $anything anything
@ -275,5 +280,5 @@ LSerror :: defineError('POSIX_01',
* @retval integer The shadowLastChange attribute value (=current date)
*/
function generate_shadowLastChange($anything) {
return time()/86400;
return time();
}