mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-22 01:49:11 +00:00
Monty Python insults from Philip Hudson
This commit is contained in:
parent
f9994f79d7
commit
523f0eeeab
5
INSTALL
5
INSTALL
@ -705,6 +705,11 @@ Options that set runtime-changeable default values:
|
||||
and warning.
|
||||
Sudoers option: syslog_goodpri
|
||||
|
||||
--with-python-insults
|
||||
Insults the user with lines from "Monty Python's Flying Circus" when an
|
||||
incorrect password is entered. You must either specify --with-insults or
|
||||
enable insults in the sudoers file for this to have any effect.
|
||||
|
||||
--with-goons-insults
|
||||
Insults the user with lines from the "Goon Show" when an incorrect
|
||||
password is entered. You must either specify --with-insults or
|
||||
|
1
MANIFEST
1
MANIFEST
@ -299,6 +299,7 @@ plugins/sudoers/ins_2001.h
|
||||
plugins/sudoers/ins_classic.h
|
||||
plugins/sudoers/ins_csops.h
|
||||
plugins/sudoers/ins_goons.h
|
||||
plugins/sudoers/ins_python.h
|
||||
plugins/sudoers/insults.h
|
||||
plugins/sudoers/interfaces.c
|
||||
plugins/sudoers/interfaces.h
|
||||
|
2
NEWS
2
NEWS
@ -39,6 +39,8 @@ What's new in Sudo 1.8.23
|
||||
checks the directory for writability before using it. Previously,
|
||||
sudoedit only performed an existence check. Bug #827.
|
||||
|
||||
* Sudo now includes an optional set of Monty Python-inspired insults.
|
||||
|
||||
What's new in Sudo 1.8.22
|
||||
|
||||
* Commands run in the background from a script run via sudo will
|
||||
|
@ -1014,6 +1014,9 @@
|
||||
/* Define to const if the `putenv' takes a const argument. */
|
||||
#undef PUTENV_CONST
|
||||
|
||||
/* Define to 1 if you want insults from "Monty Python's Flying Circus". */
|
||||
#undef PYTHON_INSULTS
|
||||
|
||||
/* The default value of preloaded objects (if any). */
|
||||
#undef RTLD_PRELOAD_DEFAULT
|
||||
|
||||
|
20
configure
vendored
20
configure
vendored
@ -922,6 +922,7 @@ with_classic_insults
|
||||
with_csops_insults
|
||||
with_hal_insults
|
||||
with_goons_insults
|
||||
with_python_insults
|
||||
with_nsswitch
|
||||
with_ldap
|
||||
with_ldap_conf_file
|
||||
@ -1752,6 +1753,8 @@ 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-python-insults include the insults from "Monty Python's Flying
|
||||
Circus"
|
||||
--with-nsswitch[=PATH] path to nsswitch.conf
|
||||
--with-ldap[=DIR] enable LDAP support
|
||||
--with-ldap-conf-file path to LDAP configuration file
|
||||
@ -5771,6 +5774,7 @@ if test "${with_all_insults+set}" = set; then :
|
||||
with_csops_insults=yes
|
||||
with_hal_insults=yes
|
||||
with_goons_insults=yes
|
||||
with_python_insults=yes
|
||||
;;
|
||||
no) ;;
|
||||
*) as_fn_error $? "\"--with-all-insults does not take an argument.\"" "$LINENO" 5
|
||||
@ -5836,6 +5840,20 @@ fi
|
||||
|
||||
|
||||
|
||||
# Check whether --with-python-insults was given.
|
||||
if test "${with_python_insults+set}" = set; then :
|
||||
withval=$with_python_insults; case $with_python_insults in
|
||||
yes) $as_echo "#define PYTHON_INSULTS 1" >>confdefs.h
|
||||
|
||||
;;
|
||||
no) ;;
|
||||
*) as_fn_error $? "\"--with-python-insults does not take an argument.\"" "$LINENO" 5
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --with-nsswitch was given.
|
||||
if test "${with_nsswitch+set}" = set; then :
|
||||
withval=$with_nsswitch; case $with_nsswitch in
|
||||
@ -5891,6 +5909,7 @@ if test "$insults" = "on"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which insult sets to include" >&5
|
||||
$as_echo_n "checking which insult sets to include... " >&6; }
|
||||
i=""
|
||||
test "$with_python_insults" = "yes" && i="python ${i}"
|
||||
test "$with_goons_insults" = "yes" && i="goons ${i}"
|
||||
test "$with_hal_insults" = "yes" && i="hal ${i}"
|
||||
test "$with_csops_insults" = "yes" && i="csops ${i}"
|
||||
@ -28781,5 +28800,6 @@ fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
12
configure.ac
12
configure.ac
@ -1089,6 +1089,7 @@ AC_ARG_WITH(all-insults, [AS_HELP_STRING([--with-all-insults], [include all the
|
||||
with_csops_insults=yes
|
||||
with_hal_insults=yes
|
||||
with_goons_insults=yes
|
||||
with_python_insults=yes
|
||||
;;
|
||||
no) ;;
|
||||
*) AC_MSG_ERROR(["--with-all-insults does not take an argument."])
|
||||
@ -1131,6 +1132,15 @@ AC_ARG_WITH(goons-insults, [AS_HELP_STRING([--with-goons-insults], [include the
|
||||
;;
|
||||
esac])
|
||||
|
||||
AC_ARG_WITH(python-insults, [AS_HELP_STRING([--with-python-insults], [include the insults from "Monty Python's Flying Circus"])],
|
||||
[case $with_python_insults in
|
||||
yes) AC_DEFINE(PYTHON_INSULTS)
|
||||
;;
|
||||
no) ;;
|
||||
*) AC_MSG_ERROR(["--with-python-insults does not take an argument."])
|
||||
;;
|
||||
esac])
|
||||
|
||||
AC_ARG_WITH(nsswitch, [AS_HELP_STRING([--with-nsswitch[[=PATH]]], [path to nsswitch.conf])],
|
||||
[case $with_nsswitch in
|
||||
no) ;;
|
||||
@ -1160,6 +1170,7 @@ dnl include all insult sets on one line
|
||||
if test "$insults" = "on"; then
|
||||
AC_MSG_CHECKING(which insult sets to include)
|
||||
i=""
|
||||
test "$with_python_insults" = "yes" && i="python ${i}"
|
||||
test "$with_goons_insults" = "yes" && i="goons ${i}"
|
||||
test "$with_hal_insults" = "yes" && i="hal ${i}"
|
||||
test "$with_csops_insults" = "yes" && i="csops ${i}"
|
||||
@ -4408,6 +4419,7 @@ AH_TEMPLATE(ENV_DEBUG, [Define to 1 to enable environment function debugging.])
|
||||
AH_TEMPLATE(ENV_EDITOR, [Define to 1 if you want visudo to honor the EDITOR and VISUAL env variables.])
|
||||
AH_TEMPLATE(FQDN, [Define to 1 if you want to require fully qualified hosts in sudoers.])
|
||||
AH_TEMPLATE(ENV_RESET, [Define to 1 to enable environment resetting by default.])
|
||||
AH_TEMPLATE(PYTHON_INSULTS, [Define to 1 if you want insults from "Monty Python's Flying Circus".])
|
||||
AH_TEMPLATE(GOONS_INSULTS, [Define to 1 if you want insults from the "Goon Show".])
|
||||
AH_TEMPLATE(HAL_INSULTS, [Define to 1 if you want 2001-like insults.])
|
||||
AH_TEMPLATE(HAVE_AFS, [Define to 1 if you use AFS.])
|
||||
|
@ -1283,6 +1283,7 @@ sudo_auth.lo: $(authdir)/sudo_auth.c $(devdir)/def_data.h \
|
||||
$(incdir)/sudo_util.h $(srcdir)/defaults.h $(srcdir)/ins_2001.h \
|
||||
$(srcdir)/ins_classic.h $(srcdir)/ins_csops.h \
|
||||
$(srcdir)/ins_goons.h $(srcdir)/insults.h $(srcdir)/logging.h \
|
||||
$(srcdir)/ins_python.h $(srcdir)/insults.h $(srcdir)/logging.h \
|
||||
$(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
|
||||
$(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
|
||||
$(top_builddir)/pathnames.h
|
||||
|
37
plugins/sudoers/ins_python.h
Normal file
37
plugins/sudoers/ins_python.h
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Todd C. Miller <Todd.Miller@sudo.ws>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef SUDOERS_INS_PYTHON_H
|
||||
#define SUDOERS_INS_PYTHON_H
|
||||
|
||||
/*
|
||||
* Insults from "Monty Python's Flying Circus" and family.
|
||||
*/
|
||||
|
||||
"That is no basis for supreme executive power!",
|
||||
"You empty-headed animal food trough wiper!",
|
||||
"I fart in your general direction!",
|
||||
"Your mother was a hamster and your father smelt of elderberries!",
|
||||
"You must cut down the mightiest tree in the forest... with... a herring!",
|
||||
"I wave my private parts at your aunties!",
|
||||
"He's not the Messiah, he's a very naughty boy!",
|
||||
"I wish to make a complaint.",
|
||||
"When you're walking home tonight, and some homicidal maniac comes after you with a bunch of loganberries, don't come crying to me!",
|
||||
"This man, he doesn't know when he's beaten! He doesn't know when he's winning, either. He has no... sort of... sensory apparatus...",
|
||||
"There's nothing wrong with you that an expensive operation can't prolong.",
|
||||
"I'm very sorry, but I'm not allowed to argue unless you've paid.",
|
||||
|
||||
#endif /* SUDOERS_INS_PYTHON_H */
|
@ -18,7 +18,7 @@
|
||||
#ifndef SUDOERS_INSULTS_H
|
||||
#define SUDOERS_INSULTS_H
|
||||
|
||||
#if defined(HAL_INSULTS) || defined(GOONS_INSULTS) || defined(CLASSIC_INSULTS) || defined(CSOPS_INSULTS)
|
||||
#if defined(HAL_INSULTS) || defined(GOONS_INSULTS) || defined(CLASSIC_INSULTS) || defined(CSOPS_INSULTS) || defined(PYTHON_INSULTS)
|
||||
|
||||
/*
|
||||
* Use one or more set of insults as determined by configure
|
||||
@ -40,6 +40,10 @@ char *insults[] = {
|
||||
|
||||
# ifdef CSOPS_INSULTS
|
||||
# include "ins_csops.h"
|
||||
# endif
|
||||
|
||||
# ifdef PYTHON_INSULTS
|
||||
# include "ins_python.h"
|
||||
# endif
|
||||
|
||||
NULL
|
||||
@ -56,6 +60,6 @@ char *insults[] = {
|
||||
*/
|
||||
#define INSULT (insults[time(NULL) % NOFINSULTS])
|
||||
|
||||
#endif /* HAL_INSULTS || GOONS_INSULTS || CLASSIC_INSULTS || CSOPS_INSULTS */
|
||||
#endif /* HAL_INSULTS || GOONS_INSULTS || CLASSIC_INSULTS || CSOPS_INSULTS || PYTHON_INSULTS */
|
||||
|
||||
#endif /* SUDOERS_INSULTS_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user