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

NSFS | set supplemental groups dynamically to users groups #8687

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nadavMiz
Copy link
Contributor

@nadavMiz nadavMiz commented Jan 14, 2025

Explain the changes

  1. get user supplemental dynamically by calling getgrouplist. getgrouplist will scan the system for all groups that the user is a part of. that way will be able to set the users groups without specifying them in the account configuration. if specified, supplemental groups set by the account configuration will take precedence, and be set as the users groups. also in case no record of the user can be found in the os and no supplemental groups were defined in the account the supplemental groups list will be set as empty
  2. some tests were using the uid 5, which is a system reserved uid, causing the feature to give them root group permissions. changed the uid and gid to ones not reserved by the OS

Issues: Fixed #xxx / Gap #xxx

Testing Instructions:

  1. sudo node ./node_modules/mocha/bin/mocha src/test/unit_tests/test_nsfs_access.js

GAPS

not implemented for mac - since all functions used are defined by posix it should be the same. but still require testing
also added helper testing functions for adding new group that require implementation for mac. should probably be done with sudo dscl . like adding new user, but again need to test this

  • Doc added/updated
  • Tests added

@nadavMiz nadavMiz force-pushed the dinamic_supplemental_groups branch 3 times, most recently from 9654fd5 to a36991b Compare January 14, 2025 16:43
@nadavMiz nadavMiz self-assigned this Jan 15, 2025
@nadavMiz nadavMiz force-pushed the dinamic_supplemental_groups branch from a36991b to b789a4e Compare January 15, 2025 10:48
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.

1 participant