diff options
author | Timo Teräs <timo.teras@iki.fi> | 2015-10-16 16:43:10 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2015-10-16 16:43:10 +0300 |
commit | 41dd189f59da7ad463ccb31a402e1b7ac95a18bb (patch) | |
tree | d32a834b552eafce366070aa069ebdd2b4eda1e8 /main/ca-certificates/update-ca.c | |
parent | 9293ea17c3e01f06b92a2cb1e43f46c1c9a5e269 (diff) | |
download | aports-41dd189f59da7ad463ccb31a402e1b7ac95a18bb.tar.bz2 aports-41dd189f59da7ad463ccb31a402e1b7ac95a18bb.tar.xz |
main/ca-certificates: fix update-ca.c
- fix permissions for the .crt bundle
- fix exec of c_rehash
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 4a2f8fc0b..c58d16c83 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; |