]> granicus.if.org Git - sudo/blob - plugins/sudoers/insults.h
Add SPDX-License-Identifier to files.
[sudo] / plugins / sudoers / insults.h
1 /*
2  * SPDX-License-Identifier: ISC
3  *
4  * Copyright (c) 1994-1996, 1998-1999, 2004
5  *      Todd C. Miller <Todd.Miller@sudo.ws>
6  *
7  * Permission to use, copy, modify, and distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  */
19
20 #ifndef SUDOERS_INSULTS_H
21 #define SUDOERS_INSULTS_H
22
23 #if defined(HAL_INSULTS) || defined(GOONS_INSULTS) || defined(CLASSIC_INSULTS) || defined(CSOPS_INSULTS) || defined(PYTHON_INSULTS)
24
25 #include "sudo_rand.h"
26
27 /*
28  * Use one or more set of insults as determined by configure
29  */
30
31 char *insults[] = {
32
33 # ifdef HAL_INSULTS
34 #  include "ins_2001.h"
35 # endif
36
37 # ifdef GOONS_INSULTS
38 #  include "ins_goons.h"
39 # endif
40
41 # ifdef CLASSIC_INSULTS
42 #  include "ins_classic.h"
43 # endif
44
45 # ifdef CSOPS_INSULTS
46 #  include "ins_csops.h"
47 # endif
48
49 # ifdef PYTHON_INSULTS
50 #  include "ins_python.h"
51 # endif
52
53     NULL
54
55 };
56
57 /*
58  * How may I insult you?  Let me count the ways...
59  */
60 #define NOFINSULTS (nitems(insults) - 1)
61
62 /*
63  * return a pseudo-random insult.
64  */
65 #define INSULT          (insults[arc4random_uniform(NOFINSULTS)])
66
67 #endif /* HAL_INSULTS || GOONS_INSULTS || CLASSIC_INSULTS || CSOPS_INSULTS || PYTHON_INSULTS */
68
69 #endif /* SUDOERS_INSULTS_H */