summaryrefslogtreecommitdiff
path: root/pkg/launcher/bitmask-launcher.c
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2016-09-27 14:54:12 -0400
committerKali Kaneko (leap communications) <kali@leap.se>2016-09-27 16:19:26 -0400
commit0f34a5b42fb6dbbcefcc166a4ad71e8502960cdc (patch)
tree042e57844f1f52432b27b224ae1d67e0c153bf5d /pkg/launcher/bitmask-launcher.c
parent40debc7182d9a20cc2a1ec2b6a162a065a3183c0 (diff)
[pkg] re-add binary launcher to bundle process
Diffstat (limited to 'pkg/launcher/bitmask-launcher.c')
-rw-r--r--pkg/launcher/bitmask-launcher.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/pkg/launcher/bitmask-launcher.c b/pkg/launcher/bitmask-launcher.c
new file mode 100644
index 0000000..cf5c2a1
--- /dev/null
+++ b/pkg/launcher/bitmask-launcher.c
@@ -0,0 +1,23 @@
+/*
+ * bitmask-launcher.c
+ *
+ * part of the bitmask bundle.
+ * execute main entrypoint in a child folder inside the bundle.
+ *
+ * (c) LEAP Encryption Access Project, 2016.
+ * License: GPL.
+ *
+*/
+
+#include <unistd.h>
+#include <stdlib.h>
+
+char* const bitmask_path = "lib";
+char* const entrypoint = "bitmask";
+
+int main(int argc, char *argv[])
+{
+ argv[0] = entrypoint;
+ chdir(bitmask_path);
+ execv(entrypoint, argv);
+}