HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/src/linux-headers-5.15.0-89/tools/testing/selftests/safesetid/safesetid-test.sh
#!/bin/bash

TCID="safesetid-test.sh"
errcode=0

# Kselftest framework requirement - SKIP code is 4.
ksft_skip=4

check_root()
{
	uid=$(id -u)
	if [ $uid -ne 0 ]; then
		echo $TCID: must be run as root >&2
		exit $ksft_skip
	fi
}

main_function()
{
  check_root
  ./safesetid-test
}

main_function
echo "$TCID: done"
exit $errcode