pkgsrc/security/kth-krb4/Makefile
marino c4e9b61dbf security/kth-krb4: Add DragonFly and FreeBSD support
The majority of these patches were inspired from FreeBSD's ports.  FreeBSD,
along with at least Debian, have removed Kerberos4 due to secuity concerns.
From: http://web.mit.edu/kerberos/krb4-end-of-life.html :

"Serious protocol flaws[2] have been found in Kerberos 4. These flaws permit
attacks which require far less effort than an exhaustive search of the DES
key space. These flaws make Kerberos 4 cross-realm authentication an
unacceptable security risk and raise serious questions about the security of
the entire Kerberos 4 protocol.

The known insecurity of DES, combined with the recently discovered protocol
flaws, make it extremely inadvisable to rely on the security of version 4 of
the Kerberos protocol. These factors motivate the MIT Kerberos Team to remove
support for Kerberos version 4 from the MIT implementation of Kerberos."

This end-of-life announcement is dated 19 October 2006.  I think it's a
good question to ask why this package and the packages that depend on it
are still in pkgsrc.
2011-11-28 19:33:13 +00:00

96 lines
2.7 KiB
Makefile

# $NetBSD: Makefile,v 1.54 2011/11/28 19:33:13 marino Exp $
#
DISTNAME= krb4-1.2.2
PKGNAME= kth-krb4-1.2.2
PKGREVISION= 5
CATEGORIES= security net
MASTER_SITES= ftp://ftp.pdc.kth.se/pub/krb/src/
MAINTAINER= wennmach@NetBSD.org
HOMEPAGE= http://www.pdc.kth.se/kth-krb/
COMMENT= Kerberos IV distribution from KTH
CONFLICTS+= arla-[0-9]*
CONFLICTS+= libdes-[0-9]*
PKG_DESTDIR_SUPPORT= user-destdir
CRYPTO= yes
USE_LIBTOOL= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --includedir=${PREFIX}/include/kerberosIV
.include "../../mk/bsd.prefs.mk"
KERBEROS_PREFIX_CMDS?= no
KRB4_PREFIX_CMDS?= ${KERBEROS_PREFIX_CMDS}
BUILD_DEFS+= KRB4_PREFIX_CMDS
.if !empty(KRB4_PREFIX_CMDS:M[yY][eE][sS])
KTH_KRB4_TRANSFORM= s/^ftp/k4&/;\
s/^rcp/k4&/;\
s/^rlogin/k4&/;\
s/^rsh/k4&/;\
s/^su/k4&/;\
s/^telnet/k4&/
PLIST_SUBST+= KRB4_PREFIX=k4
.else
KTH_KRB4_TRANSFORM= s/^ftp$$/k4&/ # always k4ftp
PLIST_SUBST+= KRB4_PREFIX=
.endif
CONFIGURE_ARGS+= --program-transform=${KTH_KRB4_TRANSFORM:Q}
INFO_FILES= yes
EXAMPLEDIR= ${PREFIX}/share/examples/kth-krb4
SUBST_CLASSES+= paths
SUBST_FILES.paths= ${WRKSRC}/lib/kafs/kafs.h
SUBST_SED.paths+= -e 's|/usr/arla/etc/|${PKG_SYSCONFDIR}|g'
SUBST_STAGE.paths= post-patch
# On some systems, kth-krb4's libroken installs a glob.h to compensate
# for the system not having one. Please turn PLIST support for this
# on narrowly.
INSTALLS_GLOB= no
.if ${INSTALLS_GLOB} == yes
PLIST.glob= yes
.endif
.if ${OPSYS} == "NetBSD"
CONFIGURE_ARGS+= --with-readline=yes \
--with-readline-lib=${BUILDLINK_PREFIX.readline}/lib \
--with-readline-include=${BUILDLINK_PREFIX.readline}/include/readline \
ac_cv_funclib_bswap16=yes \
ac_cv_funclib_bswap32=yes
.include "../../devel/readline/buildlink3.mk"
.endif
PLIST_VARS+= glob wantdes
.if ${OPSYS} == "DragonFly" || ${OPSYS} == "FreeBSD"
CPPFLAGS+= -DOPENSSL_DES_LIBDES_COMPATIBILITY
.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "amd64"
CFLAGS+= -fPIC
.endif
.else
PLIST.wantdes= yes
.endif
post-install:
${INSTALL_DATA_DIR} ${DESTDIR}${EXAMPLEDIR}
${INSTALL_DATA} ${WRKSRC}/etc/krb.conf ${DESTDIR}${EXAMPLEDIR}
${INSTALL_DATA} ${WRKSRC}/etc/krb.realms ${DESTDIR}${EXAMPLEDIR}
${INSTALL_DATA} ${WRKSRC}/etc/inetd.conf.changes ${DESTDIR}${EXAMPLEDIR}
${INSTALL_DATA} ${FILESDIR}/services-1.4.2.diff ${DESTDIR}${EXAMPLEDIR}
${INSTALL_DATA} ${FILESDIR}/services-1.5.diff ${DESTDIR}${EXAMPLEDIR}
SPECIAL_PERMS+= bin/${KRB4_PREFIX}rsh ${SETUID_ROOT_PERMS}
SPECIAL_PERMS+= bin/${KRB4_PREFIX}rcp ${SETUID_ROOT_PERMS}
SPECIAL_PERMS+= bin/${KRB4_PREFIX}rlogin ${SETUID_ROOT_PERMS}
SPECIAL_PERMS+= bin/${KRB4_PREFIX}su ${SETUID_ROOT_PERMS}
SPECIAL_PERMS+= bin/otp ${SETUID_ROOT_PERMS}
.include "../../security/openssl/buildlink3.mk"
.include "../../x11/libXt/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"