diff --git a/bash-3.2-longjmp.dif b/bash-3.2-longjmp.dif
index 5f19296..ba6e9ad 100644
--- a/bash-3.2-longjmp.dif
+++ b/bash-3.2-longjmp.dif
@@ -12,19 +12,19 @@
    /* We have committed to attempting to execute the contents of this file
       as shell commands. */
  
-+#if 1
++#if defined(BNC382214) && (BNC382214 == 1)
 +  larray = strvec_len(args) + 1;
 +  args = strvec_resize(args, larray + 1);
 +
 +  for (i = larray - 1; i; i--)
 +    args[i] = args[i - 1];
 +
-+  args[0] = savestring(_PATH_BSHELL);
++  args[0] = current_user.shell ? current_user.shell : savestring(_PATH_BSHELL);
 +  args[1] = command;
 +  args[larray] = (char *)0;
 +
 +  SETOSTYPE (0);		/* Some systems use for USG/POSIX semantics */
-+  execve ("/bin/sh", args, env);
++  execve (args[0], args, env);
 +  SETOSTYPE (1);
 +
 +  internal_error (_("%s: cannot execute: %s"), command, strerror (errno));
diff --git a/bash-4.2-patches.tar.bz2 b/bash-4.2-patches.tar.bz2
index 6995d9c..f3e3ef0 100644
--- a/bash-4.2-patches.tar.bz2
+++ b/bash-4.2-patches.tar.bz2
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:251f7aa87048b2ad274e6006e234a1d6270bc074cc779308c2117dcf17f73723
-size 25471
+oid sha256:6901414b1d93b5bc046ea7d946722c56baf503743243bed97ef2f98e05af1742
+size 27775
diff --git a/bash.changes b/bash.changes
index 5a28f41..533405a 100644
--- a/bash.changes
+++ b/bash.changes
@@ -1,3 +1,32 @@
+-------------------------------------------------------------------
+Thu Mar 21 11:51:54 UTC 2013 - werner@suse.de
+
+- Add patch from upstream mailing list to speed up array handling 
+- Add patch from upstream mailing list to avoid fdleaks
+- Use lsdiff to determine the depth of the leading slashes in a
+  patch file
+
+-------------------------------------------------------------------
+Fri Mar 15 15:35:51 UTC 2013 - werner@suse.de
+
+- Disable workaround for bnc#382214 due bnc#806628, let's see when
+  the old bug will be up again.
+- Update bash 4.2 to patch level 45
+  * When SIGCHLD is trapped, and a SIGCHLD trap handler runs when
+    a pending `read -t' invocation times out and generates SIGALRM,
+    bash can crash with a segmentation fault.
+  * When converting a multibyte string to a wide character string
+    as part of pattern matching, bash does not handle the end of
+    the string correctly, causing the search for the NUL to go
+    beyond the end of the string and reference random memory.
+    Depending on the contents of that memory, bash can produce
+    errors or crash. 
+  * The <&n- and >&n- redirections, which move one file descriptor
+    to another, leave the file descriptor closed when applied to
+    builtins or compound commands.
+- Use screen to provide a controlling terminal for running the
+  test suite
+
 -------------------------------------------------------------------
 Tue Feb 12 07:58:08 UTC 2013 - schwab@suse.de
 
diff --git a/bash.spec b/bash.spec
index 40826b5..f955c80 100644
--- a/bash.spec
+++ b/bash.spec
@@ -27,6 +27,8 @@ BuildRequires:  fdupes
 BuildRequires:  makeinfo
 %endif
 BuildRequires:  ncurses-devel
+BuildRequires:  patchutils
+BuildRequires:  screen
 %define         bash_vers 4.2
 %define         rl_vers   6.2
 %define         extend    ""
@@ -73,6 +75,7 @@ Patch11:        bash-4.0-loadables.dif
 Patch12:        bash-4.1-completion.dif
 Patch13:        bash-4.2-nscdunmap.dif
 Patch14:        bash-4.2-sigrestart.patch
+# PATCH-FIX-UPSTREAM bnc#382214 -- disabled due bnc#806628 by -DBNC382214=0
 Patch15:        bash-3.2-longjmp.dif
 Patch16:        bash-4.0-setlocale.dif
 Patch17:        bash-4.0-headers.dif
@@ -267,14 +270,19 @@ as well as programming with the interface of the readline library.
 
 %prep
 %setup -q -n bash-%{bash_vers}%{extend} -b1 -b2 -b3
+typeset -i level
 for patch in ../bash-%{bash_vers}-patches/*; do
-    level=-p1
     test -e $patch || break
-    [[ $(head -n 1 $patch) =~ From ]] || level=-p0
+    let level=0 || true
+    file=$(lsdiff --files=1 $patch)
+    if test ! -e $file ; then
+	file=${file#*/}
+	let level++ || true
+    fi
+    test -e $file || exit 1
     echo Patch $patch
-    patch -s $level < $patch
+    patch -s -p$level < $patch
 done
-unset p
 %patch1  -p0 -b .manual
 %patch2  -p0 -b .security
 %patch3  -p0 -b .2.4.4
@@ -306,10 +314,16 @@ unset p
 %patch47
 %patch0  -p0 -b .0
 pushd ../readline-%{rl_vers}%{extend}
-for p in ../readline-%{rl_vers}-patches/*; do
-    test -e $p || break
-    echo Patch $p
-    patch -s -p0 < $p
+for patch in ../readline-%{rl_vers}-patches/*; do
+    test -e $patch || break
+    let level=0 || true
+    file=$(lsdiff --files=1 $patch)
+    if test ! -e $file ; then
+	file=${file#*/}
+	let level++ || true
+    fi
+    echo Patch $patch
+    patch -s -p$level < $patch
 done
 %patch21 -p2 -b .zerotty
 %patch22 -p2 -b .wrap
@@ -329,6 +343,22 @@ done
   LANG=POSIX
   LC_ALL=$LANG
   unset LC_CTYPE
+  SCREENDIR=$(mktemp -d ${PWD}/screen.XXXXXX) || exit 1
+  SCREENRC=${SCREENDIR}/bash
+  export SCREENRC SCREENDIR
+  exec 0< /dev/null
+  SCREENLOG=${SCREENDIR}/log
+  cat > $SCREENRC<<-EOF
+	deflogin off
+	logfile $SCREENLOG
+	logfile flush 1
+	logtstamp off
+	log on
+	setsid on
+	scrollback 0
+	silence on
+	utf8 on
+	EOF
   CPU=$(uname -m 2> /dev/null)
   HOSTTYPE=${CPU}
   MACHTYPE=${CPU}-suse-linux
@@ -387,6 +417,7 @@ pushd ../readline-%{rl_vers}%{extend}
   cflags -Wno-unused-parameter   CFLAGS
   cflags -ftree-loop-linear      CFLAGS
   cflags -pipe                   CFLAGS
+  cflags -DBNC382214=0           CFLAGS
   cflags -Wl,--as-needed         LDFLAGS
   cflags -Wl,-O2                 LDFLAGS
   cflags -Wl,--hash-size=8599    LDFLAGS
@@ -509,9 +540,13 @@ popd
 	--enable-separate-helpfiles=%{_datadir}/bash/helpfiles \
 	$READLINE
   make %{?do_profiling:CFLAGS="$CFLAGS %cflags_profile_generate"} \
-      all printenv recho zecho xcase
+	all printenv recho zecho xcase
   TMPDIR=$(mktemp -d /tmp/bash.XXXXXXXXXX) || exit 1
-  env -i HOME=$PWD TERM=$TERM LD_LIBRARY_PATH=$LD_LIBRARY_PATH TMPDIR=$TMPDIR make TESTSCRIPT=%{SOURCE4} check
+  > $SCREENLOG
+  env -i HOME=$PWD TERM=$TERM LD_LIBRARY_PATH=$LD_LIBRARY_PATH TMPDIR=$TMPDIR \
+	SCREENRC=$SCREENRC SCREENDIR=$SCREENDIR \
+	screen -L -D -m make TESTSCRIPT=%{SOURCE4} check
+  cat $SCREENLOG
   make %{?do_profiling:CFLAGS="$CFLAGS %cflags_profile_feedback" clean} all
   make -C examples/loadables/
   make documentation
diff --git a/run-tests b/run-tests
index c4a2510..501eccc 100644
--- a/run-tests
+++ b/run-tests
@@ -20,7 +20,7 @@ echo Any output from any test, unless otherwise noted, indicates a possible anom
 for x in run-*
 do
 	case $x in
-	$0|run-all|run-minimal|run-gprof|run-jobs|run-ifs-posix) ;;
+	$0|run-all|run-minimal|run-gprof|run-jobs) ;;
 	*.orig|*~) ;;
 	*)	echo $x ; sh $x ;;
 	esac
@@ -40,4 +40,8 @@ time while ((count-- > 0)) ; do
 	${THIS_SH} -c $tmp
 done
 echo '#########################'
+set -x
+read -t1 < /dev/tty
+set +x
+echo '#########################'
 exit 0