(otp_get_internal): Save lock_time in returned struct.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1929 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -121,9 +121,10 @@ otp_get_internal (void *v, OtpContext *ctx, int lockp)
|
|||||||
}
|
}
|
||||||
p = dat.dptr;
|
p = dat.dptr;
|
||||||
|
|
||||||
|
memcpy (&then, p, sizeof(then));
|
||||||
|
ctx->lock_time = then;
|
||||||
if (lockp) {
|
if (lockp) {
|
||||||
time(&now);
|
time(&now);
|
||||||
memcpy (&then, p, sizeof(then));
|
|
||||||
if (then && now - then < OTP_USER_TIMEOUT) {
|
if (then && now - then < OTP_USER_TIMEOUT) {
|
||||||
ctx->err = "Entry locked";
|
ctx->err = "Entry locked";
|
||||||
return -1;
|
return -1;
|
||||||
|
Reference in New Issue
Block a user