Fix syntax error in DEBUG protected setcap.c code

Signed-off-by: yixiangzhike <yixiangzhike007@163.com>
This commit is contained in:
yixiangzhike 2022-08-27 10:58:41 +08:00
parent f9125cb2d0
commit a6b7c09e39
2 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,28 @@
From 21d08b03c2a737e4384a07857e0289ad0126b663 Mon Sep 17 00:00:00 2001
From: "Andrew G. Morgan" <morgan@kernel.org>
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 <morgan@kernel.org>
---
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

View File

@ -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 <yixiangzhike007@163.com> - 2.61-2
- fix syntax error in DEBUG protected setcap.c code
* Fri Dec 24 2021 yixiangzhike <yixiangzhike007@163.com> - 2.61-1
- update to 2.61