summaryrefslogtreecommitdiff
path: root/source/n/lynx
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2018-05-28 19:12:29 +0000
committerEric Hameleers <alien@slackware.com>2018-05-31 23:39:35 +0200
commit646a5c1cbfd95873950a87b5f75d52073a967023 (patch)
treeb8b8d2ab3b0d432ea69ad1a64d1c789649d65020 /source/n/lynx
parentd31c50870d0bee042ce660e445c9294a59a3a65b (diff)
downloadcurrent-646a5c1cbfd95873950a87b5f75d52073a967023.tar.gz
Mon May 28 19:12:29 UTC 201820180528191229
a/pkgtools-15.0-noarch-13.txz: Rebuilt. installpkg: default line length for --terselength is the number of columns. removepkg: added --terse mode. upgradepkg: default line length for --terselength is the number of columns. upgradepkg: accept -option in addition to --option. ap/vim-8.1.0026-x86_64-1.txz: Upgraded. d/bison-3.0.5-x86_64-1.txz: Upgraded. e/emacs-26.1-x86_64-1.txz: Upgraded. kde/kopete-4.14.3-x86_64-8.txz: Rebuilt. Recompiled against libidn-1.35. n/conntrack-tools-1.4.5-x86_64-1.txz: Upgraded. n/libnetfilter_conntrack-1.0.7-x86_64-1.txz: Upgraded. n/libnftnl-1.1.0-x86_64-1.txz: Upgraded. n/links-2.16-x86_64-2.txz: Rebuilt. Rebuilt to enable X driver for -g mode. n/lynx-2.8.9dev.19-x86_64-1.txz: Upgraded. n/nftables-0.8.5-x86_64-1.txz: Upgraded. n/p11-kit-0.23.11-x86_64-1.txz: Upgraded. n/ulogd-2.0.7-x86_64-1.txz: Upgraded. n/whois-5.3.1-x86_64-1.txz: Upgraded. xap/network-manager-applet-1.8.12-x86_64-1.txz: Upgraded. xap/vim-gvim-8.1.0026-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/n/lynx')
-rw-r--r--source/n/lynx/doinst.sh13
-rw-r--r--source/n/lynx/lynx-CVE-2008-4690.patch61
-rwxr-xr-xsource/n/lynx/lynx.SlackBuild27
-rw-r--r--source/n/lynx/lynx.cfg.diff9
-rw-r--r--source/n/lynx/slack-desc12
5 files changed, 105 insertions, 17 deletions
diff --git a/source/n/lynx/doinst.sh b/source/n/lynx/doinst.sh
new file mode 100644
index 00000000..79c36713
--- /dev/null
+++ b/source/n/lynx/doinst.sh
@@ -0,0 +1,13 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+config etc/lynx.cfg.new
diff --git a/source/n/lynx/lynx-CVE-2008-4690.patch b/source/n/lynx/lynx-CVE-2008-4690.patch
new file mode 100644
index 00000000..a0a6a320
--- /dev/null
+++ b/source/n/lynx/lynx-CVE-2008-4690.patch
@@ -0,0 +1,61 @@
+From c60c227ab9a36246730d7454e33d40d2c66c88b3 Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka@redhat.com>
+Date: Wed, 13 Feb 2013 15:26:22 +0100
+Subject: [PATCH] fix CVE-2008-4690
+
+prompt user before executing command via a lynxcgi link even in advanced mode,
+as the actual URL may not be shown but hidden behind an HTTP redirect and set
+TRUSTED_LYNXCGI:none in lynx.cfg to disable all lynxcgi URLs by default
+---
+ CHANGES | 7 +++++++
+ lynx.cfg | 2 +-
+ src/LYCgi.c | 2 +-
+ 3 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/CHANGES b/CHANGES
+index 360be68..8eca013 100644
+--- a/CHANGES
++++ b/CHANGES
+@@ -1237,6 +1237,13 @@ Changes since Lynx 2.8 release
+ * update win32 makefiles/build scripts to add LYmktime, parsdate modules -TD
+ * update config.guess (2008-04-14), config.sub (2008-06-16)
+
++2008-10-26
++* modify patch for CVE-2005-2929 to prompt user before executing command via
++ a lynxcgi link even in advanced mode, as the actual URL may not be shown but
++ hidden behind an HTTP redirect
++* set TRUSTED_LYNXCGI:none in lynx.cfg to disable all lynxcgi URLs by default
++ [CVE-2008-4690]
++
+ 2008-09-21 (2.8.7dev.10)
+ * remove rw.po, since the translation project no longer supplies it -TD
+ * implement "readonly" attribute for TEXTAREA and TEXT fields -TD
+diff --git a/lynx.cfg b/lynx.cfg
+index ee2aad3..144050d 100644
+--- a/lynx.cfg
++++ b/lynx.cfg
+@@ -1087,7 +1087,7 @@ CHARACTER_SET:utf-8
+ #
+ # The default TRUSTED_LYNXCGI rule is "none".
+ #
+-#TRUSTED_LYNXCGI:none
++TRUSTED_LYNXCGI:none
+
+ .h2 LYNXCGI_ENVIRONMENT
+ # Unix:
+diff --git a/src/LYCgi.c b/src/LYCgi.c
+index 832bb89..0ae8a7e 100644
+--- a/src/LYCgi.c
++++ b/src/LYCgi.c
+@@ -167,7 +167,7 @@ static BOOL can_exec_cgi(const char *linktext, const char *linkargs)
+ if (!exec_ok(HTLoadedDocumentURL(), linktext, CGI_PATH)) {
+ /* exec_ok gives out msg. */
+ result = FALSE;
+- } else {
++ } else if (user_mode < ADVANCED_MODE) {
+ StrAllocCopy(command, linktext);
+ if (non_empty(linkargs)) {
+ HTSprintf(&command, " %s", linkargs);
+--
+1.7.1
+
diff --git a/source/n/lynx/lynx.SlackBuild b/source/n/lynx/lynx.SlackBuild
index 9ee032f9..721c4afe 100755
--- a/source/n/lynx/lynx.SlackBuild
+++ b/source/n/lynx/lynx.SlackBuild
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!/bin/bash
-# Copyright 2008, 2009, 2010, 2012, 2016 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010, 2012, 2016, 2017, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,9 +20,11 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
-PKGVER=2.8.8rel.2
-DIRVER=2-8-8
+PKGNAM=lynx
+PKGVER=2.8.9dev.19
+DIRVER=2.8.9dev.19
BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j7 "}
@@ -37,6 +39,14 @@ if [ -z "$ARCH" ]; then
esac
fi
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$PKGVER-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
@@ -51,7 +61,6 @@ else
LIBDIRSUFFIX=""
fi
-CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-lynx
@@ -70,7 +79,9 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Apply recolorizing patch:
+zcat $CWD/lynx-CVE-2008-4690.patch.gz | patch -p1 --verbose || exit 1
+
+# Change default colors:
zcat $CWD/lynx.cfg.diff.gz | patch -p1 --verbose --backup || exit 1
CFLAGS="$SLKCFLAGS" \
@@ -117,6 +128,9 @@ make install DESTDIR=$PKG || exit 1
make install-help DESTDIR=$PKG || exit 1
make install-doc DESTDIR=$PKG || exit 1
+# Make lynx.cfg a preserved config file:
+mv $PKG/etc/lynx.cfg $PKG/etc/lynx.cfg.new
+
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
@@ -144,6 +158,7 @@ fi
gzip -9 $PKG/usr/man/man?/*.?
mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
diff --git a/source/n/lynx/lynx.cfg.diff b/source/n/lynx/lynx.cfg.diff
index c7ab6257..244dbd02 100644
--- a/source/n/lynx/lynx.cfg.diff
+++ b/source/n/lynx/lynx.cfg.diff
@@ -1,7 +1,6 @@
-diff -Nur lynx2-8-7.orig/lynx.cfg lynx2-8-7/lynx.cfg
---- lynx2-8-7.orig/lynx.cfg 2009-06-23 18:53:58.000000000 -0500
-+++ lynx2-8-7/lynx.cfg 2009-12-03 15:35:18.744461098 -0600
-@@ -3025,8 +3025,18 @@
+--- ./lynx.cfg.orig 2014-03-09 16:43:10.000000000 -0500
++++ ./lynx.cfg 2017-05-29 14:35:52.629203408 -0500
+@@ -2969,8 +2969,18 @@
#COLOR:4:magenta:white
#COLOR:5:blue:white
#COLOR:6:red:white
@@ -19,5 +18,5 @@ diff -Nur lynx2-8-7.orig/lynx.cfg lynx2-8-7/lynx.cfg
+COLOR:6:brightred:black
+COLOR:7:magenta:cyan
-
.h2 COLOR_STYLE
+ # Also known as "lss" (lynx style-sheet), the color-style file assigns color
diff --git a/source/n/lynx/slack-desc b/source/n/lynx/slack-desc
index c9209d29..7005f7ba 100644
--- a/source/n/lynx/slack-desc
+++ b/source/n/lynx/slack-desc
@@ -1,18 +1,18 @@
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
+# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
-# make exactly 11 lines for the formatting to be correct. It's also
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
lynx: Lynx (text mode browser)
lynx:
lynx: Lynx is a distributed hypertext browser with full World Wide Web
-lynx: capabilities. Lynx can be used to access information on the World
+lynx: capabilities. Lynx can be used to access information on the World
lynx: Wide Web, or to build information systems intended primarily for local
-lynx: access. For example, Lynx has been used to build several Campus Wide
-lynx: Information Systems (CWIS).
+lynx: access. For example, Lynx has been used to build several Campus Wide
+lynx: Information Systems (CWIS).
lynx:
lynx: Lynx's authors include Lou Montulli, Garrett Blythe, Craig Lavender,
lynx: Michael Grobe, and Charles Rezac.