bash: Fix startfiles.

Sanitize PATH variable and fix wrong path to hostname command.
This commit is contained in:
Michael Tremer
2012-11-13 22:27:49 +01:00
parent 68afc6675d
commit 7a6448326f
4 changed files with 45 additions and 1 deletions

View File

@@ -42,7 +42,7 @@ else
pathmunge /usr/sbin after
fi
HOSTNAME=`/usr/bin/hostname 2>/dev/null`
HOSTNAME=`/bin/hostname 2>/dev/null`
HISTSIZE=1000
if [ "$HISTCONTROL" = "ignorespace" ] ; then
export HISTCONTROL=ignoreboth

View File

@@ -93,6 +93,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/bash/bash32-$$(printf "%03d" "$${i}") || exit 1; \
done
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/bash-4.0-paths-1.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/bash-4.0-profile-1.patch
cd $(DIR_APP) && ./configure $(EXTRA_CONFIG)
cd $(DIR_APP) && make $(EXTRA_MAKE)
cd $(DIR_APP) && make $(EXTRA_INSTALL) install

View File

@@ -0,0 +1,30 @@
--- bash-3.0/config.h.in.paths 2004-07-21 21:08:31.000000000 +0100
+++ bash-3.0/config.h.in 2004-07-28 09:16:27.257884999 +0100
@@ -197,7 +197,7 @@
/* System paths */
-#define DEFAULT_MAIL_DIRECTORY "/usr/spool/mail"
+#define DEFAULT_MAIL_DIRECTORY "/var/spool/mail"
/* Characteristics of the system's header files and libraries that affect
the compilation environment. */
--- bash-3.0/config-top.h.paths 2003-08-05 15:36:12.000000000 +0100
+++ bash-3.0/config-top.h 2004-07-28 09:36:27.117205637 +0100
@@ -52,14 +52,14 @@
/* The default value of the PATH variable. */
#ifndef DEFAULT_PATH_VALUE
#define DEFAULT_PATH_VALUE \
- "/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:."
+ "/usr/local/bin:/bin:/usr/bin"
#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"
+ "/bin:/usr/bin:/usr/sbin:/sbin"
#endif
/* Default primary and secondary prompt strings. */

View File

@@ -0,0 +1,12 @@
diff -up bash-3.2/config-top.h.profile bash-3.2/config-top.h
--- bash-3.2/config-top.h.profile 2008-07-17 13:35:39.000000000 +0200
+++ bash-3.2/config-top.h 2008-07-17 13:42:18.000000000 +0200
@@ -26,6 +26,8 @@
what POSIX.2 specifies. */
#define CONTINUE_AFTER_KILL_ERROR
+#define NON_INTERACTIVE_LOGIN_SHELLS
+
/* Define BREAK_COMPLAINS if you want the non-standard, but useful
error messages about `break' and `continue' out of context. */
#define BREAK_COMPLAINS