Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Refactor: main: substitute is_auth_req macro" #115

Merged
merged 1 commit into from Jul 4, 2022

Conversation

jfriesse
Copy link
Member

@jfriesse jfriesse commented Jul 4, 2022

This reverts commit da79b8b.

authfile != authkey

Signed-off-by: Jan Friesse jfriesse@redhat.com

Solves #114

This reverts commit da79b8b.

authfile != authkey

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
@jfriesse
Copy link
Member Author

jfriesse commented Jul 4, 2022

@dmuhamedagic The reason for failing check is coverity which (after the patch) finally got a chance to go thru the code paths with hmac enabled and it found out that boothc header secs field is 32-bit

struct boothc_header {
...
uint32_t secs;  /* seconds */

and result of time_t (64-bit because of Y2K38 problem) is stored into 32-bit header (in init_header_bare). 2K38 is not so close, but it may be good idea to solve the problem anyway. Any idea how to solve the problem without breaking wire compatibility?

@dmuhamedagic dmuhamedagic merged commit e0bd090 into ClusterLabs:main Jul 4, 2022
@dmuhamedagic
Copy link

Thanks! Unfortunately, I managed to confuse Jan (the other one) with the name.

@jfriesse
Copy link
Member Author

jfriesse commented Jul 7, 2022

@dmuhamedagic Thanks! Any idea about solving Y2K38 problem I've described in previous comment (#115 (comment))?

I had an idea - what about ignore fact that it is wall time and instead say it is 32-bit timestamp which can overflow - and we count with it by using sliding window? So (for example) cmp knows that 0 is bigger than uint32-1 at time uint32-2?

Would you accept such patch?

@dmuhamedagic
Copy link

dmuhamedagic commented Jul 7, 2022 via email

@jfriesse
Copy link
Member Author

jfriesse commented Jul 8, 2022

On Thu, Jul 07, 2022 at 08:10:32AM -0700, Jan Friesse wrote: @dmuhamedagic Thanks! Any idea about solving Y2K38 problem I've described in previous comment (#115 (comment))?
I didn't miss it, but at the time had no good idea what to do about it. Still don't.

Oh .. ok :) No worries

I had an idea - what about ignore fact that it is wall time and instead say it is 32-bit timestamp which can overflow - and we count with it by using sliding window? So (for example) cmp knows that 0 is bigger than uint32-1 at time uint32-2? Would you accept such patch?
Of course. Sounds good.

I will try to prepare patch - still not sure if it will really work so maybe I find out different approach is needed... Let's see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants