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:
@@ -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
38
tests/hook-tls.t
Normal 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`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user