File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,20 @@ sub copy_files
4343 }
4444}
4545
46+ # Perform chmod on a set of files, taking into account wildcards
47+ sub chmod_files
48+ {
49+ my $mode = shift ;
50+ my $file_expr = shift ;
51+
52+ my @all_files = glob $file_expr ;
53+ foreach my $file_entry (@all_files )
54+ {
55+ chmod $mode , $file_entry
56+ or die " Could not run chmod with mode $mode on $file_entry " ;
57+ }
58+ }
59+
4660sub configure_test_server_for_ssl
4761{
4862 my $tempdir = $_ [0];
@@ -68,7 +82,7 @@ sub configure_test_server_for_ssl
6882# Copy all server certificates and keys, and client root cert, to the data dir
6983 copy_files(" ssl/server-*.crt" , " $tempdir /pgdata" );
7084 copy_files(" ssl/server-*.key" , " $tempdir /pgdata" );
71- system_or_bail " chmod 0600 ' $tempdir ' /pgdata/server-*.key" ;
85+ chmod_files( 0600, " $tempdir /pgdata/server-*.key" ) ;
7286 copy_files(" ssl/root+client_ca.crt" , " $tempdir /pgdata" );
7387 copy_files(" ssl/root+client.crl" , " $tempdir /pgdata" );
7488
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ sub test_connect_fails
7878# The client's private key must not be world-readable. Git doesn't track
7979# permissions (except for the executable bit), so they might be wrong after
8080# a checkout.
81- system_or_bail " chmod 0600 ssl/client.key" ;
81+ chmod 0600, " ssl/client.key" ;
8282
8383# ### Part 0. Set up the server.
8484
You can’t perform that action at this time.
0 commit comments