+
+static int is_safe_applet(char *name)
+{
+ /* It isn't a bug to have non-existent applet here... */
+ /* ...just a waste of space... */
+ static const char safe_applets[][8] = {
+ "["
+ USE_AWK (, "awk" )
+ USE_CAT (, "cat" )
+ USE_CHMOD (, "chmod" )
+ USE_CHOWN (, "chown" )
+ USE_CP (, "cp" )
+ USE_CUT (, "cut" )
+ USE_DD (, "dd" )
+ USE_ECHO (, "echo" )
+ USE_FIND (, "find" )
+ USE_HEXDUMP(, "hexdump")
+ USE_LN (, "ln" )
+ USE_LS (, "ls" )
+ USE_MKDIR (, "mkdir" )
+ USE_RM (, "rm" )
+ USE_SORT (, "sort" )
+ USE_TEST (, "test" )
+ USE_TOUCH (, "touch" )
+ USE_XARGS (, "xargs" )
+ };
+ int n = sizeof(safe_applets) / sizeof(safe_applets[0]);
+ int i;
+ for (i = 0; i < n; i++)
+ if (strcmp(safe_applets[i], name) == 0)
+ return 1;
+
+ return 0;
+}
+
+