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

fix: Add sys permission kinds for node compat #24242

Merged
merged 3 commits into from
Jul 10, 2024

Conversation

adamgreg
Copy link
Contributor

@adamgreg adamgreg commented Jun 18, 2024

Fixes #24241

  • Support "statfs", "username", "getPriority" and "setPriority" kinds for --allow-sys.
  • Check individual permissions in node:os.userInfo() instead of a single "userInfo" permission.
  • Check for "uid" permission in node:process.geteuid() instead of "geteuid".
  • Add missing "homedir" to SysPermissionDescriptor.kind union

@CLAassistant
Copy link

CLAassistant commented Jun 18, 2024

CLA assistant check
All committers have signed the CLA.

@adamgreg
Copy link
Contributor Author

Hi @bartlomieju I'm not sure why that test fails - it passes locally, and doesn't seem to relate to "sys" permissions. Can you recommend anything I should do please? It's my first time trying to contribute to the Rust codebase.

ext/node/ops/os/mod.rs Outdated Show resolved Hide resolved
* Support "statfs", "username", "getPriority" and "setPriority".
* Check username permission in node:os.userInfo() instead of unknown "userInfo" permission.
* Check for "uid" permission in node:process.geteuid() instead of "geteuid".
* Add missing "homedir" to SysPermissionDescriptor.kind union
@adamgreg adamgreg requested a review from bartlomieju July 1, 2024 11:16
@bartlomieju bartlomieju added this to the 1.45 milestone Jul 1, 2024
@adamgreg
Copy link
Contributor Author

adamgreg commented Jul 6, 2024

Hi, is there still a problem with this, or could it be merged?

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@bartlomieju bartlomieju merged commit 82f9216 into denoland:main Jul 10, 2024
17 checks passed
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.

Missing sys permission kinds for node ops
3 participants