Your description, especially the use of the adjective tainted, comports with the description in that function's manpage, and the function it similar to what you seem to have in mind, though it also returns true if the process is setgid (even if not also setuid).