Re: [PATCH] set*uid() must not fail-and-return on OOM/rlimits

From: Solar Designer
Date: Sun Aug 20 2006 - 12:50:04 EST

> Arjan van de Ven wrote:
> > sounds like a good argument to get the setuid functions marked
> > __must_check in glibc...

I agree.

On Sun, Aug 20, 2006 at 09:28:51AM -0700, Ulrich Drepper wrote:
> There are too many false positives. E.g., in a SUID binaries switching
> back from a non-root UID to root will not fail. Very common.

I wouldn't call those false positives. They're warnings of poorly
written code that might fail with further changes to the kernel or with
custom security modules, or on another Unix-like platform.

Of course, the kernel or security modules must not change the semantics
arbitrarily yet expect old apps to work, however expecting that apps
honor return value from set*[ug]id() would be reasonable. (The only
reason why it is not is that there are so many broken apps out there and
more are being developed.)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at