summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pkg/launcher/Makefile4
-rw-r--r--pkg/launcher/bitmask-launcher.c11
-rw-r--r--src/leap/bitmask/gui/anonvpn.py8
3 files changed, 7 insertions, 16 deletions
diff --git a/pkg/launcher/Makefile b/pkg/launcher/Makefile
index 8948e6b4..2114ec99 100644
--- a/pkg/launcher/Makefile
+++ b/pkg/launcher/Makefile
@@ -1,5 +1,5 @@
CC = gcc
-CFLAGS = -g -Wall -fPIE
+CFLAGS = -g -Wall -no-pie -fstack-protector-strong
STRIP = strip
default: bitmask
@@ -8,7 +8,7 @@ bitmask.o: bitmask-launcher.c
$(CC) $(CFLAGS) -c bitmask-launcher.c -o bitmask.o
bitmask: bitmask.o
- $(CC) bitmask.o -o bitmask
+ $(CC) $(CFLAGS) bitmask.o -o bitmask
$(STRIP) bitmask
clean:
-rm -f bitmask.o
diff --git a/pkg/launcher/bitmask-launcher.c b/pkg/launcher/bitmask-launcher.c
index b9bda1c2..09f5fe21 100644
--- a/pkg/launcher/bitmask-launcher.c
+++ b/pkg/launcher/bitmask-launcher.c
@@ -16,24 +16,23 @@
#include <stdio.h>
#include <string.h>
-#define MAXBUFFSIZE 1024
+#define MAXBUFSIZE 1024
char* const lib = "/lib";
-char* const entrypoint = "app";
+char* const entrypoint = "bitmask";
char* const linkname = "/proc/self/exe";
int main(int argc, char *argv[])
{
- char buf[MAXBUFFSIZE];
- char pth[MAXBUFFSIZE];
+ char buf[MAXBUFSIZE];
+ char pth[MAXBUFSIZE];
char *dirc, *dname;
- const size_t bufsize = MAXBUFFSIZE + 1;
argv[0] = entrypoint;
buf[0] = 0;
pth[0] = 0;
- readlink(linkname, buf, bufsize - 1);
+ readlink(linkname, buf, MAXBUFSIZE);
dirc = strdup(buf);
dname = dirname(dirc);
diff --git a/src/leap/bitmask/gui/anonvpn.py b/src/leap/bitmask/gui/anonvpn.py
index 5b3443d8..3c1d0458 100644
--- a/src/leap/bitmask/gui/anonvpn.py
+++ b/src/leap/bitmask/gui/anonvpn.py
@@ -40,14 +40,6 @@ from leap.common.config import get_path_prefix
bitmaskd = None
-def _handle_kill(*args, **kw):
- global bitmaskd
- bitmaskd.join()
- terminate(pid)
- cleanup()
- sys.exit()
-
-
def launch_gui():
from leap.bitmask.util import STANDALONE
if STANDALONE: