[LTP] [PATCH] setfsuid02: using -1 as invalid fsuid for setfsuid()

Richard Palethorpe rpalethorpe@suse.de
Tue Nov 1 10:03:00 CET 2022


Hello,

Petr Vorel <pvorel@suse.cz> writes:

>> Hello,
>
>> Avinesh Kumar <akumar@suse.de> writes:
>
>> > a uid which does not have an entry in the /etc/passwd
>> > file is not really an invalid fsuid for setfsuid(), so changing
>> > the test to use -1 as an invalid fsuid.
>> > And second setfsuid(-1) call is to verify that preceding call has
>> > actually failed and there is no change in the fsuid.
>
>> I think the original test is flawed and testing what using -1 does is
>> not very interesting as the kernel uses standard boilerplate to deal
>> with this.
>
>> AFAICT we don't test what happens if a non-root user tries to set the
>> fsuid to a uid that is not the euid, ruid or saved uid or 0/-1.
>
>> Possibly that is something for a new test though.
>
> Ah, sorry, I overlooked this, merged now.

No problem, I think that is the correct thing to do. I'll leave it to
Avinesh or someone else to extend the test (or not).

-- 
Thank you,
Richard.


More information about the ltp mailing list