summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <Todd.Miller@courtesan.com>2004-02-04 04:38:56 +0000
committerTodd C. Miller <Todd.Miller@courtesan.com>2004-02-04 04:38:56 +0000
commit8f08e6723964d77c54ced9f1f20c41de01456afc (patch)
tree0a7496b035aa9eae859fa6b858a767a46e7f301e
parentf7727cd9c6bd116b410d2ccea544dc57e5fccb7a (diff)
downloadsudo-8f08e6723964d77c54ced9f1f20c41de01456afc.tar.gz
Add --with-pc-insults configure option
-rw-r--r--INSTALL3
-rw-r--r--config.h.in3
-rwxr-xr-xconfigure76
-rw-r--r--configure.in9
-rw-r--r--ins_classic.h4
5 files changed, 67 insertions, 28 deletions
diff --git a/INSTALL b/INSTALL
index 0b86802f2..67016e6f1 100644
--- 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
diff --git a/config.h.in b/config.h.in
index 4a94884e5..e0ce34d04 100644
--- a/config.h.in
+++ b/config.h.in
@@ -401,6 +401,9 @@
/* 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
diff --git a/configure b/configure
index 3ae67ff36..87ccba861 100755
--- 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
diff --git a/configure.in b/configure.in
index 5549c8d6c..5619c6ac7 100644
--- a/configure.in
+++ b/configure.in
@@ -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)
diff --git a/ins_classic.h b/ins_classic.h
index 988f81a69..e92b9e1c0 100644
--- a/ins_classic.h
+++ b/ins_classic.h
@@ -42,7 +42,11 @@
*/
"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!",