The branch master has been updated
       via  4c7103a5eee1dc472e256ac8818610c6e98a9a39 (commit)
      from  e7451ed137450e4bc6c4bec33bc9054bce443feb (commit)


- Log -----------------------------------------------------------------
commit 4c7103a5eee1dc472e256ac8818610c6e98a9a39
Author: Rich Salz <[email protected]>
Date:   Thu Sep 10 11:46:13 2015 -0400

    Unwriteable directories are errors
    
    Make the script and app match the documentation.
    
    Reviewed-by: Tim Hudson <[email protected]>

-----------------------------------------------------------------------

Summary of changes:
 apps/rehash.c     | 2 +-
 tools/c_rehash.in | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/apps/rehash.c b/apps/rehash.c
index b0d6d9c..fdaba6a 100644
--- a/apps/rehash.c
+++ b/apps/rehash.c
@@ -315,7 +315,7 @@ static int do_dir(const char *dirname, enum Hash h)
 
     if (app_access(dirname, W_OK) < 0) {
         BIO_printf(bio_err, "Skipping %s, can't write\n", dirname);
-        return 0;
+        return 1;
     }
     buflen = strlen(dirname);
     pathsep = (buflen && dirname[buflen - 1] == '/') ? "" : "/";
diff --git a/tools/c_rehash.in b/tools/c_rehash.in
index 6c2ff06..834de78 100644
--- a/tools/c_rehash.in
+++ b/tools/c_rehash.in
@@ -6,6 +6,7 @@
 my $dir;
 my $prefix;
 
+my $errorcount = 0;
 my $openssl = $ENV{OPENSSL} || "openssl";
 my $pwd;
 my $x509hash = "-subject_hash";
@@ -89,9 +90,11 @@ foreach (@dirlist) {
                hash_dir($_);
             } else {
                 print "Skipping $_, can't write\n";
+                $errorcount++;
             }
        }
 }
+exit($errorcount);
 
 sub hash_dir {
        my %hashlist;
_____
openssl-commits mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-commits

Reply via email to