dot.mkshrc robustness
Bug #1441853 reported by
Thorsten Glaser
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mksh |
Fix Released
|
High
|
Unassigned |
Bug Description
Make dot.mkshrc (and prt.mkshrc) robust:
• work with “set -e” and “set -u”, often used in Debian
• not suck with “set -x”, well not much
• work with read-only filesystem, in particular no $TMPDIR (pointed out by Natureshadow)
‣ especially relevant for Android /system/etc/mkshrc
It's already mostly alias-proof and function-proof¹, thankfully.
This is especially relevant for both being /bin/sh (or /system/bin/sh ofc) and root's login shell, hence importance High where it'd otherwise be Medium.
① Assuming the user is not stupid and defines shell functions named “return”, “typeset”, “command”, etc. – i.e. POSIX builtins and specials plus the ksh “typeset” one.
To post a comment you must log in.
On Wed, Apr 8, 2015 at 2:07 PM, Thorsten Glaser
<email address hidden> wrote:
> Public bug reported:
>
> Make dot.mkshrc (and prt.mkshrc) robust:
>
> • work with “set -e” and “set -u”, often used in Debian
>
> • not suck with “set -x”, well not much
>
> • work with read-only filesystem, in particular no $TMPDIR (pointed out by Natureshadow)
> ‣ especially relevant for Android /system/etc/mkshrc
(we set TMPDIR to /data/local/tmp nowadays.)
> It's already mostly alias-proof and function-proof¹, thankfully.
>
> This is especially relevant for both being /bin/sh (or /system/bin/sh
> ofc) and root's login shell, hence importance High where it'd otherwise
> be Medium.
>
> ① Assuming the user is not stupid and defines shell functions named
> “return”, “typeset”, “command”, etc. – i.e. POSIX builtins and specials
> plus the ksh “typeset” one.
>
> ** Affects: mksh
> Importance: High
> Status: Triaged