3 # A POSIX compliant 'id' program.
4 if test -f /usr
/xpg
4/bin
/id
; then
10 # The user's original uid and gid.
14 if test `$ID -u` = 0; then
15 # No need to ask for a password.
16 "${srcdir}/test-idpriv-droptemp.su.sh" "$uid" "$gid"
18 echo "Need root privileges for the 'test-idpriv-droptemp' test. Deny if you don't trust." > /dev
/tty
19 if (type sudo
) > /dev
/null
2>&1; then
20 # Use the 'sudo' program.
21 sudo
"${srcdir}/test-idpriv-droptemp.su.sh" "$uid" "$gid"
23 # Use the 'su' program.
24 su root
-c "${srcdir}/test-idpriv-droptemp.su.sh \"$uid\" \"$gid\""
31 *) echo "Skipping test: root privileges not granted"; exit 77;;