summaryrefslogtreecommitdiff
path: root/pkg/launcher/bitmask-launcher.c
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2016-04-25 21:32:54 -0400
committerKali Kaneko <kali@leap.se>2016-04-25 21:32:54 -0400
commit434d0534661d7c222e5dabc4e5e237b060d2212b (patch)
tree2e7bf0e556f983bd5404481a9aa4fb0fd7d75778 /pkg/launcher/bitmask-launcher.c
parent9ee728108f3b894d097206cc6ff6d0a70808f2d5 (diff)
parentf47416804ad2f88ba27aa032e0d2fc1c9fd314c8 (diff)
Merge branch 'develop' into debian/experimental
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 00000000..cf5c2a18
--- /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);
+}