Python dictionaries are sparse so we cannot use pos as an index.

When converting sudo options from a dictionary to a tuple we need
to track the current index into the tuple separately from the
position of the dictionary entry.
This commit is contained in:
Todd C. Miller
2020-04-09 08:34:29 -06:00
parent 324b237245
commit 57cef10ce9
2 changed files with 3 additions and 5 deletions

View File

@@ -1548,7 +1548,6 @@ main(int argc, char *argv[])
RUN_TEST(check_example_policy_plugin_version_display(true));
RUN_TEST(check_example_policy_plugin_version_display(false));
// FIXME - sudo.options_from_dict fails for these two on python 3.4
RUN_TEST(check_example_policy_plugin_accepted_execution());
RUN_TEST(check_example_policy_plugin_failed_execution());
RUN_TEST(check_example_policy_plugin_denied_execution());