File: test-pseudo_disable-fork.sh

package info (click to toggle)
pseudo 1.8.1%2Bgit20161012-2
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 1,804 kB
  • ctags: 927
  • sloc: ansic: 11,729; sh: 760; python: 749; makefile: 158
file content (18 lines) | stat: -rwxr-xr-x 270 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

# Verify normal operation...
uid=`id -u`
gid=`id -g`
if [ $uid -ne 0 -o $gid -ne 0 ]; then
    exit 1
fi

export PSEUDO_DISABLED=1
# Verify we dropped OUT of pseudo control
uid=`id -u`
gid=`id -g`
if [ $uid -eq 0 -o $gid -eq 0 ]; then
    exit 1
fi

exit 0