From a6e958ed6224a3fe7649d022ee04a5e44404ab73 Mon Sep 17 00:00:00 2001 From: short <> Date: Thu, 4 Apr 2002 00:04:16 +0000 Subject: [PATCH] Script pathname ($0) is no longer important, just currentdir and its basename FTP now uses passive mode to workaround broken firewalls FTP now runs in verbose ("-v") mode OpenSSL update: 0.9.6b -> 0.9.6c OpenSSH update: 3.0p1 -> 3.1p1 - implemented FreeBSD compatibility patch "openssh-3.1p1-i386-unknown-freebsd2.2.5.diff" patch now uses option -N to prevent asks for reverse-applying of the patches - some files may be patched multiple times (when no "^-" lines exist): /etc/rc.local /root/.login /etc/inetd.conf /etc/crontab Fixed logging file filename - current day was replaced by current hour [cs_CZ] Direktorarova cesta ke skriptu jiz neni dulezita, jen aktualni direktorar a bazove jmeno skriptu FTP nyni pouziva pasivni mod pro obejiti vymrvenych firewallu FTP nyni bezi v ukecanem ("-v") rezimu OpenSSL update: 0.9.6b -> 0.9.6c OpenSSH update: 3.0p1 -> 3.1p1 - implementovan patch pro kompatibiltu s FreeBSD: "openssh-3.1p1-i386-unknown-freebsd2.2.5.diff" patch nyni pouziva volbu -N pro predejiti otazky na reverze-aplikaci patchu - nektere soubory mohou byt patchnuty vicekrat (kdyz nemaji zadny "^-" radek) /etc/rc.local /root/.login /etc/inetd.conf /etc/crontab Opraveno jmeno logovaciho souboru - aktualni den byl zemenen aktualni hodinou --- enbrace.bash | 74 ++++++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 60 insertions(+), 14 deletions(-) diff --git a/enbrace.bash b/enbrace.bash index b2924c5..3abb69b 100755 --- a/enbrace.bash +++ b/enbrace.bash @@ -3,6 +3,13 @@ # $Id$ # # cd;echo 'default login anonymous password short@' >~/.netrc;echo -e 'bi\nhash\ncd pub/priv/short/enbrace\nget enbrace.bash\nquit'|ftp vellum.cz;/usr/local/bin/bash enbrace.bash +# +# Patch multi-application liable files: +# [cs_CZ] Soubory citlive na vicenasobnou aplikaci patche: +# /etc/rc.local +# /root/.login +# /etc/inetd.conf +# /etc/crontab function fatal { @@ -10,10 +17,10 @@ function fatal exit 1 } -if [ "$USER" != "root" ];then fatal "This script must be run as 'root'" ;fi -if [ "$PWD" != "/root" ];then fatal "This script must be run from directory '/root'" ;fi -if [ "$0" != "enbrace.bash" ];then fatal "This script must be named 'enbrace.bash'" ;fi -if [ -e "enbrace" ];then fatal "'/root/enbrace' directory already exists" ;fi +if [ "$USER" != "root" ];then fatal "This script must be run as 'root'" ;fi +if [ "$PWD" != "/root" ];then fatal "This script must be run from directory '/root'" ;fi +if [ "`basename "$0"`" != "enbrace.bash" ];then fatal "This script must be named 'enbrace.bash'" ;fi +if [ -e "enbrace" ];then fatal "'/root/enbrace' directory already exists" ;fi function ftpget { @@ -24,6 +31,7 @@ default prom bi hash + pass EOF if [ $# != 1 ];then fatal "ftpget(): (arg1=URL) required!";fi @@ -36,7 +44,7 @@ EOF echo -n "Using already downloaded file \"$1\": ";ls -l "$file" return 0 fi - echo -e "cd \"$dir\"\\nget \"$file\"\\nquit"|ftp "$host" + echo -e "cd \"$dir\"\\nget \"$file\"\\nquit"|ftp -v "$host" return 0 } @@ -45,8 +53,8 @@ set -ex ( # Config - openssl="ftp://ftp.openssl.org/source/openssl-0.9.6b.tar.gz" - openssh="ftp://ftp1.se.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-3.0p1.tar.gz" + openssl="ftp://ftp.openssl.org/source/openssl-0.9.6c.tar.gz" + openssh="ftp://ftp1.se.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-3.1p1.tar.gz" # Init chmod +x enbrace.bash @@ -163,10 +171,46 @@ EOF +# Jan Kolar /Lace +*/30 * * * * root /usr/sbin/sendmail -q EOF + cat >openssh-3.1p1-i386-unknown-freebsd2.2.5.diff <>confdefs.h <<\_ACEOF ++#define HAVE_BOGUS_SYS_QUEUE_H 1 ++_ACEOF ++ + ;; + *-next-*) + conf_lastlog_location="/usr/adm/lastlog" +--- defines.h-orig Wed Feb 27 03:40:49 2002 ++++ defines.h Thu Apr 4 01:00:56 2002 +@@ -146,7 +146,7 @@ + including rpc/rpc.h breaks Solaris 6 + */ + #ifndef INADDR_LOOPBACK +-#define INADDR_LOOPBACK ((ulong)0x7f000001) ++#define INADDR_LOOPBACK ((unsigned long)0x7f000001) + #endif + + /* Types */ +EOF # Sendmail (cd / - patch -sEp0 &1|tee errs2 make install 2>&1|tee errs3 ) - patch /etc/rc.local &1|tee enbrace.`date '+%Y-%m-%H-%H:%M:%S'`.log +) 2>&1|tee enbrace.`date '+%Y-%m-%d-%H:%M:%S'`.log + -- 1.8.3.1