1 #!/bin/bash 2 3 TCID="safesetid-test.sh" 4 errcode=0 5 6 # Kselftest framework requirement - SKIP code 7 ksft_skip=4 8 9 check_root() 10 { 11 uid=$(id -u) 12 if [ $uid -ne 0 ]; then 13 echo $TCID: must be run as roo 14 exit $ksft_skip 15 fi 16 } 17 18 main_function() 19 { 20 check_root 21 ./safesetid-test 22 } 23 24 main_function 25 echo "$TCID: done" 26 exit $errcode
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.