brintos

brintos / linux-shallow public Read only

0
0
Text · 331 B · e4fdce6 Raw
27 lines · bash
1#!/bin/bash2 3TCID="safesetid-test.sh"4errcode=05 6# Kselftest framework requirement - SKIP code is 4.7ksft_skip=48 9check_root()10{11	uid=$(id -u)12	if [ $uid -ne 0 ]; then13		echo $TCID: must be run as root >&214		exit $ksft_skip15	fi16}17 18main_function()19{20  check_root21  ./safesetid-test22}23 24main_function25echo "$TCID: done"26exit $errcode27