Muni
  What I am trying to say is, this fix assumes that
Bin->GID is part of supplementary group IDs of root and nobody->GID is not.
There is no basis for this assumption. If nobody->GID is part of supplementary 
group ID than 
it will fail again.
  So instead specifically set the supplementary group ID of the process to 
avoid confusion
Thanks
Yeehaw
> 
> diff --git a/testcases/kernel/syscalls/chmod/chmod05.c 
> b/testcases/kernel/syscalls/chmod/chmod05.c
> index 4504aaa..c6f1225 100644
> --- a/testcases/kernel/syscalls/chmod/chmod05.c
> +++ b/testcases/kernel/syscalls/chmod/chmod05.c
> @@ -177,7 +177,7 @@ int main(int ac, char **av)
>                       if ((PERMS & ~S_ISGID) != dir_mode) {
>                               tst_resm(TFAIL, "%s: Incorrect modes 0%03o, "
>                                        "Expected 0%03o", TESTDIR, dir_mode,
> -                                      PERMS);
> +                                      PERMS & ~S_ISGID);
>                       } else {
>                               tst_resm(TPASS,
>                                        "Functionality of chmod(%s, %#o) 
> successful",
> @@ -241,12 +241,12 @@ void setup()
>                               strerror(errno));
>       }

> 
> -     if (chown(TESTDIR, nobody_u->pw_uid, bin_group->gr_gid) == -1)
> +     if (chown(TESTDIR, nobody_u->pw_uid, nobody_u->pw_gid) == -1)
>               tst_brkm(TBROK, cleanup, "Couldn't change owner of testdir: %s",
>                               strerror(errno));
> 
> -     /* change to nobody:nobody */
> -     if (setegid(nobody_u->pw_gid) == -1 ||
> +     /* change to nobody:bin */
> +     if (setegid(bin_group->gr_gid) == -1 ||
>                seteuid(nobody_u->pw_uid) == -1)
>               tst_brkm(TBROK, cleanup, "Couldn't switch to nobody:nobody: %s",
>                               strerror(errno));


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to