Debian Patches

Status for dash/0.5.12-9

Patch Description Author Forwarded Bugs Origin Last update
0004-SHELL-Disable-sh-c-command-sh-c-exec-command-optimiza.diff shell: Disable sh -c "command" -> sh -c "exec command" optimization
Bugs #642706 (bin-prot FTBFS) and #642835 (sexplib310 FTBFS) can be
fixed by reverting the patch submitted at [1]. I don't understand why.

[1] http://thread.gmane.org/gmane.comp.shells.dash/556

While investigating #642706, in the failing case, I observed that a
cpp process called with "sh -c" gets SIGPIPE while writing to
stderr. In the succeeding case, the write is successful, and is read
by the ocamlbuild process that started "sh -c cpp ...".
Stéphane Glondu <glondu@debian.org> no 2011-09-25
0007-Don-t-execute-binary-files-if-execve-returned-ENOEXE.diff Don't execute binary files if execve() returned ENOEXEC
Both "dash -c foo" and "./foo" are supposed to be able to run hashbang-less
scripts, but attempts to execute common binary files tend to be nasty:
especially both ELF and PE tend to make dash create a bunch of files with
unprintable names, that in turn confuse some tools up to causing data loss.

Thus, let's read the first line and see if it looks like text. This is a
variant of the approach used by bash and zsh; mksh instead checks for
signatures of a bunch of common file types.

POSIX says: "If the executable file is not a text file, the shell may bypass
this command execution.".
Adam Borowski <kilobyte@angband.pl> no 2017-01-24
0008-Support-e-in-echo-and-printf-builtins.diff Support \e in "echo" and "printf" builtins Adam Borowski <kilobyte@angband.pl> no 2014-06-28
0009-dash-Fix-stack-overflow-from-infinite-recursion-in-s.patch dash: Fix stack overflow from infinite recursion in script Chris Lamb <lamby@debian.org> no debian 2018-02-15
0010-exec-Check-executable-bit-when-searching-path.patch exec: Check executable bit when searching path
This is inherited from NetBSD. There is even a commented-out
block of code that tried to fix this.

Anyway, we now have faccessat so we can simply use it.
Herbert Xu <herbert@gondor.apana.org.au> no debian 2021-11-10
0012-enable-large-file-support-when-available.patch enable large file support when available You-Sheng Yang <vicamo@gmail.com> no 2018-12-12
0013-enable-hardening-for-helpers.patch Add $(CPPFLAGS), $(CFLAGS) and $(LDFLAGS) to $(COMPILE_FOR_BUILD) so that helpers are built with hardening

But don't leak host CFLAGS into build compiler invocation
Helmut Grohne <helmut@subdivi.de> no debian 2019-07-18
0017-histedit-Fix-infinite-loop-when-using-fc--s.patch histedit: Fix infinite loop when using 'fc -s'
When compiling with libedit, he.num may somehow overrun last, causing
an infinite loop when using fc -s.
This mild change to the check plugs it.
宇砂ワシ <usawashi16@yahoo.co.jp> no debian 2019-04-27
0018-builtin-Don-t-early-exit-when-first-hash-r-is-found.patch builtin: Don't early-exit when first hash -r is found
This fixes incorrectly-accepted "hash -rv" being equivalent to hash -r
(well, hash -r[literally anything] being equivalent to hash -r)

Also remove -v from the manual, it doesn't appear to have ever existed
наб <nabijaczleweli@nabijaczleweli.xyz> no debian 2022-12-14
0019-builtin-Actually-accept-ulimit-r.patch builtin: Actually accept ulimit -r
The original commit that added it supposes this works, but it only adds
it to the ulimit -a listing and the manual, but doesn't allow it as an
option.
Vincent Lefevre <vincent@vinc17.net> no debian 2022-12-16
0020-Update-manpages.patch Update manpages

The explicit arguments were missing, also exchange expr subst for
arithmetic and fix the spacing around Bell Labs




The manual now contains all built-ins


The current wording says that given
printf a b c d
a is the format, c and d are processed as noted,
but b is unspecified


Multiple issues:
* the encoding is not always ASCII
* what ASCII code is assigned to я
* dash isn't internationalised
(this is nonconformant but out of scope),
and uses the next /byte/; in a UTF-8 locale:
$ printf %d\\n \'ą
196
$ printf %d\\n \'я
196
this is in contrast to POSIX (and bash), which says:
> If the leading character is a single-quote or double-quote,
> the value shall be the numeric value in the underlying codeset
> of the character following the single-quote or double-quote.
(i.e. mbrtowc(&val, argv[n], ...))


Only true was documented, add false just below it
(out of order, but so is true, and the grouping makes much more sense).
наб <nabijaczleweli@nabijaczleweli.xyz> no debian 2022-12-14
0021-jobs-Implement-pipefail-option.patch jobs: Implement pipefail option
With the pipefail option set, a pipeline's exit status is the exit
status of the rightmost command that failed, or zero if all commands
succeeded.

This is planned for inclusion in the next revision of POSIX [1],
although the details are yet to be finalised. The semantics of this
implementation are the same as those proposed in [2], which have also
been adopted by the BSD shells.

[1] https://www.austingroupbugs.net/view.php?id=789
[2] https://www.austingroupbugs.net/view.php?id=789#c4115
Chris Novakovic <chris@chrisn.me.uk> no 2022-04-22
9001-Add-privmode.diff Implement privmode Harald van Dijk <harald@gigawatt.nl> no debian https://www.openwall.com/lists/oss-security/2013/08/22/15 2013-08-22

All known versions for source package 'dash'

Links