From a7b97e367c44d8a6890397848dcf59f4e190d4f9 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 16 Feb 2020 18:29:52 +0100 Subject: [PATCH] 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 Signed-off-by: Denys Vlasenko --- shell/ash.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shell/ash.c b/shell/ash.c index 75edebd8d..78ca1d99c 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -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 }, -- 2.25.1