Make the debug subsystem unsigned.

It was already unsigned in sudoers but not in the front-end or the
python plugin.  Making this consistent resolves a lot of -Wconversion
warnings.  Also clean up some other -Wconversion warnings in sudo_debug.c.
This commit is contained in:
Todd C. Miller
2023-07-01 16:14:50 -06:00
parent 04c7e910ef
commit b926df1df2
7 changed files with 121 additions and 104 deletions

View File

@@ -51,7 +51,7 @@ static const char *const python_subsystem_names[] = {
#define NUM_SUBSYSTEMS sizeof(python_subsystem_names) / sizeof(*python_subsystem_names) - 1
/* Subsystem IDs assigned at registration time. */
int python_subsystem_ids[NUM_SUBSYSTEMS];
unsigned int python_subsystem_ids[NUM_SUBSYSTEMS];
/*
* Parse the "filename flags,..." debug_flags entry and insert a new
@@ -84,7 +84,7 @@ python_debug_register(const char *program,
if (debug_files != NULL && !TAILQ_EMPTY(debug_files)) {
if (program != NULL) {
instance = sudo_debug_register(program, python_subsystem_names,
(unsigned int *)python_subsystem_ids, debug_files, -1);
python_subsystem_ids, debug_files, -1);
}
TAILQ_FOREACH_SAFE(debug_file, debug_files, entries, debug_next) {
TAILQ_REMOVE(debug_files, debug_file, entries);