From: Todd C. Miller Date: Mon, 12 Jul 2010 14:38:07 +0000 (-0400) Subject: Add --insults=disabled configure option to allow people to build X-Git-Tag: SUDO_1_7_4~106 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ad999024b3f0862213942523a9b0ad143b541981;p=sudo Add --insults=disabled configure option to allow people to build in insult support but have the insults disabled unless explicitly enabled in sudoers. --HG-- branch : 1.7 --- diff --git a/INSTALL b/INSTALL index 82637fb5d..e4f2de104 100644 --- a/INSTALL +++ b/INSTALL @@ -491,6 +491,10 @@ The following options are also configurable at runtime: Define this if you want to be insulted for typing an incorrect password just like the original sudo(8). This is off by default. + --with-insults=disabled + Include support for insults but disable them unless explicitly + enabled in sudoers. + --with-all-insults Include all the insult sets listed below. You must either specify --with-insults or enable insults in the sudoers file for this to diff --git a/configure b/configure index e2bc5b340..583c0d0ca 100755 --- a/configure +++ b/configure @@ -4811,6 +4811,10 @@ if test "${with_insults+set}" = set; then : with_classic_insults=yes with_csops_insults=yes ;; + disabled) insults=off + with_classic_insults=yes + with_csops_insults=yes + ;; no) insults=off ;; *) as_fn_error "\"--with-insults does not take an argument.\"" "$LINENO" 5 @@ -6621,13 +6625,13 @@ if test "${lt_cv_nm_interface+set}" = set; then : else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:6624: $ac_compile\"" >&5) + (eval echo "\"\$as_me:6628: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:6627: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:6631: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:6630: output\"" >&5) + (eval echo "\"\$as_me:6634: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -7832,7 +7836,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 7835 "configure"' > conftest.$ac_ext + echo '#line 7839 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -9225,11 +9229,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9228: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9232: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9232: \$? = $ac_status" >&5 + echo "$as_me:9236: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9564,11 +9568,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9567: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9571: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9571: \$? = $ac_status" >&5 + echo "$as_me:9575: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9669,11 +9673,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9672: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9676: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9676: \$? = $ac_status" >&5 + echo "$as_me:9680: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -9724,11 +9728,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9727: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9731: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9731: \$? = $ac_status" >&5 + echo "$as_me:9735: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12091,7 +12095,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12094 "configure" +#line 12098 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12187,7 +12191,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12190 "configure" +#line 12194 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/configure.in b/configure.in index 5e04e9533..ba5b477aa 100644 --- a/configure.in +++ b/configure.in @@ -921,6 +921,10 @@ AC_ARG_WITH(insults, [AS_HELP_STRING([--with-insults], [insult the user for ente with_classic_insults=yes with_csops_insults=yes ;; + disabled) insults=off + with_classic_insults=yes + with_csops_insults=yes + ;; no) insults=off ;; *) AC_MSG_ERROR(["--with-insults does not take an argument."])