Dmitry V. Levin | 1da7c95 | 2014-12-13 18:24:13 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # Check uid decoding. |
| 4 | |
| 5 | . "${srcdir=.}/init.sh" |
| 6 | |
Dmitry V. Levin | 1da7c95 | 2014-12-13 18:24:13 +0000 | [diff] [blame] | 7 | s="${uid_syscall_suffix-}" |
| 8 | w="${uid_t_size-}" |
Dmitry V. Levin | 8f54664 | 2015-03-17 17:07:57 +0000 | [diff] [blame] | 9 | |
| 10 | run_prog ./uid$s$w |
Dmitry V. Levin | 1da7c95 | 2014-12-13 18:24:13 +0000 | [diff] [blame] | 11 | |
Dmitry V. Levin | 2720a61 | 2016-01-09 00:06:06 +0000 | [diff] [blame] | 12 | case "$STRACE_ARCH" in |
| 13 | alpha) getuid=getxuid ;; |
| 14 | *) getuid=getuid ;; |
| 15 | esac |
Dmitry V. Levin | 8ef5439 | 2015-07-16 09:09:11 +0000 | [diff] [blame] | 16 | |
Dmitry V. Levin | 2720a61 | 2016-01-09 00:06:06 +0000 | [diff] [blame] | 17 | syscalls="$getuid$s,setuid$s,getresuid$s,setreuid$s,setresuid$s,fchown$s,getgroups$s" |
Dmitry V. Levin | 8f54664 | 2015-03-17 17:07:57 +0000 | [diff] [blame] | 18 | run_strace -e trace="$syscalls" $args |
Dmitry V. Levin | 1da7c95 | 2014-12-13 18:24:13 +0000 | [diff] [blame] | 19 | |
Dmitry V. Levin | 8f54664 | 2015-03-17 17:07:57 +0000 | [diff] [blame] | 20 | AWK=gawk |
| 21 | match_awk "$LOG" "$srcdir"/uid.awk "$STRACE $args output mismatch" -v suffix="$s" |
Dmitry V. Levin | 1da7c95 | 2014-12-13 18:24:13 +0000 | [diff] [blame] | 22 | |
| 23 | exit 0 |