]> granicus.if.org Git - sudo/blob - plugins/sudoers/iolog_files.h
889c20b3fe0dd23bd1095b4284f0134ab33e7e85
[sudo] / plugins / sudoers / iolog_files.h
1 /*
2  * Copyright (c) 2013 Todd C. Miller <Todd.Miller@sudo.ws>
3  *
4  * Permission to use, copy, modify, and distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16
17 #ifndef SUDOERS_IOLOG_FILES_H
18 #define SUDOERS_IOLOG_FILES_H
19
20 /*
21  * Indexes into io_log_files[]
22  */
23 #define IOFD_STDIN      0
24 #define IOFD_STDOUT     1
25 #define IOFD_STDERR     2
26 #define IOFD_TTYIN      3
27 #define IOFD_TTYOUT     4
28 #define IOFD_TIMING     5
29 #define IOFD_MAX        6
30
31 struct io_log_file {
32     bool enabled;
33     const char *suffix;
34     union io_fd fd;
35 };
36
37 static struct io_log_file io_log_files[] = {
38     { false, "/stdin" },        /* IOFD_STDIN */
39     { false, "/stdout" },       /* IOFD_STDOUT */
40     { false, "/stderr" },       /* IOFD_STDERR */
41     { false, "/ttyin" },        /* IOFD_TTYIN  */
42     { false, "/ttyout" },       /* IOFD_TTYOUT */
43     { true,  "/timing" },       /* IOFD_TIMING */
44     { false, NULL }             /* IOFD_MAX */
45 };
46
47 #endif /* SUDOERS_IOLOG_H */