irods / irods_auth_plugin_pam_interactive

2 stars 3 forks source link

[#5] password expiration issue #7

Closed ll4strw closed 4 months ago

ll4strw commented 5 months ago

using boost::chrono for time and passwd expiration check performed on epoch timestamps

alanking commented 5 months ago

Thanks for submitting this! We'll take a look as soon as we can.

ll4strw commented 4 months ago

@alanking thanks for reviewing this PR.

So the idea here is that we are moving to using epoch time instead of converting things to local time? Does this resolve your issues?

That is right. These code changes make the code timezone independent. Moreover, it does solve #5.

I think we can probably move to using std::chrono instead of boost::chrono, unless there's something being used that's not provided by the std::chrono library. We can also move to using std::chrono in a future commit, preferably before the first release.

In this particular instance no, there is not. As far as I am concerned, std::chrono is sufficient here.

I see though that rodsServer.cpp uses boost::chrono::system_clock whereas db_plugin.cpp uses std::chrono::system_clock. Any reason?