Make a copy of the current sudoers path when assigning errorfile.
Fixes a potential use after free in visudo when there is an error in one of the include files.
This commit is contained in:
@@ -266,7 +266,7 @@ int pam_prep_user(struct passwd *);
|
||||
/* gram.y */
|
||||
int sudoersparse(void);
|
||||
extern char *login_style;
|
||||
extern const char *errorfile;
|
||||
extern char *errorfile;
|
||||
extern int errorlineno;
|
||||
extern bool parse_error;
|
||||
extern bool sudoers_warnings;
|
||||
|
Reference in New Issue
Block a user