Store column number for aliases, defaults and userspecs too.

This is used to provided the column number along with the line
number in error messages.  For aliases we store the column of the
alias name, not the value since that is what visudo generally needs.
This commit is contained in:
Todd C. Miller
2020-11-02 05:39:06 -07:00
parent 982012dbb1
commit 6286ce1d16
16 changed files with 602 additions and 535 deletions

View File

@@ -133,8 +133,8 @@ void dump_default(void);
bool init_defaults(void);
struct early_default *is_early_default(const char *name);
bool run_early_defaults(void);
bool set_early_default(const char *var, const char *val, int op, const char *file, int lineno, bool quiet, struct early_default *early);
bool set_default(const char *var, const char *val, int op, const char *file, int lineno, bool quiet);
bool set_early_default(const char *var, const char *val, int op, const char *file, int line, int column, bool quiet, struct early_default *early);
bool set_default(const char *var, const char *val, int op, const char *file, int line, int column, bool quiet);
bool update_defaults(struct sudoers_parse_tree *parse_tree, struct defaults_list *defs, int what, bool quiet);
bool check_defaults(struct sudoers_parse_tree *parse_tree, bool quiet);