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

« back to all changes in this revision

Viewing changes to tests/regression/apparmor/fchdir.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 chdir
 
10
#=DESCRIPTION 
 
11
# Verify change directory functions correctly for a confined process. Subdomain
 
12
# should allow 'x' access on a directory without it being explicitly listed in 
 
13
# tasks profile.
 
14
#=END
 
15
 
 
16
pwd=`dirname $0`
 
17
pwd=`cd $pwd ; /bin/pwd`
 
18
 
 
19
bin=$pwd
 
20
 
 
21
. $bin/prologue.inc
 
22
 
 
23
dir=$tmpdir/tmpdir/
 
24
 
 
25
mkdir $dir
 
26
 
 
27
# CHDIR TEST
 
28
 
 
29
# no profile, verify we didn't break normal fchdir
 
30
runchecktest "FCHDIR/no profile" pass $dir
 
31
 
 
32
# null profile, verify fchdir (x) functions
 
33
genprofile $dir:r
 
34
runchecktest "FCHDIR/profile" pass $dir