diff options
Diffstat (limited to 'main/ca-certificates/update-ca.c')
-rw-r--r-- | main/ca-certificates/update-ca.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/ca-certificates/update-ca.c b/main/ca-certificates/update-ca.c index 4a2f8fc0bf..c58d16c838 100644 --- a/main/ca-certificates/update-ca.c +++ b/main/ca-certificates/update-ca.c @@ -283,6 +283,7 @@ int main(int a, char **v) printf("Failed to open temporary file %s for ca bundle\n", tmpfile); exit(0); } + fchmod(fd, 0644); /* Handle global CA certs from config file */ file_readline(CERTSCONF, calinks, fd); @@ -324,11 +325,10 @@ int main(int a, char **v) int nullfd = open("/dev/null", O_WRONLY); if (nullfd == -1) return 0; - if (dup2(nullfd, STDOUT_FILENO) == -1) return 0; - char* c_rehash_args[] = { "/usr/bin/c_rehash", ETCCERTSDIR, ">", "/dev/null", 0 }; + char* c_rehash_args[] = { "/usr/bin/c_rehash", ETCCERTSDIR, 0 }; execve(c_rehash_args[0], c_rehash_args, NULL); return 0; |