diff options
author | Thibaut Notteboom <tib@tibux.org> | 2011-12-11 22:11:27 -0600 |
---|---|---|
committer | Niels Horn <niels.horn@slackbuilds.org> | 2011-12-18 00:07:45 -0200 |
commit | adfa160a33338632c054bfe7f2ea8c98d2943a5f (patch) | |
tree | bdc14f50fe1207756481ee5b751a1e3b2684e44e /network/heimdal | |
parent | b16dcfda15b2aa602e654ebf003a74d8bf5c8dc1 (diff) | |
download | slackbuilds-adfa160a33338632c054bfe7f2ea8c98d2943a5f.tar.gz |
network/heimdal: Added (KTH Heimdal Kerberos)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'network/heimdal')
-rw-r--r-- | network/heimdal/README | 10 | ||||
-rw-r--r-- | network/heimdal/config/heimdal.csh | 8 | ||||
-rw-r--r-- | network/heimdal/config/heimdal.sh | 10 | ||||
-rw-r--r-- | network/heimdal/config/kdc.conf | 20 | ||||
-rw-r--r-- | network/heimdal/config/rc.heimdal | 36 | ||||
-rw-r--r-- | network/heimdal/doinst.sh | 35 | ||||
-rw-r--r-- | network/heimdal/heimdal.SlackBuild | 128 | ||||
-rw-r--r-- | network/heimdal/heimdal.info | 10 | ||||
-rw-r--r-- | network/heimdal/inittab-heimdal.patch | 21 | ||||
-rw-r--r-- | network/heimdal/slack-desc | 19 |
10 files changed, 297 insertions, 0 deletions
diff --git a/network/heimdal/README b/network/heimdal/README new file mode 100644 index 0000000000..e13deca10f --- /dev/null +++ b/network/heimdal/README @@ -0,0 +1,10 @@ +Heimdal is a free implementation of Kerberos 5. The goals are to: +* have an implementation that can be freely used by anyone +* be protocol compatible with existing implementations and, if not + in conflict, with RFC 4120 (and any future updated RFC). + RFC 4120 replaced RFC 1510. +* be reasonably compatible with the M.I.T Kerberos V5 API +* have support for Kerberos V5 over GSS-API (RFC1964) +* include the most important and useful application programs + (rsh, telnet, popper, etc.) +* include enough backwards compatibility with Kerberos V4 diff --git a/network/heimdal/config/heimdal.csh b/network/heimdal/config/heimdal.csh new file mode 100644 index 0000000000..be96ce7347 --- /dev/null +++ b/network/heimdal/config/heimdal.csh @@ -0,0 +1,8 @@ +#!/bin/csh + +setenv MANPATH ${MANPATH}:/usr/heimdal/man + +setenv PATH "${PATH}:/usr/heimdal/bin" +if ( x"$uid" == x"0" ) then + setenv PATH "${PATH}:/usr/heimdal/sbin" +endif diff --git a/network/heimdal/config/heimdal.sh b/network/heimdal/config/heimdal.sh new file mode 100644 index 0000000000..561d30a296 --- /dev/null +++ b/network/heimdal/config/heimdal.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +MANPATH="$MANPATH:/usr/heimdal/man" +export MANPATH + +PATH="${PATH}:/usr/heimdal/bin" +if [ x"${EUID}" == x"0" ]; then + PATH="${PATH}:/usr/heimdal/sbin" +fi +export PATH diff --git a/network/heimdal/config/kdc.conf b/network/heimdal/config/kdc.conf new file mode 100644 index 0000000000..180b8ab69e --- /dev/null +++ b/network/heimdal/config/kdc.conf @@ -0,0 +1,20 @@ +# Leave this section out on the clients +[kdc] + # Space seperated list of addresses to listen for requests on. + #addresses = 192.168.0.1 172.16.0.1 10.0.0.1 + + # Following directive is needed when KDC starts atomatically + require-preauth = no + + # database key file + key-file = /var/heimdal/key-file + + # Check the addresses in the ticket when processing TGS requests. + check-ticket-addresses = TRUE + + # Permit tickets with no addresses. + #allow-null-ticket-addresses = TRUE + + # Permit anonymous tickets with no addresses. + #allow-anonymous = TRUE + diff --git a/network/heimdal/config/rc.heimdal b/network/heimdal/config/rc.heimdal new file mode 100644 index 0000000000..7c0b93fe72 --- /dev/null +++ b/network/heimdal/config/rc.heimdal @@ -0,0 +1,36 @@ +#!/bin/sh + +heimdal_start() { + if [ -r /var/heimdal/kdc.conf -a -x /usr/heimdal/libexec/kdc ]; then + echo "Starting the Kerberos service: /usr/heimdal/libexec/kdc --detach" + /usr/heimdal/libexec/kdc --detach + fi + +} + +heimdal_stop() { + killall kdc + +} + +heimdal_restart() { + heimdal_stop + sleep 1 + heimdal_start + +} + +case "$1" in +'start') + heimdal_start + ;; +'stop') + heimdal_stop + ;; +'restart') + heimdal_restart + ;; +*) + echo "Usage: $0 start|stop|restart" +esac + diff --git a/network/heimdal/doinst.sh b/network/heimdal/doinst.sh new file mode 100644 index 0000000000..e47d56e712 --- /dev/null +++ b/network/heimdal/doinst.sh @@ -0,0 +1,35 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +preserve_perms() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ -e $OLD ]; then + cp -a $OLD ${NEW}.incoming + cat $NEW > ${NEW}.incoming + mv ${NEW}.incoming $NEW + fi + config $NEW +} + +preserve_perms etc/rc.d/rc.heimdal.new +config etc/krb5.conf-sample.new +config var/heimdal/kdc.conf-sample.new +config etc/profile.d/heimdal.sh.new +config etc/profile.d/heimdal.csh.new + +# Add heimdal libs to the library search path +if ! grep -q '^/usr/heimdal/lib$' etc/ld.so.conf ; then + echo "/usr/heimdal/lib" >> etc/ld.so.conf +fi + diff --git a/network/heimdal/heimdal.SlackBuild b/network/heimdal/heimdal.SlackBuild new file mode 100644 index 0000000000..40cebbb4c9 --- /dev/null +++ b/network/heimdal/heimdal.SlackBuild @@ -0,0 +1,128 @@ +#!/bin/sh + +# Slackware build script for KTH Heimdal Kerberos + +# Written by Menno Duursma <druiloor@zonnet.nl> +# Modified by the SlackBuilds.org project +# Modified by Thibaut Notteboom <tib@tibux.org> + +# This program is free software. It comes without any warranty. +# Granted WTFPL, Version 2, as published by Sam Hocevar. See +# http://sam.zoy.org/wtfpl/COPYING for more details. + +PRGNAM=heimdal +VERSION=${VERSION:-1.5.1} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e # Exit immediately if a command exits with a non-zero status. + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 \ + -o -perm 400 \) -exec chmod 644 {} \; + +# Note about OpenLDAP: +# The openldap-client package is part of Slackware since the 11.0 release. +# If you want to store your KDC database in LDAP, you will need to configure +# Heimdal with support for OpenLDAP: +# Replace this: "--without-openldap" with this: "--with-openldap=/usr" +# in the configure lines below +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr/heimdal \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --infodir=/usr/info \ + --mandir=/usr/heimdal/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --build=$ARCH-slackware-linux \ + --enable-shared=yes \ + --disable-otp \ + --without-openldap \ + --without-hesiod \ + --without-ipv6 \ + --enable-kcm \ + --with-x + +make +make install-strip DESTDIR=$PKG + +rm -rf $PKG/usr/heimdal/man/cat? # We don't want these +find $PKG/usr/heimdal/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/heimdal/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +rm -f $PKG/usr/info/dir +gzip -9 $PKG/usr/info/* +( cd $PKG/usr/info ; ln -s heimdal.info.gz heimdal ) + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a [A-Z][A-Z]* ChangeLog* etc/services.append $PKG/usr/doc/$PRGNAM-$VERSION +cp -a doc/{init-creds,layman.asc,mdate-sh} $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/inittab-heimdal.patch > $PKG/usr/doc/$PRGNAM-$VERSION/inittab-heimdal.patch +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +find $PKG/usr/doc -type f -exec chmod -x {} \; + +# Add sample krb5.conf file (may not be needed) +mkdir -p $PKG/etc +cat krb5.conf > $PKG/etc/krb5.conf-sample.new + +# Create directory for the KDC to use +mkdir -p $PKG/var/heimdal + +# Add sample kdc.conf file (may not be needed) +cat $CWD/config/kdc.conf > $PKG/var/heimdal/kdc.conf-sample.new + +# Include a KDC rc-file for the admin to consider +mkdir -p $PKG/etc/rc.d +cat $CWD/config/rc.heimdal > $PKG/etc/rc.d/rc.heimdal.new + +# Add heimdal to INFOPATH, MANPATH, and PATH +mkdir -p $PKG/etc/profile.d +cat $CWD/config/heimdal.sh > $PKG/etc/profile.d/heimdal.sh.new +cat $CWD/config/heimdal.csh > $PKG/etc/profile.d/heimdal.csh.new +chmod 0755 $PKG/etc/profile.d/* + +mkdir $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/network/heimdal/heimdal.info b/network/heimdal/heimdal.info new file mode 100644 index 0000000000..c2420b4504 --- /dev/null +++ b/network/heimdal/heimdal.info @@ -0,0 +1,10 @@ +PRGNAM="heimdal" +VERSION="1.5.1" +HOMEPAGE="http://www.h5l.org" +DOWNLOAD="http://www.h5l.org/dist/src/heimdal-1.5.1.tar.gz" +MD5SUM="0709951e91560f788b4b7cb125604b2b" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Thibaut Notteboom" +EMAIL="tib@tibux.org" +APPROVED="rworkman" diff --git a/network/heimdal/inittab-heimdal.patch b/network/heimdal/inittab-heimdal.patch new file mode 100644 index 0000000000..14e59246d9 --- /dev/null +++ b/network/heimdal/inittab-heimdal.patch @@ -0,0 +1,21 @@ +--- /etc/inittab 2011-11-22 00:05:33.883260270 +0100 ++++ /etc/inittab-heimdal 2011-11-21 23:45:38.922009963 +0100 +@@ -49,12 +49,12 @@ + pg::powerokwait:/sbin/genpowerfail stop + + # These are the standard console login getties in multiuser mode: +-c1:12345:respawn:/sbin/agetty 38400 tty1 linux +-c2:12345:respawn:/sbin/agetty 38400 tty2 linux +-c3:12345:respawn:/sbin/agetty 38400 tty3 linux +-c4:12345:respawn:/sbin/agetty 38400 tty4 linux +-c5:12345:respawn:/sbin/agetty 38400 tty5 linux +-c6:12345:respawn:/sbin/agetty 38400 tty6 linux ++c1:12345:respawn:/sbin/agetty -l /usr/heimdal/bin/login 38400 tty1 linux ++c2:12345:respawn:/sbin/agetty -l /usr/heimdal/bin/login 38400 tty2 linux ++c3:12345:respawn:/sbin/agetty -l /usr/heimdal/bin/login 38400 tty3 linux ++c4:12345:respawn:/sbin/agetty -l /usr/heimdal/bin/login 38400 tty4 linux ++c5:12345:respawn:/sbin/agetty -l /usr/heimdal/bin/login 38400 tty5 linux ++c6:12345:respawn:/sbin/agetty -l /usr/heimdal/bin/login 38400 tty6 linux + + # Local serial lines: + #s1:12345:respawn:/sbin/agetty -L ttyS0 9600 vt100 diff --git a/network/heimdal/slack-desc b/network/heimdal/slack-desc new file mode 100644 index 0000000000..8639a28a9c --- /dev/null +++ b/network/heimdal/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler-----------------------------------------------------| +heimdal: heimdal (KTH Heimdal Kerberos) +heimdal: +heimdal: Heimdal is an implementation of Kerberos 5 largely written in Sweden. +heimdal: It is freely available under a three clause BSD style license. +heimdal: +heimdal: This package includes all basic Kerberos functionality; a KDC +heimdal: (key distribution center) ``kerberized'' versions of programs such +heimdal: as such as login and ftp/ftpd , telnet/telnetd and administration +heimdal: utilities such as ``klist'' and ``kadmin''. krb and GSSAPI libs. +heimdal: +heimdal: This package installs in /usr/heimdal to avoid naming conflicts. |