commit:     b93a9c64ca2a19e1b9b97f66a4425c0ed7e4cd22
Author:     David Lamparter <equinox <AT> diac24 <DOT> net>
AuthorDate: Fri Feb 26 08:48:58 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Feb 26 11:50:22 2021 +0000
URL:        https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=b93a9c64

pspax: replace deprecated capgetp()

This doesn't actually show any process having any capabilities for some
reason; everything lists "=ep".  Not sure what's going on there, but
capgetp() is marked as deprecated anyways, and cap_get_pid() seems to
actually work correctly.

Signed-off-by: David Lamparter <equinox <AT> diac24.net>
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 pspax.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pspax.c b/pspax.c
index 52bdd8d..6094882 100644
--- a/pspax.c
+++ b/pspax.c
@@ -413,7 +413,7 @@ static void pspax(const char *find_name)
 
                /* this is a non-POSIX function */
                caps = NULL;
-               WRAP_SYSCAP(capgetp(pfd, cap_d));
+               WRAP_SYSCAP(cap_d = cap_get_pid(pid));
                WRAP_SYSCAP(caps = cap_to_text(cap_d, &length));
 
                if (pwd && strlen(pwd->pw_name) >= 8)

Reply via email to