diff options
author | Rich Salz <rsalz@akamai.com> | 2015-09-07 22:21:38 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-09-08 15:13:57 -0400 |
commit | ff2f6bb0845ef859954f7c36b2b302c60088c4c7 (patch) | |
tree | 6dc6f52f62c066e6c310391ca9b628c14c58db25 /apps/rehash.c | |
parent | 8c82de991b73caa25f06a181d86550cfcf457858 (diff) |
Fix rehash/c_rehash doc and behavior.
Both now warn once if directory isn't writeable.
Both now warn on file-write errors (multiple times).
Update manpage to describe both program and script correctly.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'apps/rehash.c')
-rw-r--r-- | apps/rehash.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/rehash.c b/apps/rehash.c index 8417449235..b0d6d9cc13 100644 --- a/apps/rehash.c +++ b/apps/rehash.c @@ -313,6 +313,10 @@ static int do_dir(const char *dirname, enum Hash h) const char *filename; char *buf; + if (app_access(dirname, W_OK) < 0) { + BIO_printf(bio_err, "Skipping %s, can't write\n", dirname); + return 0; + } buflen = strlen(dirname); pathsep = (buflen && dirname[buflen - 1] == '/') ? "" : "/"; buflen += NAME_MAX + 2; |