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

Safety comments: PR1 #860

Merged
merged 9 commits into from
Oct 7, 2024
Merged

Safety comments: PR1 #860

merged 9 commits into from
Oct 7, 2024

Conversation

squell
Copy link
Member

@squell squell commented Sep 2, 2024

It's tedious to do, but let's have proper # Safety and // SAFETY comments all across the board.

This PR addresses some low-hanging fruit:

  • simple routines from system
  • pam and cutils.
  • file locking
  • this PR also replaces our raw sys call with libc::close_range, since that is available now.

This is related to #861 but does not close that issue. I've broken it up in multiple PR's for easier reviewing.

@squell squell mentioned this pull request Sep 2, 2024
@squell squell linked an issue Sep 3, 2024 that may be closed by this pull request
src/pam/securemem.rs Outdated Show resolved Hide resolved
src/system/mod.rs Outdated Show resolved Hide resolved
pvdrz
pvdrz previously requested changes Sep 26, 2024
Copy link
Collaborator

@pvdrz pvdrz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm leaving the PAM bits to Ruben :P

src/system/mod.rs Outdated Show resolved Hide resolved
src/system/mod.rs Outdated Show resolved Hide resolved
@squell squell dismissed pvdrz’s stale review October 7, 2024 14:58

Changes have been incorporated.

@pvdrz pvdrz enabled auto-merge October 7, 2024 18:39
@pvdrz pvdrz merged commit 8cb08c6 into main Oct 7, 2024
12 checks passed
@pvdrz pvdrz deleted the safety-comments-1 branch October 7, 2024 19:10
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.

Add missing SAFETY comments relating to libc calls.
3 participants