mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 00:37:00 +08:00
Use a more terse, but with more dynamic information version string.
This commit is contained in:
33
src/config.c
33
src/config.c
@@ -797,6 +797,39 @@ unsigned i;
|
||||
return;
|
||||
}
|
||||
|
||||
void print_version(tOptions *opts, tOptDesc *desc)
|
||||
{
|
||||
const char *p;
|
||||
|
||||
fputs(OCSERV_FULL_VERSION, stderr);
|
||||
fprintf(stderr, "\n\nCompiled with ");
|
||||
#ifdef HAVE_LIBSECCOMP
|
||||
fprintf(stderr, "seccomp, ");
|
||||
#endif
|
||||
#ifdef HAVE_LIBWRAP
|
||||
fprintf(stderr, "tcp-wrappers, ");
|
||||
#endif
|
||||
#ifdef HAVE_PAM
|
||||
fprintf(stderr, "PAM, ");
|
||||
#endif
|
||||
#ifdef HAVE_PKCS11
|
||||
fprintf(stderr, "PKCS#11, ");
|
||||
#endif
|
||||
#ifdef ANYCONNECT_CLIENT_COMPAT
|
||||
fprintf(stderr, "AnyConnect, ");
|
||||
#endif
|
||||
fprintf(stderr, "\n");
|
||||
|
||||
p = gnutls_check_version(NULL);
|
||||
if (strcmp(p, GNUTLS_VERSION) != 0) {
|
||||
fprintf(stderr, "GnuTLS version: %s (compiled with %s)\n", p, GNUTLS_VERSION);
|
||||
} else {
|
||||
fprintf(stderr, "GnuTLS version: %s\n", p);
|
||||
}
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void reload_cfg_file(void *pool, struct cfg_st* config)
|
||||
{
|
||||
clear_cfg_file(config);
|
||||
|
||||
@@ -12,6 +12,8 @@ short-usage = "Usage: ocserv [options] -c [config]\nocserv --help for usage in
|
||||
explain = "";
|
||||
#include version.inc
|
||||
|
||||
version-proc = "print_version";
|
||||
|
||||
detail = "Openconnect VPN server (ocserv) is a VPN server compatible with the
|
||||
openconnect VPN client. It follows the AnyConnect VPN protocol which
|
||||
is used by several CISCO routers.
|
||||
|
||||
Reference in New Issue
Block a user