2 # Make list of configuration variables regarding suid handling
4 # input $1: full path to autoconf.h
5 # input $2: full path to applets.h
6 # input $3: full path to .config
7 # output (stdout): list of CONFIG_ that do or may require suid
9 # If the environment variable SUID is not set or set to DROP,
10 # lists all config options that do not require suid permissions.
11 # Otherwise, lists all config options for applets that DO or MAY require
14 # Maintainer: Bernhard Reutner-Fischer
19 CONFIG_H=${1:-include/autoconf.h}
20 APPLETS_H=${2:-include/applets.h}
21 DOT_CONFIG=${3:-.config}
24 [dD][rR][oO][pP]) USE="DROP" ;;
28 $HOSTCC -E -DMAKE_SUID -include $CONFIG_H $APPLETS_H |
32 if ($2 != "BB_SUID_DROP") next
34 if ($2 == "BB_SUID_DROP") next
39 s[i++] = "CONFIG_" cfg
40 s[i++] = "CONFIG_FEATURE_" cfg "_.*"
43 while (getline < ARGV[2]) {
45 if ($0 ~ "^" s[j] "=y$") {
48 if (s[j] !~ /\*$/) delete s[j] # can drop this applet now