additional applets available as ash builtins?
Cristian Ionescu-Idbohrn
cristian.ionescu-idbohrn at axis.com
Sun Apr 13 10:49:04 UTC 2008
On Sun, 13 Apr 2008, Denys Vlasenko wrote:
> I mostly worry about various obscure cases like this:
>
> VAR=''
> VAR=qwe sleep 4
> echo "should be empty: '$VAR'"
>
> They can be broken now after my quick hack. E.g. VAR value
> may now "leak" into main shell environment.
Yes, I see what you mean.
> (I didn't test, I just speculate)
I did. You're right.
,----
| # ./busybox ash
| ash> VAR=;VAR=qwe sleep 1;echo "should be empty: $VAR"
| should be empty: qwe
`----
> > and found these seem to fork:
> >
> > 'tac':
>
> tac is NOEXEC:
>
> USE_TAC(APPLET_NOEXEC(tac, tac, _BB_DIR_USR_BIN, _BB_SUID_NEVER, tac))
>
> Of course it will fork. NOEXEC applets cannot avoid forking,
> they can only avoid execing.
>
> NOFORKing is, mathematically speaking, is "stronger" property.
...
> Documentation explains that in more details.
Of course. I wasn't thinking :( Too late, too tired.
Still, in this particular 'tac' case, I don't see why 'cat' should be
NOFORK and 'tac' NOEXEC. Do you?
Cheers,
--
Cristian
More information about the busybox
mailing list