[LTP] [PATCH] setreuid01: Use SETREUID() instead of setreuid() to check 32bit syscall
Richard Palethorpe
rpalethorpe@suse.de
Tue Jan 10 15:20:14 CET 2023
Hello,
Merged, thanks!
Avinesh Kumar <akumar@suse.de> writes:
> Signed-off-by: Avinesh Kumar <akumar@suse.de>
> ---
> testcases/kernel/syscalls/setreuid/setreuid01.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/testcases/kernel/syscalls/setreuid/setreuid01.c b/testcases/kernel/syscalls/setreuid/setreuid01.c
> index bbf29d360..7c2b6d589 100644
> --- a/testcases/kernel/syscalls/setreuid/setreuid01.c
> +++ b/testcases/kernel/syscalls/setreuid/setreuid01.c
> @@ -26,13 +26,13 @@ static void run(void)
> euid = geteuid();
> UID16_CHECK(euid, setreuid);
>
> - TST_EXP_PASS(setreuid(-1, -1));
> - TST_EXP_PASS(setreuid(-1, euid));
> - TST_EXP_PASS(setreuid(ruid, -1));
> - TST_EXP_PASS(setreuid(-1, ruid));
> - TST_EXP_PASS(setreuid(euid, -1));
> - TST_EXP_PASS(setreuid(euid, euid));
> - TST_EXP_PASS(setreuid(ruid, ruid));
> + TST_EXP_PASS(SETREUID(-1, -1));
> + TST_EXP_PASS(SETREUID(-1, euid));
> + TST_EXP_PASS(SETREUID(ruid, -1));
> + TST_EXP_PASS(SETREUID(-1, ruid));
> + TST_EXP_PASS(SETREUID(euid, -1));
> + TST_EXP_PASS(SETREUID(euid, euid));
> + TST_EXP_PASS(SETREUID(ruid, ruid));
> }
>
> static struct tst_test test = {
> --
> 2.39.0
--
Thank you,
Richard.
More information about the ltp
mailing list