xrdp: add --license option to show third party license
This commit is contained in:
parent
68555abe74
commit
740bcfde47
@ -14,6 +14,7 @@ AM_CPPFLAGS = \
|
|||||||
-I$(top_srcdir)/common \
|
-I$(top_srcdir)/common \
|
||||||
-I$(top_srcdir)/libipm \
|
-I$(top_srcdir)/libipm \
|
||||||
-I$(top_srcdir)/libxrdp \
|
-I$(top_srcdir)/libxrdp \
|
||||||
|
-I$(top_srcdir)/third_party \
|
||||||
-I$(top_srcdir)/third_party/tomlc99 \
|
-I$(top_srcdir)/third_party/tomlc99 \
|
||||||
$(IMLIB2_CFLAGS)
|
$(IMLIB2_CFLAGS)
|
||||||
|
|
||||||
|
24
xrdp/xrdp.c
24
xrdp/xrdp.c
@ -27,6 +27,7 @@
|
|||||||
#include "xrdp.h"
|
#include "xrdp.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "xrdp_configure_options.h"
|
#include "xrdp_configure_options.h"
|
||||||
|
#include "copying_third_party.h"
|
||||||
#include "string_calls.h"
|
#include "string_calls.h"
|
||||||
|
|
||||||
#if !defined(PACKAGE_VERSION)
|
#if !defined(PACKAGE_VERSION)
|
||||||
@ -35,6 +36,17 @@
|
|||||||
|
|
||||||
static struct xrdp_listen *g_listen = 0;
|
static struct xrdp_listen *g_listen = 0;
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
static void
|
||||||
|
print_license(void)
|
||||||
|
{
|
||||||
|
g_writeln("Third Party Code Additional Copyright Notices and License Terms");
|
||||||
|
g_writeln("%s", "");
|
||||||
|
g_writeln("Following third-party code are used in xrdp %s:", PACKAGE_VERSION);
|
||||||
|
g_writeln("%s", "");
|
||||||
|
g_writeln("%s", copying_third_party);
|
||||||
|
}
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
static void
|
static void
|
||||||
print_version(void)
|
print_version(void)
|
||||||
@ -68,6 +80,7 @@ print_help(void)
|
|||||||
g_writeln(" -f, --fork fork on new connection");
|
g_writeln(" -f, --fork fork on new connection");
|
||||||
g_writeln(" -c, --config specify new path to xrdp.ini");
|
g_writeln(" -c, --config specify new path to xrdp.ini");
|
||||||
g_writeln(" --dump-config display config on stdout on startup");
|
g_writeln(" --dump-config display config on stdout on startup");
|
||||||
|
g_writeln(" --license show additional license information");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
@ -208,6 +221,10 @@ xrdp_process_params(int argc, char **argv,
|
|||||||
{
|
{
|
||||||
startup_params->dump_config = 1;
|
startup_params->dump_config = 1;
|
||||||
}
|
}
|
||||||
|
else if (nocase_matches(option, "--license", NULL))
|
||||||
|
{
|
||||||
|
startup_params->license = 1;
|
||||||
|
}
|
||||||
else if (nocase_matches(option, "-c", "--config", NULL))
|
else if (nocase_matches(option, "-c", "--config", NULL))
|
||||||
{
|
{
|
||||||
index++;
|
index++;
|
||||||
@ -336,6 +353,13 @@ main(int argc, char **argv)
|
|||||||
g_exit(0);
|
g_exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (startup_params.license)
|
||||||
|
{
|
||||||
|
print_license();
|
||||||
|
g_deinit();
|
||||||
|
g_exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
if (xrdp_sanity_check() != 0)
|
if (xrdp_sanity_check() != 0)
|
||||||
{
|
{
|
||||||
g_writeln("Fatal error occurred, exiting");
|
g_writeln("Fatal error occurred, exiting");
|
||||||
|
@ -679,6 +679,7 @@ struct xrdp_startup_params
|
|||||||
int version;
|
int version;
|
||||||
int fork;
|
int fork;
|
||||||
int dump_config;
|
int dump_config;
|
||||||
|
int license;
|
||||||
int tcp_send_buffer_bytes;
|
int tcp_send_buffer_bytes;
|
||||||
int tcp_recv_buffer_bytes;
|
int tcp_recv_buffer_bytes;
|
||||||
int tcp_nodelay;
|
int tcp_nodelay;
|
||||||
|
Loading…
Reference in New Issue
Block a user