~ubuntu-branches/ubuntu/trusty/bash/trusty-security

« back to all changes in this revision

Viewing changes to tests/exec7.sub

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-03-03 22:52:05 UTC
  • mfrom: (1.3.5) (2.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20140303225205-87ltrt5kspeq0g1b
Tags: 4.3-1ubuntu1
* Merge with Debian; remaining changes:
  - skel.bashrc:
    - Run lesspipe.
    - Enable ls aliases.
    - Set options in ll alias to -alF.
    - Define an alert alias.
    - Enabled colored grep aliases.
  - etc.bash.bashrc:
    - Add sudo hint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# make sure that bash really checks the right things when deciding what
 
2
# constitutes an executable file
 
3
 
 
4
[ $UID -eq 0 ] && { echo "exec7.sub: the test suite should not be run as root" >&2 ; }
 
5
 
 
6
: ${TMPDIR:=/tmp}
 
7
 
 
8
cd $TMPDIR || { echo "cannot cd to $TMPDIR" >&2 ; exit 2; }
 
9
 
 
10
mkdir testa testb
 
11
 
 
12
echo 'echo "testa"' > testa/foo
 
13
echo 'echo "testb"' > testb/foo
 
14
 
 
15
chmod 655 testa/foo
 
16
chmod 755 testb/foo
 
17
 
 
18
PATH=$TMPDIR/testa:$TMPDIR/testb $THIS_SH -c foo
 
19
 
 
20
rm -rf testa testb