From 13711966afc3e9f35488aaeda817edc237c6af89 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Tue, 14 Dec 2010 10:45:28 +0000 Subject: [PATCH] safer permissions on the user dir i#62858# --- desktop/source/app/userinstall.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/desktop/source/app/userinstall.cxx b/desktop/source/app/userinstall.cxx index 263c09e16a54..212b4939c8ee 100644 --- a/desktop/source/app/userinstall.cxx +++ b/desktop/source/app/userinstall.cxx @@ -243,6 +243,11 @@ namespace desktop { FileBase::RC rc = Directory::createPath(aUserPath); if ((rc != FileBase::E_None) && (rc != FileBase::E_EXIST)) return UserInstall::E_Creation; +#ifdef UNIX + // set safer permissions for the user directory by default + File::setAttributes(aUserPath, Attribute_OwnWrite| Attribute_OwnRead| Attribute_OwnExe); +#endif + // copy data from shared data directory of base installation for (sal_Int32 i=0; pszSrcList[i]!=NULL && pszDstList[i]!=NULL; i++) {