From ac807a1a082cb595975b70f175cbbffbaac8408d Mon Sep 17 00:00:00 2001 From: yixiangzhike Date: Sat, 27 Aug 2022 11:06:17 +0800 Subject: [PATCH] Fix syntax error in DEBUG protected setcap.c code Signed-off-by: yixiangzhike --- ...ror-in-DEBUG-protected-setcap.c-code.patch | 28 +++++++++++++++++++ libcap.spec | 6 +++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 Fix-syntax-error-in-DEBUG-protected-setcap.c-code.patch diff --git a/Fix-syntax-error-in-DEBUG-protected-setcap.c-code.patch b/Fix-syntax-error-in-DEBUG-protected-setcap.c-code.patch new file mode 100644 index 0000000..9cebd8d --- /dev/null +++ b/Fix-syntax-error-in-DEBUG-protected-setcap.c-code.patch @@ -0,0 +1,28 @@ +From 21d08b03c2a737e4384a07857e0289ad0126b663 Mon Sep 17 00:00:00 2001 +From: "Andrew G. Morgan" +Date: Sun, 17 Apr 2022 06:41:23 -0700 +Subject: [PATCH] Fix syntax error in DEBUG protected setcap.c code. + +Bug reported with fix from yixiangzhike. + +Signed-off-by: Andrew G. Morgan +--- + progs/setcap.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/progs/setcap.c b/progs/setcap.c +index 02a8a5d..737efcc 100644 +--- a/progs/setcap.c ++++ b/progs/setcap.c +@@ -176,7 +176,7 @@ int main(int argc, char **argv) + { + char *result = cap_to_text(cap_d, NULL); + fprintf(stderr, "caps set to: [%s]\n", result); +- cap_free(result) ++ cap_free(result); + } + #endif + } +-- +2.27.0 + diff --git a/libcap.spec b/libcap.spec index 4f69fa1..9a1ee37 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,12 +1,13 @@ Name: libcap Version: 2.61 -Release: 1 +Release: 2 Summary: A library for getting and setting POSIX.1e draft 15 capabilities License: GPLv2 URL: https://sites.google.com/site/fullycapable Source0: https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.gz Patch0: libcap-buildflags.patch +Patch1: Fix-syntax-error-in-DEBUG-protected-setcap.c-code.patch BuildRequires: libattr-devel pam-devel perl-interpreter gcc @@ -70,6 +71,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_mandir}/man8/*.gz %changelog +* Sat Aug 27 2022 yixiangzhike - 2.61-2 +- fix syntax error in DEBUG protected setcap.c code + * Thu Nov 25 2021 yixiangzhike - 2.61-1 - update to 2.61 -- Gitee