diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-06-03 23:38:20 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-06-03 23:38:20 +0000 |
commit | cb0324c400189bbbd79c2cd40eee1c9c77121765 (patch) | |
tree | b3a07c948650d2f14db559c3ab203a60b32b01cd /src/tools/tor-gencert.c | |
parent | 6d447e04a23bdcb368151edd08393e6a028277b9 (diff) | |
download | tor-cb0324c400189bbbd79c2cd40eee1c9c77121765.tar.gz tor-cb0324c400189bbbd79c2cd40eee1c9c77121765.zip |
r13191@catbus: nickm | 2007-06-03 19:38:18 -0400
Set umask(0700) when starting tor-gencert; resolves bug 445.
svn:r10475
Diffstat (limited to 'src/tools/tor-gencert.c')
-rw-r--r-- | src/tools/tor-gencert.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tools/tor-gencert.c b/src/tools/tor-gencert.c index fadefc13dd..e4bc01df73 100644 --- a/src/tools/tor-gencert.c +++ b/src/tools/tor-gencert.c @@ -7,6 +7,9 @@ #include <stdio.h> #include <string.h> +#include <sys/types.h> +#include <sys/stat.h> + #include <openssl/evp.h> #include <openssl/pem.h> #include <openssl/objects.h> @@ -354,6 +357,9 @@ main(int argc, char **argv) fprintf(stderr, "Couldn't seed RNG.\n"); goto done; } + /* Make sure that files are made private. */ + umask(0700); + if (parse_commandline(argc, argv)) goto done; if (load_identity_key()) |