diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2022-06-16 09:32:50 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2022-06-16 09:35:40 +0300 |
commit | b7e71ffa4714a26618492b8200ab34b35a167b47 (patch) | |
tree | 604c57edb5191df8083a611f405459cf5383c5b1 /lib/verify.c | |
parent | b1fed31a99a712576d275f74e3175199e9b6fd26 (diff) | |
download | rpm-b7e71ffa4714a26618492b8200ab34b35a167b47.tar.gz |
Drop support for ancient libcap
cap_compare() is in libcap since 2008 or so, we really don't need to
bother with versions older than that. Another redundant configure check
and a piece of moldy code bites the dust.
Diffstat (limited to 'lib/verify.c')
-rw-r--r-- | lib/verify.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/lib/verify.c b/lib/verify.c index 154274593..b0e3d0943 100644 --- a/lib/verify.c +++ b/lib/verify.c @@ -32,29 +32,6 @@ #define S_ISDEV(m) (S_ISBLK((m)) || S_ISCHR((m))) -/* If cap_compare() (Linux extension) not available, do it the hard way */ -#if defined(WITH_CAP) && !defined(HAVE_CAP_COMPARE) -static int cap_compare(cap_t acap, cap_t bcap) -{ - int rc = 0; - size_t asize = cap_size(acap); - size_t bsize = cap_size(bcap); - - if (asize != bsize) { - rc = 1; - } else { - char *abuf = xcalloc(asize, sizeof(*abuf)); - char *bbuf = xcalloc(bsize, sizeof(*bbuf)); - cap_copy_ext(abuf, acap, asize); - cap_copy_ext(bbuf, bcap, bsize); - rc = memcmp(abuf, bbuf, asize); - free(abuf); - free(bbuf); - } - return rc; -} -#endif - rpmVerifyAttrs rpmfilesVerify(rpmfiles fi, int ix, rpmVerifyAttrs omitMask) { rpmfileAttrs fileAttrs = rpmfilesFFlags(fi, ix); |