diff options
author | Michael McVady <femtonaut@gmail.com> | 2021-11-15 22:02:53 -0500 |
---|---|---|
committer | Michael McVady <femtonaut@gmail.com> | 2021-11-15 22:02:53 -0500 |
commit | ba99adb890ac823ec5505861071f03ebcb889ac1 (patch) | |
tree | 0cd074310e38390eb725d1de463e4278ac512d37 | |
parent | 40441e01b6e73a0a1d7f06377b3607f151aed65b (diff) |
Disable seccomp/add seccomp tracing
-rw-r--r-- | conf/clog.conf | 13 | ||||
-rw-r--r-- | src/clog.c | 38 |
2 files changed, 30 insertions, 21 deletions
diff --git a/conf/clog.conf b/conf/clog.conf index bc54fa9..126c3e1 100644 --- a/conf/clog.conf +++ b/conf/clog.conf @@ -8,6 +8,10 @@ load ./clog.so init tls_dhparam dh2048.pem +workers 1 + +seccomp_tracing yes + domain * { # attach notls attach tls @@ -15,6 +19,11 @@ domain * { certfile cert/server.pem certkey cert/key.pem - route / page - route /posts page + route / { + handler page + } + + route /posts { + handler page + } } @@ -31,8 +31,8 @@ int page(struct http_request *req) /* sql stuff */ struct kore_pgsql sql; - // char *name; - // int rows, i; + char *name; + int rows, i; /* req->status = HTTP_STATUS_INTERNAL_ERROR; */ @@ -55,23 +55,23 @@ int page(struct http_request *req) kore_log(1, "here!"); -// /* -// * Now we can fire off the query, once it returns we either have -// * a result on which we can operate or an error occurred. -// */ -// if (!kore_pgsql_query(&sql, "SELECT * FROM coders")) { -// kore_pgsql_logerror(&sql); -// goto out; -// } -// -// /* -// * Iterate over the result and dump it to somewhere. -// */ -// rows = kore_pgsql_ntuples(&sql); -// for (i = 0; i < rows; i++) { -// name = kore_pgsql_getvalue(&sql, i, 0); -// kore_log(LOG_NOTICE, "name: '%s'", name); -// } + /* + * Now we can fire off the query, once it returns we either have + * a result on which we can operate or an error occurred. + */ + if (!kore_pgsql_query(&sql, "SELECT * FROM entries")) { + kore_pgsql_logerror(&sql); + goto out; + } + + /* + * Iterate over the result and dump it to somewhere. + */ + rows = kore_pgsql_ntuples(&sql); + for (i = 0; i < rows; i++) { + name = kore_pgsql_getvalue(&sql, i, 0); + kore_log(LOG_NOTICE, "name: '%s'", name); + } out: ; |