Promote strict field in sudoers_parser_config from bool to int.
This will be used by visudo to indicate when "visudo -s" is run.
This commit is contained in:
@@ -81,10 +81,10 @@ struct group_list {
|
|||||||
*/
|
*/
|
||||||
struct sudoers_parser_config {
|
struct sudoers_parser_config {
|
||||||
const char *sudoers_path;
|
const char *sudoers_path;
|
||||||
bool strict;
|
int strict;
|
||||||
|
int verbose;
|
||||||
bool recovery;
|
bool recovery;
|
||||||
bool ignore_perms;
|
bool ignore_perms;
|
||||||
int verbose;
|
|
||||||
mode_t sudoers_mode;
|
mode_t sudoers_mode;
|
||||||
uid_t sudoers_uid;
|
uid_t sudoers_uid;
|
||||||
gid_t sudoers_gid;
|
gid_t sudoers_gid;
|
||||||
@@ -92,9 +92,9 @@ struct sudoers_parser_config {
|
|||||||
#define SUDOERS_PARSER_CONFIG_INITIALIZER { \
|
#define SUDOERS_PARSER_CONFIG_INITIALIZER { \
|
||||||
NULL, /* sudoers_path */ \
|
NULL, /* sudoers_path */ \
|
||||||
false, /* strict */ \
|
false, /* strict */ \
|
||||||
|
1, /* verbose level 1 */ \
|
||||||
true, /* recovery */ \
|
true, /* recovery */ \
|
||||||
false, /* ignore_perms */ \
|
false, /* ignore_perms */ \
|
||||||
1, /* verbose level 1 */ \
|
|
||||||
SUDOERS_MODE, \
|
SUDOERS_MODE, \
|
||||||
SUDOERS_UID, \
|
SUDOERS_UID, \
|
||||||
SUDOERS_GID \
|
SUDOERS_GID \
|
||||||
|
@@ -285,7 +285,7 @@ main(int argc, char *argv[])
|
|||||||
* Parse the existing sudoers file(s) to highlight any existing
|
* Parse the existing sudoers file(s) to highlight any existing
|
||||||
* errors and to pull in editor and env_editor conf values.
|
* errors and to pull in editor and env_editor conf values.
|
||||||
*/
|
*/
|
||||||
ctx.parser_conf.strict = true;
|
ctx.parser_conf.strict = strict + 1;
|
||||||
ctx.parser_conf.verbose = quiet ? 0 : 2;
|
ctx.parser_conf.verbose = quiet ? 0 : 2;
|
||||||
ctx.parser_conf.sudoers_path = path_sudoers;
|
ctx.parser_conf.sudoers_path = path_sudoers;
|
||||||
init_parser(&ctx, NULL);
|
init_parser(&ctx, NULL);
|
||||||
|
Reference in New Issue
Block a user