[Spice-commits] 4 commits - SpiceXPI/src
Peter Hatina
phatina at kemper.freedesktop.org
Mon Apr 2 23:53:06 PDT 2012
SpiceXPI/src/plugin/controller.cpp | 2 ++
SpiceXPI/src/plugin/plugin.cpp | 16 +++++++++++++---
SpiceXPI/src/plugin/plugin.h | 1 -
3 files changed, 15 insertions(+), 4 deletions(-)
New commits:
commit e7712ed91bad3721f02eb5696746d2edb429db5f
Author: Peter Hatina <phatina at redhat.com>
Date: Tue Apr 3 08:47:25 2012 +0200
tmp files owned by current user
diff --git a/SpiceXPI/src/plugin/plugin.cpp b/SpiceXPI/src/plugin/plugin.cpp
index 8df91e3..3459869 100644
--- a/SpiceXPI/src/plugin/plugin.cpp
+++ b/SpiceXPI/src/plugin/plugin.cpp
@@ -641,7 +641,9 @@ void nsPluginInstance::Connect()
FILE *fp;
int fd = -1;
char trust_store_template[] = "/tmp/truststore.pem-XXXXXX";
+ mode_t prev_umask = umask(0177);
fd = mkstemp(trust_store_template);
+ umask(prev_umask);
m_trust_store_file = trust_store_template;
if (fd != -1)
commit c488472179d8c4a171968aee439a9bb2685a93df
Author: Peter Hatina <phatina at redhat.com>
Date: Tue Apr 3 08:46:58 2012 +0200
initialize nsPluginInstance
diff --git a/SpiceXPI/src/plugin/plugin.cpp b/SpiceXPI/src/plugin/plugin.cpp
index 5596609..8df91e3 100644
--- a/SpiceXPI/src/plugin/plugin.cpp
+++ b/SpiceXPI/src/plugin/plugin.cpp
@@ -185,15 +185,20 @@ void NS_DestroyPluginInstance(nsPluginInstanceBase *aPlugin)
nsPluginInstance::nsPluginInstance(NPP aInstance):
nsPluginInstanceBase(),
m_pid_controller(-1),
+ m_connected_status(-2),
m_instance(aInstance),
- m_initialized(PR_FALSE),
+ m_initialized(PR_TRUE),
+ m_window(NULL),
+ m_fullscreen(PR_FALSE),
+ m_smartcard(PR_FALSE),
+ m_admin_console(PR_FALSE),
+ m_no_taskmgr_execution(PR_FALSE),
+ m_send_ctrlaltdel(PR_TRUE),
m_scriptable_peer(NULL)
{
// create temporary directory in /tmp
char tmp_dir[] = "/tmp/spicec-XXXXXX";
m_tmp_dir = mkdtemp(tmp_dir);
-
- m_connected_status = -2;
}
nsPluginInstance::~nsPluginInstance()
@@ -225,6 +230,9 @@ NPBool nsPluginInstance::init(NPWindow *aWindow)
m_dynamic_menu.clear();
m_number_of_monitors.clear();
m_guest_host_name.clear();
+ m_hot_keys.clear();
+ m_language.clear();
+ m_trust_store_file.clear();
m_color_depth.clear();
m_disable_effects.clear();
commit 7642bb5bac11cb13fa69fc09e246389de0ce31c0
Author: Peter Hatina <phatina at redhat.com>
Date: Tue Apr 3 08:41:42 2012 +0200
check string length before calling strcpy
diff --git a/SpiceXPI/src/plugin/controller.cpp b/SpiceXPI/src/plugin/controller.cpp
index 23c853b..4c6ce9f 100644
--- a/SpiceXPI/src/plugin/controller.cpp
+++ b/SpiceXPI/src/plugin/controller.cpp
@@ -96,6 +96,8 @@ int SpiceController::Connect()
struct sockaddr_un remote;
remote.sun_family = AF_UNIX;
+ if (m_name.length() + 1 > sizeof(remote.sun_path))
+ return -1;
strcpy(remote.sun_path, m_name.c_str());
int rc = connect(m_client_socket, (struct sockaddr *) &remote, strlen(remote.sun_path) + sizeof(remote.sun_family));
commit 3998d44bd1305c4c784e7d2529954f6ccbb96986
Author: Peter Hatina <phatina at redhat.com>
Date: Tue Apr 3 08:41:05 2012 +0200
remove unused class member
diff --git a/SpiceXPI/src/plugin/plugin.h b/SpiceXPI/src/plugin/plugin.h
index acba031..8b3725d 100644
--- a/SpiceXPI/src/plugin/plugin.h
+++ b/SpiceXPI/src/plugin/plugin.h
@@ -190,7 +190,6 @@ private:
NPBool m_initialized;
NPWindow *m_window;
- PRBool m_fIPC;
std::string m_host_ip;
std::string m_port;
std::string m_password;
More information about the Spice-commits
mailing list