Bug 11951 - Comply with change date when updating password
Summary: Comply with change date when updating password
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Standard Compliance (show other bugs)
Version: unspecified
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-06 16:30 UTC by Adam
Modified: 2019-06-07 10:30 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:


Attachments
patch to fix this bug (1.62 KB, patch)
2019-06-06 16:30 UTC, Adam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adam 2019-06-06 16:30:47 UTC
Created attachment 8086 [details]
patch to fix this bug

When the function update_passwd is called on a system with a date set to 1st Jan
1970 (like some embedded devices), the change date is set to 0, which has a special meaning:
"The value 0 has a special meaning, which is that the user should change her password the next time she will log in the system."

The attached patch fixes, this behaviour by setting the change date to -1 if called on 1st Jan 1970.
Comment 1 Denys Vlasenko 2019-06-07 10:30:57 UTC
Fixed in git, thanks!