projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f1e0ec
)
Use access() instead of stat() for checking whether scripts exist.
author
Guus Sliepen
<guus@tinc-vpn.org>
Mon, 14 Sep 2009 22:36:07 +0000
(
00:36
+0200)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Mon, 14 Sep 2009 22:36:07 +0000
(
00:36
+0200)
src/process.c
patch
|
blob
|
history
diff --git
a/src/process.c
b/src/process.c
index
f03f12a
..
544c224
100644
(file)
--- a/
src/process.c
+++ b/
src/process.c
@@
-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;
@@
-383,7
+382,7
@@
bool execute_script(const char *name, char **envp)
#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;
}