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

« back to all changes in this revision

Viewing changes to tests/regression/apparmor/clone.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
#       Copyright (C) 2002-2005 Novell/SUSE
 
3
#
 
4
#       This program is free software; you can redistribute it and/or
 
5
#       modify it under the terms of the GNU General Public License as
 
6
#       published by the Free Software Foundation, version 2 of the
 
7
#       License.
 
8
 
 
9
#=NAME clone
 
10
#=DESCRIPTION
 
11
# Verifies that clone is allowed under AppArmor, but that CLONE_NEWNS is
 
12
# restriced.
 
13
#=END
 
14
 
 
15
pwd=`dirname $0`
 
16
pwd=`cd $pwd ; /bin/pwd`
 
17
 
 
18
bin=$pwd
 
19
 
 
20
. $bin/prologue.inc
 
21
 
 
22
# TEST1 unconfined
 
23
 
 
24
runchecktest "CLONE/unconfined" pass
 
25
 
 
26
# TEST2. confined
 
27
 
 
28
genprofile
 
29
runchecktest "CLONE/confined" pass
 
30
 
 
31
# TEST3. confined + CLONE_NEWNS
 
32
 
 
33
genprofile
 
34
runchecktest "CLONE/confined/NEWNS" fail --newns
 
35
 
 
36
# TEST4. confined + CLONE_NEWNS + cap_sys_admin
 
37
 
 
38
genprofile cap:sys_admin
 
39
runchecktest "CLONE/confined/NEWNS" pass --newns