]> granicus.if.org Git - sudo/commitdiff
Add --with-pc-insults configure option
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 4 Feb 2004 04:38:56 +0000 (04:38 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 4 Feb 2004 04:38:56 +0000 (04:38 +0000)
INSTALL
config.h.in
configure
configure.in
ins_classic.h

diff --git a/INSTALL b/INSTALL
index 0b86802f28afb5cb1f67f23897e4808a4a0e13ed..67016e6f1c6a741b383b58f8b779fa2b95d94efd 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -464,6 +464,9 @@ The following options are also configurable at runtime:
        password is entered.  You must either specify --with-insults or
        enable insults in the sudoers file for this to have any effect.
 
+  --with-pc-insults
+       Replace politically incorrect insults with less objectionable ones.
+
   --with-secure-path[=PATH]
        Path used for every command run from sudo(8).  If you don't trust the
        people running sudo to have a sane PATH environment variable you may
index 4a94884e5dd9de0ddd2ca5b2cacde8609d15ffbc..e0ce34d0436bc03bbc89d9441ea31830eb4b4145 100644 (file)
 /* The passwd prompt timeout (in minutes). */
 #undef PASSWORD_TIMEOUT
 
+/* Define to replace politically incorrect insults with less offensive ones. */
+#undef PC_INSULTS
+
 /* The syslog priority sudo will use for unsuccessful attempts/errors. */
 #undef PRI_FAILURE
 
index 3ae67ff36b6dfc9a988b432765970d7c2b08d05a..87ccba861936dd878d7ae74c5bf3eb9af193fd3a 100755 (executable)
--- a/configure
+++ b/configure
@@ -1104,6 +1104,7 @@ Optional Packages:
   --with-csops-insults    include CSOps insults
   --with-hal-insults      include 2001-like insults
   --with-goons-insults    include the insults from the "Goon Show"
+  --with-pc-insults       replace politically incorrect insults with less offensive ones
   --with-secure-path      override the user's path with a built-in one
   --without-interfaces    don't try to read the ip addr of ether interfaces
   --with-stow             properly handle GNU stow packaging
@@ -3093,6 +3094,25 @@ echo "$as_me: error: \"--with-goons-insults does not take an argument.\"" >&2;}
 esac
 fi;
 
+
+# Check whether --with-pc-insults or --without-pc-insults was given.
+if test "${with_pc_insults+set}" = set; then
+  withval="$with_pc_insults"
+  case $with_pc_insults in
+    yes)
+cat >>confdefs.h <<\_ACEOF
+#define PC_INSULTS 1
+_ACEOF
+
+               ;;
+    no)                ;;
+    *)         { { echo "$as_me:$LINENO: error: \"--with-pc-insults does not take an argument.\"" >&5
+echo "$as_me: error: \"--with-pc-insults does not take an argument.\"" >&2;}
+   { (exit 1); exit 1; }; }
+               ;;
+esac
+fi;
+
 if test "$insults" = "on"; then
     echo "$as_me:$LINENO: checking which insult sets to include" >&5
 echo $ECHO_N "checking which insult sets to include... $ECHO_C" >&6
@@ -5410,7 +5430,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 5413 "configure"' > conftest.$ac_ext
+  echo '#line 5433 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -6571,7 +6591,7 @@ fi
 
 
 # Provide some information about the compiler.
-echo "$as_me:6574:" \
+echo "$as_me:6594:" \
      "checking for Fortran 77 compiler version" >&5
 ac_compiler=`set X $ac_compile; echo $2`
 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -7580,11 +7600,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7583: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7603: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7587: \$? = $ac_status" >&5
+   echo "$as_me:7607: \$? = $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
@@ -7812,11 +7832,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7815: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7835: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7819: \$? = $ac_status" >&5
+   echo "$as_me:7839: \$? = $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
@@ -7879,11 +7899,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7882: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7902: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:7886: \$? = $ac_status" >&5
+   echo "$as_me:7906: \$? = $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
@@ -9859,7 +9879,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 9862 "configure"
+#line 9882 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -9957,7 +9977,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 9960 "configure"
+#line 9980 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12093,11 +12113,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12096: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:12116: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:12100: \$? = $ac_status" >&5
+   echo "$as_me:12120: \$? = $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
@@ -12160,11 +12180,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12163: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:12183: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:12167: \$? = $ac_status" >&5
+   echo "$as_me:12187: \$? = $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
@@ -13364,7 +13384,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 13367 "configure"
+#line 13387 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13462,7 +13482,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 13465 "configure"
+#line 13485 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -14284,11 +14304,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14287: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14307: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:14291: \$? = $ac_status" >&5
+   echo "$as_me:14311: \$? = $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
@@ -14351,11 +14371,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14354: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14374: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:14358: \$? = $ac_status" >&5
+   echo "$as_me:14378: \$? = $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
@@ -16263,11 +16283,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16266: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16286: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:16270: \$? = $ac_status" >&5
+   echo "$as_me:16290: \$? = $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
@@ -16495,11 +16515,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16498: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16518: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:16502: \$? = $ac_status" >&5
+   echo "$as_me:16522: \$? = $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
@@ -16562,11 +16582,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16565: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16585: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:16569: \$? = $ac_status" >&5
+   echo "$as_me:16589: \$? = $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
@@ -18542,7 +18562,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 18545 "configure"
+#line 18565 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -18640,7 +18660,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 18643 "configure"
+#line 18663 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index 5549c8d6c31fc2a01851b41494814700ec8c1ed6..5619c6ac7757cf93a2a1171083754582a892e1ce 100644 (file)
@@ -906,6 +906,15 @@ AC_ARG_WITH(goons-insults, [  --with-goons-insults    include the insults from t
                ;;
 esac])
 
+AC_ARG_WITH(pc-insults, [  --with-pc-insults       replace politically incorrect insults with less offensive ones],
+[case $with_pc_insults in  
+    yes)       AC_DEFINE(PC_INSULTS, 1, [Define to replace politically incorrect insults with less offensive ones.])
+               ;;
+    no)                ;;
+    *)         AC_MSG_ERROR(["--with-pc-insults does not take an argument."])
+               ;;
+esac])
+
 dnl include all insult sets on one line
 if test "$insults" = "on"; then
     AC_MSG_CHECKING(which insult sets to include)
index 988f81a69ba5e82dba40b33f0cac62ef64c92a6b..e92b9e1c0997d998e28b6eef426ba6dcc93e9b24 100644 (file)
      */
 
     "Wrong!  You cheating scum!",
+#ifdef PC_INSULTS
+    "And you call yourself a Rocket Scientist!",
+#else
     "No soap, honkie-lips.",
+#endif
     "Where did you learn to type?",
     "Are you on drugs?",
     "My pet ferret can type better than you!",