[LTP] [PATCH] syscalls/setfsuid: Use SETFSUID instead of setfsuid to check 32bit syscall

Richard Palethorpe rpalethorpe@suse.de
Mon Nov 28 16:16:09 CET 2022


Hello,

Merged, Thanks!

Yang Xu <xuyang2018.jy@fujitsu.com> writes:

> Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
> ---
>  testcases/kernel/syscalls/setfsuid/setfsuid01.c | 4 ++--
>  testcases/kernel/syscalls/setfsuid/setfsuid03.c | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/testcases/kernel/syscalls/setfsuid/setfsuid01.c b/testcases/kernel/syscalls/setfsuid/setfsuid01.c
> index 0cbf101ee..9805e38b6 100644
> --- a/testcases/kernel/syscalls/setfsuid/setfsuid01.c
> +++ b/testcases/kernel/syscalls/setfsuid/setfsuid01.c
> @@ -34,8 +34,8 @@ static void run(void)
>  	UID16_CHECK(uid, setfsuid);
>  
>  	SAFE_SETEUID(0);
> -	TST_EXP_VAL(setfsuid(nobody_uid), uid, "setfsuid(%d)", nobody_uid);
> -	TST_EXP_VAL(setfsuid(-1), nobody_uid);
> +	TST_EXP_VAL(SETFSUID(nobody_uid), uid, "setfsuid(%d)", nobody_uid);
> +	TST_EXP_VAL(SETFSUID(-1), nobody_uid);
>  }
>  
>  static struct tst_test test = {
> diff --git a/testcases/kernel/syscalls/setfsuid/setfsuid03.c b/testcases/kernel/syscalls/setfsuid/setfsuid03.c
> index 02698f7cf..ee06e9376 100644
> --- a/testcases/kernel/syscalls/setfsuid/setfsuid03.c
> +++ b/testcases/kernel/syscalls/setfsuid/setfsuid03.c
> @@ -36,8 +36,8 @@ static void run(void)
>  	SAFE_SETEUID(nobody_uid);
>  	UID16_CHECK(ruid, setfsuid);
>  
> -	TST_EXP_VAL_SILENT(setfsuid(ruid), nobody_uid);
> -	TST_EXP_VAL(setfsuid(-1), ruid, "setfsuid(fsuid) by non-root user:");
> +	TST_EXP_VAL_SILENT(SETFSUID(ruid), nobody_uid);
> +	TST_EXP_VAL(SETFSUID(-1), ruid, "setfsuid(fsuid) by non-root user:");
>  }
>  
>  static struct tst_test test = {
> -- 
> 2.27.0


-- 
Thank you,
Richard.


More information about the ltp mailing list