Hello community, here is the log from the commit of package vncmanager for openSUSE:Factory checked in at 2017-08-12 20:28:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/vncmanager (Old) and /work/SRC/openSUSE:Factory/.vncmanager.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "vncmanager" Sat Aug 12 20:28:14 2017 rev:5 rq:516143 version:1.0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/vncmanager/vncmanager.changes 2017-05-22 18:09:49.370231542 +0200 +++ /work/SRC/openSUSE:Factory/.vncmanager.new/vncmanager.changes 2017-08-12 20:28:19.322614604 +0200 @@ -1,0 +2,8 @@ +Fri Aug 11 13:03:26 UTC 2017 - [email protected] + +- U_Add-xvnc-args-configuration-option.patch, + n_disable_mit_shm.patch + * Disable MIT-SHM extension in Xvnc started by vncmanager. + (bnc#1053373) + +------------------------------------------------------------------- New: ---- U_Add-xvnc-args-configuration-option.patch n_disable_mit_shm.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ vncmanager.spec ++++++ --- /var/tmp/diff_new_pack.tVOLv7/_old 2017-08-12 20:28:20.166496310 +0200 +++ /var/tmp/diff_new_pack.tVOLv7/_new 2017-08-12 20:28:20.186493507 +0200 @@ -49,6 +49,8 @@ Source1: tmpfile.conf Patch1: n_use_port_5901.patch Patch2: n_use_with_vnc_key_wrapper.patch +Patch3: U_Add-xvnc-args-configuration-option.patch +Patch4: n_disable_mit_shm.patch %description Session manager for VNC. It listens on VNC port and spawns Xvnc processes for incoming clients. @@ -70,6 +72,8 @@ %setup %patch1 -p1 %patch2 -p1 +%patch3 -p1 +%patch4 -p1 %build %cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_VERBOSE_MAKEFILE=ON ++++++ U_Add-xvnc-args-configuration-option.patch ++++++ >From 3bd1a087aa604545f8400bcdc1df37a00d7a4aa4 Mon Sep 17 00:00:00 2001 From: Michal Srb <[email protected]> Date: Fri, 11 Aug 2017 14:58:33 +0200 Subject: [PATCH] Add xvnc-args configuration option. It allows passing additional arguments to Xvnc. --- Configuration.cpp | 20 +++++++++++++++++++- Configuration.h | 7 +++++++ Xvnc.cpp | 9 +++++++++ vncmanager.conf | 6 ++++++ 4 files changed, 41 insertions(+), 1 deletion(-) diff --git a/Configuration.cpp b/Configuration.cpp index 9d7f932..10f3f1f 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -64,6 +64,22 @@ static void validate(boost::any &v, std::vector<std::string> const &tokens, VeNC throw po::invalid_option_value("No security type configured."); } +static void validate(boost::any &v, std::vector<std::string> const &tokens, XvncArgList *target_type, int /* boost template trickery */) +{ + if (v.empty()) + v = boost::any(XvncArgList()); + + XvncArgList *p = boost::any_cast<XvncArgList>(&v); + + boost::escaped_list_separator<char> sep('\\', ' ', '\"'); + for (const std::string & token : tokens) { + boost::tokenizer<boost::escaped_list_separator<char>> tok(token, sep); + for (auto str : tok) { + p->values.push_back(str); + } + } +} + bool Configuration::parse(int argc, char *argv[], const char *config) { VeNCryptSubtypesList defaultSecurity = { VeNCryptSubtype::TLSNone, VeNCryptSubtype::X509None, VeNCryptSubtype::None }; @@ -92,7 +108,9 @@ bool Configuration::parse(int argc, char *argv[], const char *config) ("xvnc", po::value<std::string>()->default_value("/usr/bin/Xvnc"), "path to Xvnc executable") ("greeter", po::value<std::string>()->default_value("/usr/bin/vncmanager-greeter"), "path to Greeter executable") ("xauth", po::value<std::string>()->default_value("/usr/bin/xauth"), "path to xauth executable") - ("rundir", po::value<std::string>()->default_value("/run/vncmanager"), "path to run directory"); + ("rundir", po::value<std::string>()->default_value("/run/vncmanager"), "path to run directory") + + ("xvnc-args", po::value<XvncArgList>()->multitoken(), "Additional arguments that will be passed to Xvnc. Take care to not overwrite arguments set by vncmanager."); po::options_description tls("TLS"); tls.add_options() diff --git a/Configuration.h b/Configuration.h index 59cc46d..ca7d167 100644 --- a/Configuration.h +++ b/Configuration.h @@ -29,6 +29,13 @@ #include <boost/program_options.hpp> + +/// Wrapper struct to allow custom parsing +struct XvncArgList +{ + std::vector<std::string> values; +}; + class Configuration { public: diff --git a/Xvnc.cpp b/Xvnc.cpp index d8709cc..4c26c68 100644 --- a/Xvnc.cpp +++ b/Xvnc.cpp @@ -246,6 +246,15 @@ void Xvnc::execute(bool queryDisplayManager) argv.push_back("-desktop"); argv.push_back("VNC manager"); } + + XvncArgList xvnc_args; + if (!Configuration::options["xvnc-args"].empty()) { + xvnc_args = Configuration::options["xvnc-args"].as<XvncArgList>(); + } + for (auto &xvnc_arg : xvnc_args.values) { + argv.push_back(xvnc_arg.c_str()); + } + argv.push_back(nullptr); // Execute diff --git a/vncmanager.conf b/vncmanager.conf index 4b53673..33ecef9 100644 --- a/vncmanager.conf +++ b/vncmanager.conf @@ -89,3 +89,9 @@ # Default: /run/vncmanager # # rundir = /run/vncmanager + +# Additional arguments that will be passed to Xvnc. +# Take care to not overwrite arguments set by vncmanager. +# +# Default: +# xvnc-args = -- 2.12.3 ++++++ n_disable_mit_shm.patch ++++++ Index: vncmanager-1.0.1/vncmanager.conf =================================================================== --- vncmanager-1.0.1.orig/vncmanager.conf +++ vncmanager-1.0.1/vncmanager.conf @@ -89,4 +89,4 @@ port = 5901 # Take care to not overwrite arguments set by vncmanager. # # Default: -# xvnc-args = +xvnc-args = -extension MIT-SHM
