mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
Split command match code out into match_command.c.
Also remove unused SUDOERS_NAME_MATCH code.
This commit is contained in:
@@ -18,8 +18,11 @@
|
||||
#ifndef SUDOERS_PARSE_H
|
||||
#define SUDOERS_PARSE_H
|
||||
|
||||
/* Characters that must be quoted in sudoers */
|
||||
#define SUDOERS_QUOTED ":\\,=#\""
|
||||
/* Characters that must be quoted in sudoers. */
|
||||
#define SUDOERS_QUOTED ":\\,=#\""
|
||||
|
||||
/* Returns true if string 's' contains meta characters. */
|
||||
#define has_meta(s) (strpbrk(s, "\\?*[]") != NULL)
|
||||
|
||||
#undef UNSPEC
|
||||
#define UNSPEC -1
|
||||
@@ -297,13 +300,15 @@ void reparent_parse_tree(struct sudoers_parse_tree *new_tree);
|
||||
/* match_addr.c */
|
||||
bool addr_matches(char *n);
|
||||
|
||||
/* match_command.c */
|
||||
bool command_matches(const char *sudoers_cmnd, const char *sudoers_args, const struct command_digest *digest);
|
||||
|
||||
/* match_digest.c */
|
||||
bool digest_matches(int fd, const char *file, const struct command_digest *digest);
|
||||
|
||||
/* match.c */
|
||||
struct group;
|
||||
struct passwd;
|
||||
bool command_matches(const char *sudoers_cmnd, const char *sudoers_args, const struct command_digest *digest);
|
||||
bool group_matches(const char *sudoers_group, const struct group *gr);
|
||||
bool hostname_matches(const char *shost, const char *lhost, const char *pattern);
|
||||
bool netgr_matches(const char *netgr, const char *lhost, const char *shost, const char *user);
|
||||
|
Reference in New Issue
Block a user