Attribution for Vil Brekin and some code style cleanups.
This commit is contained in:
parent
f421a64077
commit
66e702d90d
2 changed files with 11 additions and 14 deletions
1
THANKS
1
THANKS
|
@ -44,6 +44,7 @@ We would like to thank the following people for their contributions to tinc:
|
||||||
* Teemu Kiviniemi
|
* Teemu Kiviniemi
|
||||||
* Timothy Redaelli
|
* Timothy Redaelli
|
||||||
* Tonnerre Lombard
|
* Tonnerre Lombard
|
||||||
|
* Vil Brekin
|
||||||
* Wessel Dankers
|
* Wessel Dankers
|
||||||
* Wouter van Heyst
|
* Wouter van Heyst
|
||||||
|
|
||||||
|
|
|
@ -358,7 +358,7 @@ bool execute_script(const char *name, char **envp) {
|
||||||
int status, len;
|
int status, len;
|
||||||
char *scriptname;
|
char *scriptname;
|
||||||
int i;
|
int i;
|
||||||
char *aInterpreter = NULL;
|
char *interpreter = NULL;
|
||||||
|
|
||||||
#ifndef HAVE_MINGW
|
#ifndef HAVE_MINGW
|
||||||
len = xasprintf(&scriptname, "\"%s/%s\"", confbase, name);
|
len = xasprintf(&scriptname, "\"%s/%s\"", confbase, name);
|
||||||
|
@ -379,19 +379,15 @@ bool execute_script(const char *name, char **envp) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Custom scripts interpreter
|
// Custom scripts interpreter
|
||||||
if(get_config_string(lookup_config(config_tree, "ScriptsInterpreter"), &aInterpreter))
|
if(get_config_string(lookup_config(config_tree, "ScriptsInterpreter"), &interpreter)) {
|
||||||
{
|
// Force custom scripts interpreter allowing execution of scripts on android without execution flag (such as on /sdcard)
|
||||||
// Force custom scripts interpreter allowing execution of scripts on android without execution flag (such as on /sdcard)
|
free(scriptname);
|
||||||
free(scriptname);
|
len = xasprintf(&scriptname, "%s \"%s/%s\"", interpreter, confbase, name);
|
||||||
len = xasprintf(&scriptname, "%s \"%s/%s\"", aInterpreter, confbase, name);
|
free(interpreter);
|
||||||
if(len < 0)
|
if(len < 0)
|
||||||
{
|
return false;
|
||||||
free(aInterpreter);
|
}
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
free(aInterpreter);
|
|
||||||
|
|
||||||
ifdebug(STATUS) logger(LOG_INFO, "Executing script %s", name);
|
ifdebug(STATUS) logger(LOG_INFO, "Executing script %s", name);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue