Conversation
14ade76 to
0cc0886
Compare
|
Thank you for your PR. Have wall clock adjustments been a problem for you? While it is true that CLOCK_BOOTTIME is better for this purpose, the fallback (CLOCK_MONOTONIC) does not increment during sleep. Point is, unless there is an actual problem with |
In my case, the system allowed users to adjust the system clock, so using a clock source immune to wall‑clock changes was a better approach. Since I was working on Linux, I knew |
0cc0886 to
913d868
Compare
Replace usage of time(NULL) with clock_gettime(). This provides elapsed time since boot and avoids issues caused by wall‑clock adjustments.
913d868 to
3c135fe
Compare
|
I'm still not entirely sure that this is a condition that SSHGuard can and should handle. On most systems, you have to be root to change time. If the user is root, what else can they change? Can you be more specific about why you need SSHGuard specifically to handle time changing? |
I’ve checked and found that the only configurable option is the timezone in the system I was working on, which does not affect |
Replace usage of
time(NULL)withclock_gettime(). This provides elapsed time since boot and avoids issues caused by wall‑clock adjustments.