aboutsummaryrefslogtreecommitdiffstats
path: root/main/ca-certificates/update-ca.c
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2016-01-14 10:59:29 +0100
committerNatanael <ncopa@alpinelinux.org>2016-01-14 13:57:46 +0000
commit5d47601458052a7869624876704ad2ca875b7c01 (patch)
treeeae0f9b5169b2a20ba21de288d1e09b10f4b3619 /main/ca-certificates/update-ca.c
parent2ae074a53e9c8c9725d9c3368185519ed2cda95e (diff)
downloadaports-5d47601458052a7869624876704ad2ca875b7c01.tar.gz
aports-5d47601458052a7869624876704ad2ca875b7c01.tar.bz2
aports-5d47601458052a7869624876704ad2ca875b7c01.tar.xz
main/ca-certificates: run c_rehash as a hook from update.d
instead of running c_rehash directly we run it as a hook from update.d. We also: - update the man-page to be more correct. - remove obsolete lua script (cherry picked from commit febc87f0569a6cc0e688991108c60a1c7d88f81e)
Diffstat (limited to 'main/ca-certificates/update-ca.c')
-rw-r--r--main/ca-certificates/update-ca.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/main/ca-certificates/update-ca.c b/main/ca-certificates/update-ca.c
index f13da69fb2..bcdd4270f8 100644
--- a/main/ca-certificates/update-ca.c
+++ b/main/ca-certificates/update-ca.c
@@ -15,6 +15,7 @@
#define CERTSDIR "/usr/share/ca-certificates/"
#define LOCALCERTSDIR "/usr/local/share/ca-certificates/"
#define ETCCERTSDIR "/etc/ssl/certs/"
+#define RUNPARTSDIR "/etc/ca-certificates/update.d/"
#define CERTBUNDLE "ca-certificates.crt"
#define CERTSCONF "/etc/ca-certificates.conf"
@@ -316,13 +317,9 @@ int main(int a, char **v)
free(tmpfile);
- /* Execute c_rehash */
- int nullfd = open("/dev/null", O_WRONLY);
- if (nullfd == -1)
- return 1;
- dup2(nullfd, STDOUT_FILENO);
- char* c_rehash_args[] = { "/usr/bin/c_rehash", ETCCERTSDIR, 0 };
- execve(c_rehash_args[0], c_rehash_args, NULL);
+ /* Execute run-parts */
+ char* run_parts_args[] = { "run-parts", RUNPARTSDIR, 0 };
+ execvpe(run_parts_args[0], run_parts_args, NULL);
return 0;
}