lha - Uncompresses and compresses .lha packages ChangeLog

HOWTO


# lha 1.14i
# =========
# Slackware 8.1 and up (including current) originally included the original
# 1.14i version of lha, and now include a patched 1.14i (see below).

# If you're using Slackware and you haven't already upgraded things in your
# original 'bin' package, the easiest thing to do would be to grab the latest
# 'bin' package from ftp://ftp.slackware.com/pub/slackware/ for your version
# of slackware and run 'upgradepkg ./bin-*.tgz' to upgrade it.

# The home page link above will take you to the home page for this version.
# There is also a version 1.17 available here, but it is vulnerable to the
# security problems that are fixed by the patch to the 1.14i version.
# The 1.17 version is the one that is listed on freshmeat.net

# lha is part of Slackware's 'bin' package.  Run this to remove the old
# lha and to clean up (remove lha from) the 'bin' package's package file:
FNAME=`find /var/adm/packages/bin* -type f | head -1`
egrep -q "^usr/bin/lha$" $FNAME && (
  rm -f /usr/bin/lha
  cat $FNAME | grep -v "^usr/bin/lha$" > ${FNAME}.new
  test -s ${FNAME}.new &&
  (
   mkdir -p -m 0700 ~/backup/packages
   mv -f $FNAME ${FNAME}.`date +%Y%m%d`
   mv ${FNAME}.`date +%Y%m%d` ~/backup/packages/
   mv -f ${FNAME}.new $FNAME
  )
)
unset FNAME

cd
test -f installed/lha-114i.tar.gz && mv installed/lha-114i.tar.gz .
test ! -f lha-114i.tar.gz &&
wget http://www2m.biglobe.ne.jp/~dolphin/lha/prog/lha-114i.tar.gz
cd /usr/local/src
find -type d -maxdepth 1 -name "lha-*" -exec rm -r {} \;
tar xzvf ~/lha-114i.tar.gz
cd lha-114i
chown -R root.root .

# Apply this patch to fix the buffer overflows and directory traversal
# problems referred to here:
# http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0234
# http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0235
cd src
wget -nc http://englanders.cc/pub/linux/patches/notmine/lha.patch &&
patch -p0 < lha.patch
cd ..

# You can use 'make install BINDIR=/usr/bin MANDIR=/usr/man' if you like
# below (instead of 'install -s ...'), but it will install a man page in
# Japanese that you probably can't read.

make
install -s src/lha /usr/bin/
cd
mkdir -p -m 0700 installed
rm -f installed/lha-*.tar.*
mv lha-114i.tar.gz installed/

List of HOWTOs

Web page itself last updated: 2023-12-20 8:06pm (EST -0500)
HOWTO last updated: 2004-05-21 1:53pm
Copyright © 2001-2024 Jason Englander. All Rights reserved.
[HTML5]