~apparmor-dev/apparmor/master

« back to all changes in this revision

Viewing changes to tests/regression/apparmor/chdir.sh

  • Committer: Steve Beattie
  • Date: 2019-02-19 09:38:13 UTC
  • Revision ID: sbeattie@ubuntu.com-20190219093813-ud526ee6hwn8nljz
The AppArmor project has been converted to git and is now hosted on
gitlab.

To get the converted repository, please do
  git clone https://gitlab.com/apparmor/apparmor

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 chdir
30
 
runchecktest "CHDIR" pass $dir
31
 
 
32
 
# null profile, verify chdir (x) functions
33
 
genprofile
34
 
runchecktest "CHDIR" pass $dir