Skip to content

Commit

Permalink
dropbear: update to 20231212 (and disable linux-pam)
Browse files Browse the repository at this point in the history
  • Loading branch information
sepen committed Jan 6, 2024
1 parent f08dc00 commit c30dd03
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 0 deletions.
19 changes: 19 additions & 0 deletions dropbear/.footprint
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
drwxr-xr-x root/root etc/
drwxr-xr-x root/root etc/dropbear/
drwxr-xr-x root/root etc/rc.d/
-rwxr-xr-x root/root etc/rc.d/dropbear
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/dbclient
-rwxr-xr-x root/root usr/bin/dropbearconvert
-rwxr-xr-x root/root usr/bin/dropbearkey
drwxr-xr-x root/root usr/sbin/
-rwxr-xr-x root/root usr/sbin/dropbear
drwxr-xr-x root/root usr/share/
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/dbclient.1.gz
-rw-r--r-- root/root usr/share/man/man1/dropbearconvert.1.gz
-rw-r--r-- root/root usr/share/man/man1/dropbearkey.1.gz
drwxr-xr-x root/root usr/share/man/man8/
-rw-r--r-- root/root usr/share/man/man8/dropbear.8.gz
2 changes: 2 additions & 0 deletions dropbear/.md5sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
a75a34bcc03cacf71a2db9da3b7c94a5 dropbear-2022.83.tar.bz2
3a7e24d43d5051c35c4edd18d31399bc dropbear.rc
25 changes: 25 additions & 0 deletions dropbear/Pkgfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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
# Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu
# Depends on: zlib

name=dropbear
version=2022.83
release=1
source=(https://matt.ucc.asn.au/$name/releases/$name-$version.tar.bz2 \
dropbear.rc)

build() {
cd $name-$version

echo '#define SFTPSERVER_PATH "/usr/lib/ssh/sftp-server"' > localoptions.h
echo '#define DROPBEAR_PIDFILE "/var/run/dropbear.pid"' >> localoptions.h

./configure --prefix=/usr
make
make DESTDIR=$PKG install

install -d $PKG/etc/{rc.d,dropbear}
install -m 755 $SRC/dropbear.rc $PKG/etc/rc.d/dropbear
}
42 changes: 42 additions & 0 deletions dropbear/dropbear.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/sh
#
# /etc/rc.d/dropbear: start/stop dropbear ssh 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() {
[ -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
start)
create_keys
$PROG -P $PID
;;
stop)
killall -q $PROG || kill -9 $(cat $PID)
;;
restart)
$0 stop
sleep 2
$0 start
;;
*)
echo "usage: $0 [start|stop|restart]"
;;
esac

# End of file

0 comments on commit c30dd03

Please sign in to comment.