import tang-7-6.el8

This commit is contained in:
CentOS Sources 2021-05-18 02:58:08 -04:00 committed by Andrew Lukoshko
parent 0464305bb1
commit f147a77be1
2 changed files with 46 additions and 3 deletions

View File

@ -0,0 +1,38 @@
From ea43ca02cf52d0455c6949683692a95e38ccdf70 Mon Sep 17 00:00:00 2001
From: Sergio Correia <scorreia@redhat.com>
Date: Fri, 4 Dec 2020 09:05:19 -0300
Subject: [PATCH 2/2] Exit with success unless the issue was with with tangd
itself
When an HTTP parser error happens, tangd is currently exiting with an
error status, which may cause trouble in some scenarios [1].
However, we don't exit with an error in situations where we try requests
that do not exist, for instance. It makes sense to only exit with an
error when the error was with tangd itself, e.g.: when we are unable to
read the directory with the keys, not when the actual HTTP operation
does not succeed for some reason.
Upstream: https://github.com/latchset/tang/pull/55
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1828558
---
src/tangd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/tangd.c b/src/tangd.c
index b569f38..d40201f 100644
--- a/src/tangd.c
+++ b/src/tangd.c
@@ -225,7 +225,7 @@ main(int argc, char *argv[])
if (parser.http_errno != 0) {
fprintf(stderr, "HTTP Parsing Error: %s\n",
http_errno_description(parser.http_errno));
- return EXIT_FAILURE;
+ return EXIT_SUCCESS;
}
memmove(req, &req[r], rcvd - r);
--
2.27.0

View File

@ -1,12 +1,13 @@
Name: tang Name: tang
Version: 7 Version: 7
Release: 5%{?dist} Release: 6%{?dist}
Summary: Network Presence Binding Daemon Summary: Network Presence Binding Daemon
License: GPLv3+ License: GPLv3+
URL: https://github.com/latchset/%{name} URL: https://github.com/latchset/%{name}
Source0: https://github.com/latchset/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.bz2 Source0: https://github.com/latchset/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.bz2
Patch1: 0001-Move-key-generation-to-tang.patch Patch1: 0001-Move-key-generation-to-tang.patch
Patch2: 0002-Exit-with-success-unless-the-issue-was-with-with-tan.patch
BuildRequires: gcc BuildRequires: gcc
BuildRequires: autoconf BuildRequires: autoconf
@ -27,6 +28,7 @@ BuildRequires: asciidoc
BuildRequires: coreutils BuildRequires: coreutils
BuildRequires: grep BuildRequires: grep
BuildRequires: sed BuildRequires: sed
BuildRequires: git-core
%{?systemd_requires} %{?systemd_requires}
Requires: coreutils Requires: coreutils
@ -40,8 +42,7 @@ Requires(pre): shadow-utils
Tang is a small daemon for binding data to the presence of a third party. Tang is a small daemon for binding data to the presence of a third party.
%prep %prep
%setup -q %autosetup -S git
%patch1 -p1
%build %build
autoreconf -i autoreconf -i
@ -88,6 +89,10 @@ exit 0
%{_mandir}/man1/tang-show-keys.1* %{_mandir}/man1/tang-show-keys.1*
%changelog %changelog
* Wed Jan 13 2021 Sergio Correia <scorreia@redhat.com> - 7-6
- Exit with success unless the issue was with with tangd itself
Resolves: rhbz#1828558
* Sun Dec 01 2019 Sergio Correia <scorreia@redhat.com> - 7-5 * Sun Dec 01 2019 Sergio Correia <scorreia@redhat.com> - 7-5
- Permissions of /var/db/tang set to 0700 - Permissions of /var/db/tang set to 0700
- Home dir of user tang is /var/cache/tang - Home dir of user tang is /var/cache/tang