While this is almost certainly an issue with the underlying C function (somewhat concerning), I think we should validate the values passed to Process.uid= (and similar methods) the same way we validate it for the string. Presumably a simple getpwuid check would work.