From e0d248215257eca2d081f180bf356b482ff96883 Mon Sep 17 00:00:00 2001 From: Frank Benkstein Date: Wed, 28 Nov 2007 00:43:36 +0100 Subject: [PATCH] src/script.c: remove executable check with access(2) This was only necessarry when get_dependency had no error detection. --- src/script.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/script.c b/src/script.c index e4219a2..ad7c4ec 100644 --- a/src/script.c +++ b/src/script.c @@ -95,15 +95,8 @@ bool init_script(struct plugin *p) return false; } - /* Test for access. This must be done manually because vlock most likely - * runs as a setuid executable and would otherwise override restrictions. - * - * Also there is currently no error detection in case exec() fails later. - */ - if (access(context->path, X_OK) < 0) - goto error; - - /* Get the dependency information. */ + /* Get the dependency information. Whether the script is executable or not + * is also detected here. */ for (size_t i = 0; i < nr_dependencies; i++) if (!get_dependency(context->path, dependency_names[i], p->dependencies[i])) goto error; -- 2.11.4.GIT