RBAC in ksql(3)

combining with kcgi(3)
if (KSQL_OK != khttp_parse(&r, NULL, 0, "index", 1, 0))
		errx(EXIT_FAILURE, "khttp_parse");

ksql_cfg_defaults(&cfg);
cfg.stmts.stmts = stmts;
cfg.stmts.stmtsz = 2;
cfg.roles.roles = roles;
cfg.roles.rolesz = 4;
cfg.roles.defrole = 3;

if (NULL == (r.arg = ksql_alloc_child(&cfg, NULL, NULL)))
	errx(EXIT_FAILURE, "ksql_alloc_child");

if (-1 == pledge("stdio", NULL))
	err(EXIT_FAILURE, "pledge");

if (KSQL_OK != ksql_open(r.arg, "test.db"))
	errx(EXIT_FAILURE, "ksql_open");