op_run();
struct json_node **jzs = need_child(rp, "zones", JSON_ARRAY)->elements;
- printf("%-16s %6s %6s %s\n", "Zone", "Passwd", "Tokens", "Description");
+ printf("%-16s %6s %6s %6s %s\n", "Zone", "Passwd", "Tokens", "MaxTmp", "Description");
for (uint i=0; i < GARY_SIZE(jzs); i++)
{
struct json_node *jz = jzs[i];
struct json_node *jdesc = get_child(jz, "desc", JSON_STRING);
struct json_node *jpass = get_child(jz, "allow-passwd", JSON_NUMBER);
struct json_node *jtokens = get_child(jz, "allow-tokens", JSON_NUMBER);
- printf("%-16s %6s %6d %s\n",
+ struct json_node *jtemp = get_child(jz, "max-temp-validity", JSON_NUMBER);
+ printf("%-16s %6s %6d %6d %s\n",
jname->string,
(jpass && jpass->number ? "yes" : "-"),
(jtokens ? (uint) jtokens->number : 0),
+ (jtemp ? (uint) jtemp->number : 0),
(jdesc ? jdesc->string : "(no description)"));
}
}
set_string(c, jz, "desc", az->desc);
set_uint(c, jz, "allow-passwd", az->allow_passwd);
set_uint(c, jz, "allow-tokens", az->allow_tokens);
+ set_uint(c, jz, "max-temp-validity", az->max_temp_validity);
}
cmd_ok(c);