X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fprocess.c;h=2ca93008af942ac7fb3f769dc833004294c4de8c;hp=d07ce7db1acd608c2e75400e6f6126407c09ac54;hb=c23fcf555ee4b69f03b76a0ffb731c3a475a77e7;hpb=f52ea0a7eb0383cc2a5f41db1bf24c39424fdb04 diff --git a/src/process.c b/src/process.c index d07ce7db..2ca93008 100644 --- a/src/process.c +++ b/src/process.c @@ -1,7 +1,7 @@ /* process.c -- process management functions Copyright (C) 1999-2005 Ivo Timmermans, - 2000-2007 Guus Sliepen + 2000-2009 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -364,7 +364,6 @@ bool execute_script(const char *name, char **envp) { #ifdef HAVE_SYSTEM int status, len; - struct stat s; char *scriptname, *p; int i; @@ -380,12 +379,14 @@ bool execute_script(const char *name, char **envp) scriptname[len - 1] = '\0'; +#ifndef HAVE_TUNEMU /* First check if there is a script */ - if(stat(scriptname + 1, &s)) { + if(access(scriptname + 1, F_OK)) { free(scriptname); return true; } +#endif ifdebug(STATUS) logger(LOG_INFO, _("Executing script %s"), name);