#!/bin/sh # First argument of this script is the package name # Reading system configuration informations, functions and package versions. source ../sysinfos source ../functions source ../packages-list # Applying patches (if any) apply_patches ${1} && install -v -m700 -d /var/lib/sshd && chown -v root:sys /var/lib/sshd && hv_groupadd sshd && hv_useradd -c sshd-privsep -d /var/lib/sshd -g sshd -s /bin/false sshd && cd ${LFS_TMP}/${1}-build && ../${1}/configure \ --prefix=/usr \ --sysconfdir=/etc/ssh \ --libexecdir=/usr/lib/openssh \ --with-md5-passwords \ --with-privsep-path=/var/lib/sshd && make -j ${MAKEJOBS} && make -j ${MAKEJOBS} install && cd ${LFS_TMP}/${1} && install -v -m755 -d /usr/share/doc/${1} && install -v -m644 INSTALL LICENCE OVERVIEW README* WARNING.RNG \ /usr/share/doc/${1} && # Disabling root logins sed -i -e "s!^#PermitRootLogin.*!PermitRootLogin no!g" /etc/ssh/sshd_config && # Enabling X11 forwarding sed -i -e "s!^#X11Forwarding.*!X11Forwarding yes!g" /etc/ssh/sshd_config && # Setting MaxAuthTries to 1 sed -i -e "s!^#MaxAuthTries.*!MaxAuthTries 1!g" /etc/ssh/sshd_config # Return last error exit $?