~ubuntu-branches/ubuntu/wily/apparmor/wily

« back to all changes in this revision

Viewing changes to tests/regression/subdomain/pipe.sh

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2011-04-27 10:38:07 UTC
  • mfrom: (5.1.118 natty)
  • Revision ID: james.westby@ubuntu.com-20110427103807-ym3rhwys6o84ith0
Tags: 2.6.1-2
debian/copyright: clarify for some full organization names.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/bash
2
 
# $Id: pipe.sh 61 2006-05-19 18:32:14Z steve-beattie $
3
 
 
4
 
#       Copyright (C) 2002-2005 Novell/SUSE
5
 
#
6
 
#       This program is free software; you can redistribute it and/or
7
 
#       modify it under the terms of the GNU General Public License as
8
 
#       published by the Free Software Foundation, version 2 of the
9
 
#       License.
10
 
 
11
 
#=NAME pipe
12
 
#=DESCRIPTION 
13
 
# This test is structured similarly to named_pipe except it uses the pipe(2) 
14
 
# syscall to create a communication channel between parent and child rather 
15
 
# than a node in the filesystem.   AppArmor does not mediate pipe io for either
16
 
# confined or non confined processes. This test verifies that io functions as 
17
 
# expected for both an unconfined process and a confined process with an empty 
18
 
# profile.
19
 
#=END
20
 
 
21
 
pwd=`dirname $0`
22
 
pwd=`cd $pwd ; /bin/pwd`
23
 
 
24
 
bin=$pwd
25
 
 
26
 
. $bin/prologue.inc
27
 
 
28
 
subtest=sub
29
 
 
30
 
# PIPE - no confinement 
31
 
 
32
 
runchecktest "PIPE (no confinement)" pass nochange
33
 
 
34
 
# PIPE - confined.
35
 
 
36
 
genprofile 
37
 
 
38
 
runchecktest "PIPE (confinement)" pass nochange
39
 
 
40
 
# PIPE - in a subprofile.
41
 
 
42
 
genprofile hat:$subtest
43
 
 
44
 
runchecktest "PIPE (subprofile)" pass ${subtest}