Hi!
> diff --git a/testcases/kernel/syscalls/setresuid/setresuid03.c 
> b/testcases/kernel/syscalls/setresuid/setresuid03.c
> index 9bb0abd..085ed7b 100644
> --- a/testcases/kernel/syscalls/setresuid/setresuid03.c
> +++ b/testcases/kernel/syscalls/setresuid/setresuid03.c
> @@ -70,10 +70,12 @@
>  #include <errno.h>
>  #include <sys/wait.h>
>  
> +#include <compat_16.h>
> +
>  char *TCID = "setresuid03";
>  
>  uid_t neg_one = -1;
> -uid_t inval_user = (USHRT_MAX - 2);
> +uid_t inval_user;
>  
>  /* flag to tell parent if child passed or failed. */
>  int flag = 0;
> @@ -232,6 +234,10 @@ void setup(void)
>       bin = *(getpwnam("bin"));
>       bin_pw_uid = bin.pw_uid;
>  
> +     inval_user = GET_UNUSED_UID();
> +     if (inval_user == -1)
> +             tst_brkm(TBROK, NULL, "No free uid found");
> +
>       /* Pause if that option was specified
>        * TEST_PAUSE contains the code to fork the test with the -i option.
>        * You want to make sure you do this before you create your temporary

Hmm, the setresuid03 did not fail because the EPERM check kicks in even
before the check for correct uid/gid. Which should probably be fixed
because there does not seem to be a setresuid test for invalid values
that would actually excercise such checks, but that can be fixed after
the release.

Thanks for the patches, I will commit them right after packages are
build and I have tested that everything is fine.

-- 
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to