2016-09-16 13:10:58 +02:00
|
|
|
---
|
|
|
|
config-top.h | 16 ++++++++++------
|
|
|
|
doc/Makefile.in | 2 +-
|
|
|
|
doc/bash.1 | 7 +++++--
|
|
|
|
general.h | 3 +++
|
|
|
|
parse.y | 2 +-
|
|
|
|
shell.c | 4 +++-
|
|
|
|
support/bashbug.sh | 2 +-
|
|
|
|
support/man2html.c | 1 +
|
|
|
|
support/rlvers.sh | 6 +++---
|
|
|
|
support/shobj-conf | 5 +++--
|
|
|
|
tests/glob.tests | 4 ++--
|
|
|
|
tests/run-intl | 2 +-
|
|
|
|
tests/run-read | 2 +-
|
|
|
|
13 files changed, 35 insertions(+), 21 deletions(-)
|
|
|
|
|
2010-02-18 12:17:29 +01:00
|
|
|
--- config-top.h
|
2016-09-16 13:10:58 +02:00
|
|
|
+++ config-top.h 2016-09-16 10:38:13.570285185 +0000
|
|
|
|
@@ -60,17 +60,21 @@
|
2014-10-22 14:53:54 +02:00
|
|
|
due to EPIPE. */
|
|
|
|
/* #define DONT_REPORT_BROKEN_PIPE_WRITE_ERRORS */
|
|
|
|
|
|
|
|
+#ifndef _PATH_DEFPATH
|
|
|
|
+# include <paths.h>
|
|
|
|
+#endif
|
|
|
|
+
|
2006-12-15 18:03:59 +01:00
|
|
|
/* The default value of the PATH variable. */
|
|
|
|
#ifndef DEFAULT_PATH_VALUE
|
|
|
|
#define DEFAULT_PATH_VALUE \
|
2014-10-22 14:53:54 +02:00
|
|
|
- "/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:."
|
|
|
|
+ "/usr/local/bin:" _PATH_DEFPATH ":."
|
2006-12-15 18:03:59 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* The value for PATH when invoking `command -p'. This is only used when
|
|
|
|
the Posix.2 confstr () function, or CS_PATH define are not present. */
|
|
|
|
#ifndef STANDARD_UTILS_PATH
|
|
|
|
#define STANDARD_UTILS_PATH \
|
|
|
|
- "/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/etc"
|
2014-10-22 14:53:54 +02:00
|
|
|
+ _PATH_STDPATH
|
2006-12-15 18:03:59 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Default primary and secondary prompt strings. */
|
2016-09-16 13:10:58 +02:00
|
|
|
@@ -87,20 +91,20 @@
|
|
|
|
#define DEFAULT_BASHRC "~/.bashrc"
|
2006-12-15 18:03:59 +01:00
|
|
|
|
|
|
|
/* System-wide .bashrc file for interactive shells. */
|
|
|
|
-/* #define SYS_BASHRC "/etc/bash.bashrc" */
|
|
|
|
+#define SYS_BASHRC "/etc/bash.bashrc"
|
|
|
|
|
|
|
|
/* System-wide .bash_logout for login shells. */
|
|
|
|
-/* #define SYS_BASH_LOGOUT "/etc/bash.bash_logout" */
|
|
|
|
+#define SYS_BASH_LOGOUT "/etc/bash.bash_logout"
|
|
|
|
|
|
|
|
/* Define this to make non-interactive shells begun with argv[0][0] == '-'
|
|
|
|
run the startup files when not in posix mode. */
|
|
|
|
-/* #define NON_INTERACTIVE_LOGIN_SHELLS */
|
|
|
|
+#define NON_INTERACTIVE_LOGIN_SHELLS
|
|
|
|
|
|
|
|
/* Define this if you want bash to try to check whether it's being run by
|
2009-03-03 18:12:53 +01:00
|
|
|
sshd and source the .bashrc if so (like the rshd behavior). This checks
|
|
|
|
for the presence of SSH_CLIENT or SSH2_CLIENT in the initial environment,
|
|
|
|
which can be fooled under certain not-uncommon circumstances. */
|
2007-12-05 23:45:24 +01:00
|
|
|
-/* #define SSH_SOURCE_BASHRC */
|
|
|
|
+#define SSH_SOURCE_BASHRC
|
2009-03-03 18:12:53 +01:00
|
|
|
|
|
|
|
/* Define if you want the case-capitalizing operators (~[~]) and the
|
|
|
|
`capcase' variable attribute (declare -c). */
|
2014-10-22 14:53:54 +02:00
|
|
|
--- doc/Makefile.in
|
2016-09-16 13:10:58 +02:00
|
|
|
+++ doc/Makefile.in 2016-09-16 10:38:13.570285185 +0000
|
|
|
|
@@ -154,7 +154,7 @@ BASHREF_FILES = $(srcdir)/bashref.texi $
|
|
|
|
# $(RM) $@
|
|
|
|
# -${TEXI2PDF} $<
|
2014-10-22 14:53:54 +02:00
|
|
|
|
2016-09-16 13:10:58 +02:00
|
|
|
-all: ps info dvi text html $(MAN2HTML)
|
|
|
|
+all: info html $(MAN2HTML)
|
2014-10-22 14:53:54 +02:00
|
|
|
nodvi: ps info text html
|
|
|
|
everything: all pdf
|
|
|
|
|
|
|
|
--- doc/bash.1
|
2016-09-16 13:10:58 +02:00
|
|
|
+++ doc/bash.1 2016-09-16 10:38:13.570285185 +0000
|
|
|
|
@@ -5253,8 +5253,8 @@ file (the \fIinputrc\fP file).
|
2014-10-22 14:53:54 +02:00
|
|
|
The name of this file is taken from the value of the
|
|
|
|
.SM
|
|
|
|
.B INPUTRC
|
|
|
|
-variable. If that variable is unset, the default is
|
|
|
|
-.IR ~/.inputrc .
|
|
|
|
+environment variable. If that variable is unset, readline will read both
|
|
|
|
+.IR /etc/inputrc " and " ~/.inputrc .
|
|
|
|
When a program which uses the readline library starts up, the
|
|
|
|
initialization file is read, and the key bindings and variables
|
|
|
|
are set.
|
2016-09-16 13:10:58 +02:00
|
|
|
@@ -10586,6 +10586,9 @@ The individual login shell cleanup file,
|
2014-10-22 14:53:54 +02:00
|
|
|
.TP
|
|
|
|
.FN ~/.inputrc
|
|
|
|
Individual \fIreadline\fP initialization file
|
|
|
|
+.TP
|
|
|
|
+.FN /etc/inputrc
|
|
|
|
+System \fBreadline\fP initialization file
|
|
|
|
.PD
|
|
|
|
.SH AUTHORS
|
|
|
|
Brian Fox, Free Software Foundation
|
2010-02-18 12:17:29 +01:00
|
|
|
--- general.h
|
2016-09-16 13:10:58 +02:00
|
|
|
+++ general.h 2016-09-16 10:38:17.614209958 +0000
|
2006-12-15 18:03:59 +01:00
|
|
|
@@ -21,10 +21,13 @@
|
|
|
|
#if !defined (_GENERAL_H_)
|
|
|
|
#define _GENERAL_H_
|
|
|
|
|
|
|
|
+#include <time.h>
|
|
|
|
+#include <sys/types.h>
|
|
|
|
#include "stdc.h"
|
|
|
|
|
|
|
|
#include "bashtypes.h"
|
|
|
|
#include "chartypes.h"
|
|
|
|
+#include "bashline.h"
|
|
|
|
|
|
|
|
#if defined (HAVE_SYS_RESOURCE_H) && defined (RLIMTYPE)
|
|
|
|
# if defined (HAVE_SYS_TIME_H)
|
2010-02-18 12:17:29 +01:00
|
|
|
--- parse.y
|
2016-09-16 13:10:58 +02:00
|
|
|
+++ parse.y 2016-09-16 10:38:17.614209958 +0000
|
|
|
|
@@ -1426,7 +1426,7 @@ input_file_descriptor ()
|
2006-12-15 18:03:59 +01:00
|
|
|
|
|
|
|
#if defined (READLINE)
|
|
|
|
char *current_readline_prompt = (char *)NULL;
|
|
|
|
-char *current_readline_line = (char *)NULL;
|
|
|
|
+unsigned char *current_readline_line = (unsigned char *)NULL;
|
|
|
|
int current_readline_line_index = 0;
|
|
|
|
|
|
|
|
static int
|
2010-02-18 12:17:29 +01:00
|
|
|
--- shell.c
|
2016-09-16 13:10:58 +02:00
|
|
|
+++ shell.c 2016-09-16 10:38:17.614209958 +0000
|
|
|
|
@@ -45,6 +45,7 @@
|
|
|
|
#if defined (HAVE_UNISTD_H)
|
|
|
|
# include <sys/types.h>
|
|
|
|
# include <unistd.h>
|
|
|
|
+# include <grp.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "bashintl.h"
|
|
|
|
@@ -501,7 +502,7 @@ main (argc, argv, env)
|
2006-12-15 18:03:59 +01:00
|
|
|
if (dump_translatable_strings)
|
|
|
|
read_but_dont_execute = 1;
|
|
|
|
|
|
|
|
- if (running_setuid && privileged_mode == 0)
|
|
|
|
+ if (running_setuid && privileged_mode == 0 /* && act_like_sh == 0 */)
|
|
|
|
disable_priv_mode ();
|
|
|
|
|
|
|
|
/* Need to get the argument to a -c option processed in the
|
2016-09-16 13:10:58 +02:00
|
|
|
@@ -1277,6 +1278,7 @@ disable_priv_mode ()
|
|
|
|
{
|
|
|
|
int e;
|
|
|
|
|
|
|
|
+ setgroups(0, NULL);
|
|
|
|
if (setuid (current_user.uid) < 0)
|
|
|
|
{
|
|
|
|
e = errno;
|
|
|
|
--- support/bashbug.sh
|
|
|
|
+++ support/bashbug.sh 2016-09-16 10:38:17.614209958 +0000
|
|
|
|
@@ -1,4 +1,4 @@
|
|
|
|
-#!/bin/sh -
|
|
|
|
+#!/bin/bash -
|
|
|
|
#
|
|
|
|
# bashbug - create a bug report and mail it to the bug address
|
|
|
|
#
|
2011-11-25 18:50:33 +01:00
|
|
|
--- support/man2html.c
|
2016-09-16 13:10:58 +02:00
|
|
|
+++ support/man2html.c 2016-09-16 10:38:17.618209884 +0000
|
2014-10-22 14:53:54 +02:00
|
|
|
@@ -78,6 +78,7 @@
|
2011-11-25 18:50:33 +01:00
|
|
|
#include <time.h>
|
|
|
|
#include <sys/time.h>
|
|
|
|
#include <errno.h>
|
|
|
|
+#include <unistd.h>
|
|
|
|
|
|
|
|
#define NULL_TERMINATED(n) ((n) + 1)
|
|
|
|
|
2010-02-18 12:17:29 +01:00
|
|
|
--- support/rlvers.sh
|
2016-09-16 13:10:58 +02:00
|
|
|
+++ support/rlvers.sh 2016-09-16 10:38:17.618209884 +0000
|
2006-12-15 18:03:59 +01:00
|
|
|
@@ -27,10 +27,10 @@ TDIR=$TMPDIR/rlvers
|
|
|
|
|
|
|
|
# defaults
|
|
|
|
CC=cc
|
|
|
|
-RL_LIBDIR=/usr/local/lib
|
|
|
|
-RL_INCDIR=/usr/local/include
|
|
|
|
+RL_LIBDIR=/lib
|
|
|
|
+RL_INCDIR=/usr/include
|
|
|
|
|
|
|
|
-TERMCAP_LIB="-ltermcap"
|
2011-11-16 12:14:23 +01:00
|
|
|
+echo 'int main () { return 0; }' | gcc -ltinfo -o /dev/null -xc - > /dev/null 2>&1 && TERMCAP_LIB="-ltinfo" || TERMCAP_LIB="-lncurses"
|
2006-12-15 18:03:59 +01:00
|
|
|
|
|
|
|
# cannot rely on the presence of getopts
|
|
|
|
while [ $# -gt 0 ]; do
|
2010-02-18 12:17:29 +01:00
|
|
|
--- support/shobj-conf
|
2016-09-16 13:10:58 +02:00
|
|
|
+++ support/shobj-conf 2016-09-16 10:38:17.618209884 +0000
|
2014-10-22 14:53:54 +02:00
|
|
|
@@ -126,10 +126,11 @@ sunos5*|solaris2*)
|
2010-02-18 12:17:29 +01:00
|
|
|
linux*-*|gnu*-*|k*bsd*-gnu-*|freebsd*-gentoo)
|
2006-12-15 18:03:59 +01:00
|
|
|
SHOBJ_CFLAGS=-fPIC
|
|
|
|
SHOBJ_LD='${CC}'
|
|
|
|
- SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
|
|
|
|
+ SHOBJ_LDFLAGS='-shared'
|
|
|
|
|
|
|
|
- SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
|
|
|
|
+ SHLIB_XLDFLAGS='-Wl,-rpath-link,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
|
|
|
|
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
|
2011-11-16 12:14:23 +01:00
|
|
|
+ echo 'int main () { return 0; }' | gcc -ltinfo -o /dev/null -xc - > /dev/null 2>&1 && SHLIB_LIBS=-ltinfo || SHLIB_LIBS=-lncurses
|
2006-12-15 18:03:59 +01:00
|
|
|
;;
|
|
|
|
|
2009-03-03 18:12:53 +01:00
|
|
|
freebsd2*)
|
2016-09-16 13:10:58 +02:00
|
|
|
--- tests/glob.tests
|
|
|
|
+++ tests/glob.tests 2016-09-16 10:38:17.618209884 +0000
|
|
|
|
@@ -12,8 +12,8 @@ ${THIS_SH} ./glob1.sub
|
|
|
|
|
|
|
|
MYDIR=$PWD # save where we are
|
|
|
|
|
|
|
|
-TESTDIR=/tmp/glob-test
|
|
|
|
-mkdir $TESTDIR
|
|
|
|
+TESTDIR=${TMPDIR:=/tmp}/glob-test
|
|
|
|
+mkdir -p $TESTDIR
|
|
|
|
builtin cd $TESTDIR || { echo $0: cannot cd to $TESTDIR >&2 ; exit 1; }
|
|
|
|
rm -rf *
|
|
|
|
|
2010-02-18 12:17:29 +01:00
|
|
|
--- tests/run-intl
|
2016-09-16 13:10:58 +02:00
|
|
|
+++ tests/run-intl 2016-09-16 10:38:17.618209884 +0000
|
2009-03-03 18:12:53 +01:00
|
|
|
@@ -5,4 +5,4 @@ echo "warning: some of these tests will
|
|
|
|
echo "warning: locales installed on your system." >&2
|
2016-09-16 13:10:58 +02:00
|
|
|
|
|
|
|
${THIS_SH} ./intl.tests > ${BASH_TSTOUT}
|
|
|
|
-diff $AFLAG ${BASH_TSTOUT} intl.right && rm -f ${BASH_TSTOUT}
|
|
|
|
+diff -w $AFLAG ${BASH_TSTOUT} intl.right && rm -f ${BASH_TSTOUT}
|
2010-02-18 12:17:29 +01:00
|
|
|
--- tests/run-read
|
2016-09-16 13:10:58 +02:00
|
|
|
+++ tests/run-read 2016-09-16 10:38:17.618209884 +0000
|
2009-03-03 18:12:53 +01:00
|
|
|
@@ -1,4 +1,4 @@
|
|
|
|
echo "warning: please do not consider output differing only in the amount of" >&2
|
|
|
|
echo "warning: white space to be an error." >&2
|
2016-09-16 13:10:58 +02:00
|
|
|
${THIS_SH} ./read.tests > ${BASH_TSTOUT} 2>&1
|
|
|
|
-diff ${BASH_TSTOUT} read.right && rm -f ${BASH_TSTOUT}
|
|
|
|
+diff -w ${BASH_TSTOUT} read.right && rm -f ${BASH_TSTOUT}
|