Hello community, here is the log from the commit of package vncmanager for openSUSE:Factory checked in at 2018-02-15 19:31:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/vncmanager (Old) and /work/SRC/openSUSE:Factory/.vncmanager.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "vncmanager" Thu Feb 15 19:31:36 2018 rev:6 rq:577032 version:1.0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/vncmanager/vncmanager.changes 2017-08-12 20:28:19.322614604 +0200 +++ /work/SRC/openSUSE:Factory/.vncmanager.new/vncmanager.changes 2018-02-15 19:31:37.358512988 +0100 @@ -1,0 +2,6 @@ +Thu Feb 15 13:42:56 UTC 2018 - msrb@suse.com + +- U_ControllerConnection-Split-iostream-into-istream-and.patch + * Do not try to seek on unix socket. (bnc#1076730) + +------------------------------------------------------------------- New: ---- U_ControllerConnection-Split-iostream-into-istream-and.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ vncmanager.spec ++++++ --- /var/tmp/diff_new_pack.B7a9PR/_old 2018-02-15 19:31:38.274480113 +0100 +++ /var/tmp/diff_new_pack.B7a9PR/_new 2018-02-15 19:31:38.278479969 +0100 @@ -1,7 +1,7 @@ # # spec file for package vncmanager # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -51,6 +51,7 @@ Patch2: n_use_with_vnc_key_wrapper.patch Patch3: U_Add-xvnc-args-configuration-option.patch Patch4: n_disable_mit_shm.patch +Patch5: U_ControllerConnection-Split-iostream-into-istream-and.patch %description Session manager for VNC. It listens on VNC port and spawns Xvnc processes for incoming clients. @@ -74,6 +75,7 @@ %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %build %cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_VERBOSE_MAKEFILE=ON ++++++ U_ControllerConnection-Split-iostream-into-istream-and.patch ++++++
From 4bef799592eab400b0e050988ff61fa21935d86c Mon Sep 17 00:00:00 2001 From: Michal Srb
Date: Thu, 15 Feb 2018 14:38:04 +0100 Subject: [PATCH] ControllerConnection: Split iostream into istream and ostream.
The boost::iostreams::file_descriptor is seekable by default, but seeking is
not possible on unix socket. Unfortunatelly there does not seem to be a way to
turn it into (non seekable) bidirectional, so lets split it into separate input
and output.
---
ControllerConnection.cpp | 24 +++++++++++++-----------
ControllerConnection.h | 7 +++++--
2 files changed, 18 insertions(+), 13 deletions(-)
diff --git a/ControllerConnection.cpp b/ControllerConnection.cpp
index 17822e6..a1b4739 100644
--- a/ControllerConnection.cpp
+++ b/ControllerConnection.cpp
@@ -38,8 +38,10 @@
ControllerConnection::ControllerConnection(XvncManager &vncManager, int fd)
: m_vncManager(vncManager)
, m_fd(fd)
- , m_controllerStreamBuffer(boost::iostreams::file_descriptor(fd, boost::iostreams::close_handle))
- , m_controllerStream(&m_controllerStreamBuffer)
+ , m_controllerStreamBufferIn(boost::iostreams::file_descriptor(fd, boost::iostreams::close_handle))
+ , m_controllerStreamBufferOut(boost::iostreams::file_descriptor(fd, boost::iostreams::never_close_handle))
+ , m_controllerStreamIn(&m_controllerStreamBufferIn)
+ , m_controllerStreamOut(&m_controllerStreamBufferOut)
{}
void ControllerConnection::start()
@@ -48,7 +50,7 @@ void ControllerConnection::start()
try {
if (initialize()) {
- while (m_controllerStream.good()) {
+ while (m_controllerStreamIn.good()) {
receive();
}
}
@@ -64,19 +66,19 @@ void ControllerConnection::start()
bool ControllerConnection::initialize()
{
int displayNumber;
- m_controllerStream >> displayNumber;
+ m_controllerStreamIn >> displayNumber;
m_xvnc = m_vncManager.getSessionByDisplayNumber(displayNumber);
if (m_xvnc) {
- m_controllerStream << "OK" << std::endl;
- m_controllerStream.flush();
+ m_controllerStreamOut << "OK" << std::endl;
+ m_controllerStreamOut.flush();
} else {
Log::notice() << "Controller " << (intptr_t)this << " asked for display number " << displayNumber << " which is not managed by vncmanager." << std::endl;
return false;
}
std::string key;
- m_controllerStream >> key;
+ m_controllerStreamIn >> key;
for (int tries = 0; ; tries++) {
if (m_xvnc->isKeyApproved(key)) {
@@ -91,8 +93,8 @@ bool ControllerConnection::initialize()
std::this_thread::sleep_for(std::chrono::milliseconds(100)); // TODO: Tune
}
- m_controllerStream << "OK" << std::endl;
- m_controllerStream.flush();
+ m_controllerStreamOut << "OK" << std::endl;
+ m_controllerStreamOut.flush();
struct ucred ucred;
socklen_t len = sizeof(struct ucred);
@@ -111,11 +113,11 @@ bool ControllerConnection::initialize()
void ControllerConnection::receive()
{
std::string cmd;
- m_controllerStream >> cmd;
+ m_controllerStreamIn >> cmd;
if (cmd == "VISIBLE") {
bool yes;
- m_controllerStream >> yes;
+ m_controllerStreamIn >> yes;
m_xvnc->markVisible(yes);
return;
}
diff --git a/ControllerConnection.h b/ControllerConnection.h
index 997c2a6..207357b 100644
--- a/ControllerConnection.h
+++ b/ControllerConnection.h
@@ -29,6 +29,7 @@
#include <memory>
+#include