[apparmor] [PATCH] additional kernel regression test cleanups
Kees Cook
kees at ubuntu.com
Mon Jul 26 07:37:35 BST 2010
Fixes several warnings, typos, clarifies a subtest description and starts
to try to get rid of programmatic use of $Id$.
=== modified file 'tests/regression/apparmor/changehat_misc.sh'
--- tests/regression/apparmor/changehat_misc.sh 2006-05-19 17:32:14 +0000
+++ tests/regression/apparmor/changehat_misc.sh 2010-07-24 16:06:07 +0000
@@ -64,7 +64,7 @@
echo "*** A 'Killed' message from bash is expected for the following test"
runchecktest "CHANGEHAT (subprofile->subprofile w/ bad magic)" signal9 $subtest $subtest2 badmagic $file
-# 1. ATTEMPT TO CHANGEGAT TO AN INVALUD PROFILE, SHOULD PUT US INTO A NULL
+# 1. ATTEMPT TO CHANGEHAT TO AN INVALID PROFILE, SHOULD PUT US INTO A NULL
# PROFILE
# 2. ATTEMPT TO CHANGEHAT OUT WITH BAD TOKEN
settest changehat_fail
=== modified file 'tests/regression/apparmor/mkprofile.pl'
--- tests/regression/apparmor/mkprofile.pl 2009-11-11 18:44:26 +0000
+++ tests/regression/apparmor/mkprofile.pl 2010-07-24 16:06:07 +0000
@@ -5,7 +5,7 @@
#
# Gawd, I hate writing perl. It shows, too.
#
-my $__VERSION__='$Id$';
+my $__VERSION__=$0;
use strict;
use Getopt::Long;
=== modified file 'tests/regression/apparmor/pwrite.sh'
--- tests/regression/apparmor/pwrite.sh 2007-12-23 00:58:47 +0000
+++ tests/regression/apparmor/pwrite.sh 2010-07-24 16:06:07 +0000
@@ -27,7 +27,7 @@
genprofile $file:$okperm
-runtestbg "PWRITE with w" pass $file
+runtestbg "PREAD/PWRITE with rw" pass $file
sleep 2
=== modified file 'tests/regression/apparmor/swap.sh'
--- tests/regression/apparmor/swap.sh 2006-05-19 17:32:14 +0000
+++ tests/regression/apparmor/swap.sh 2010-07-24 16:06:07 +0000
@@ -32,7 +32,7 @@
swap_file=$tmpdir/swapfile
dd if=/dev/zero of=${swap_file} bs=1024 count=512 2> /dev/null
-/sbin/mkswap ${swap_file} > /dev/null
+/sbin/mkswap -f ${swap_file} > /dev/null
# TEST 1. Make sure can enable and disable swap unconfined
=== modified file 'tests/regression/apparmor/syscall.sh'
--- tests/regression/apparmor/syscall.sh 2007-12-23 01:02:50 +0000
+++ tests/regression/apparmor/syscall.sh 2010-07-24 16:06:07 +0000
@@ -1,7 +1,7 @@
#! /bin/bash
-# $Id$
-
+#
# Copyright (C) 2002-2005 Novell/SUSE
+# Copyright (C) 2010 Canonical, Ltd.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
@@ -114,9 +114,9 @@
runchecktest "MKNOD sock (permissions)" fail s $mknod_file
##
-## D. SETHOSTNAME
+## C. SYSCTL
##
-sh syscall_sysctl.sh
+bash syscall_sysctl.sh
##
## D. SETHOSTNAME
=== modified file 'tests/regression/apparmor/unix_fd_server.c'
--- tests/regression/apparmor/unix_fd_server.c 2006-05-19 17:32:14 +0000
+++ tests/regression/apparmor/unix_fd_server.c 2010-07-24 16:06:07 +0000
@@ -2,6 +2,7 @@
/*
* Copyright (C) 2002-2005 Novell/SUSE
+ * Copyright (C) 2010 Canonical, Ltd.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -134,6 +135,7 @@
}
/* Check for info re: reading the file */
+ memset(inbound_buffer, 0, sizeof(inbound_buffer));
if (recv(in_sock, inbound_buffer, 16,0) == -1 ) {
fprintf(stderr, "FAIL - recv %s\n",
strerror(errno));
--
Kees Cook
Ubuntu Security Team
More information about the AppArmor
mailing list