Fix formatting for bound defaults with multiple entries in the binding.

The entries in the binding were separated with " ," instead of ", ".
This commit is contained in:
Todd C. Miller
2021-08-20 14:01:44 -06:00
parent 4ccd966e22
commit 7df245dc91

View File

@@ -742,10 +742,10 @@ display_bound_defaults_by_type(struct sudoers_parse_tree *parse_tree,
sudo_lbuf_append(lbuf, " Defaults%s", dsep);
TAILQ_FOREACH(m, binding, entries) {
if (m != TAILQ_FIRST(binding))
sudo_lbuf_append(lbuf, ",");
sudo_lbuf_append(lbuf, ", ");
sudoers_format_member(lbuf, parse_tree, m, ", ", atype);
sudo_lbuf_append(lbuf, " ");
}
sudo_lbuf_append(lbuf, " ");
} else
sudo_lbuf_append(lbuf, ", ");
sudoers_format_default(lbuf, d);