public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/trousers] rawhide: Fixes F45FTBFS, added a patch to build against OpenSSL4+
@ 2026-08-18  2:28 Filipe Rosset
  0 siblings, 0 replies; only message in thread
From: Filipe Rosset @ 2026-08-18  2:28 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/trousers
            Branch : rawhide
            Commit : 55a8fa11299f0392eb225dae4e4bfd3ba2e92bf4
            Author : Filipe Rosset <rosset.filipe@gmail.com>
            Date   : 2026-08-17T23:26:03-03:00
            Stats  : +39/-4 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/trousers/c/55a8fa11299f0392eb225dae4e4bfd3ba2e92bf4?branch=rawhide

            Log:
            Fixes F45FTBFS, added a patch to build against OpenSSL4+

Build Requires in alphabetical order, one per line

rpmlint reported a security error: missing-call-to-setgroups-before-setuid on tcsd
added a patch to invoke initgroups() before switching users and dropping privileges, satisfying security guidelines

Resolves: rhbz#2505018

---
diff --git a/trousers-0.3.15-openssl-opaque.patch b/trousers-0.3.15-openssl-opaque.patch
new file mode 100644
index 0000000..713e461
--- /dev/null
+++ b/trousers-0.3.15-openssl-opaque.patch
@@ -0,0 +1,11 @@
+--- trousers-0.3.15/src/tspi/tspi_asn1.c	2020-05-27 23:01:45.000000000 -0700
++++ trousers-0.3.15-new/src/tspi/tspi_asn1.c	2026-08-17 23:20:00.000000000 -0700
+@@ -237,7 +237,7 @@
+ 
+ 	if (*rawBlobSize != 0) {
+ 		if (decBlobSize <= *rawBlobSize) {
+-			memcpy(rawBlob, tssBlob->blob->data, decBlobSize);
++			memcpy(rawBlob, ASN1_STRING_get0_data(tssBlob->blob), decBlobSize);
+ 		}
+ 		else {
+ 			TSS_BLOB_free(tssBlob);

diff --git a/trousers-0.3.15-setgroups.patch b/trousers-0.3.15-setgroups.patch
new file mode 100644
index 0000000..4c7aa44
--- /dev/null
+++ b/trousers-0.3.15-setgroups.patch
@@ -0,0 +1,18 @@
+--- trousers-0.3.15/src/tcsd/svrside.c.orig	2026-08-17 23:23:22.707246661 -0300
++++ trousers-0.3.15/src/tcsd/svrside.c	2026-08-17 23:23:34.064247377 -0300
+@@ -21,6 +21,7 @@
+ #include <sys/socket.h>
+ #include <netdb.h>
+ #include <pwd.h>
++#include <grp.h>
+ #if (defined (__OpenBSD__) || defined (__FreeBSD__))
+ #include <netinet/in.h>
+ #endif
+@@ -473,6 +474,7 @@
+ 		}
+ 		return TCSERR(TSS_E_INTERNAL_ERROR);
+ 	}
++	initgroups(TSS_USER_NAME, pwd->pw_gid);
+ 	setgid(pwd->pw_gid);
+ 	setuid(pwd->pw_uid);
+ #endif

diff --git a/trousers.spec b/trousers.spec
index 2b2c0bc..04cbc94 100644
--- a/trousers.spec
+++ b/trousers.spec
@@ -2,8 +2,7 @@ Name: trousers
 Summary: TCG's Software Stack v1.2
 Version: 0.3.15
 Release: 19%{?dist}
-# Automatically converted from old format: BSD - review is highly recommended.
-License: LicenseRef-Callaway-BSD
+License: BSD-3-Clause
 Url: http://trousers.sourceforge.net
 
 Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
@@ -13,9 +12,16 @@ Patch1:  trousers-0.3.14-noinline.patch
 Patch2: trousers-0.3.14-unlock-in-err-path.patch
 Patch3: trousers-0.3.14-fix-indent-obj_policy.patch
 Patch4: trousers-0.3.14-fix-indent-tspi_key.patch
-
+Patch5: trousers-0.3.15-openssl-opaque.patch
+Patch6: trousers-0.3.15-setgroups.patch
+
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: gcc
+BuildRequires: gettext-devel
+BuildRequires: libtool
 BuildRequires: make
-BuildRequires: libtool openssl-devel gettext-devel autoconf automake
+BuildRequires: openssl-devel
 BuildRequires: systemd
 # remove systemd dependency for flatpak builds
 %if ! 0%{?flatpak}

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-18  2:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-18  2:28 [rpms/trousers] rawhide: Fixes F45FTBFS, added a patch to build against OpenSSL4+ Filipe Rosset

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox