Skip to content
Snippets Groups Projects
Unverified Commit 15fd1551 authored by meskio's avatar meskio :tent:
Browse files

[osx] don't drop privieleges

The script client.down.sh needs to be run as root. As long as we don't
implement another way to execute it from the helper let's not drop
privileges on OSX.

- Resolves: #23
parent 6b6b58e2
No related branches found
No related tags found
No related merge requests found
...@@ -9,8 +9,6 @@ import ( ...@@ -9,8 +9,6 @@ import (
) )
const ( const (
openvpnUser = "nobody"
openvpnGroup = "nobody"
nameserver = "10.42.0.1" nameserver = "10.42.0.1"
) )
...@@ -22,8 +20,6 @@ var ( ...@@ -22,8 +20,6 @@ var (
"--tls-client", "--tls-client",
"--remote-cert-tls", "server", "--remote-cert-tls", "server",
"--dhcp-option", "DNS", nameserver, "--dhcp-option", "DNS", nameserver,
"--user", openvpnUser,
"--group", openvpnGroup,
"--log", logFolder + "openvpn.log", "--log", logFolder + "openvpn.log",
} }
......
...@@ -85,8 +85,6 @@ func getOpenvpnPath() string { ...@@ -85,8 +85,6 @@ func getOpenvpnPath() string {
return openvpnPath return openvpnPath
} }
// TODO -- pass extra args to start_openvpn with --up and --down scripts
func kill(cmd *exec.Cmd) error { func kill(cmd *exec.Cmd) error {
return cmd.Process.Signal(os.Interrupt) return cmd.Process.Signal(os.Interrupt)
} }
......
...@@ -23,6 +23,8 @@ import ( ...@@ -23,6 +23,8 @@ import (
) )
const ( const (
openvpnUser = "nobody"
openvpnGroup = "nogroup"
logFolder = "/var/log/" logFolder = "/var/log/"
systemOpenvpnPath = "/usr/sbin/openvpn" systemOpenvpnPath = "/usr/sbin/openvpn"
snapOpenvpnPath = "/snap/bin/riseup-vpn.openvpn" snapOpenvpnPath = "/snap/bin/riseup-vpn.openvpn"
...@@ -31,6 +33,8 @@ const ( ...@@ -31,6 +33,8 @@ const (
var ( var (
platformOpenvpnFlags = []string{ platformOpenvpnFlags = []string{
"--script-security", "1", "--script-security", "1",
"--user", openvpnUser,
"--group", openvpnGroup,
} }
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment