wok-next rev 17046

Add tcpd
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Aug 20 12:09:19 2014 +0200 (2014-08-20)
parents 3d34d531561a
children eb612c761921
files busybox/stuff/inetd.conf dropbear/receipt rsync/receipt tcpd/receipt
line diff
     1.1 --- a/busybox/stuff/inetd.conf	Tue Aug 19 23:37:07 2014 +0200
     1.2 +++ b/busybox/stuff/inetd.conf	Wed Aug 20 12:09:19 2014 +0200
     1.3 @@ -26,9 +26,10 @@
     1.4  
     1.5  # These are standard services.
     1.6  #
     1.7 -tftp	dgram	udp	wait	root	/usr/sbin/tftpd	/usr/sbin/tftpd -r /boot
     1.8 -#systat	stream	tcp	nowait	nobody	/bin/ps
     1.9 -#netstat	stream	tcp	nowait	root	/bin/netstat	/bin/netstat	-a
    1.10 -#http	stream	tcp	nowait	root	/usr/sbin/httpd	/usr/sbin/httpd	-i -u 80:80
    1.11 -#ftp	stream	tcp	nowait	root	/usr/sbin/ftpd	/usr/sbin/ftpd	-w /home/ftp
    1.12 -#printer	stream	tcp	nowait	root	/usr/sbin/lpd	/usr/sbin/lpd	/var/spool/lpd
    1.13 +tftp	dgram	udp	wait	root	tftpd	tftpd -r /boot
    1.14 +#systat	stream	tcp	nowait	nobody	ps
    1.15 +#netstat	stream	tcp	nowait	root	netstat	netstat	-a
    1.16 +#http	stream	tcp	nowait	root	httpd	httpd	-i -u 80:80
    1.17 +#ftp	stream	tcp	nowait	root	ftpd	ftpd	-w /home/ftp
    1.18 +#printer	stream	tcp	nowait	root	lpd	lpd	/var/spool/lpd
    1.19 +#telnet	stream	tcp	nowait	root	telnetd	telnetd	-i
     2.1 --- a/dropbear/receipt	Tue Aug 19 23:37:07 2014 +0200
     2.2 +++ b/dropbear/receipt	Wed Aug 20 12:09:19 2014 +0200
     2.3 @@ -9,7 +9,7 @@
     2.4  TARBALL="$PACKAGE-$VERSION.tar.bz2"
     2.5  WEB_SITE="http://matt.ucc.asn.au/dropbear/dropbear.html"
     2.6  WGET_URL="http://matt.ucc.asn.au/dropbear/releases/$TARBALL"
     2.7 -CONFIG_FILES="/etc/dropbear"
     2.8 +CONFIG_FILES="/etc/dropbear /etc/inetd.conf"
     2.9  SUGGESTED="sftp-server"
    2.10  PROVIDE="ssh"
    2.11  TAGS="ssh"
    2.12 @@ -92,7 +92,15 @@
    2.13  /etc/dropbear/dropbear_rsa_host_key	/etc/ssh/ssh_host_rsa_key
    2.14  /etc/dropbear/dropbear_dss_host_key	/etc/ssh/ssh_host_dsa_key
    2.15  EOT
    2.16 +	grep -q ssh $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT
    2.17 +#ssh	stream	tcp	nowait	root	dropbear	dropbear	-i -b /etc/dropbear/banner
    2.18 +EOT
    2.19  	echo -e "\nTo starts $PACKAGE server you can run :\n"
    2.20  	echo "/etc/init.d/$PACKAGE start"
    2.21  	echo -e "Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf\n"
    2.22  }
    2.23 +
    2.24 +post_remove()
    2.25 +{
    2.26 +	grep -q dropbear $1/etc/inetd.conf && sed -i '/dropbear/d' $1/etc/inetd.conf
    2.27 +}
     3.1 --- a/rsync/receipt	Tue Aug 19 23:37:07 2014 +0200
     3.2 +++ b/rsync/receipt	Wed Aug 20 12:09:19 2014 +0200
     3.3 @@ -9,7 +9,7 @@
     3.4  TARBALL="$PACKAGE-$VERSION.tar.gz"
     3.5  WEB_SITE="http://rsync.samba.org/"
     3.6  WGET_URL="${WEB_SITE}ftp/rsync/$TARBALL"
     3.7 -CONFIG_FILES="/etc/rsyncd.conf /etc/rsyncd.secrets"
     3.8 +CONFIG_FILES="/etc/rsyncd.conf /etc/rsyncd.secrets /etc/inetd.conf"
     3.9  TAGS="sync copy secure"
    3.10  HOST_ARCH="i486 arm"
    3.11  
    3.12 @@ -46,5 +46,12 @@
    3.13  	cp -a $stuff/etc $fs
    3.14  	chown root.root $fs/etc/init.d/*
    3.15  	chmod 0644 $fs/etc/rsyncd.conf
    3.16 +	grep -q rsync $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT
    3.17 +#rsync	stream	tcp	nowait	root	rsync	rsync	-daemon
    3.18 +EOT
    3.19 +}
    3.20  
    3.21 +post_remove()
    3.22 +{
    3.23 +	grep -q rsync $1/etc/inetd.conf && sed -i '/rsync/d' $1/etc/inetd.conf
    3.24  }
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/tcpd/receipt	Wed Aug 20 12:09:19 2014 +0200
     4.3 @@ -0,0 +1,24 @@
     4.4 +# SliTaz package receipt.
     4.5 +
     4.6 +PACKAGE="tcpd"
     4.7 +VERSION="7.6"
     4.8 +CATEGORY="development"
     4.9 +SHORT_DESC="Wietse Venema's network encapsulation files."
    4.10 +MAINTAINER="erjo@slitaz.org"
    4.11 +LICENSE="BSD"
    4.12 +WANTED="libwrap"
    4.13 +WEB_SITE="ftp://ftp.porcupine.org/pub/security/index.html"
    4.14 +HOST_ARCH="i486 arm"
    4.15 +
    4.16 +DEPENDS="libwrap"
    4.17 +
    4.18 +# Rules to gen a SliTaz package suitable for Tazpkg.
    4.19 +genpkg_rules()
    4.20 +{
    4.21 +	mkdir -p $fs/usr/sbin
    4.22 +	cp -a $src/tcpd $fs/usr/sbin
    4.23 +	cp -a $src/tcpdchk $fs/usr/sbin
    4.24 +	cp -a $src/tcpdmatch $fs/usr/sbin
    4.25 +	cp -a $src/try-from $fs/usr/sbin
    4.26 +	cp -a $src/safe_finger $fs/usr/sbin
    4.27 +}