fdo#36733: Add useronly read permission, while creating tmpfile.

Signed-off-by: Michael Meeks <michael.meeks@novell.com>
This commit is contained in:
Michael Meeks 2011-07-11 12:05:47 +01:00
parent 53d325115e
commit de8e1d6651

View file

@ -3330,11 +3330,12 @@ sal_Bool SfxMedium::SetWritableForUserOnly( const ::rtl::OUString& aURL )
{
sal_uInt64 nAttributes = aFileStatus.getAttributes();
nAttributes &= ~(Attribute_OwnWrite |
Attribute_GrpWrite |
Attribute_OthWrite |
Attribute_ReadOnly);
nAttributes |= Attribute_OwnWrite;
nAttributes &= ~(osl_File_Attribute_OwnWrite |
osl_File_Attribute_GrpWrite |
osl_File_Attribute_OthWrite |
osl_File_Attribute_ReadOnly);
nAttributes |= (osl_File_Attribute_OwnWrite |
osl_File_Attribute_OwnRead);
bResult = ( osl::File::setAttributes( aURL, nAttributes ) == ::osl::FileBase::E_None );
}