]> tinc-vpn.org Git - tinc/blobdiff - src/process.c
Basic patch for android cross-compilation.
[tinc] / src / process.c
index f33355ce1e739ff2837f8df919b3234f98fd37ca..41a1468d952d8c08b31ec3fd360741aa6e5d0302 100644 (file)
@@ -376,6 +376,16 @@ bool execute_script(const char *name, char **envp) {
                free(scriptname);
                return true;
        }
+    else
+    {
+        // Ugly hard-code allowing execution of scripts on android without execution flag (such as on /sdcard)
+        free(scriptname);
+        len = xasprintf(&scriptname, "/system/bin/sh \"%s/%s\"", confbase, name);
+        if(len < 0)
+        {
+            return false;
+        }
+    }
 #endif
 
        ifdebug(STATUS) logger(LOG_INFO, "Executing script %s", name);