fix for internal redirection flags colliding with open/fcntl flags; call memfd_create with MFD_NOEXEC_SEAL; fix for setting $BASH in su-started login shell; fix for unsetting $REPLY after nofork comsubs

This commit is contained in:
Chet Ramey
2024-05-01 11:39:51 -04:00
parent 9c430f6bf3
commit 1f42d15864
17 changed files with 118 additions and 357 deletions
-8
View File
@@ -1,8 +0,0 @@
FROM alpine:3.17
RUN apk add --no-cache bison coreutils gcc libc-dev make
ncurses-dev libncurses5-dev libncursesw5-dev
WORKDIR /tmp/bash
COPY . .
RUN ./configure --enable-readline --with-curses
RUN make
RUN make tests
-56
View File
@@ -1,56 +0,0 @@
#! /bin/sh
#
# relicense - change copyrights between GPL2 and GPL3
#
# usage: relicense [n]
#
# n is `2' or `3'. The default `n' is 2
#
# Chet Ramey
# chet.ramey@case.edu
#
SRC=/usr/homes/chet/src/bash/src
V=2
if [ ! -f parse.y ]; then
echo "relicense: must be run from source directory to be relicensed" >&2
exit 2
fi
case "$1" in
2) V=2 ;;
3) V=3 ;;
"") ;;
*) echo "relicense: usage: relicense [2|3]" >&2 ; exit 2 ;;
esac
LIC2="version 2 of the License"
LIC3="version 3 of the License"
VS2='GPLv2+: GNU GPL version 2 or later'
VS3='GPLv3+: GNU GPL version 3 or later'
case "$V" in
2) PAT1="$LIC3" REP1="$LIC2" PAT2="$VS3" REP2="$VS2" ;;
3) PAT1="$LIC2" REP1="$LIC3" PAT2="$VS2" REP2="$VS3" ;;
esac
find . -type f -print |
while read fn ; do
BASE=${fn##*/}
sed -e "s|$PAT1|$REP1|g" -e "s|$PAT2|$REP2|g" < $fn > /tmp/$BASE && touch -r $fn /tmp/$BASE
cmp -s /tmp/$BASE $fn || mv /tmp/$BASE $fn
echo $fn
rm -f /tmp/$BASE
done
echo "relicense: copying appropriate license file"
case "$V" in
2) cp -p $SRC/COPYINGv2 COPYING
cp -p $SRC/COPYINGv2 lib/readline/COPYING ;;
3) cp -p $SRC/COPYINGv3 COPYING
cp -p $SRC/COPYINGv3 lib/readline/COPYING ;;
esac
exit 0