diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2016-01-14 15:01:22 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2016-01-14 15:11:10 +0000 |
commit | c2b94cc3813c31bbba0f1da42b402cbe024c5fae (patch) | |
tree | 8baf5668fdcff84157f3d2b45ffa65e4e886ce48 /main/ca-certificates/update-ca.c | |
parent | 94969c8a556eedeeafb78a33752ab6b6e6f7f892 (diff) | |
download | aports-c2b94cc3813c31bbba0f1da42b402cbe024c5fae.tar.bz2 aports-c2b94cc3813c31bbba0f1da42b402cbe024c5fae.tar.xz |
main/ca-certificates: improve run-parts execution
Do not depend on PATH for run-parts, instead we try /usr/bin/run-parts
and /bin/run-parts directly. Exit with error if it fails.
Diffstat (limited to 'main/ca-certificates/update-ca.c')
-rw-r--r-- | main/ca-certificates/update-ca.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/main/ca-certificates/update-ca.c b/main/ca-certificates/update-ca.c index bcdd4270f8..20af994c38 100644 --- a/main/ca-certificates/update-ca.c +++ b/main/ca-certificates/update-ca.c @@ -318,8 +318,10 @@ int main(int a, char **v) free(tmpfile); /* Execute run-parts */ - char* run_parts_args[] = { "run-parts", RUNPARTSDIR, 0 }; - execvpe(run_parts_args[0], run_parts_args, NULL); + static const char *run_parts_args[] = { "run-parts", RUNPARTSDIR, 0 }; + execve("/usr/bin/run-parts", run_parts_args, NULL); + execve("/bin/run-parts", run_parts_args, NULL); + perror("run-parts"); - return 0; + return 1; } |