diff --git a/ocserv-0.10.6-json.patch b/ocserv-0.10.6-json.patch new file mode 100644 index 0000000..4afb8ea --- /dev/null +++ b/ocserv-0.10.6-json.patch @@ -0,0 +1,29 @@ +diff --git a/src/occtl-print.c b/src/occtl-print.c +index 1441cd6..8ff297e 100644 +--- a/src/occtl-print.c ++++ b/src/occtl-print.c +@@ -47,9 +47,9 @@ int print_list_entries(FILE* out, cmd_params_st *params, const char* name, char + tmp = val[i]; + if (tmp != NULL) { + if (i==0) +- fprintf(out, "%s", tmp); ++ fprintf(out, "\"%s\"", tmp); + else +- fprintf(out, ", %s", tmp); ++ fprintf(out, ", \"%s\"", tmp); + } + } + fprintf(out, "]%s\n", have_more?",":""); +diff --git a/src/occtl-unix.c b/src/occtl-unix.c +index 6df5a1e..d6b28f3 100644 +--- a/src/occtl-unix.c ++++ b/src/occtl-unix.c +@@ -254,7 +254,7 @@ int handle_status_cmd(struct unix_ctx *ctx, const char *arg, cmd_params_st *para + print_single_value_int(stdout, params, "TLS DB entries", rep->stored_tls_sessions, 1); + print_separator(stdout, params); + print_single_value_int(stdout, params, "Server PID", rep->pid, 1); +- print_single_value_int(stdout, params, "Sec-mod PID", rep->sec_mod_pid, 1); ++ print_single_value_int(stdout, params, "Sec-mod PID", rep->sec_mod_pid, 0); + print_end_block(stdout, params, 0); + + status_rep__free_unpacked(rep, &pa); diff --git a/ocserv.spec b/ocserv.spec index 8364436..65f76d2 100644 --- a/ocserv.spec +++ b/ocserv.spec @@ -2,7 +2,7 @@ Name: ocserv Version: 0.10.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: OpenConnect SSL VPN server # For a breakdown of the licensing, see PACKAGE-LICENSING @@ -17,6 +17,7 @@ Source4: PACKAGE-LICENSING Source6: ftp://ftp.infradead.org/pub/ocserv/%{name}-%{version}.tar.xz.sig Source7: ocserv-genkey Source8: ocserv-script +Patch0: ocserv-0.10.6-json.patch # Taken from upstream: # http://git.infradead.org/ocserv.git/commitdiff/7d70006a2dbddf783213f1856374bacc74217e09 @@ -73,6 +74,8 @@ to provide the secure VPN service. %prep %setup -q +%patch0 -p1 -b .json + rm -f src/http-parser/http_parser.c src/http-parser/http_parser.h rm -rf src/protobuf/ rm -rf src/ccan/talloc @@ -156,6 +159,9 @@ rm -rf %{buildroot} %{_localstatedir}/lib/ocserv/profile.xml %changelog +* Thu Jul 9 2015 Nikos Mavrogiannopoulos - 0.10.6-2 +- corrected JSON output + * Thu Jul 2 2015 Nikos Mavrogiannopoulos - 0.10.6-1 - new upstream release (#1238499)