ProtonVPN / protonvpn-cli

Legacy protonvpn-cli: ProtonVPN Command-Line Tool for Linux and macOS. This has been superseded by https://github.com/ProtonVPN/protonvpn-cli-ng
Other
607 stars 98 forks source link

Added "--status" to unprivileged options #178

Closed roguepullrequest closed 5 years ago

roguepullrequest commented 5 years ago

Felt that --status -status status shouldn't need root privileges to run. There is nothing in the commands that root access is needed. Privacy isn't a concern here as this is info available on the system.

kaplun commented 5 years ago

Hi @roguepullrequest,

I am taking over from @mazen160 for integrating code. This PR looks good to me. Thanks for the contribution!

Tamaranch commented 5 years ago

This PR introduces a regression: we need root privileges to read "$(get_protonvpn_cli_home)/.connection_config_id" at line 701. Edit: More precisely, we need root privileges to access this file, because of chmod -R 0400 "$(get_protonvpn_cli_home)/" at line 226