* the current sudoers file to path.
*/
void
-init_parser(const char *path, int quiet)
+init_parser(const char *path, bool quiet)
{
struct defaults *d;
struct member *m, *binding;
* the current sudoers file to path.
*/
void
-init_parser(const char *path, int quiet)
+init_parser(const char *path, bool quiet)
{
struct defaults *d;
struct member *m, *binding;
debug_decl(sudo_file_close, SUDO_DEBUG_NSS)
/* Free parser data structures and close sudoers file. */
- init_parser(NULL, 0);
+ init_parser(NULL, false);
if (nss->handle != NULL) {
fclose(nss->handle);
nss->handle = NULL;
if (nss->handle == NULL)
debug_return_int(-1);
- init_parser(sudoers_file, 0);
+ init_parser(sudoers_file, false);
yyin = nss->handle;
if (yyparse() != 0 || parse_error) {
if (errorlineno != -1) {
void alias_apply(int (*)(void *, void *), void *);
void init_aliases(void);
void init_lexer(void);
-void init_parser(const char *, int);
+void init_parser(const char *, bool);
int alias_compare(const void *, const void *);
#endif /* _SUDO_PARSE_H */
set_interfaces(p);
/* Allocate space for data structures in the parser. */
- init_parser("sudoers", 0);
+ init_parser("sudoers", false);
if (yyparse() != 0 || parse_error) {
parse_error = true;
(void) printf(_("%s grammar version %d\n"), getprogname(), SUDOERS_GRAMMAR_VERSION);
goto done;
case 'c':
- checkonly++; /* check mode */
+ checkonly = true; /* check mode */
break;
case 'f':
sudoers_path = optarg; /* sudoers file path */
help();
break;
case 's':
- strict++; /* strict mode */
+ strict = true; /* strict mode */
break;
case 'q':
- quiet++; /* quiet mode */
+ quiet = false; /* quiet mode */
break;
default:
usage(1);
if ((yyin = open_sudoers(sudoers_path, true, NULL)) == NULL) {
error(1, "%s", sudoers_path);
}
- init_parser(sudoers_path, 0);
+ init_parser(sudoers_path, false);
yyparse();
(void) update_defaults(SETDEF_GENERIC|SETDEF_HOST|SETDEF_USER);