summaryrefslogtreecommitdiff
path: root/unotools/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-05-19 11:44:24 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2014-08-20 09:40:50 +0200
commit7fb510c36f4978b8c125f85618664d170db6a981 (patch)
tree972d7da1d883d69e3011f3f98ca10f73daf8cb08 /unotools/source
parent6f4c230912801f7cbddf27fce263219975dacdf8 (diff)
fdo#60338: Add osl_File_OpenFlag_Private to avoid umask
(cherry picked from commit f67702e709a9049042fdd456d2456d35055a935d) Conflicts: unotools/source/ucbhelper/tempfile.cxx Change-Id: I293295244d1b089d747548c5025cb73b8ec428a4
Diffstat (limited to 'unotools/source')
-rw-r--r--unotools/source/ucbhelper/tempfile.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx
index 074c21de7df9..ee8066cd4b68 100644
--- a/unotools/source/ucbhelper/tempfile.cxx
+++ b/unotools/source/ucbhelper/tempfile.cxx
@@ -27,6 +27,8 @@
#include <ucbhelper/fileidentifierconverter.hxx>
#include <rtl/ustring.hxx>
#include <rtl/instance.hxx>
+#include <osl/file.h>
+#include <osl/detail/file.h>
#include <osl/file.hxx>
#include <tools/time.hxx>
#include <tools/debug.hxx>
@@ -274,14 +276,8 @@ void lcl_createName(TempFile_Impl& _rImpl,const String& rLeadingChars,sal_Bool _
else
{
File aFile( aTmp );
-#ifdef UNX
-/* RW permission for the user only! */
- mode_t old_mode = umask(077);
-#endif
- FileBase::RC err = aFile.open(osl_File_OpenFlag_Create);
-#ifdef UNX
-umask(old_mode);
-#endif
+ FileBase::RC err = aFile.open(
+ osl_File_OpenFlag_Create | osl_File_OpenFlag_Private);
if ( err == FileBase::E_None || err == FileBase::E_NOLCK )
{
_rImpl.aName = aTmp;