File: test-bbbbbbbb.sh

package info (click to toggle)
proot 5.4.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,012 kB
  • sloc: ansic: 18,627; sh: 1,662; python: 108; asm: 41; makefile: 16; awk: 6
file content (24 lines) | stat: -rw-r--r-- 584 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
if [ -z `which mcookie` ] || [ -z `which rm` ] || [ -z `which ln` ]; then
    exit 125;
fi

DONT_EXIST=$(mcookie)
TMP1=$(mcookie)
TMP2=$(mcookie)

rm -f /tmp/${DONT_EXIST}
${PROOT} ln -sf /${DONT_EXIST} /tmp/
${PROOT} ln -sf /${DONT_EXIST} /tmp/

rm -f /tmp/${DONT_EXIST}
  ${PROOT} ln -sf /etc/fstab/${DONT_EXIST} /tmp/
! ${PROOT} ln -sf /etc/fstab/${DONT_EXIST} /tmp/

rm -f /tmp/${DONT_EXIST}
rm -f /tmp/${TMP1} /tmp/${TMP2}
touch /tmp/${TMP2}
ln -sf /tmp/${DONT_EXIST} /tmp/${TMP1}
! ${PROOT} ln /tmp/${TMP2} /tmp/${TMP1}

rm -f /tmp/${TMP1} /tmp/${TMP2}
rm -f /tmp/${DONT_EXIST}