aboutsummaryrefslogtreecommitdiffstats
path: root/main/ca-certificates/update-ca.c
diff options
context:
space:
mode:
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;
}