source: scripts/blfs-scripts/blfs-openssh.sh@ 873009c

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 873009c was 617118d, checked in by Jim Gifford <clfs@…>, 19 years ago

r561@server (orig r559): root | 2005-06-05 02:38:49 -0700
Fixed Directory Structure

  • Property mode set to 100755
File size: 1.5 KB
RevLine 
[617118d]1#!/bin/sh
2#
3# Openssh
4#
5# TODO: work to be done to make opensshConfig.sh behave
6cd ${SRC}
7LOG=openssh-blfs.log
8
9set_libdirname
10setup_multiarch
11
12# We require an sshd user and group
13# set to uid 22, gid 22
14id sshd > /dev/null 2>&1 ||
15{
16 echo " o Adding sshd user"
17 groupadd -g 22 sshd
18 useradd -u 22 -g sshd -c 'sshd privsep' -d /var/empty -s /bin/false sshd
19}
20
21if [ ! -d /var/empty ]; then mkdir -p /var/empty; chown root:sys /var/empty; fi
22
23unpack_tarball openssh-${OPENSSH_VER} &&
24cd ${PKGDIR}
25
26max_log_init Openssh ${OPENSSH_VER} "blfs (shared)" ${CONFLOGS} ${LOG}
27CFLAGS="${TGT_CFLAGS}" \
28./configure --prefix=/usr --sysconfdir=/etc/ssh \
29 --libexecdir=/usr/${libdirname}/openssh \
30 --mandir=/usr/share/man --infodir=/usr/share/info \
31 --with-md5-passwords \
32 --with-kerberos5=/usr \
33 --with-tcp-wrappers \
34 --without-pam \
35 >> ${LOGFILE} 2>&1 &&
36echo " o Configure OK" &&
37
38min_log_init ${BUILDLOGS} &&
39make ${PMFLAGS} \
40 >> ${LOGFILE} 2>&1 &&
41echo " o Build OK" &&
42
43min_log_init ${INSTLOGS} &&
44make install \
45 >> ${LOGFILE} 2>&1 &&
46echo " o ALL OK" || barf
47
48# create an sshd wrapper script so we can specify the krb5 keytab
49# Moce sshd to /usr/${libdirname}/openssh
50file /usr/sbin/sshd | grep -q text || {
51 mv /usr/sbin/sshd /usr/${libdirname}/openssh
52
53 cat > /usr/sbin/sshd <<EOF
54#!/bin/sh
55# sshd wrapper script
56#
57# export the location of the krb5 keytab for sshd
58export KRB5_KTNAME=/etc/ssh/sshd.keytab
59/usr/${libdirname}/openssh/sshd \${@}
60
61EOF
62}
63
64chmod 750 /usr/sbin/sshd
65
Note: See TracBrowser for help on using the repository browser.