1993-11-28 07:45:01 +00:00
|
|
|
/*
|
2019-04-29 07:21:51 -06:00
|
|
|
* SPDX-License-Identifier: ISC
|
|
|
|
*
|
2008-11-09 14:13:13 +00:00
|
|
|
* Copyright (c) 1994-1996, 1998-1999, 2004
|
2017-12-03 17:53:40 -07:00
|
|
|
* Todd C. Miller <Todd.Miller@sudo.ws>
|
1993-11-28 07:45:01 +00:00
|
|
|
*
|
2004-02-13 21:36:43 +00:00
|
|
|
* 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.
|
1999-07-31 16:19:50 +00:00
|
|
|
*
|
2004-02-13 21:36:43 +00:00
|
|
|
* 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.
|
1993-11-28 07:45:01 +00:00
|
|
|
*/
|
|
|
|
|
2015-05-21 11:13:20 -06:00
|
|
|
#ifndef SUDOERS_INSULTS_H
|
|
|
|
#define SUDOERS_INSULTS_H
|
1994-05-25 01:25:40 +00:00
|
|
|
|
2018-04-17 07:10:43 -06:00
|
|
|
#if defined(HAL_INSULTS) || defined(GOONS_INSULTS) || defined(CLASSIC_INSULTS) || defined(CSOPS_INSULTS) || defined(PYTHON_INSULTS)
|
1999-12-06 06:47:13 +00:00
|
|
|
|
2018-05-24 21:04:23 -06:00
|
|
|
#include "sudo_rand.h"
|
|
|
|
|
1993-11-28 07:45:01 +00:00
|
|
|
/*
|
1998-10-15 06:25:39 +00:00
|
|
|
* Use one or more set of insults as determined by configure
|
1993-11-28 07:45:01 +00:00
|
|
|
*/
|
1995-07-23 23:35:14 +00:00
|
|
|
|
|
|
|
char *insults[] = {
|
|
|
|
|
|
|
|
# ifdef HAL_INSULTS
|
1995-07-02 00:41:33 +00:00
|
|
|
# include "ins_2001.h"
|
1995-07-23 23:35:14 +00:00
|
|
|
# endif
|
|
|
|
|
|
|
|
# ifdef GOONS_INSULTS
|
|
|
|
# include "ins_goons.h"
|
|
|
|
# endif
|
|
|
|
|
|
|
|
# ifdef CLASSIC_INSULTS
|
|
|
|
# include "ins_classic.h"
|
1995-09-01 03:52:32 +00:00
|
|
|
# endif
|
|
|
|
|
|
|
|
# ifdef CSOPS_INSULTS
|
|
|
|
# include "ins_csops.h"
|
2018-04-17 07:10:43 -06:00
|
|
|
# endif
|
|
|
|
|
|
|
|
# ifdef PYTHON_INSULTS
|
|
|
|
# include "ins_python.h"
|
1995-07-23 23:35:14 +00:00
|
|
|
# endif
|
|
|
|
|
2016-06-23 10:58:07 -06:00
|
|
|
NULL
|
1995-07-23 23:35:14 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* How may I insult you? Let me count the ways...
|
|
|
|
*/
|
2016-06-23 10:58:07 -06:00
|
|
|
#define NOFINSULTS (nitems(insults) - 1)
|
1994-02-09 03:48:58 +00:00
|
|
|
|
1993-11-28 07:45:01 +00:00
|
|
|
/*
|
1995-05-02 05:34:59 +00:00
|
|
|
* return a pseudo-random insult.
|
1993-11-28 07:45:01 +00:00
|
|
|
*/
|
2018-05-24 21:04:23 -06:00
|
|
|
#define INSULT (insults[arc4random_uniform(NOFINSULTS)])
|
1993-11-28 07:45:01 +00:00
|
|
|
|
2018-04-17 07:10:43 -06:00
|
|
|
#endif /* HAL_INSULTS || GOONS_INSULTS || CLASSIC_INSULTS || CSOPS_INSULTS || PYTHON_INSULTS */
|
1999-12-06 06:47:13 +00:00
|
|
|
|
2015-05-21 11:13:20 -06:00
|
|
|
#endif /* SUDOERS_INSULTS_H */
|