sudorule: Fix management of deny_sudocmdgroup.

Upstream tests were not testing one path of code related to variable
`deny_sudocmdgroup`, and a regression was added.

This patch fixes a call to the current configuration dictionary, and
add tests so that the code path is executed in the upstream tests.
This commit is contained in:
Rafael Guterres Jeffman
2022-01-24 11:24:33 -03:00
parent b162122630
commit ec198d0e09
2 changed files with 126 additions and 2 deletions

View File

@@ -544,7 +544,7 @@ def main():
if deny_sudocmdgroup is not None:
deny_cmdgroup_add = gen_add_list(
deny_sudocmdgroup,
res_find("memberdenycmd_sudocmdgroup")
res_find.get("memberdenycmd_sudocmdgroup")
)
if sudooption is not None:
sudooption_add = gen_add_list(