]> git.ipfire.org Git - thirdparty/coreutils.git/commit
all: fix adjustment of /proc/$pid/cmdline by single binary
authorMax Filippov <jcmvbkbc@gmail.com>
Mon, 27 Dec 2021 11:58:28 +0000 (11:58 +0000)
committerPádraig Brady <P@draigBrady.com>
Mon, 27 Dec 2021 12:09:39 +0000 (12:09 +0000)
commit5bc9d928683932c24f516bd797171e69d6976e7c
treea758fb1bb0473327bc3b55115b916d7e3eee2733
parent5475fd6fe0aacad6f665edce17d48485acd24a93
all: fix adjustment of /proc/$pid/cmdline by single binary

When configured with --enable-single-binary tools issue incorrect prctl:

  prctl(PR_SET_KEEPCAPS, ...)      = -1 EINVAL (Invalid argument)

PR_SET_MM_ARG_START is not a prctl 'option' parameter, it's 'arg2'
parameter for the option PR_SET_MM.  It also has to have 'arg4' and
'arg5' set to 0 explicitly, otherwise the kernel also returns -EINVAL.

* src/coreutils.c (launch_program): Fix prctl arguments.
* NEWS: Mention the improvement.
Fixes https://bugs.gnu.org/52800
NEWS
src/coreutils.c