summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorTodd C. Miller <Todd.Miller@courtesan.com>2014-02-12 15:00:04 -0700
committerTodd C. Miller <Todd.Miller@courtesan.com>2014-02-12 15:00:04 -0700
commit872390ed64df64fb2df2e8e183b979e37b225553 (patch)
treeadd8079851c8054e71c5004ba18f3818456220d3 /plugins
parent734ca1908f69c9f5c71d824d4074ec558260544e (diff)
downloadsudo-872390ed64df64fb2df2e8e183b979e37b225553.tar.gz
Fix indentation of Defaults entries. The initial indent should be
outside the loop iterating over the entries.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sudoers/visudo_json.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/sudoers/visudo_json.c b/plugins/sudoers/visudo_json.c
index 2cf9c5556..0598b31f5 100644
--- a/plugins/sudoers/visudo_json.c
+++ b/plugins/sudoers/visudo_json.c
@@ -603,6 +603,7 @@ print_defaults_json(FILE *fp, int indent, bool need_comma)
debug_return_bool(need_comma);
fprintf(fp, "%s\n%*s\"Defaults\": [\n", need_comma ? "," : "", indent, "");
+ indent += 4;
TAILQ_FOREACH_SAFE(def, &defaults, entries, next) {
type = get_defaults_type(def);
@@ -613,7 +614,6 @@ print_defaults_json(FILE *fp, int indent, bool need_comma)
}
/* Found it, print object container and binding (if any). */
- indent += 4;
fprintf(fp, "%*s{\n", indent, "");
indent += 4;
print_binding_json(fp, def->binding, def->type, indent);