Fix coverity Y2K38_SAFTY issues in smbpasswd backend
This changelist address coverity issue pertaining to Y2K38_SAFTY in smbpasswd backend and fixes issues#1509031 and 1509040. https://scan5.scan.coverity.com/#/project-view/64750/10100?selectedIssue=1509031 https://scan5.scan.coverity.com/#/project-view/64750/10100?selectedIssue=1509040
Following changes are done.
- Updates record format to deal with 64-bit time_t value as 16-byte hex string. Old format: username:uid:[32hex bytes]:[32hex bytes]:[attributes]:LCT-XXXXXXXX New format: username:uid:[32hex bytes]:[32hex bytes]:[attributes]:LCT-XXXXXXXXXXXXXXXX
- Updates add, modify and get functions to work with new format.
- Checks for old records in init and writes them in new format.
Unit testing:
- Verify detection of old records.
- Verify conversion of records from old to new format.
- verify addition of new record.
- verify modification of new record.
- verify deletion on record.
Checklist
- [*] Commits have
Signed-off-by:
with name/author being identical to the commit author -
(optional) This MR is just one part towards a larger feature. -
(optional, if backport required) Bugzilla bug filed and BUG:
tag added -
Test suite updated with functionality tests -
Test suite updated with negative tests -
Documentation updated -
CI timeout is 3h or higher (see Settings/CICD/General pipelines/ Timeout)
Reviewer's checklist:
-
There is a test suite reasonably covering new functionality or modifications -
Function naming, parameters, return values, types, etc., are consistent and according to README.Coding.md
-
This feature/change has adequate documentation added -
No obvious mistakes in the code