2 * Copyright (c) 1996, 1998-2000, 2004, 2007
3 * Todd C. Miller <Todd.Miller@courtesan.com>
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 * $Sudo: parse.h,v 1.14.2.1 2007/06/23 21:36:48 millert Exp $
24 * Data structure used in parsing sudoers;
25 * top of stack values are the ones that
26 * apply when parsing is done & can be
27 * accessed by *_matches macros
29 #define STACKINCREMENT (32)
41 * Data structure describing a command in the
49 #define user_matches (match[top-1].user)
50 #define cmnd_matches (match[top-1].cmnd)
51 #define host_matches (match[top-1].host)
52 #define runas_matches (match[top-1].runas)
53 #define no_passwd (match[top-1].nopass)
54 #define no_execve (match[top-1].noexec)
55 #define setenv_ok (match[top-1].setenv)
58 * Structure containing command matches if "sudo -l" is used.
60 struct command_match {
73 * Structure describing an alias match in parser.
82 * Structure containing Cmnd_Alias's if "sudo -l" is used.
84 struct generic_alias {
92 /* The matching stack and number of entries on it. */
93 extern struct matchstack *match;
99 int addr_matches __P((char *));
100 int command_matches __P((char *, char *));
101 int hostname_matches __P((char *, char *, char *));
102 int netgr_matches __P((char *, char *, char *, char *));
103 int userpw_matches __P((char *, char *, struct passwd *));
104 int usergr_matches __P((char *, char *, struct passwd *));
106 #endif /* _SUDO_PARSE_H */