-
Notifications
You must be signed in to change notification settings - Fork 90
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
opensnitch: Add at v1.6.7 #4783
base: main
Are you sure you want to change the base?
Conversation
c78cdb0
to
e231295
Compare
I did a quick ripgrep for /etc/opensnitchd and updated the locations. Hopefully that was all of them. |
Almost there. Just changing the locations isn't enough; we want users to be able to copy the default configs to |
Ah got it. I am not familiar with go but Ill give it a shot |
**Summary** - add python-qt-material a dependecy of opensnitch
Not my best work but I think it's done. /etc/rules is created when running opensnitch since these are user preferences. Not sure if the directory will be created each time though. |
Hm I should have clicked Comment instead of Request Changes. Oops. |
About the /etc/rules. I did not make sense to me that the rules directory should be in /usr/ because these will be created by the user and not Solus itself. |
An issue I just experienced is that the /etc/opensnitchd/rules is not being created |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I might see why.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! I had a few (admittedly minor) comments on the systemd and Go patches.
if args.socket == None: | ||
# default | ||
- args.socket = "unix:///tmp/osui.sock" | ||
+ args.socket = "unix:///run/user/1000/opensnitch/osui.sock" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think (haven't checked) this should use $XDG_RUNTIME_DIR
instead of hardcoding the UID.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not resolved correctly with the updated version (using os.environ.get
would be required), but (after playing with the PR result) I think it shouldn't be user-bound at all as this socket is something that the daemon (running as root) and the user use to communicate.
Instead, I think this should be the following:
args.socket = "unix:///run/opensnitch/osui.sock"
However, there are some other components needed to make this work:
- A systemd sysusers.d definition to create an
opensnitch
group (if you don't want to use an existing group likeadm
). - A systemd tmpfiles.d definition to create
/run/opensnitch
with mode0775
and groupopensnitch
(or an existing group).
The libvirt
package has both of these if you are looking for an example.
Lastly, users would need to add themselves to the group to use opensnitch (eg: sudo usermod -a -G opensnitch $USER
).
**Summary** - adds opensnitch a firewall inspired by Little Snitch
Hm, opensnitch isn' giving me a pop up to allow ssh. Let me test a bit further. |
Yeah, I think my |
So I added the changes and now the socket is not being created. I also am getting a weird issue where the ui is parsing the config file incorrectly. It is interpreting the quotes from default-config.json |
I see an extra quote but it is not creating the socket. |
Maybe the issue is |
I was able to get opensnitch to connect to the /run/opensnitch socket but I was not able to get a prompt for eopkg and ssh. I was able to get these without changing the socket |
Summary
Test Plan
Checklist
Resolves #289