summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2020-09-15 00:49:38 +0200
committerkali kaneko (leap communications) <kali@leap.se>2020-09-25 13:08:23 +0200
commitf5e3655bfd66d19b37f1359fa91f841b687e339d (patch)
treeddb2e83fa5345a492e109f53d6a96ce5604050b0 /pkg
parentc51106f43197abf294e756689483967d2426903d (diff)
[bug] fix variable in template
- add some extra debug info for troubleshooting start errors - fix vendors labels
Diffstat (limited to 'pkg')
-rw-r--r--pkg/vpn/launcher_linux.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/vpn/launcher_linux.go b/pkg/vpn/launcher_linux.go
index 3a29789..ba505b8 100644
--- a/pkg/vpn/launcher_linux.go
+++ b/pkg/vpn/launcher_linux.go
@@ -40,6 +40,7 @@ var (
var bitmaskRootPaths = []string{
"/usr/sbin/bitmask-root",
"/usr/local/sbin/bitmask-root",
+ snapBitmaskRootPath,
}
type launcher struct {
@@ -59,27 +60,33 @@ func (l *launcher) close() error {
func (l *launcher) check() (helpers bool, privilege bool, err error) {
hasHelpers, err := hasHelpers()
if err != nil {
+ log.Println("Error checking helpers")
return
}
if !hasHelpers {
+ log.Println("Could not find helpers")
return false, true, nil
}
isRunning, err := isPolkitRunning()
if err != nil {
+ log.Println("Error checking if polkit is running")
return
}
if !isRunning {
polkitPath := getPolkitPath()
if polkitPath == "" {
+ log.Println("Cannot find any usable polkit")
return true, false, nil
}
cmd := exec.Command("setsid", polkitPath)
err = cmd.Start()
if err != nil {
+ log.Println("Cannot launch polkit")
return
}
+ log.Println("Checking if polkit is running after attempted launch")
isRunning, err = isPolkitRunning()
return true, isRunning, err
}