docs: kernel_abi.py: fix command injection
authorVegard Nossum <vegard.nossum@oracle.com>
Sun, 31 Dec 2023 23:59:59 +0000 (00:59 +0100)
committerJonathan Corbet <corbet@lwn.net>
Wed, 3 Jan 2024 20:44:11 +0000 (13:44 -0700)
commit3231dd5862779c2e15633c96133a53205ad660ce
treeb5ce97e6795806590224de86ff910418f2834e96
parent5889d6ede53bc17252f79c142387e007224aa554
docs: kernel_abi.py: fix command injection

The kernel-abi directive passes its argument straight to the shell.
This is unfortunate and unnecessary.

Let's always use paths relative to $srctree/Documentation/ and use
subprocess.check_call() instead of subprocess.Popen(shell=True).

This also makes the code shorter.

Link: https://fosstodon.org/@jani/111676532203641247
Reported-by: Jani Nikula <jani.nikula@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20231231235959.3342928-2-vegard.nossum@oracle.com
Documentation/admin-guide/abi-obsolete.rst
Documentation/admin-guide/abi-removed.rst
Documentation/admin-guide/abi-stable.rst
Documentation/admin-guide/abi-testing.rst
Documentation/sphinx/kernel_abi.py