The prctl(2) system-call wrapper is implemented as a variadic function. This makes it important to pass arguments to it of the right type (and more importantly of the right width), to avoid undefined behavior. While at it, check errors with ==-1, not <0, which is more explicit. Also, PR_SET_KEEPCAPS(2const) doesn't need all arguments, so it can be called with just two of them; remove unnecessary 0s. See-also: prctl(2), PR_SET_KEEPCAPS(2const) Link: <https://lore.kernel.org/linux-man/ddbdyaiptesjalgfmztxideej67e3yaob7ucsmbf6qvriwxiif@dohhxrqgwhrf/T/#med306b5b003f9cc7cc2de69fcdd7ee2d056d0954> Cc: Xi Ruoyao <xry111@xry111.site> Cc: Lukas Slebodnik <lslebodn@fedoraproject.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
7.0 KiB
7.0 KiB