-
Notifications
You must be signed in to change notification settings - Fork 115
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
Drop external deps #2 (Review) #226
Conversation
Drop external software dependencies and need for root access
…irectory: '/dev/net/tun'
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.
notes to self (and Derrick):
management.py 151, openpyn.py 538 885 939 989: we can't have f"" strings if we want python 3.5 compatibility.
so we don't need execute permissions for shell scripts? hmm
openpyn.py: 528, test systemd check is good in different cases.
revisit 836
851 (should it be < 3)
systemd.py 48 do we need to add --user here as well?
Completely overlooked this, initial pull request by ranisalt included them, f"" strings were new to me and I was like, cool, let use them :) Will this be a major issue for users on Python 3.5? |
Yeah the f"" strings error out on python<3.6 . we have gone through the pain of keeping it compatible with 3.5 . shouldn't break that now :) |
If you want, I can make another commit, to use str.format() alternative to f"" strings |
That would be great, if you could!
--
Securely sent with Tutanota. Get your own encrypted, ad-free mailbox:
https://tutanota.com
|
I'll try to incorporate these changes before the end of the month! |
… not skip if "--nvram", routerOS clears config files on every boot!
@jotyGill, all changes have been made finally, a month later :) I also ran the tests this time, and added one new test as well! |
@1951FDG Thanks for putting all that work into it. Really appreciate it! :) |
@ranisalt @1951FDG I am trying to keep the configs in ~/.local/share but have the global systemd.service file (run by root, as before). This introduces another issue (not really issue but waste of space) of 2 config locations, one for regular user one for root. Is there any other way of resolving this? I guess passing "_xdg_data_home" variable point to the locatoin of regular user to the openpyn.service file could do. (reliably determining the logged in user across multiple environments, distros/docker could be another thing. i know os.getlogin() is not always reliable) When you install it using "python3 -m pip install --user" it won't be in root's path. would need a symbolic link like Then for different OS's the global location for python3 bins could be different. the older version might be in All of these, I am now questioning is it really worth it. |
We can have a minimal shell script with suid bit, as does profile-sync-daemon to mount filesystems non-root.
Maybe deny running as root? This also makes the entire script safer. |
Interesting! but looks like it may not be possible run shell scripts that way anymore? even if we manage to run openvpn using a shell script (as root using suid) and pass the openvpn arguments to it. We need root access to run all of iptables commands. |
For one, there's openvpn-unroot as a script to help. I don't know about managing iptables, though. Probably won't be able to drop sudo as external dependency, but avoiding it as much as possible helps. |
No description provided.