Skip to content

ui: resolve usernames with getent for UID rules#1608

Open
tttjhgan wants to merge 1 commit into
evilsocket:masterfrom
tttjhgan:remote-uid-getent-fix
Open

ui: resolve usernames with getent for UID rules#1608
tttjhgan wants to merge 1 commit into
evilsocket:masterfrom
tttjhgan:remote-uid-getent-fix

Conversation

@tttjhgan
Copy link
Copy Markdown

Summary

  • Use getent passwd to populate local UID rule users instead of pwd.getpwall()
  • Resolve typed UID usernames through pwd.getpwnam, local getent, and remote non-interactive SSH getent
  • Prevent uidCombo from handling invalid indexes when users type custom text
  • Fix local node detection to compare IP addresses exactly instead of substring matching

Testing

  • python3 -m py_compile ui/opensnitch/dialogs/ruleseditor/dialog.py ui/opensnitch/nodes.py ui/tests/dialogs/test_ruleseditor.py ui/tests/ test_nodes.py
  • git diff --check

Note: targeted pytest collection could not run in this local environment because the Python grpc module is missing.

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.

1 participant