-
Notifications
You must be signed in to change notification settings - Fork 257
Some patches from #876 #888
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SCALE is always DAY (and has to be always DAY), so replace it with DAY in source code and remove unneeded calculations. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Link: <shadow-maint#876> Signed-off-by: Alejandro Colomar <alx@kernel.org>
cdeb885 to
0ac323d
Compare
Collaborator
Author
|
v1b changes:
|
The size of time_t varies across systems, but since data type long is more than enough to calculate with days (precision of shadow file), use it instead. Just in case a shadow file contains huge values, check for a possible signed integer overflow. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Link: <shadow-maint#876> Signed-off-by: Alejandro Colomar <alx@kernel.org>
0ac323d to
711b8a2
Compare
Collaborator
Author
|
v2 changes:
|
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Link: <shadow-maint#876> Co-developed-by: Alejandro Colomar <alx@kernel.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Special care has to be taken for 32 bit systems with a 64 bit time_t, since their long data type is still 32 bit. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Link: <shadow-maint#876> Signed-off-by: Alejandro Colomar <alx@kernel.org>
711b8a2 to
2e63cee
Compare
Collaborator
Author
|
v2b changes:
|
hallyn
approved these changes
Jan 5, 2024
alejandro-colomar
pushed a commit
that referenced
this pull request
Feb 14, 2024
SCALE is always DAY (and has to be always DAY), so replace it with DAY in source code and remove unneeded calculations. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Link: <#876> Signed-off-by: Alejandro Colomar <alx@kernel.org> Cherry-picked-from: ecc3508 ("lib/, src/: Remove SCALE definition") Cc: "Serge E. Hallyn" <serge@hallyn.com> Link: <#888> Link: <#876> [alx: This is a pre-requisite for 674409e ("lib/: Saturate addition to avoid overflow")] Signed-off-by: Alejandro Colomar <alx@kernel.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These are the patches that I reviewed from that PR.
Cc: @stoeckmann