[PATCH 4/4] tmp files owned by current user
Peter Hatina
phatina at redhat.com
Mon Apr 2 03:17:16 PDT 2012
---
SpiceXPI/src/plugin/plugin.cpp | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/SpiceXPI/src/plugin/plugin.cpp b/SpiceXPI/src/plugin/plugin.cpp
index 2274b63..fd2e0ed 100644
--- a/SpiceXPI/src/plugin/plugin.cpp
+++ b/SpiceXPI/src/plugin/plugin.cpp
@@ -617,7 +617,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)
--
1.7.7.6
--
Peter Hatina
EMEA ENG-Desktop Development
Red Hat Czech, Brno
More information about the Spice-devel
mailing list