Skip to content

Conversation

@jackyalbo
Copy link
Contributor

@jackyalbo jackyalbo commented Nov 12, 2025

Describe the Problem

As a new check for allowed running users will be in scale CLIs, we will remove the check from our side

Explain the Changes

  1. won't check for root

Issues: Fixed #xxx / Gap #xxx

  1. Part of the efforts needed in https://issues.redhat.com/browse/RHSTOR-6713

Testing Instructions:

  1. try and run manage_nsfs with out using sudo - see it doesn't fail
  • Doc added/updated
  • Tests added

Summary by CodeRabbit

  • Refactor
    • Removed the root-permission requirement, allowing the application to execute with any user privilege level.

@coderabbitai
Copy link

coderabbitai bot commented Nov 12, 2025

Walkthrough

Removed the root-permission guard in manage_nsfs.js main function. Previously, the code threw an error if the process was not running with root privileges (uid/gid not zero). The new version no longer enforces this requirement and continues execution regardless of user permissions.

Changes

Cohort / File(s) Change Summary
Permission check removal
src/cmd/manage_nsfs.js
Removed the root-permission guard that previously threw an error if the process was not running as root (uid/gid === 0). Execution now proceeds without enforcing root privileges.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Security consideration: Verify that removing the root-permission check does not introduce security vulnerabilities or cause operational issues, as the command may now be executable by non-root users.
  • Impact verification: Ensure dependent code paths handle execution with non-root permissions correctly and that no privileged operations are performed without proper safeguards.

Suggested reviewers

  • liranmauda

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing the root permission check from manage_nsfs, which is the primary modification in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ed6b491 and b2750c4.

📒 Files selected for processing (1)
  • src/cmd/manage_nsfs.js (0 hunks)
💤 Files with no reviewable changes (1)
  • src/cmd/manage_nsfs.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build Noobaa Image
  • GitHub Check: run-jest-unit-tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Check of allowed running users will be in scale CLIs

Signed-off-by: jackyalbo <jacky.albo@gmail.com>
@jackyalbo jackyalbo merged commit a293513 into noobaa:master Nov 13, 2025
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants