[Midnightbsd-cvs] src [6852] stable/0.5: 0.5.2 - fix a regression with the mksh hotfix
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Oct 11 08:44:52 EDT 2014
Revision: 6852
http://svnweb.midnightbsd.org/src/?rev=6852
Author: laffer1
Date: 2014-10-11 08:44:51 -0400 (Sat, 11 Oct 2014)
Log Message:
-----------
0.5.2 - fix a regression with the mksh hotfix
Modified Paths:
--------------
stable/0.5/UPDATING
stable/0.5/bin/mksh/Makefile
stable/0.5/contrib/mksh/Build.sh
stable/0.5/contrib/mksh/check.t
stable/0.5/contrib/mksh/eval.c
stable/0.5/contrib/mksh/mksh.1
stable/0.5/contrib/mksh/sh.h
stable/0.5/contrib/mksh/var.c
stable/0.5/sys/conf/newvers.sh
Property Changed:
----------------
stable/0.5/contrib/mksh/
Modified: stable/0.5/UPDATING
===================================================================
--- stable/0.5/UPDATING 2014-10-11 12:28:09 UTC (rev 6851)
+++ stable/0.5/UPDATING 2014-10-11 12:44:51 UTC (rev 6852)
@@ -1,5 +1,10 @@
Updating Information for MidnightBSD users.
+20141011:
+ 0.5.2
+
+ mksh R50d - R50c had a regression with field splitting.
+
20141004:
0.5.1
mksh R50c is a minor security update to fix an issue with the
Modified: stable/0.5/bin/mksh/Makefile
===================================================================
--- stable/0.5/bin/mksh/Makefile 2014-10-11 12:28:09 UTC (rev 6851)
+++ stable/0.5/bin/mksh/Makefile 2014-10-11 12:44:51 UTC (rev 6852)
@@ -38,7 +38,7 @@
-DHAVE_SYS_ERRLIST_DECL=1 -DHAVE_SYS_SIGLIST_DECL=1 -DHAVE_PERSISTENT_HISTORY=1 \
-DHAVE_SILENT_IDIVWRAPV=0 \
-DMKSH_BINSHREDUCED -DMKSH_MIDNIGHTBSD01ASH_COMPAT \
- -DMKSH_DISABLE_DEPRECATED -DMKSH_BUILD_R=503
+ -DMKSH_DISABLE_DEPRECATED -DMKSH_BUILD_R=504
WARNS?= 0
MAN= mksh.1
Index: stable/0.5/contrib/mksh
===================================================================
--- stable/0.5/contrib/mksh 2014-10-11 12:28:09 UTC (rev 6851)
+++ stable/0.5/contrib/mksh 2014-10-11 12:44:51 UTC (rev 6852)
Property changes on: stable/0.5/contrib/mksh
___________________________________________________________________
Modified: svn:mergeinfo
## -1,2 +1,2 ##
/branches/MIROS/contrib/mksh:5952-6384
-/vendor/MirOS/mksh/dist:6385-6841
\ No newline at end of property
+/vendor/MirOS/mksh/dist:6385-6851
\ No newline at end of property
Modified: stable/0.5/contrib/mksh/Build.sh
===================================================================
--- stable/0.5/contrib/mksh/Build.sh 2014-10-11 12:28:09 UTC (rev 6851)
+++ stable/0.5/contrib/mksh/Build.sh 2014-10-11 12:44:51 UTC (rev 6852)
@@ -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.669 2014/10/07 15:22:12 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.669 2014/10/07 15:22:12 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=504
$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
Modified: stable/0.5/contrib/mksh/check.t
===================================================================
--- stable/0.5/contrib/mksh/check.t 2014-10-11 12:28:09 UTC (rev 6851)
+++ stable/0.5/contrib/mksh/check.t 2014-10-11 12:44:51 UTC (rev 6852)
@@ -1,4 +1,4 @@
-# $MirOS: src/bin/mksh/check.t,v 1.659 2014/10/03 17:32:09 tg Exp $
+# $MirOS: src/bin/mksh/check.t,v 1.661 2014/10/07 15:22:14 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/10/03
+ @(#)MIRBSD KSH R50 2014/10/07
description:
Check version of shell.
stdin:
@@ -36,7 +36,7 @@
category: shell:legacy-no
---
expected-stdout:
- @(#)LEGACY KSH R50 2014/10/03
+ @(#)LEGACY KSH R50 2014/10/07
description:
Check version of legacy shell.
stdin:
@@ -3736,12 +3736,18 @@
name: IFS-subst-3
description:
Check leading IFS non-whitespace after trim does make a field
+ but leading IFS whitespace does not, nor empty replacements
stdin:
showargs() { for i; do echo -n " <$i>"; done; echo; }
+ showargs 0 ${-+}
IFS=:
showargs 1 ${-+:foo:bar}
+ IFS=' '
+ showargs 2 ${-+ foo bar}
expected-stdout:
+ <0>
<1> <> <foo> <bar>
+ <2> <foo> <bar>
---
name: IFS-subst-4-1
description:
Modified: stable/0.5/contrib/mksh/eval.c
===================================================================
--- stable/0.5/contrib/mksh/eval.c 2014-10-11 12:28:09 UTC (rev 6851)
+++ stable/0.5/contrib/mksh/eval.c 2014-10-11 12:44:51 UTC (rev 6852)
@@ -23,7 +23,7 @@
#include "sh.h"
-__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.152 2014/10/03 17:32:11 tg Exp $");
+__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.153 2014/10/07 15:22:16 tg Exp $");
/*
* string expansion
@@ -62,6 +62,7 @@
#define IFS_WORD 0 /* word has chars (or quotes) */
#define IFS_WS 1 /* have seen IFS white-space */
#define IFS_NWS 2 /* have seen IFS non-white-space */
+#define IFS_IWS 3 /* begin of word, ignore IFS WS */
static int varsub(Expand *, const char *, const char *, int *, int *);
static int comsub(Expand *, const char *, int);
@@ -663,7 +664,7 @@
f |= DOTEMP;
/* FALLTHROUGH */
default:
- word = IFS_WORD;
+ word = quote ? IFS_WORD : IFS_IWS;
/* Enable tilde expansion */
tilde_ok = 1;
f |= DOTILDE;
@@ -907,12 +908,12 @@
* IFS_WORD w/WS w/NWS w
* IFS_WS -/WS -/NWS -
* IFS_NWS -/NWS w/NWS -
+ * IFS_IWS -/WS w/NWS -
* (w means generate a word)
- * Note that IFS_NWS/0 generates a word (AT&T ksh
- * doesn't do this, but POSIX does).
*/
- if (word == IFS_WORD ||
- (word == IFS_NWS && c && !ctype(c, C_IFSWS))) {
+ if ((word == IFS_WORD) || (c &&
+ (word == IFS_IWS || word == IFS_NWS) &&
+ !ctype(c, C_IFSWS))) {
emit_word:
*dp++ = '\0';
cp = Xclose(ds, dp);
Modified: stable/0.5/contrib/mksh/mksh.1
===================================================================
--- stable/0.5/contrib/mksh/mksh.1 2014-10-11 12:28:09 UTC (rev 6851)
+++ stable/0.5/contrib/mksh/mksh.1 2014-10-11 12:44:51 UTC (rev 6852)
@@ -1,4 +1,4 @@
-.\" $MirOS: src/bin/mksh/mksh.1,v 1.343 2014/10/03 12:35:38 tg Exp $
+.\" $MirOS: src/bin/mksh/mksh.1,v 1.344 2014/10/07 15:30:12 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,
@@ -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: October 3 2014 $
+.Dd $Mdocdate: October 7 2014 $
.\"
.\" Check which macro package we use, and do other -mdoc setup.
.\"
@@ -2530,6 +2530,12 @@
as numeric arguments to the
.Ic test
command, and as the value of an assignment to an integer parameter.
+.Em Warning :
+This also affects implicit conversion to integer, for example as done by the
+.Ic let
+command.
+.Em Never
+use unchecked user input, e.g. from the environment, in arithmetics!
.Pp
Expressions are calculated using signed arithmetic and the
.Vt mksh_ari_t
Modified: stable/0.5/contrib/mksh/sh.h
===================================================================
--- stable/0.5/contrib/mksh/sh.h 2014-10-11 12:28:09 UTC (rev 6851)
+++ stable/0.5/contrib/mksh/sh.h 2014-10-11 12:44:51 UTC (rev 6852)
@@ -169,9 +169,9 @@
#endif
#ifdef EXTERN
-__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.695 2014/10/03 17:32:12 tg Exp $");
+__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.697 2014/10/07 15:22:17 tg Exp $");
#endif
-#define MKSH_VERSION "R50 2014/10/03"
+#define MKSH_VERSION "R50 2014/10/07"
/* 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 != 503)
+#if (!defined(MKSH_BUILDMAKEFILE4BSD) && !defined(MKSH_BUILDSH)) || (MKSH_BUILD_R != 504)
#error Must run Build.sh to compile this.
extern void thiswillneverbedefinedIhope(void);
int
Modified: stable/0.5/contrib/mksh/var.c
===================================================================
--- stable/0.5/contrib/mksh/var.c 2014-10-11 12:28:09 UTC (rev 6851)
+++ stable/0.5/contrib/mksh/var.c 2014-10-11 12:44:51 UTC (rev 6852)
@@ -28,7 +28,7 @@
#include <sys/sysctl.h>
#endif
-__RCSID("$MirOS: src/bin/mksh/var.c,v 1.182 2014/10/03 17:20:03 tg Exp $");
+__RCSID("$MirOS: src/bin/mksh/var.c,v 1.183 2014/10/04 11:47:19 tg Exp $");
/*-
* Variables
@@ -784,8 +784,9 @@
/* find value if variable already exists */
if ((qval = val) == NULL) {
varsearch(e->loc, &vp, tvar, hash(tvar));
- if (vp != NULL)
- qval = str_val(vp);
+ if (vp == NULL)
+ goto nameref_empty;
+ qval = str_val(vp);
}
/* check target value for being a valid variable name */
ccp = skip_varname(qval, false);
@@ -803,6 +804,7 @@
case '-':
goto nameref_rhs_checked;
}
+ nameref_empty:
errorf("%s: %s", var, "empty nameref target");
}
len = (*ccp == '[') ? array_ref_len(ccp) : 0;
Modified: stable/0.5/sys/conf/newvers.sh
===================================================================
--- stable/0.5/sys/conf/newvers.sh 2014-10-11 12:28:09 UTC (rev 6851)
+++ stable/0.5/sys/conf/newvers.sh 2014-10-11 12:44:51 UTC (rev 6852)
@@ -32,7 +32,7 @@
# $MidnightBSD: src/sys/conf/newvers.sh,v 1.9 2012/10/07 14:18:18 laffer1 Exp $
TYPE="MidnightBSD"
-REVISION="0.5.1"
+REVISION="0.5.2"
BRANCH="RELEASE"
if [ "X${BRANCH_OVERRIDE}" != "X" ]; then
BRANCH=${BRANCH_OVERRIDE}
More information about the Midnightbsd-cvs
mailing list