提交 4c7103a5 编写于 作者: R Rich Salz 提交者: Rich Salz

Unwriteable directories are errors

Make the script and app match the documentation.
Reviewed-by: NTim Hudson <tjh@openssl.org>
上级 e7451ed1
...@@ -315,7 +315,7 @@ static int do_dir(const char *dirname, enum Hash h) ...@@ -315,7 +315,7 @@ static int do_dir(const char *dirname, enum Hash h)
if (app_access(dirname, W_OK) < 0) { if (app_access(dirname, W_OK) < 0) {
BIO_printf(bio_err, "Skipping %s, can't write\n", dirname); BIO_printf(bio_err, "Skipping %s, can't write\n", dirname);
return 0; return 1;
} }
buflen = strlen(dirname); buflen = strlen(dirname);
pathsep = (buflen && dirname[buflen - 1] == '/') ? "" : "/"; pathsep = (buflen && dirname[buflen - 1] == '/') ? "" : "/";
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
my $dir; my $dir;
my $prefix; my $prefix;
my $errorcount = 0;
my $openssl = $ENV{OPENSSL} || "openssl"; my $openssl = $ENV{OPENSSL} || "openssl";
my $pwd; my $pwd;
my $x509hash = "-subject_hash"; my $x509hash = "-subject_hash";
...@@ -89,9 +90,11 @@ foreach (@dirlist) { ...@@ -89,9 +90,11 @@ foreach (@dirlist) {
hash_dir($_); hash_dir($_);
} else { } else {
print "Skipping $_, can't write\n"; print "Skipping $_, can't write\n";
$errorcount++;
} }
} }
} }
exit($errorcount);
sub hash_dir { sub hash_dir {
my %hashlist; my %hashlist;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册