From 7e06f22a97d094f7c8f87f0fa5b1e242f9a26477 Mon Sep 17 00:00:00 2001 From: Thierry N Date: Fri, 7 Aug 2009 14:32:20 +0200 Subject: Ajout de openssh#5.2p1-1 --- base/openssh/.footprint | 63 +++++++++++++++++++++++++++++++++++++++++++++++++ base/openssh/.md5sum | 2 ++ base/openssh/Pkgfile | 37 +++++++++++++++++++++++++++++ base/openssh/sshd | 63 +++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 165 insertions(+) create mode 100644 base/openssh/.footprint create mode 100644 base/openssh/.md5sum create mode 100755 base/openssh/Pkgfile create mode 100644 base/openssh/sshd diff --git a/base/openssh/.footprint b/base/openssh/.footprint new file mode 100644 index 000000000..b6ccbc256 --- /dev/null +++ b/base/openssh/.footprint @@ -0,0 +1,63 @@ +drwxr-xr-x root/root etc/ +drwxr-xr-x root/root etc/rc.d/ +drwxr-xr-x root/root etc/rc.d/init.d/ +-rwxr-xr-x root/root etc/rc.d/init.d/sshd +drwxr-xr-x root/root etc/rc.d/rc0.d/ +lrwxrwxrwx root/root etc/rc.d/rc0.d/K30sshd -> ../init.d/sshd +drwxr-xr-x root/root etc/rc.d/rc1.d/ +lrwxrwxrwx root/root etc/rc.d/rc1.d/K30sshd -> ../init.d/sshd +drwxr-xr-x root/root etc/rc.d/rc2.d/ +lrwxrwxrwx root/root etc/rc.d/rc2.d/K30sshd -> ../init.d/sshd +drwxr-xr-x root/root etc/rc.d/rc3.d/ +lrwxrwxrwx root/root etc/rc.d/rc3.d/S30sshd -> ../init.d/sshd +drwxr-xr-x root/root etc/rc.d/rc4.d/ +lrwxrwxrwx root/root etc/rc.d/rc4.d/S30sshd -> ../init.d/sshd +drwxr-xr-x root/root etc/rc.d/rc5.d/ +lrwxrwxrwx root/root etc/rc.d/rc5.d/S30sshd -> ../init.d/sshd +drwxr-xr-x root/root etc/rc.d/rc6.d/ +lrwxrwxrwx root/root etc/rc.d/rc6.d/K30sshd -> ../init.d/sshd +drwxr-xr-x root/root etc/rc.d/rcsysinit.d/ +drwxr-xr-x root/root etc/ssh/ +-rw-r--r-- root/root etc/ssh/moduli +-rw-r--r-- root/root etc/ssh/ssh_config +-rw-r--r-- root/root etc/ssh/sshd_config +drwxr-xr-x root/root etc/sysconfig/ +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-rwxr-xr-x root/root usr/bin/scp +-rwxr-xr-x root/root usr/bin/sftp +lrwxrwxrwx root/root usr/bin/slogin -> ./ssh +-rwxr-xr-x root/root usr/bin/ssh +-rwxr-xr-x root/root usr/bin/ssh-add +-rwxr-xr-x root/root usr/bin/ssh-agent +-rwxr-xr-x root/root usr/bin/ssh-keygen +-rwxr-xr-x root/root usr/bin/ssh-keyscan +drwxr-xr-x root/root usr/lib/ +drwxr-xr-x root/root usr/lib/openssh/ +-rwxr-xr-x root/root usr/lib/openssh/sftp-server +-rws--x--x root/root usr/lib/openssh/ssh-keysign +drwxr-xr-x root/root usr/sbin/ +-rwxr-xr-x root/root usr/sbin/sshd +drwxr-xr-x root/root usr/share/ +-rw-r--r-- root/root usr/share/Ssh.bin +drwxr-xr-x root/root usr/share/man/ +drwxr-xr-x root/root usr/share/man/man1/ +-rw-r--r-- root/root usr/share/man/man1/scp.1.gz +-rw-r--r-- root/root usr/share/man/man1/sftp.1.gz +lrwxrwxrwx root/root usr/share/man/man1/slogin.1.gz -> ssh.1.gz +-rw-r--r-- root/root usr/share/man/man1/ssh-add.1.gz +-rw-r--r-- root/root usr/share/man/man1/ssh-agent.1.gz +-rw-r--r-- root/root usr/share/man/man1/ssh-keygen.1.gz +-rw-r--r-- root/root usr/share/man/man1/ssh-keyscan.1.gz +-rw-r--r-- root/root usr/share/man/man1/ssh.1.gz +drwxr-xr-x root/root usr/share/man/man5/ +-rw-r--r-- root/root usr/share/man/man5/moduli.5.gz +-rw-r--r-- root/root usr/share/man/man5/ssh_config.5.gz +-rw-r--r-- root/root usr/share/man/man5/sshd_config.5.gz +drwxr-xr-x root/root usr/share/man/man8/ +-rw-r--r-- root/root usr/share/man/man8/sftp-server.8.gz +-rw-r--r-- root/root usr/share/man/man8/ssh-keysign.8.gz +-rw-r--r-- root/root usr/share/man/man8/sshd.8.gz +drwxr-xr-x root/root var/ +drwxr-xr-x root/root var/lib/ +drwx------ root/sys var/lib/sshd/ diff --git a/base/openssh/.md5sum b/base/openssh/.md5sum new file mode 100644 index 000000000..e9f17dd19 --- /dev/null +++ b/base/openssh/.md5sum @@ -0,0 +1,2 @@ +ada79c7328a8551bdf55c95e631e7dad openssh-5.2p1.tar.gz +3dc8a0c96046ec3f058c0c2f226512f6 sshd diff --git a/base/openssh/Pkgfile b/base/openssh/Pkgfile new file mode 100755 index 000000000..551e8799a --- /dev/null +++ b/base/openssh/Pkgfile @@ -0,0 +1,37 @@ +# Description: Outils client et serveur de shell sécurisé +# URL: http://www.openssh.org/ +# Maintainer: NuTyX coreteam +# Packager: thierryn1 at hispeed dot ch +# Depends on: openssl, zlib, tcp_wrappers + +name=openssh +version=5.2p1 +release=1 +source=(ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/$name-$version.tar.gz\ + sshd\ +) + +build() { + source /etc/blfs-bootscripts + wget http://www.linuxfromscratch.org/blfs/downloads/svn/$scripts-$scriptsversion.tar.bz2 + tar xvf $scripts-$scriptsversion.tar.bz2 + cd $name-$version + sed -i "s:-lcrypto:/usr/lib/libcrypto.a -ldl:g" configure + sed -i "s/lkrb5 -ldes/lkrb5/" configure + install -v -m700 -d $PKG/var/lib/sshd + chown -v 0:2 $PKG/var/lib/sshd + ./configure --prefix=/usr \ + --sysconfdir=/etc/ssh \ + --libexecdir=/usr/lib/openssh \ + --with-tcp-wrappers --with-md5-passwords \ + --with-privsep-path=/var/lib/sshd \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --disable-debug + make DESTDIR=$PKG install + cd ../$scripts-$scriptsversion + make DESTDIR=$PKG install-sshd + rm $PKG/etc/rc.d/init.d/sshd + install -m755 ../sshd $PKG/etc/rc.d/init.d/ + echo "PermitRootLogin no" >> $PKG/etc/ssh/sshd_config +} diff --git a/base/openssh/sshd b/base/openssh/sshd new file mode 100644 index 000000000..468b89973 --- /dev/null +++ b/base/openssh/sshd @@ -0,0 +1,63 @@ +#!/bin/sh +# Begin $rc_base/init.d/sshd + +# Based on sysklogd script from LFS-3.1 and earlier. +# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org +# Add create user and Groups - thierryn1@hispeed.ch + +# $Id: sshd,v 1.2 2007/09/26 10:21:45 install Exp install $ + +. /etc/sysconfig/rc +. $rc_functions +newgroup=sshd +newuser=sshd +newid=50 +getent group $newgroup > /dev/null || /usr/sbin/groupadd -g $newid $newgroup +getent passwd $newuser > /dev/null || /usr/sbin/useradd -g $newgroup \ +-u $newid -d /var/lib/sshd -s /bin/false -c "sshd PrivSep" $newuser + +case "$1" in + start) + boot_mesg "Starting SSH Server..." + if [ ! -f /etc/ssh/ssh_host_key ]; then + /usr/bin/ssh-keygen -t rsa1 -N "" -f /etc/ssh/ssh_host_key + fi + if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then + /usr/bin/ssh-keygen -t rsa -N "" -f /etc/ssh/ssh_host_rsa_key + fi + if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then + /usr/bin/ssh-keygen -t dsa -N "" -f /etc/ssh/ssh_host_dsa_key + fi + # Also prevent ssh from being killed by out of memory conditions + loadproc /usr/sbin/sshd + sleep 1 + echo "-16" >/proc/`cat /var/run/sshd.pid`/oom_adj + ;; + + stop) + boot_mesg "Stopping SSH Server..." + killproc /usr/sbin/sshd + ;; + + reload) + boot_mesg "Reloading SSH Server..." + reloadproc /usr/sbin/sshd + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + status) + statusproc /usr/sbin/sshd + ;; + + *) + echo "Usage: $0 {start|stop|reload|restart|status}" + exit 1 + ;; +esac + +# End $rc_base/init.d/sshd -- cgit v1.2.3-70-g09d2