summaryrefslogtreecommitdiff
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
parentc51106f43197abf294e756689483967d2426903d (diff)
[bug] fix variable in template
- add some extra debug info for troubleshooting start errors - fix vendors labels
-rw-r--r--branding/config/vendor.conf2
-rw-r--r--branding/templates/snap/snapcraft-template.yaml2
-rw-r--r--gui/providers/providers.json8
-rw-r--r--pkg/vpn/launcher_linux.go7
4 files changed, 13 insertions, 6 deletions
diff --git a/branding/config/vendor.conf b/branding/config/vendor.conf
index 472ee26..d142852 100644
--- a/branding/config/vendor.conf
+++ b/branding/config/vendor.conf
@@ -50,7 +50,7 @@ donateURL =
name = demolib
applicationName = DemoLibVPN
-binaryName = demolibvpn
+binaryName = demolib-vpn
auth = sip
authEmptyPass = true
diff --git a/branding/templates/snap/snapcraft-template.yaml b/branding/templates/snap/snapcraft-template.yaml
index f8e8435..45d7bd5 100644
--- a/branding/templates/snap/snapcraft-template.yaml
+++ b/branding/templates/snap/snapcraft-template.yaml
@@ -38,7 +38,7 @@ parts:
mkdir -p $SNAPCRAFT_PART_INSTALL/snap/
mkdir -p $SNAPCRAFT_PRIME/snap/
echo ${version} > $SNAPCRAFT_PRIME/snap/version.txt
- QT_SELECT=5 XBUILD=no TARGET={binaryName} ./build.sh
+ QT_SELECT=5 XBUILD=no TARGET=${binaryName} ./build.sh
mkdir -p $SNAPCRAFT_PART_INSTALL/bin
mv qtbuild/release/${binaryName} $SNAPCRAFT_PART_INSTALL/bin/
override-prime: |
diff --git a/gui/providers/providers.json b/gui/providers/providers.json
index 8cbfbc0..30d39b0 100644
--- a/gui/providers/providers.json
+++ b/gui/providers/providers.json
@@ -3,8 +3,8 @@
"providers": [
{
"name": "demolib",
- "applicationName": "DemoLib",
- "binaryName": "demo-lib",
+ "applicationName": "DemoLibVPN",
+ "binaryName": "demolib-vpn",
"auth": "sip",
"authEmptyPass": "true",
"providerURL": "vpnlib.bitmask.net",
@@ -15,7 +15,7 @@
"apiURL": "https://api.vpnlib.bitmask.net:4430/",
"geolocationAPI": "https://getmyip.vpnlib.bitmask.net/json",
"caCertString": "-----BEGIN CERTIFICATE-----\nMIIBQzCB6aADAgECAgEBMAoGCCqGSM49BAMCMBcxFTATBgNVBAMTDExFQVAgUm9v\ndCBDQTAeFw0yMDA4MDYxOTA3NDRaFw0yNTA4MDYxOTEyNDRaMBcxFTATBgNVBAMT\nDExFQVAgUm9vdCBDQTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABIG5POr4cAdK\nkTavKpSJr8nW1V7HLpr27qKaShpk1TUy5ipaAlusmavGLxKsPE+i3AMlvf/f6ch3\n1MjAtIf5rYujJjAkMA4GA1UdDwEB/wQEAwICpDASBgNVHRMBAf8ECDAGAQH/AgEB\nMAoGCCqGSM49BAMCA0kAMEYCIQDXj280LNZbSbi0Y2WvtQrJBUw4wdm8qAeOeuH7\n6XiLEwIhAPBRsmst/ujcChsG2t6LpG+p8s4rfIfh8YLo/4qrcc5p\n-----END CERTIFICATE-----",
- "timeStamp": "2020-09-08 03:42:39"
+ "timeStamp": "2020-09-25 13:05:47"
}
]
-}
+} \ No newline at end of file
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
}