Hello community,

here is the log from the commit of package mksh for openSUSE:Factory checked in 
at 2014-10-05 20:31:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mksh (Old)
 and      /work/SRC/openSUSE:Factory/.mksh.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mksh"

Changes:
--------
--- /work/SRC/openSUSE:Factory/mksh/mksh.changes        2014-09-06 
16:59:29.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.mksh.new/mksh.changes   2014-10-05 
20:33:34.000000000 +0200
@@ -1,0 +2,19 @@
+Fri Oct  3 19:21:55 UTC 2014 - t...@mirbsd.org
+
+- update to SECURITY version 50c
+  - [tg] Know more rare signals when generating sys_signame[] replacement
+  - [tg] OpenBSD sync (mostly RCSID only)
+  - [tg] Document HISTSIZE limit; found by luigi_345 on IRC
+  - [zacts] Fix link to Debian .mkshrc
+  - [tg] Cease exporting $RANDOM (Debian #760857)
+  - [tg] Fix C99 compatibility
+  - [tg] Work around klibc bug causing a coredump (Debian #763842)
+  - [tg] Use issetugid(2) as additional check if we are FPRIVILEGED
+  - [tg] SECURITY: do not permit += from environment
+  - [tg] Fix more field splitting bugs reported by Stephane Chazelas and
+    mikeserv; document current status wrt. ambiguous ones as testcases too
+- use build log cleaner sed command from home:mirabile package
+- enable lksh build-time option to automatically run "set -o posix"
+  when called as sh or -sh, like home:mirabile package did
+
+-------------------------------------------------------------------

Old:
----
  mksh-R50b.tgz

New:
----
  mksh-R50c.tgz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ mksh.spec ++++++
--- /var/tmp/diff_new_pack.RdEVqt/_old  2014-10-05 20:33:35.000000000 +0200
+++ /var/tmp/diff_new_pack.RdEVqt/_new  2014-10-05 20:33:35.000000000 +0200
@@ -3,7 +3,7 @@
 #
 # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
 # Copyright (c) 2013 Guido Berhoerster.
-# Copyright (c) 2013 Thorsten Glaser.
+# Copyright (c) 2013, 2014 Thorsten Glaser.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -21,7 +21,7 @@
 # Please see OBS home:mirabile/mksh for a package for other distributions.
 
 Name:           mksh
-Version:        50b
+Version:        50c
 Release:        0
 Summary:        MirBSD Korn Shell
 License:        MirOS and ISC
@@ -82,6 +82,8 @@
     sh Build.sh -r -c lto || touch build.failed
 %endif
     mv test.sh test-mksh.sh
+# build lksh to automatically enable -o posix if called as sh
+    CPPFLAGS="$CPPFLAGS -DMKSH_BINSHPOSIX"
 # work around bugs in gcc 4.8 (deb#717734 rh#922974) and gcc 4.1.2 in SLE 10
 %if 0%{?suse_version} >= 1310 || 0%{?sles_version} == 10
     sh Build.sh -L -r || touch build.failed
@@ -89,7 +91,9 @@
     sh Build.sh -L -r -c lto || touch build.failed
 %endif
     mv test.sh test-lksh.sh
-} 2>&1 | sed '/conftest.c:/s/: warning:/: W:/'
+} 2>&1 | sed \
+  -e 's!conftest.c:\([0-9]*\(:[0-9]*\)*\): error:!cE(\1) -!g' \
+  -e 's!conftest.c:\([0-9]*\(:[0-9]*\)*\): warning:!cW(\1) -!g'
 test ! -e build.failed
 
 %install

++++++ mksh-R50b.tgz -> mksh-R50c.tgz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mksh/Build.sh new/mksh/Build.sh
--- old/mksh/Build.sh   2014-09-03 21:23:13.000000000 +0200
+++ new/mksh/Build.sh   2014-10-03 19:32:57.000000000 +0200
@@ -1,5 +1,5 @@
 #!/bin/sh
-srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.664 2014/09/03 19:22:48 tg Exp $'
+srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.668 2014/10/03 17:32:07 tg Exp $'
 #-
 # Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
 #              2011, 2012, 2013, 2014
@@ -1784,7 +1784,7 @@
                #define EXTERN
                #define MKSH_INCLUDES_ONLY
                #include "sh.h"
-               __RCSID("$MirOS: src/bin/mksh/Build.sh,v 1.664 2014/09/03 
19:22:48 tg Exp $");
+               __RCSID("$MirOS: src/bin/mksh/Build.sh,v 1.668 2014/10/03 
17:32:07 tg Exp $");
                int main(void) { printf("Hello, World!\n"); return (isatty(0)); 
}
 EOF
        case $cm in
@@ -1904,6 +1904,11 @@
        int main(void) { struct timeval tv; return (gettimeofday(&tv, NULL)); }
 EOF
 
+ac_test issetugid <<-'EOF'
+       #include <unistd.h>
+       int main(void) { return (issetugid()); }
+EOF
+
 ac_test killpg <<-'EOF'
        #include <signal.h>
        int main(int ac, char *av[]) { return (av[0][killpg(123, ac)]); }
@@ -2273,6 +2278,7 @@
        sigs="ABRT FPE ILL INT SEGV TERM ALRM BUS CHLD CONT HUP KILL PIPE QUIT"
        sigs="$sigs STOP TSTP TTIN TTOU USR1 USR2 POLL PROF SYS TRAP URG VTALRM"
        sigs="$sigs XCPU XFSZ INFO WINCH EMT IO DIL LOST PWR SAK CLD IOT RESV"
+       sigs="$sigs STKFLT UNUSED"
        test 1 = $HAVE_CPP_DD && test $NSIG -gt 1 && sigs="$sigs "`vq \
            "$CPP $CFLAGS $CPPFLAGS $NOWARN -dD conftest.c" | \
            grep '[      ]SIG[A-Z0-9][A-Z0-9]*[  ]' | \
@@ -2310,7 +2316,7 @@
 addsrcs USE_PRINTF_BUILTIN printf.c
 test 1 = "$USE_PRINTF_BUILTIN" && add_cppflags -DMKSH_PRINTF_BUILTIN
 test 1 = "$HAVE_CAN_VERB" && CFLAGS="$CFLAGS -verbose"
-add_cppflags -DMKSH_BUILD_R=502
+add_cppflags -DMKSH_BUILD_R=503
 
 $e $bi$me: Finished configuration testing, now producing output.$ao
 
@@ -2647,7 +2653,7 @@
 Copy dot.mkshrc to /etc/skel/.mkshrc; install mksh into $prefix/bin; or
 /bin; install the manpage, if omitting the -r flag a catmanpage is made
 using $NROFF. Consider using a forward script as /etc/skel/.mkshrc like
-https://www.mirbsd.org/cvs.cgi/contrib/hosted/tg/deb/mksh/debian/.mkshrc?rev=HEAD
+http://anonscm.debian.org/cgit/collab-maint/mksh.git/plain/debian/.mkshrc
 and put dot.mkshrc as /etc/mkshrc so users need not keep up their HOME.
 
 EOD
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mksh/check.t new/mksh/check.t
--- old/mksh/check.t    2014-09-03 21:23:14.000000000 +0200
+++ new/mksh/check.t    2014-10-03 19:32:59.000000000 +0200
@@ -1,4 +1,4 @@
-# $MirOS: src/bin/mksh/check.t,v 1.658 2014/09/03 19:22:49 tg Exp $
+# $MirOS: src/bin/mksh/check.t,v 1.659 2014/10/03 17:32:09 tg Exp $
 # OpenBSD src/regress/bin/ksh updated: 2013/12/02 20:39:44
 #-
 # Copyright © 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
@@ -27,7 +27,7 @@
 # 
http://www.freebsd.org/cgi/cvsweb.cgi/src/tools/regression/bin/test/regress.sh?rev=HEAD
 
 expected-stdout:
-       @(#)MIRBSD KSH R50 2014/09/03
+       @(#)MIRBSD KSH R50 2014/10/03
 description:
        Check version of shell.
 stdin:
@@ -36,7 +36,7 @@
 category: shell:legacy-no
 ---
 expected-stdout:
-       @(#)LEGACY KSH R50 2014/09/03
+       @(#)LEGACY KSH R50 2014/10/03
 description:
        Check version of legacy shell.
 stdin:
@@ -3736,7 +3736,6 @@
 name: IFS-subst-3
 description:
        Check leading IFS non-whitespace after trim does make a field
-expected-fail: yes
 stdin:
        showargs() { for i; do echo -n " <$i>"; done; echo; }
        IFS=:
@@ -3744,6 +3743,390 @@
 expected-stdout:
         <1> <> <foo> <bar>
 ---
+name: IFS-subst-4-1
+description:
+       reported by mikeserv
+stdin:
+       a='space divded  argument
+       here'
+       IFS=\  ; set -- $a
+       IFS= ; q="$*" ; nq=$*
+       printf '<%s>\n' "$*" $* "$q" "$nq"
+       [ "$q" = "$nq" ] && echo =true || echo =false
+expected-stdout:
+       <spacedivdedargument
+       here>
+       <space>
+       <divded>
+       <argument
+       here>
+       <spacedivdedargument
+       here>
+       <spacedivdedargument
+       here>
+       =true
+---
+name: IFS-subst-4-2
+description:
+       extended testsuite based on problem by mikeserv
+stdin:
+       a='space divded  argument
+       here'
+       IFS=\  ; set -- $a
+       IFS= ; q="$@" ; nq=$@
+       printf '<%s>\n' "$*" $* "$q" "$nq"
+       [ "$q" = "$nq" ] && echo =true || echo =false
+expected-stdout:
+       <spacedivdedargument
+       here>
+       <space>
+       <divded>
+       <argument
+       here>
+       <space divded argument
+       here>
+       <space divded argument
+       here>
+       =true
+---
+name: IFS-subst-4-3
+description:
+       extended testsuite based on problem by mikeserv
+stdin:
+       a='space divded  argument
+       here'
+       IFS=\ ; set -- $a; IFS=
+       qs="$*"
+       nqs=$*
+       qk="$@"
+       nqk=$@
+       printf '= qs '; printf '<%s>\n' "$qs"
+       printf '=nqs '; printf '<%s>\n' "$nqs"
+       printf '= qk '; printf '<%s>\n' "$qk"
+       printf '=nqk '; printf '<%s>\n' "$nqk"
+       printf '~ qs '; printf '<%s>\n' "$*"
+       printf '~nqs '; printf '<%s>\n' $*
+       printf '~ qk '; printf '<%s>\n' "$@"
+       printf '~nqk '; printf '<%s>\n' $@
+expected-stdout:
+       = qs <spacedivdedargument
+       here>
+       =nqs <spacedivdedargument
+       here>
+       = qk <space divded argument
+       here>
+       =nqk <space divded argument
+       here>
+       ~ qs <spacedivdedargument
+       here>
+       ~nqs <space>
+       <divded>
+       <argument
+       here>
+       ~ qk <space>
+       <divded>
+       <argument
+       here>
+       ~nqk <space>
+       <divded>
+       <argument
+       here>
+---
+name: IFS-subst-4-4
+description:
+       extended testsuite based on problem by mikeserv
+stdin:
+       a='space divded  argument
+       here'
+       IFS=\ ; set -- $a; IFS=
+       qs="$*"
+       printf '= qs '; printf '<%s>\n' "$qs"
+       printf '~ qs '; printf '<%s>\n' "$*"
+       nqs=$*
+       printf '=nqs '; printf '<%s>\n' "$nqs"
+       printf '~nqs '; printf '<%s>\n' $*
+       qk="$@"
+       printf '= qk '; printf '<%s>\n' "$qk"
+       printf '~ qk '; printf '<%s>\n' "$@"
+       nqk=$@
+       printf '=nqk '; printf '<%s>\n' "$nqk"
+       printf '~nqk '; printf '<%s>\n' $@
+expected-stdout:
+       = qs <spacedivdedargument
+       here>
+       ~ qs <spacedivdedargument
+       here>
+       =nqs <spacedivdedargument
+       here>
+       ~nqs <space>
+       <divded>
+       <argument
+       here>
+       = qk <space divded argument
+       here>
+       ~ qk <space>
+       <divded>
+       <argument
+       here>
+       =nqk <space divded argument
+       here>
+       ~nqk <space>
+       <divded>
+       <argument
+       here>
+---
+name: IFS-subst-4-4p
+description:
+       extended testsuite based on problem by mikeserv
+stdin:
+       a='space divded  argument
+       here'
+       IFS=\ ; set -- $a; IFS=
+       unset v
+       qs=${v:-"$*"}
+       printf '= qs '; printf '<%s>\n' "$qs"
+       printf '~ qs '; printf '<%s>\n' ${v:-"$*"}
+       nqs=${v:-$*}
+       printf '=nqs '; printf '<%s>\n' "$nqs"
+       printf '~nqs '; printf '<%s>\n' ${v:-$*}
+       qk=${v:-"$@"}
+       printf '= qk '; printf '<%s>\n' "$qk"
+       printf '~ qk '; printf '<%s>\n' ${v:-"$@"}
+       nqk=${v:-$@}
+       printf '=nqk '; printf '<%s>\n' "$nqk"
+       printf '~nqk '; printf '<%s>\n' ${v:-$@}
+expected-stdout:
+       = qs <spacedivdedargument
+       here>
+       ~ qs <spacedivdedargument
+       here>
+       =nqs <spacedivdedargument
+       here>
+       ~nqs <space>
+       <divded>
+       <argument
+       here>
+       = qk <space divded argument
+       here>
+       ~ qk <space>
+       <divded>
+       <argument
+       here>
+       =nqk <space divded argument
+       here>
+       ~nqk <space>
+       <divded>
+       <argument
+       here>
+---
+name: IFS-subst-4-5
+description:
+       extended testsuite based on problem by mikeserv
+stdin:
+       a='space divded  argument
+       here'
+       IFS=\ ; set -- $a; IFS=,
+       qs="$*"
+       printf '= qs '; printf '<%s>\n' "$qs"
+       printf '~ qs '; printf '<%s>\n' "$*"
+       nqs=$*
+       printf '=nqs '; printf '<%s>\n' "$nqs"
+       printf '~nqs '; printf '<%s>\n' $*
+       qk="$@"
+       printf '= qk '; printf '<%s>\n' "$qk"
+       printf '~ qk '; printf '<%s>\n' "$@"
+       nqk=$@
+       printf '=nqk '; printf '<%s>\n' "$nqk"
+       printf '~nqk '; printf '<%s>\n' $@
+expected-stdout:
+       = qs <space,divded,argument
+       here>
+       ~ qs <space,divded,argument
+       here>
+       =nqs <space,divded,argument
+       here>
+       ~nqs <space>
+       <divded>
+       <argument
+       here>
+       = qk <space divded argument
+       here>
+       ~ qk <space>
+       <divded>
+       <argument
+       here>
+       =nqk <space divded argument
+       here>
+       ~nqk <space>
+       <divded>
+       <argument
+       here>
+---
+name: IFS-subst-4-5p
+description:
+       extended testsuite based on problem by mikeserv
+stdin:
+       a='space divded  argument
+       here'
+       IFS=\ ; set -- $a; IFS=,
+       unset v
+       qs=${v:-"$*"}
+       printf '= qs '; printf '<%s>\n' "$qs"
+       printf '~ qs '; printf '<%s>\n' ${v:-"$*"}
+       nqs=${v:-$*}
+       printf '=nqs '; printf '<%s>\n' "$nqs"
+       printf '~nqs '; printf '<%s>\n' ${v:-$*}
+       qk=${v:-"$@"}
+       printf '= qk '; printf '<%s>\n' "$qk"
+       printf '~ qk '; printf '<%s>\n' ${v:-"$@"}
+       nqk=${v:-$@}
+       printf '=nqk '; printf '<%s>\n' "$nqk"
+       printf '~nqk '; printf '<%s>\n' ${v:-$@}
+expected-stdout:
+       = qs <space,divded,argument
+       here>
+       ~ qs <space,divded,argument
+       here>
+       =nqs <space,divded,argument
+       here>
+       ~nqs <space>
+       <divded>
+       <argument
+       here>
+       = qk <space divded argument
+       here>
+       ~ qk <space>
+       <divded>
+       <argument
+       here>
+       =nqk <space divded argument
+       here>
+       ~nqk <space>
+       <divded>
+       <argument
+       here>
+---
+name: IFS-subst-5
+description:
+       extended testsuite based on IFS-subst-3
+       differs slightly from ksh93:
+       - omit trailing field in a3zna, a7ina (unquoted $@ expansion)
+       - has extra middle fields in b5ins, b7ina (IFS_NWS unquoted expansion)
+       differs slightly from bash:
+       - omit leading field in a5ins, a7ina (IFS_NWS unquoted expansion)
+       differs slightly from zsh:
+       - differs in assignment, not expansion; probably zsh bug
+       - has extra middle fields in b5ins, b7ina (IFS_NWS unquoted expansion)
+       'emulate sh' zsh has extra fields in
+       - a5ins (IFS_NWS unquoted $*)
+       - b5ins, matching mksh’s
+stdin:
+       "$__progname" -c 'IFS=; set -- "" 2 ""; printf "[%s]\n" $*; x=$*; 
printf "<%s>\n" "$x"'
+       echo '=a1zns'
+       "$__progname" -c 'IFS=; set -- "" 2 ""; printf "[%s]\n" "$*"; x="$*"; 
printf "<%s>\n" "$x"'
+       echo '=a2zqs'
+       "$__progname" -c 'IFS=; set -- "" 2 ""; printf "[%s]\n" $@; x=$@; 
printf "<%s>\n" "$x"'
+       echo '=a3zna'
+       "$__progname" -c 'IFS=; set -- "" 2 ""; printf "[%s]\n" "$@"; x="$@"; 
printf "<%s>\n" "$x"'
+       echo '=a4zqa'
+       "$__progname" -c 'IFS=,; set -- "" 2 ""; printf "[%s]\n" $*; x=$*; 
printf "<%s>\n" "$x"'
+       echo '=a5ins'
+       "$__progname" -c 'IFS=,; set -- "" 2 ""; printf "[%s]\n" "$*"; x="$*"; 
printf "<%s>\n" "$x"'
+       echo '=a6iqs'
+       "$__progname" -c 'IFS=,; set -- "" 2 ""; printf "[%s]\n" $@; x=$@; 
printf "<%s>\n" "$x"'
+       echo '=a7ina'
+       "$__progname" -c 'IFS=,; set -- "" 2 ""; printf "[%s]\n" "$@"; x="$@"; 
printf "<%s>\n" "$x"'
+       echo '=a8iqa'
+       "$__progname" -c 'IFS=; set -- A B "" "" C; printf "[%s]\n" $*; x=$*; 
printf "<%s>\n" "$x"'
+       echo '=b1zns'
+       "$__progname" -c 'IFS=; set -- A B "" "" C; printf "[%s]\n" "$*"; 
x="$*"; printf "<%s>\n" "$x"'
+       echo '=b2zqs'
+       "$__progname" -c 'IFS=; set -- A B "" "" C; printf "[%s]\n" $@; x=$@; 
printf "<%s>\n" "$x"'
+       echo '=b3zna'
+       "$__progname" -c 'IFS=; set -- A B "" "" C; printf "[%s]\n" "$@"; 
x="$@"; printf "<%s>\n" "$x"'
+       echo '=b4zqa'
+       "$__progname" -c 'IFS=,; set -- A B "" "" C; printf "[%s]\n" $*; x=$*; 
printf "<%s>\n" "$x"'
+       echo '=b5ins'
+       "$__progname" -c 'IFS=,; set -- A B "" "" C; printf "[%s]\n" "$*"; 
x="$*"; printf "<%s>\n" "$x"'
+       echo '=b6iqs'
+       "$__progname" -c 'IFS=,; set -- A B "" "" C; printf "[%s]\n" $@; x=$@; 
printf "<%s>\n" "$x"'
+       echo '=b7ina'
+       "$__progname" -c 'IFS=,; set -- A B "" "" C; printf "[%s]\n" "$@"; 
x="$@"; printf "<%s>\n" "$x"'
+       echo '=b8iqa'
+expected-stdout:
+       [2]
+       <2>
+       =a1zns
+       [2]
+       <2>
+       =a2zqs
+       [2]
+       < 2 >
+       =a3zna
+       []
+       [2]
+       []
+       < 2 >
+       =a4zqa
+       [2]
+       <,2,>
+       =a5ins
+       [,2,]
+       <,2,>
+       =a6iqs
+       [2]
+       < 2 >
+       =a7ina
+       []
+       [2]
+       []
+       < 2 >
+       =a8iqa
+       [A]
+       [B]
+       [C]
+       <ABC>
+       =b1zns
+       [ABC]
+       <ABC>
+       =b2zqs
+       [A]
+       [B]
+       [C]
+       <A B   C>
+       =b3zna
+       [A]
+       [B]
+       []
+       []
+       [C]
+       <A B   C>
+       =b4zqa
+       [A]
+       [B]
+       []
+       []
+       [C]
+       <A,B,,,C>
+       =b5ins
+       [A,B,,,C]
+       <A,B,,,C>
+       =b6iqs
+       [A]
+       [B]
+       []
+       []
+       [C]
+       <A B   C>
+       =b7ina
+       [A]
+       [B]
+       []
+       []
+       [C]
+       <A B   C>
+       =b8iqa
+---
 name: IFS-arith-1
 description:
        http://austingroupbugs.net/view.php?id=832
@@ -7802,6 +8185,17 @@
 expected-stdout:
        <1> <> <2> <> <+> <> <3> <> <+> <> .
 ---
+name: varexpand-null-3
+description:
+       Ensure concatenating behaviour matches other shells
+       although the line 2<> is probably wrong? XNULLSUB case.
+stdin:
+       x=; printf "1<%s>\n" "$x$@"
+       set A; printf "2<%s>\n" "${@:+}"
+expected-stdout:
+       1<>
+       2<>
+---
 name: print-funny-chars
 description:
        Check print builtin's capability to output designated characters
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mksh/eval.c new/mksh/eval.c
--- old/mksh/eval.c     2014-07-29 18:29:36.000000000 +0200
+++ new/mksh/eval.c     2014-10-03 19:33:01.000000000 +0200
@@ -23,7 +23,7 @@
 
 #include "sh.h"
 
-__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.151 2014/07/29 16:29:11 tg Exp $");
+__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.152 2014/10/03 17:32:11 tg Exp $");
 
 /*
  * string expansion
@@ -244,8 +244,8 @@
                internal_errorf("expand(NULL)");
        /* for alias, readonly, set, typeset commands */
        if ((f & DOVACHECK) && is_wdvarassign(ccp)) {
-               f &= ~(DOVACHECK|DOBLANK|DOGLOB|DOTILDE);
-               f |= DOASNTILDE;
+               f &= ~(DOVACHECK | DOBLANK | DOGLOB | DOTILDE);
+               f |= DOASNTILDE | DOASNFIELD;
        }
        if (Flag(FNOGLOB))
                f &= ~DOGLOB;
@@ -261,7 +261,7 @@
        fdo = 0;
        saw_eq = false;
        /* must be 1/0 */
-       tilde_ok = (f & (DOTILDE|DOASNTILDE)) ? 1 : 0;
+       tilde_ok = (f & (DOTILDE | DOASNTILDE)) ? 1 : 0;
        doblank = 0;
        make_magic = false;
        word = (f&DOBLANK) ? IFS_WS : IFS_WORD;
@@ -422,7 +422,7 @@
                                                print_value_quoted(&shf, 
str_val(st->var));
                                                x.str = shf_sclose(&shf);
                                                break;
-                                       }
+                                           }
                                        case '0': {
                                                char *beg, *mid, *end, *stg;
                                                mksh_ari_t from = 0, num = -1, 
flen, finc = 0;
@@ -472,7 +472,7 @@
                                                        utfincptr(beg, &num);
                                                strndupx(x.str, beg, num, 
ATEMP);
                                                goto do_CSUBST;
-                                       }
+                                           }
                                        case '/': {
                                                char *s, *p, *d, *sbeg, *end;
                                                char *pat, *rrep;
@@ -616,7 +616,7 @@
                                                if (rrep != null)
                                                        afree(rrep, ATEMP);
                                                goto do_CSUBST;
-                                       }
+                                           }
                                        case '#':
                                        case '%':
                                                /* ! DOBLANK,DOBRACE,DOTILDE */
@@ -649,7 +649,7 @@
                                                 * a arithmetic operator.
                                                 */
                                                if (!(x.var->flag & INTEGER))
-                                                       f |= DOASNTILDE|DOTILDE;
+                                                       f |= DOASNTILDE | 
DOTILDE;
                                                f |= DOTEMP;
                                                /*
                                                 * These will be done after the
@@ -663,6 +663,7 @@
                                                f |= DOTEMP;
                                                /* FALLTHROUGH */
                                        default:
+                                               word = IFS_WORD;
                                                /* Enable tilde expansion */
                                                tilde_ok = 1;
                                                f |= DOTILDE;
@@ -671,7 +672,7 @@
                                        /* skip word */
                                        sp += wdscan(sp, CSUBST) - sp;
                                continue;
-                       }
+                           }
                        case CSUBST:
                                /* only get here if expanding word */
  do_CSUBST:
@@ -741,6 +742,7 @@
                                        if (f & DOBLANK)
                                                doblank++;
                                        st = st->prev;
+                                       word = quote || (!*x.str && (f & 
DOASNFIELD)) ? IFS_WORD : IFS_WS;
                                        continue;
                                case '?': {
                                        char *s = Xrestpos(ds, dp, st->base);
@@ -749,13 +751,14 @@
                                            dp == s ?
                                            "parameter null or not set" :
                                            (debunk(s, s, strlen(s) + 1), s));
-                               }
+                                   }
                                case '0':
                                case '/':
                                case 0x100 | '#':
                                case 0x100 | 'Q':
                                        dp = Xrestpos(ds, dp, st->base);
                                        type = XSUB;
+                                       word = quote || (!*x.str && (f & 
DOASNFIELD)) ? IFS_WORD : IFS_WS;
                                        if (f & DOBLANK)
                                                doblank++;
                                        st = st->prev;
@@ -795,13 +798,6 @@
                        type = XBASE;
                        if (f & DOBLANK) {
                                doblank--;
-                               /*
-                                * XXX not really correct:
-                                *      x=; "$x$@"
-                                * should generate a null argument and
-                                *      set A; "${@:+}"
-                                * shouldn't.
-                                */
                                if (dp == Xstring(ds, dp))
                                        word = IFS_WS;
                        }
@@ -825,7 +821,7 @@
                        if ((c = *x.str++) == '\0') {
                                /*
                                 * force null words to be created so
-                                * set -- '' 2 ''; foo "$@" will do
+                                * set -- "" 2 ""; echo "$@" will do
                                 * the right thing
                                 */
                                if (quote && x.split)
@@ -837,9 +833,21 @@
                                        continue;
                                }
                                c = ifs0;
+                               if ((f & DOASNFIELD)) {
+                                       /* assignment, do not field-split */
+                                       if (x.split) {
+                                               c = ' ';
+                                               break;
+                                       }
+                                       if (c == 0) {
+                                               continue;
+                                       }
+                               }
                                if (c == 0) {
                                        if (quote && !x.split)
                                                continue;
+                                       if (!quote && word == IFS_WS)
+                                               continue;
                                        /* this is so we don't terminate */
                                        c = ' ';
                                        /* now force-emit a word */
@@ -922,7 +930,8 @@
                                            strlen(cp) + 1));
                                fdo = 0;
                                saw_eq = false;
-                               tilde_ok = (f & (DOTILDE|DOASNTILDE)) ? 1 : 0;
+                               /* must be 1/0 */
+                               tilde_ok = (f & (DOTILDE | DOASNTILDE)) ? 1 : 0;
                                if (c == 0)
                                        return;
                                Xinit(ds, dp, 128, ATEMP);
@@ -1006,7 +1015,7 @@
                                         * through the sequence ${A=a=}~
                                         */
                                        if (type == XBASE &&
-                                           (f & (DOTILDE|DOASNTILDE)) &&
+                                           (f & (DOTILDE | DOASNTILDE)) &&
                                            (tilde_ok & 2)) {
                                                const char *tcp;
                                                char *tdp = dp;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mksh/exec.c new/mksh/exec.c
--- old/mksh/exec.c     2014-06-24 20:38:56.000000000 +0200
+++ new/mksh/exec.c     2014-10-03 19:33:01.000000000 +0200
@@ -23,7 +23,7 @@
 
 #include "sh.h"
 
-__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.132 2014/06/24 18:38:31 tg Exp $");
+__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.133 2014/10/03 17:32:11 tg Exp $");
 
 #ifndef MKSH_DEFAULT_EXECSHELL
 #define MKSH_DEFAULT_EXECSHELL "/bin/sh"
@@ -635,7 +635,7 @@
        for (i = 0; t->vars[i]; i++) {
                /* do NOT lookup in the new var/fn block just created */
                e->loc = l_expand;
-               cp = evalstr(t->vars[i], DOASNTILDE);
+               cp = evalstr(t->vars[i], DOASNTILDE | DOASNFIELD);
                e->loc = l_assign;
                if (Flag(FXTRACE)) {
                        const char *ccp;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mksh/funcs.c new/mksh/funcs.c
--- old/mksh/funcs.c    2014-07-28 23:46:09.000000000 +0200
+++ new/mksh/funcs.c    2014-09-03 21:56:41.000000000 +0200
@@ -1,5 +1,5 @@
 /*     $OpenBSD: c_ksh.c,v 1.34 2013/12/17 16:37:05 deraadt Exp $      */
-/*     $OpenBSD: c_sh.c,v 1.44 2013/09/04 15:49:18 millert Exp $       */
+/*     $OpenBSD: c_sh.c,v 1.45 2014/08/27 08:26:04 jmc Exp $   */
 /*     $OpenBSD: c_test.c,v 1.18 2009/03/01 20:11:06 otto Exp $        */
 /*     $OpenBSD: c_ulimit.c,v 1.19 2013/11/28 10:33:37 sobrado Exp $   */
 
@@ -38,7 +38,7 @@
 #endif
 #endif
 
-__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.257 2014/07/28 21:45:44 tg Exp $");
+__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.258 2014/09/03 19:55:51 tg Exp $");
 
 #if HAVE_KILLPG
 /*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mksh/jobs.c new/mksh/jobs.c
--- old/mksh/jobs.c     2014-06-11 00:17:34.000000000 +0200
+++ new/mksh/jobs.c     2014-10-03 14:33:38.000000000 +0200
@@ -23,7 +23,7 @@
 
 #include "sh.h"
 
-__RCSID("$MirOS: src/bin/mksh/jobs.c,v 1.104 2014/06/10 22:17:09 tg Exp $");
+__RCSID("$MirOS: src/bin/mksh/jobs.c,v 1.105 2014/10/03 12:32:48 tg Exp $");
 
 #if HAVE_KILLPG
 #define mksh_killpg            killpg
@@ -1339,7 +1339,7 @@
        do {
 #ifndef MKSH_NOPROSPECTOFWORK
                pid = waitpid(-1, &status, (WNOHANG |
-#ifdef WCONTINUED
+#if defined(WCONTINUED) && defined(WIFCONTINUED)
                    WCONTINUED |
 #endif
                    WUNTRACED));
@@ -1381,7 +1381,7 @@
                if (WIFSTOPPED(status))
                        p->state = PSTOPPED;
                else
-#ifdef WIFCONTINUED
+#if defined(WCONTINUED) && defined(WIFCONTINUED)
                  if (WIFCONTINUED(status)) {
                        p->state = j->state = PRUNNING;
                        /* skip check_job(), no-op in this case */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mksh/main.c new/mksh/main.c
--- old/mksh/main.c     2014-06-09 14:28:42.000000000 +0200
+++ new/mksh/main.c     2014-10-03 19:20:17.000000000 +0200
@@ -1,6 +1,6 @@
 /*     $OpenBSD: main.c,v 1.54 2013/11/28 10:33:37 sobrado Exp $       */
-/*     $OpenBSD: tty.c,v 1.9 2006/03/14 22:08:01 deraadt Exp $ */
-/*     $OpenBSD: io.c,v 1.23 2013/12/17 16:37:06 deraadt Exp $ */
+/*     $OpenBSD: tty.c,v 1.10 2014/08/10 02:44:26 guenther Exp $       */
+/*     $OpenBSD: io.c,v 1.25 2014/08/11 20:28:47 guenther Exp $        */
 /*     $OpenBSD: table.c,v 1.15 2012/02/19 07:52:30 otto Exp $ */
 
 /*-
@@ -34,7 +34,7 @@
 #include <locale.h>
 #endif
 
-__RCSID("$MirOS: src/bin/mksh/main.c,v 1.280 2014/06/09 12:28:17 tg Exp $");
+__RCSID("$MirOS: src/bin/mksh/main.c,v 1.284 2014/10/03 17:19:27 tg Exp $");
 
 extern char **environ;
 
@@ -63,7 +63,7 @@
 
 static const char *initcoms[] = {
        Ttypeset, "-r", initvsn, NULL,
-       Ttypeset, "-x", "HOME", "PATH", "RANDOM", "SHELL", NULL,
+       Ttypeset, "-x", "HOME", "PATH", "SHELL", NULL,
        Ttypeset, "-i10", "COLUMNS", "LINES", "SECONDS", "TMOUT", NULL,
        Talias,
        "integer=typeset -i",
@@ -184,7 +184,7 @@
        int argi, i;
        Source *s = NULL;
        struct block *l;
-       unsigned char restricted, errexit, utf_flag;
+       unsigned char restricted_shell, errexit, utf_flag;
        char *cp;
        const char *ccp, **wp;
        struct tbl *vp;
@@ -407,7 +407,11 @@
        setint_n((vp_pipest = global("PIPESTATUS")), 0, 10);
 
        /* Set this before parsing arguments */
-       Flag(FPRIVILEGED) = (kshuid != ksheuid || kshgid != kshegid) ? 2 : 0;
+       Flag(FPRIVILEGED) = (
+#if HAVE_ISSETUGID
+           issetugid() ||
+#endif
+           kshuid != ksheuid || kshgid != kshegid) ? 2 : 0;
 
        /* this to note if monitor is set on command line (see below) */
 #ifndef MKSH_UNEMPLOYED
@@ -573,7 +577,7 @@
        }
 
        /* Disable during .profile/ENV reading */
-       restricted = Flag(FRESTRICTED);
+       restricted_shell = Flag(FRESTRICTED);
        Flag(FRESTRICTED) = 0;
        errexit = Flag(FERREXIT);
        Flag(FERREXIT) = 0;
@@ -603,7 +607,7 @@
                        change_flag(FPRIVILEGED, OF_INTERNAL, false);
        }
 
-       if (restricted) {
+       if (restricted_shell) {
                shcomexec(restr_com);
                /* After typeset command... */
                Flag(FRESTRICTED) = 1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mksh/mirhash.h new/mksh/mirhash.h
--- old/mksh/mirhash.h  2014-06-29 13:48:30.000000000 +0200
+++ new/mksh/mirhash.h  2014-10-02 21:34:56.000000000 +0200
@@ -30,6 +30,12 @@
  * for speed reasons, specified for the regular stable hash, but very
  * much recommended if the actual output value may differ across runs
  * (so is using a random value instead of 0 for the IV).
+ *-
+ * Little quote gem:
+ *     We are looking into it. Changing the core
+ *     hash function in PHP isn't a trivial change
+ *     and will take us some time.
+ * -- Rasmus Lerdorf
  */
 
 #ifndef SYSKERN_MIRHASH_H
@@ -38,7 +44,7 @@
 
 #include <sys/types.h>
 
-__RCSID("$MirOS: src/bin/mksh/mirhash.h,v 1.2 2014/06/29 11:48:05 tg Exp $");
+__RCSID("$MirOS: src/bin/mksh/mirhash.h,v 1.3 2014/10/02 19:34:06 tg Exp $");
 
 /*-
  * BAFH itself is defined by the following primitives:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mksh/mksh.1 new/mksh/mksh.1
--- old/mksh/mksh.1     2014-07-29 19:26:49.000000000 +0200
+++ new/mksh/mksh.1     2014-10-03 14:36:28.000000000 +0200
@@ -1,5 +1,5 @@
-.\" $MirOS: src/bin/mksh/mksh.1,v 1.340 2014/07/29 17:26:24 tg Exp $
-.\" $OpenBSD: ksh.1,v 1.152 2014/02/12 16:28:13 schwarze Exp $
+.\" $MirOS: src/bin/mksh/mksh.1,v 1.343 2014/10/03 12:35:38 tg Exp $
+.\" $OpenBSD: ksh.1,v 1.153 2014/08/17 07:15:41 jmc Exp $
 .\"-
 .\" Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
 .\"            2010, 2011, 2012, 2013, 2014
@@ -74,7 +74,7 @@
 .\" with -mandoc, it might implement .Mx itself, but we want to
 .\" use our own definition. And .Dd must come *first*, always.
 .\"
-.Dd $Mdocdate: July 29 2014 $
+.Dd $Mdocdate: October 3 2014 $
 .\"
 .\" Check which macro package we use, and do other -mdoc setup.
 .\"
@@ -1875,6 +1875,9 @@
 .It Ev HISTSIZE
 The number of commands normally stored for history.
 The default is 2047.
+Do not set this value to insanely high values such as 1000000000 because
+.Nm
+can then not allocate enough memory for the history and will not start.
 .It Ev HOME
 The default directory for the
 .Ic cd
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mksh/sh.h new/mksh/sh.h
--- old/mksh/sh.h       2014-09-03 21:23:15.000000000 +0200
+++ new/mksh/sh.h       2014-10-03 19:33:02.000000000 +0200
@@ -169,9 +169,9 @@
 #endif
 
 #ifdef EXTERN
-__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.694 2014/09/03 19:22:50 tg Exp $");
+__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.695 2014/10/03 17:32:12 tg Exp $");
 #endif
-#define MKSH_VERSION "R50 2014/09/03"
+#define MKSH_VERSION "R50 2014/10/03"
 
 /* arithmetic types: C implementation */
 #if !HAVE_CAN_INTTYPES
@@ -533,7 +533,7 @@
 #define mkssert(e)     do { } while (/* CONSTCOND */ 0)
 #endif
 
-#if (!defined(MKSH_BUILDMAKEFILE4BSD) && !defined(MKSH_BUILDSH)) || 
(MKSH_BUILD_R != 502)
+#if (!defined(MKSH_BUILDMAKEFILE4BSD) && !defined(MKSH_BUILDSH)) || 
(MKSH_BUILD_R != 503)
 #error Must run Build.sh to compile this.
 extern void thiswillneverbedefinedIhope(void);
 int
@@ -1396,6 +1396,7 @@
 #define DOVACHECK BIT(9)       /* var assign check (for typeset, set, etc) */
 #define DOMARKDIRS BIT(10)     /* force markdirs behaviour */
 #define DOTCOMEXEC BIT(11)     /* not an eval flag, used by sh -c hack */
+#define DOASNFIELD BIT(12)     /* is assignment, change field handling */
 
 #define X_EXTRA        20      /* this many extra bytes in X string */
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mksh/var.c new/mksh/var.c
--- old/mksh/var.c      2014-09-03 21:23:16.000000000 +0200
+++ new/mksh/var.c      2014-10-03 19:20:53.000000000 +0200
@@ -28,7 +28,7 @@
 #include <sys/sysctl.h>
 #endif
 
-__RCSID("$MirOS: src/bin/mksh/var.c,v 1.181 2014/09/03 19:22:51 tg Exp $");
+__RCSID("$MirOS: src/bin/mksh/var.c,v 1.182 2014/10/03 17:20:03 tg Exp $");
 
 /*-
  * Variables
@@ -751,18 +751,18 @@
                }
                val += len;
        }
-       if (val[0] == '=' || (val[0] == '+' && val[1] == '=')) {
+       if (val[0] == '=') {
                strndupx(tvar, var, val - var, ATEMP);
-               if (*val++ == '+') {
-                       ++val;
-                       vappend = true;
-               }
-       } else if ((val[0] != '\0') || (set & IMPORT)) {
-               /*
-                * must have a = when setting a variable by importing
-                * the original environment, otherwise be empty; we
-                * also end up here when a variable name was invalid
-                */
+               ++val;
+       } else if (set & IMPORT) {
+               /* environment invalid variable name or no assignment */
+               return (NULL);
+       } else if (val[0] == '+' && val[1] == '=') {
+               strndupx(tvar, var, val - var, ATEMP);
+               val += 2;
+               vappend = true;
+       } else if (val[0] != '\0') {
+               /* other invalid variable names (not from environment) */
                return (NULL);
        } else {
                /* just varname with no value part nor equals sign */

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to