X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage2%2Fcis-openssh;h=c4187718ff6a96f59ffa68c0893ea2c59caed3ae;hb=425bbc4fed1d0106b78befe474328fb9f5a15334;hp=148ca8d53a387ca254e4aa889afab1a4398b2764;hpb=16cc35ba4890382ee9368a176e4f5a7fa773b7a6;p=hvlinux.git diff --git a/stage2/cis-openssh b/stage2/cis-openssh index 148ca8d..c418771 100755 --- a/stage2/cis-openssh +++ b/stage2/cis-openssh @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,37 +9,38 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -install -v -m700 -d /var/lib/sshd && -chown -v root:sys /var/lib/sshd && +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 && +hv_groupadd sshd +hv_useradd -c sshd-privsep -d /var/lib/sshd -g sshd -s /bin/false sshd -cd ${LFS_TMP}/${1}-build && +cd ${LFS_TMP}/${1}-build ../${1}/configure \ --prefix=/usr \ --sysconfdir=/etc/ssh \ + --datadir=/usr/share/sshd \ + --with-pam \ --libexecdir=/usr/lib/openssh \ --with-md5-passwords \ - --with-privsep-path=/var/lib/sshd && -make -j ${MAKEJOBS} && -make -j ${MAKEJOBS} install && + --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} && +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} && + /usr/share/doc/${1} # Disabling root logins -sed -i -e "s!^#PermitRootLogin.*!PermitRootLogin no!g" /etc/ssh/sshd_config && +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 && +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 $?