[Issue#] SSDWSSP-449
[Bug/Feature] There should be difference between initiated password time and
first function call regarding password so that difference should
not cause SECURITY_SERVER_ERROR_PASSWORD_RETRY_TIMER error.
[Cause] While security-server is called for the first time, it initiates
itself.
[Solution] N/A
[Verification] Running security-server ss-password tests. There should be no
error with SECURITY_SERVER_ERROR_PASSWORD_RETRY_TIMER (value -17).
Change-Id: I67243269fc8ed0476f614ab4143d81f4c12e24ee
void initiate_try()
{
+ long int temp_usec;
+
gettimeofday(&prev_try, NULL);
+
+ temp_usec = prev_try.tv_usec - SECURITY_SERVER_PASSWORD_RETRY_TIMEOUT_MICROSECOND;
+ if (temp_usec >= 0)
+ prev_try.tv_usec = temp_usec;
+ else
+ {
+ prev_try.tv_sec = prev_try.tv_sec - 1;
+ prev_try.tv_usec = 1000000 + temp_usec;
+ }
}
int validate_pwd_file(char *filename)