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

Petr Vorel pvorel@suse.cz
Mon Oct 31 15:56:20 CET 2022


> On 31. 10. 22 14:50, Petr Vorel wrote:
> > > No, UID16_CHECK(invalid_uid, setfsuid); is the correct test call. The test
> > > is supposed to verify that trying to set invalid_uid will fail, and the only
> > > way to verify that it failed is to call setfsuid(invalid_uid) again and
> > > check that it returns current_uid.
> > I'm somehow blind today. UID16_CHECK() in compat_tst_16.h calls
> > UID_SIZE_CHECK(), which just checks the uid value. I don't see setfsuid() call,
> > IMHO that's done in SETFSUID().

> It doesn't make sense to call UID16_CHECK() on a value that we'll never pass
> to a 16bit syscall, does it?
Ah, sure, I see current_uid is used for checking only. So what is your
suggestion to fix the problem on 16-bit?

Kind regards,
Petr


More information about the ltp mailing list