]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lib/caputils: add fall back for last cap using prctl.
authorÉrico Rolim <erico.erc@gmail.com>
Sun, 15 Nov 2020 04:34:41 +0000 (01:34 -0300)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 9 Feb 2021 23:40:17 +0000 (23:40 +0000)
commit15966a2cc4cb02bded8b54cfff97987f9b29484c
treebfb7993a13da910577cc27f7abda3c3b3dee9738
parent9f704636d0ff547c809c0fe9cf301507359fbe44
lib/caputils: add fall back for last cap using prctl.

This allows the rest of the programs using cap_last_cap to trust the
value returned by it, since it will either be obtained from procfs
(straight from kernel) or with prctl.

Also checked if the file under /proc is actually mounted in a procfs.

(cherry picked from commit 5d95818757941bc609e5aeec5e2218f7d35a6e19)
lib/caputils.c