cvtsudoers: merge aliases when multiple sudoers files are specified
Duplicate aliases are remove. If there are conflicting alias names, the conflicts are renamed by appending a numerical suffix. For example, if there are two SERVERS Host_Aliases, the second one will be renamed to SERVERS_1.
This commit is contained in:
@@ -345,7 +345,7 @@ bool no_aliases(struct sudoers_parse_tree *parse_tree);
|
||||
bool alias_add(struct sudoers_parse_tree *parse_tree, char *name, int type, char *file, int line, int column, struct member *members);
|
||||
const char *alias_type_to_string(int alias_type);
|
||||
struct alias *alias_get(struct sudoers_parse_tree *parse_tree, const char *name, int type);
|
||||
struct alias *alias_remove(struct sudoers_parse_tree *parse_tree, char *name, int type);
|
||||
struct alias *alias_remove(struct sudoers_parse_tree *parse_tree, const char *name, int type);
|
||||
bool alias_find_used(struct sudoers_parse_tree *parse_tree, struct rbtree *used_aliases);
|
||||
void alias_apply(struct sudoers_parse_tree *parse_tree, int (*func)(struct sudoers_parse_tree *, struct alias *, void *), void *cookie);
|
||||
void alias_free(void *a);
|
||||
|
Reference in New Issue
Block a user