ash: builtin: Mark more regular built-ins

Upstream commit:

    Date: Sat, 19 May 2018 02:39:49 +0800
    builtin: Mark more regular built-ins

    This patch marks the following built-ins as regular, meaning that
    they cannot be overriden using PATH search:

            hash
            pwd
            type
            ulimit

    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2020-02-16 18:29:52 +01:00
parent 2bad3a305b
commit a7b97e367c

View File

@ -9962,7 +9962,7 @@ static const struct builtincmd builtintab[] = {
#if ENABLE_ASH_GETOPTS
{ BUILTIN_REGULAR "getopts" , getoptscmd },
#endif
{ BUILTIN_NOSPEC "hash" , hashcmd },
{ BUILTIN_REGULAR "hash" , hashcmd },
#if ENABLE_ASH_HELP
{ BUILTIN_NOSPEC "help" , helpcmd },
#endif
@ -9980,7 +9980,7 @@ static const struct builtincmd builtintab[] = {
#if ENABLE_ASH_PRINTF
{ BUILTIN_REGULAR "printf" , printfcmd },
#endif
{ BUILTIN_NOSPEC "pwd" , pwdcmd },
{ BUILTIN_REGULAR "pwd" , pwdcmd },
{ BUILTIN_REGULAR "read" , readcmd },
{ BUILTIN_SPEC_REG_ASSG "readonly", exportcmd },
{ BUILTIN_SPEC_REG "return" , returncmd },
@ -9995,8 +9995,8 @@ static const struct builtincmd builtintab[] = {
{ BUILTIN_SPEC_REG "times" , timescmd },
{ BUILTIN_SPEC_REG "trap" , trapcmd },
{ BUILTIN_REGULAR "true" , truecmd },
{ BUILTIN_NOSPEC "type" , typecmd },
{ BUILTIN_NOSPEC "ulimit" , ulimitcmd },
{ BUILTIN_REGULAR "type" , typecmd },
{ BUILTIN_REGULAR "ulimit" , ulimitcmd },
{ BUILTIN_REGULAR "umask" , umaskcmd },
#if ENABLE_ASH_ALIAS
{ BUILTIN_REGULAR "unalias" , unaliascmd },