1
0
mirror of synced 2026-02-21 06:15:04 +00:00

2006-03-08 20:08:28 by steve

Updated the TLS disabling script to remove the chmod 0.
  Added test case to ensure the script works.
This commit is contained in:
steve
2006-03-08 20:08:28 +00:00
parent 2e50d04a11
commit c96cbefbce
2 changed files with 39 additions and 2 deletions

View File

@@ -4,7 +4,7 @@
#
# Steve
# --
# $Id: 10-disable-tls,v 1.6 2006-03-08 20:01:58 steve Exp $
# $Id: 10-disable-tls,v 1.7 2006-03-08 20:08:28 steve Exp $
prefix=$1
@@ -16,4 +16,3 @@ mv ${prefix}/lib/tls ${prefix}/lib/tls.disabled
# it cannot be modified.
#
mkdir ${prefix}/lib/tls
chmod 0 ${prefix}/lib/tls

38
tests/hook-tls.t Normal file
View File

@@ -0,0 +1,38 @@
#!/usr/bin/perl -w
#
# Test that the tls-disabling hook works.
#
# Steve
# --
# $Id: hook-tls.t,v 1.1 2006-03-08 20:08:28 steve Exp $
#
use strict;
use Test::More qw( no_plan );
use File::Temp;
#
# Create a temporary directory.
#
my $dir = File::Temp::tempdir( CLEANUP => 1 );
mkdir( $dir . "/lib", 0777 );
mkdir( $dir . "/lib/tls", 0777 );
mkdir( $dir . "/lib/tls/foo", 0777 );
ok( -d $dir, "Temporary directory created OK" );
ok( -d $dir . "/lib/tls", "TLS directory OK" );
ok( -d $dir . "/lib/tls/foo", "TLS directory is non-empty" );
ok( -e "etc/hook.d/10-disable-tls", "TLS Disabling hook exists" );
ok( -x "etc/hook.d/10-disable-tls", "TLS Disabling hook is executable" );
#
# Call the hook
#
`etc/hook.d/10-disable-tls $dir`;