diff options
author | Juergen Daubert <jue@jue.li> | 2021-05-22 18:25:50 +0200 |
---|---|---|
committer | Juergen Daubert <jue@jue.li> | 2021-05-22 18:25:50 +0200 |
commit | 2a4ebee4d21d095d55942fbfef03eb64aed54e55 (patch) | |
tree | 207a5981556e50d7829ab65104cd3b129123571d /dropbear | |
parent | 55ecfde3835d4d9a90a65941d1a8590ee2e16bc6 (diff) | |
download | opt-2a4ebee4d21d095d55942fbfef03eb64aed54e55.tar.gz opt-2a4ebee4d21d095d55942fbfef03eb64aed54e55.tar.xz |
dropbear: fix rc-script
Diffstat (limited to 'dropbear')
-rw-r--r-- | dropbear/.signature | 6 | ||||
-rw-r--r-- | dropbear/Pkgfile | 36 | ||||
-rw-r--r-- | dropbear/dropbear.rc | 27 |
3 files changed, 26 insertions, 43 deletions
diff --git a/dropbear/.signature b/dropbear/.signature index 8a8e6fce2..ee3dad9a9 100644 --- a/dropbear/.signature +++ b/dropbear/.signature @@ -1,7 +1,7 @@ untrusted comment: verify with /etc/ports/opt.pub -RWSE3ohX2g5d/cpHM5I325/rdm29LwZsguYh0iad5pjSo7PnQRFiM432ddgbObomCP46LJMAEKMsxvZlk1bRjPL01GVKq2218g8= -SHA256 (Pkgfile) = c9c4ecb8a087f934f432578daa84fecb5a2e121d1a926dd28baf6deb88469a19 +RWSE3ohX2g5d/dca4jCzCpCfuAWsWhODpNC5Ks2EGpuYu/yjodnRS3VYjS4hEq2JdPMcEnrte6x6cxrrI9cbHk8achTLMhGg4Qs= +SHA256 (Pkgfile) = 33b046761053b5bf399aae889831d5f906e4e9df886a9e5978d7b04a8f30c730 SHA256 (.footprint) = 5d47799d69d21b860be70eb9e767298617679bcee2140d245cbc74f4a2a4502e SHA256 (dropbear-2020.81.tar.bz2) = 48235d10b37775dbda59341ac0c4b239b82ad6318c31568b985730c788aac53b -SHA256 (dropbear.rc) = def8d4ebda5759a3bc55055957235fa47f7e40216badf07830f487f05e7fbd42 +SHA256 (dropbear.rc) = 058090551dce466c7e61ff497d55bf97af02fac13b895dcbc69dabf186020965 SHA256 (dropbear.pam) = 0c0aff342e586e64f2d2a814ef127a2748b223e746c3efccfccc91a5aadbce4a diff --git a/dropbear/Pkgfile b/dropbear/Pkgfile index 67a3ac59e..92faddeb7 100644 --- a/dropbear/Pkgfile +++ b/dropbear/Pkgfile @@ -1,28 +1,28 @@ # Description: Small and secure SSH2 server and client -# URL: https://matt.ucc.asn.au/dropbear/dropbear.html -# Maintainer: Juergen Daubert, jue at crux dot nu -# Depends on: zlib linux-pam +# URL: https://matt.ucc.asn.au/dropbear/dropbear.html +# Maintainer: Juergen Daubert, jue at crux dot nu +# Depends on: zlib linux-pam name=dropbear version=2020.81 -release=1 +release=2 source=(https://matt.ucc.asn.au/$name/releases/$name-$version.tar.bz2 \ - dropbear.rc dropbear.pam) + dropbear.rc dropbear.pam) -build () { - cd $name-$version +build() { + cd $name-$version - sed '/pam_start/s/sshd/dropbear/' -i svr-authpam.c - - echo '#define SFTPSERVER_PATH "/usr/lib/ssh/sftp-server"' > localoptions.h - echo '#define DROPBEAR_SVR_PASSWORD_AUTH 0' >> localoptions.h - echo '#define DROPBEAR_SVR_PAM_AUTH 1' >> localoptions.h + sed '/pam_start/s/sshd/dropbear/' -i svr-authpam.c - ./configure --prefix=/usr --enable-pam - make - make DESTDIR=$PKG install + echo '#define SFTPSERVER_PATH "/usr/lib/ssh/sftp-server"' > localoptions.h + echo '#define DROPBEAR_SVR_PASSWORD_AUTH 0' >> localoptions.h + echo '#define DROPBEAR_SVR_PAM_AUTH 1' >> localoptions.h - install -d $PKG/etc/{rc.d,pam.d,dropbear} - install -m 755 $SRC/dropbear.rc $PKG/etc/rc.d/dropbear - install -m 644 $SRC/dropbear.pam $PKG/etc/pam.d/dropbear + ./configure --prefix=/usr --enable-pam + make + make DESTDIR=$PKG install + + install -d $PKG/etc/{rc.d,pam.d,dropbear} + install -m 755 $SRC/dropbear.rc $PKG/etc/rc.d/dropbear + install -m 644 $SRC/dropbear.pam $PKG/etc/pam.d/dropbear } diff --git a/dropbear/dropbear.rc b/dropbear/dropbear.rc index 20f6b2246..ead543baf 100644 --- a/dropbear/dropbear.rc +++ b/dropbear/dropbear.rc @@ -7,35 +7,18 @@ SSD=/sbin/start-stop-daemon PROG=/usr/sbin/dropbear PID=/var/run/dropbear.pid -CONV=/usr/bin/dropbearconvert KEYG=/usr/bin/dropbearkey RSA=/etc/dropbear/dropbear_rsa_host_key DSS=/etc/dropbear/dropbear_dss_host_key ECDSA=/etc/dropbear/dropbear_ecdsa_host_key +ED25519=/etc/dropbear/dropbear_ed25519_host_key create_keys() { - if [ ! -f $RSA ]; then - if [ -f /etc/ssh/ssh_host_rsa_key ]; then - $CONV openssh dropbear /etc/ssh/ssh_host_rsa_key $RSA - else - $KEYG -t rsa -s 4096 -f $RSA - fi - fi - if [ ! -f $DSS ]; then - if [ -f /etc/ssh/ssh_host_dsa_key ]; then - $CONV openssh dropbear /etc/ssh/ssh_host_dsa_key $DSS - else - $KEYG -t dss -f $DSS - fi - fi - if [ ! -f $ECDSA ]; then - if [ -f /etc/ssh/ssh_host_ecdsa_key ]; then - $CONV openssh dropbear /etc/ssh/ssh_host_ecdsa_key $ECDSA - else - $KEYG -t ecdsa -s 521 -f $ECDSA - fi - fi + [ -f $RSA ] || $KEYG -t rsa -s 4096 -f $RSA + [ -f $DSS ] || $KEYG -t dss -f $DSS + [ -f $ECDSA ] || $KEYG -t ecdsa -s 521 -f $ECDSA + [ -f ED25519 ] || $KEYG -t ed25519 -f $ED25519 } case $1 in |