Hi!
> > Applied for now, thanks.
> >
> > Howvever if I remeber correctly the past discussion we do not strictly
> > need system unused uid and gid in the setregid02 and setregid03
> > testcases and the failures were caused by the clash between nobody uid
> > and arbitrary constatnt hardcoded into the source.
>
> setregid03 doesn't use GET_UNUSED_GID(). That time we talked about
> setregid02 and setresuid03.
Right, git grep GET_UNUSED shows these two.
> > If I understand this correctly all need is a uid/gid different from the
> > nobody user used for the testing, right?
> >
> Yes.
>
> And, actually, bin.gr_gid is equivalent to inval_user for purposes of
> setregid02 testing.
>
> Therefore, theoretically, we can cut off:
> &inval_user, &neg_one, EINVAL, &nobody, &nobody,
> "After setregid(invalid group, -1),"}, {
> &neg_one, &inval_user, EINVAL, &nobody, &nobody,
> "After setregid(-1, invalid group),"},};
>
> from there.
Hmm, as far as I can see the the error for bin.gr_gid is EPERM, while
invalid user test expect EINVAL, so something must be different.
And it looks like you can really get EINVAL in the setregid() in
kernel/sys.c. And that it depends on namespace mappings. See
kernel/user_namespace.c make_kgid() that calls map_id_down(), although I
haven't yet figured out exact conditions yet.
--
Cyril Hrubis
[email protected]
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list