summaryrefslogtreecommitdiff
path: root/repo/krb5
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-31 11:05:19 +0100
committerdavidovski <david@davidovski.xyz>2022-05-31 11:05:19 +0100
commit48ca75555522716f0f686dcae3dd6cf3d8ad714d (patch)
tree00c0f58550ba4661e87376f2f02c8001c69bae44 /repo/krb5
parent871b2b573f01c1b3176a0f65458b3d281b41c437 (diff)
removed idea of repos
Diffstat (limited to 'repo/krb5')
-rw-r--r--repo/krb5/krb5.xibuild59
1 files changed, 59 insertions, 0 deletions
diff --git a/repo/krb5/krb5.xibuild b/repo/krb5/krb5.xibuild
new file mode 100644
index 0000000..a6ca171
--- /dev/null
+++ b/repo/krb5/krb5.xibuild
@@ -0,0 +1,59 @@
+#!/bin/sh
+
+MAKEDEPS="make "
+DEPS="musl e2fsprogs libldap gdbm"
+
+PKG_VER=1.19.2
+SOURCE=http://kerberos.org/dist/krb5/${PKG_VER%.*}/krb5-${PKG_VER}.tar.gz
+
+ADDITIONAL="
+ https://www.linuxfromscratch.org/patches/blfs/svn/mitkrb-${PKG_VER}-openssl3_fixes-1.patch
+"
+
+DESC="The Kerberos network authentication system"
+
+prepare () {
+
+ # fix denial of service vulnerability
+ sed -i '210a if (sprinc == NULL) {\
+ status = "NULL_SERVER";\
+ errcode = KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN;\
+ goto cleanup;\
+ }' src/kdc/do_tgs_req.c
+
+
+ cd src &&
+ #these were needed for libressl
+ #patch -Np0 -i ../patch-plugins_preauth_pkinit_pkinit__crypto__openssl.c
+ #patch -Np0 -i ../patch-plugins_preauth_pkinit_pkinit__crypto__openssl.h
+ patch -Np2 -i ../mitkrb-$PKG_VER-openssl3_fixes-1.patch
+
+
+ sed -e "/LDFLAGS=/d" -i build-tools/krb5-config.in
+ sed -i -e 's@\^u}@^u cols 300}@' tests/dejagnu/config/default.exp || true
+ sed -i -e '/eq 0/{N;s/12 //}' plugins/kdb/db2/libdb2/test/run.test || true
+ sed -i '/t_iprop.py/d' tests/Makefile.in || true
+}
+
+build () {
+ # would be ideal to use openssl rather than builtin library
+ autoreconf
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var/lib \
+ --runstatedir=/run \
+ --with-system-et \
+ --with-system-ss \
+ --with-system-verto=no \
+ --with-crypto-impl=builtin \
+ --enable-dns-for-realm &&
+
+ make
+}
+
+package () {
+ make DESTDIR=$PKG_DEST install
+
+ install -dm755 $PKG_DEST/usr/share/doc/krb5-$PKG_VER &&
+ cp -fr ../doc/* $PKG_DEST/usr/share/doc/krb5-$PKG_VER
+}