summaryrefslogtreecommitdiff
path: root/app-crypt/trousers
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
commit3cf7c3ef441822c889356fd1812ebf2944a59851 (patch)
treec513fe68548b40365c1c2ebfe35c58ad431cdd77 /app-crypt/trousers
parent05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff)
gentoo resync : 25.08.2020
Diffstat (limited to 'app-crypt/trousers')
-rw-r--r--app-crypt/trousers/Manifest2
-rw-r--r--app-crypt/trousers/files/trousers-0.3.14-tcsd-fixes.patch58
-rw-r--r--app-crypt/trousers/trousers-0.3.14-r3.ebuild69
3 files changed, 129 insertions, 0 deletions
diff --git a/app-crypt/trousers/Manifest b/app-crypt/trousers/Manifest
index 467f4cac1282..d7ee938eb0ec 100644
--- a/app-crypt/trousers/Manifest
+++ b/app-crypt/trousers/Manifest
@@ -6,6 +6,8 @@ AUX trousers-0.3.13-nouseradd.patch 606 BLAKE2B 7e4a479fe1bdc75f743263c1321f2d99
AUX trousers-0.3.14-Makefile.am-Mark-tddl.a-nodist.patch 746 BLAKE2B 91dec77a329a4931487cdff54ab8c77ae302af6bc741da3db61bc34b416d29615808799c8a4c5b39a293021dc1cc16642461037fcb367507ceadcc4456565715 SHA512 704a87fd4b5e50356ac6a0ad68aec04eebb2030d9818c9e23a40f2e621d6e2d5e5660b81997b459e67a8059a0d88a254a41baa833806ce99268ee24b1190ae0b
AUX trousers-0.3.14-fno-common.patch 385 BLAKE2B 7ed20c894c4687275804adf8d820227e5b246f02880d38b29dc6a17d12a4932059f237913f8d1841d56ee32c652cf732c01e77cd1235255b8e2fc28bc9a78027 SHA512 cf771b065d972b9974c93ec67a471a8ed3da737178a14b2d14537ee7948544bcbf071201d42d6e2b1333a3c30e8104cd1dbb344327a424597e5046e50137a692
AUX trousers-0.3.14-libressl.patch 877 BLAKE2B 6416ecf1cf99678299e4ac39756920de61e598ec9b9c91c17cf8eddfa10af145b813756e2fae3b39fef8682eeb2ee722b3979d52570f41b99708fb4ba2cebe2d SHA512 3aba9ec7554d4fdb941063f771b40c5700efefdbb6e5df186824e93a6b2c61801acb4be60cdbe71dcee9360c0f59229e5d17f1a18aa981132807b5e74efc2d59
+AUX trousers-0.3.14-tcsd-fixes.patch 2203 BLAKE2B 8085cfd36817e35d54d39a012037945440fcae6e5040f7a7fd35a3c814df93264382a87eb06758b6042b64bef851ab3d5f5e424c2b946c0d1eaa92ebb97a733f SHA512 cc2827ed501cc29dcadd00537161804a62918c9dc703b2a773227aaf74a695d026b44c70848819a78b01cc785831117ae9dfa1d4c30133241b97dd32e8e838ba
DIST trousers-0.3.14.tar.gz 1378438 BLAKE2B 3dc2824fa2ca1b1f1181f98d59e85276e7d38af4bfc07ee8246431d9ccb300a8e0820b318643d4cf5d757d2a49492c8686e2fe9de03484263d2189d4bbaa32d0 SHA512 bf87f00329cf1d76a12cf6b6181fa22f90e76af3c5786e6e2db98438d2d3f0c0e05364374664173f45e3a2f6c0e2364948d0b958a7845cb23fcb340150cd9b21
EBUILD trousers-0.3.14-r2.ebuild 1636 BLAKE2B a7d811322ebc0e5e61b7b4ae53d24a138e1e801782cc8f9b7a0ee3448163a422b92ee648f7df98d79d61ee143b012d85b74ab78e63c3a6251cd6e704bc8f46aa SHA512 2f99e83739a57b8e5114e87064e9975dd6d401842a03a08743ea115037c7847c80b5ed41f729947914304fa2a2c54db0a5b2613f449a45384503851aa5136feb
+EBUILD trousers-0.3.14-r3.ebuild 1674 BLAKE2B 7fc07533a3b2f624d599b7ddce616f82cd2540cc5cf5e40c510165930a806ad85e60c1abf604295703dc21f9e3325288fce686857310800397a7e6fb4cf6c6e4 SHA512 c5d2710f08e5f7e4f8bdd5533f6b5c3eaeb752f4c0f3674abcd4ef4269de71a573d619291d85793b516442ec5095f1465ad397ba8b6c3fb58d6b5c68e05999aa
MISC metadata.xml 507 BLAKE2B 1674e8c11713df517fd8d2aead0b5207a114de5b34559ed1b1a2527e73ee7e749a13d5a7e10330f940bc61c51ed9083e3ce423db428503f25295e1fd3b64d576 SHA512 f1c304734694001da4b95f1f18cb6891d3fc9df1db1013ad7155b2f60fd466f46947b3fa9e78d50c2a4a2fb1d0ca98b8ebb8017dde2bfcadd847e422df8885d7
diff --git a/app-crypt/trousers/files/trousers-0.3.14-tcsd-fixes.patch b/app-crypt/trousers/files/trousers-0.3.14-tcsd-fixes.patch
new file mode 100644
index 000000000000..10031e088293
--- /dev/null
+++ b/app-crypt/trousers/files/trousers-0.3.14-tcsd-fixes.patch
@@ -0,0 +1,58 @@
+Index: trousers-0.3.14/src/tcs/ps/tcsps.c
+===================================================================
+--- trousers-0.3.14.orig/src/tcs/ps/tcsps.c
++++ trousers-0.3.14/src/tcs/ps/tcsps.c
+@@ -72,7 +72,7 @@ get_file()
+ }
+
+ /* open and lock the file */
+- system_ps_fd = open(tcsd_options.system_ps_file, O_CREAT|O_RDWR, 0600);
++ system_ps_fd = open(tcsd_options.system_ps_file, O_CREAT|O_RDWR|O_NOFOLLOW, 0600);
+ if (system_ps_fd < 0) {
+ LogError("system PS: open() of %s failed: %s",
+ tcsd_options.system_ps_file, strerror(errno));
+Index: trousers-0.3.14/src/tcsd/svrside.c
+===================================================================
+--- trousers-0.3.14.orig/src/tcsd/svrside.c
++++ trousers-0.3.14/src/tcsd/svrside.c
+@@ -473,6 +473,7 @@ main(int argc, char **argv)
+ }
+ return TCSERR(TSS_E_INTERNAL_ERROR);
+ }
++ setgid(pwd->pw_gid);
+ setuid(pwd->pw_uid);
+ #endif
+ #endif
+Index: trousers-0.3.14/src/tcsd/tcsd_conf.c
+===================================================================
+--- trousers-0.3.14.orig/src/tcsd/tcsd_conf.c
++++ trousers-0.3.14/src/tcsd/tcsd_conf.c
+@@ -743,7 +743,7 @@ conf_file_init(struct tcsd_config *conf)
+ #ifndef SOLARIS
+ struct group *grp;
+ struct passwd *pw;
+- mode_t mode = (S_IRUSR|S_IWUSR);
++ mode_t mode = (S_IRUSR|S_IWUSR|S_IRGRP);
+ #endif /* SOLARIS */
+ TSS_RESULT result;
+
+@@ -798,15 +798,15 @@ conf_file_init(struct tcsd_config *conf)
+ }
+
+ /* make sure user/group TSS owns the conf file */
+- if (pw->pw_uid != stat_buf.st_uid || grp->gr_gid != stat_buf.st_gid) {
++ if (stat_buf.st_uid != 0 || grp->gr_gid != stat_buf.st_gid) {
+ LogError("TCSD config file (%s) must be user/group %s/%s", tcsd_config_file,
+- TSS_USER_NAME, TSS_GROUP_NAME);
++ "root", TSS_GROUP_NAME);
+ return TCSERR(TSS_E_INTERNAL_ERROR);
+ }
+
+- /* make sure only the tss user can manipulate the config file */
++ /* make sure only the tss user can read (but not manipulate) the config file */
+ if (((stat_buf.st_mode & 0777) ^ mode) != 0) {
+- LogError("TCSD config file (%s) must be mode 0600", tcsd_config_file);
++ LogError("TCSD config file (%s) must be mode 0640", tcsd_config_file);
+ return TCSERR(TSS_E_INTERNAL_ERROR);
+ }
+ #endif /* SOLARIS */
diff --git a/app-crypt/trousers/trousers-0.3.14-r3.ebuild b/app-crypt/trousers/trousers-0.3.14-r3.ebuild
new file mode 100644
index 000000000000..bad268a44f8c
--- /dev/null
+++ b/app-crypt/trousers/trousers-0.3.14-r3.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools linux-info readme.gentoo-r1 systemd udev
+
+DESCRIPTION="An open-source TCG Software Stack (TSS) v1.1 implementation"
+HOMEPAGE="http://trousers.sf.net"
+SRC_URI="mirror://sourceforge/trousers/${PN}/${P}.tar.gz"
+
+LICENSE="CPL-1.0 GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 ~m68k ~ppc ~ppc64 ~s390 x86"
+IUSE="doc libressl selinux" # gtk
+
+# gtk support presently does NOT compile.
+# gtk? ( >=x11-libs/gtk+-2 )
+
+DEPEND="acct-group/tss
+ acct-user/tss
+ >=dev-libs/glib-2
+ !libressl? ( >=dev-libs/openssl-0.9.7:0= )
+ libressl? ( dev-libs/libressl:0= )"
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-tcsd )"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.3.13-nouseradd.patch"
+ "${FILESDIR}/${P}-libressl.patch"
+ "${FILESDIR}/${P}-fno-common.patch"
+ "${FILESDIR}/${P}-Makefile.am-Mark-tddl.a-nodist.patch"
+ "${FILESDIR}/${P}-tcsd-fixes.patch"
+)
+
+DOCS="AUTHORS ChangeLog NICETOHAVES README TODO"
+
+DOC_CONTENTS="
+ If you have problems starting tcsd, please check permissions and
+ ownership on /dev/tpm* and ~tss/system.data
+"
+S="${WORKDIR}"
+
+CONFIG_CHECK="~TCG_TPM"
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ # econf --with-gui=$(usex gtk gtk openssl)
+ econf --with-gui=openssl
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -delete || die
+
+ keepdir /var/lib/tpm
+ use doc && dodoc doc/*
+ newinitd "${FILESDIR}"/tcsd.initd tcsd
+ newconfd "${FILESDIR}"/tcsd.confd tcsd
+ systemd_dounit "${FILESDIR}"/tcsd.service
+ udev_dorules "${FILESDIR}"/61-trousers.rules
+ fowners tss:tss /var/lib/tpm
+ readme.gentoo_create_doc
+}